Skip to content

Commit

Permalink
Order.symbol is a str..
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Jan 13, 2023
1 parent b0a8728 commit f5f476f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions piker/ui/order_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Dialog(Struct):
# TODO: use ``pydantic.UUID4`` field
uuid: str
order: Order
symbol: Symbol
symbol: str
lines: list[LevelLine]
last_status_close: Callable = lambda: None
msgs: dict[str, dict] = {}
Expand Down Expand Up @@ -379,7 +379,7 @@ def submit_order(
dialog = Dialog(
uuid=order.oid,
order=order,
symbol=order.symbol,
symbol=order.symbol, # XXX: always a str?
lines=lines,
last_status_close=self.multistatus.open_status(
f'submitting {order.exec_mode}-{order.action}',
Expand Down Expand Up @@ -964,8 +964,9 @@ async def process_trade_msg(
oid = msg.oid
dialog: Dialog = mode.dialogs.get(oid)

fqsn = dialog.symbol.front_fqsn()
flume = mode.feed.flumes[fqsn]
if dialog:
fqsn = dialog.symbol
flume = mode.feed.flumes[fqsn]

match msg:
case Status(
Expand Down

0 comments on commit f5f476f

Please sign in to comment.