From 090d1ba524c1baf112f55b3f610655f2d5d0866c Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 16 Jan 2023 16:40:22 -0500 Subject: [PATCH] `kraken`: catch value error not index on missing `src_fiat` in pair --- piker/brokers/kraken/broker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/piker/brokers/kraken/broker.py b/piker/brokers/kraken/broker.py index 6432ee57..b33050ff 100644 --- a/piker/brokers/kraken/broker.py +++ b/piker/brokers/kraken/broker.py @@ -509,7 +509,9 @@ async def trades_dialogue( for bsuid in table.pps: try: dst_name_start = bsuid.rindex(src_fiat) - except IndexError: + except ( + ValueError, # substr not found + ): # TODO: handle nested positions..(i.e. # positions where the src fiat was used to # buy some other dst which was furhter used