Not all accounts will have API trade transactions this session..
parent
e348968113
commit
0a959c1c74
|
@ -575,17 +575,18 @@ async def trades_dialogue(
|
||||||
# if new trades are detected from the API, prepare
|
# if new trades are detected from the API, prepare
|
||||||
# them for the ledger file and update the pptable.
|
# them for the ledger file and update the pptable.
|
||||||
if api_to_ledger_entries:
|
if api_to_ledger_entries:
|
||||||
trade_entries = api_to_ledger_entries[acctid]
|
trade_entries = api_to_ledger_entries.get(acctid)
|
||||||
|
|
||||||
# write ledger with all new trades **AFTER**
|
if trade_entries:
|
||||||
# we've updated the `pps.toml` from the
|
# write ledger with all new trades **AFTER**
|
||||||
# original ledger state! (i.e. this is
|
# we've updated the `pps.toml` from the
|
||||||
# currently done on exit)
|
# original ledger state! (i.e. this is
|
||||||
ledger.update(trade_entries)
|
# currently done on exit)
|
||||||
|
ledger.update(trade_entries)
|
||||||
|
|
||||||
trans = trans_by_acct.get(acctid)
|
trans = trans_by_acct.get(acctid)
|
||||||
if trans:
|
if trans:
|
||||||
table.update_from_trans(trans)
|
table.update_from_trans(trans)
|
||||||
|
|
||||||
# XXX: not sure exactly why it wouldn't be in
|
# XXX: not sure exactly why it wouldn't be in
|
||||||
# the updated output (maybe this is a bug?) but
|
# the updated output (maybe this is a bug?) but
|
||||||
|
|
Loading…
Reference in New Issue