From 56f736e7ca02776571ba67dee803362037d8acd6 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 15 Mar 2023 11:43:04 -0400 Subject: [PATCH] Drop use of `Symbol.brokers` everywhere --- piker/data/feed.py | 2 +- piker/ui/_display.py | 2 +- piker/ui/order_mode.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/piker/data/feed.py b/piker/data/feed.py index 5e1a1aec..530bed92 100644 --- a/piker/data/feed.py +++ b/piker/data/feed.py @@ -1635,7 +1635,7 @@ async def open_feed( # apply `brokerd`-common steam to each flume # tracking a symbol from that provider. for fqsn, flume in feed.flumes.items(): - if brokermod.name in flume.symbol.brokers: + if brokermod.name == flume.symbol.broker: flume.stream = stream assert len(feed.mods) == len(feed.portals) == len(feed.streams) diff --git a/piker/ui/_display.py b/piker/ui/_display.py index 3da33809..a6f8e6c2 100644 --- a/piker/ui/_display.py +++ b/piker/ui/_display.py @@ -1288,7 +1288,7 @@ async def display_symbol_data( hist_ohlcv: ShmArray = flume.hist_shm symbol = flume.symbol - brokername = symbol.brokers[0] + brokername = symbol.broker fqsn = symbol.fqsn hist_chart = hist_linked.plot_ohlc_main( diff --git a/piker/ui/order_mode.py b/piker/ui/order_mode.py index ab89798b..43598d9b 100644 --- a/piker/ui/order_mode.py +++ b/piker/ui/order_mode.py @@ -292,7 +292,7 @@ class OrderMode: account=self.current_pp.alloc.account, size=0, symbol=symbol, - brokers=symbol.brokers, + brokers=[symbol.broker], oid='', # filled in on submit exec_mode=trigger_type, # dark or live ) @@ -709,7 +709,7 @@ async def open_order_mode( # load account names from ``brokers.toml`` accounts_def = config.load_accounts( - providers=symbol.brokers + providers=[symbol.broker], ) # XXX: ``brokerd`` delivers a set of account names that it