Lol, drop unintented accound name key layer from ledger ledger

ib_native_data_hack
Tyler Goodlet 2022-07-21 15:23:47 -04:00
parent f26c399ad3
commit ad458e3fcd
1 changed files with 3 additions and 10 deletions

View File

@ -306,7 +306,6 @@ async def update_ledger_from_api_trades(
conf['accounts'].inverse, conf['accounts'].inverse,
trade_entries, trade_entries,
) )
# normalize recent session's trades to the `Transaction` type # normalize recent session's trades to the `Transaction` type
trans_by_acct: dict[str, dict[str, Transaction]] = {} trans_by_acct: dict[str, dict[str, Transaction]] = {}
@ -519,16 +518,10 @@ async def trades_dialogue(
trades, trades,
proxy, proxy,
) )
acctid = acctid.strip('ib.')
ledgers[acctid].update(ready_for_ledger_entries)
# WTF, yet again this key error is getting ignored?!?! acctid = account.strip('ib.')
# tables[acctid].update_from_trans(trans_by_acct[account]) ledger = ledgers[acctid]
ledger.update(ready_for_ledger_entries[acctid])
# this causes a hang..
# - marketstored tries to kill container, cant,
# - ctrl-c makes pikerd get stuck...
# assert 0
trans = trans_by_acct.get(acctid) trans = trans_by_acct.get(acctid)
if trans: if trans: