From 64f920d7e5a2588bbdcb6e62b6ad22f3cd81fbf7 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 19 Jul 2022 08:59:09 -0400 Subject: [PATCH] Accept direct fqsn matches on position msg updates --- piker/ui/order_mode.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/piker/ui/order_mode.py b/piker/ui/order_mode.py index d7db1bee..41078e05 100644 --- a/piker/ui/order_mode.py +++ b/piker/ui/order_mode.py @@ -794,15 +794,11 @@ async def process_trades_and_update_ui( pp_msg_symbol = msg['symbol'].lower() fqsn = sym.front_fqsn() broker, key = sym.front_feed() - # print( - # f'pp msg symbol: {pp_msg_symbol}\n', - # f'fqsn: {fqsn}\n', - # f'front key: {key}\n', - # ) - if ( - pp_msg_symbol == fqsn.replace(f'.{broker}', '') + pp_msg_symbol == fqsn + or pp_msg_symbol == fqsn.removesuffix(f'.{broker}') ): + log.info(f'{fqsn} matched pp msg: {fmsg}') tracker = mode.trackers[msg['account']] tracker.live_pp.update_from_msg(msg) # update order pane widgets