From be8c8bf019a520c19d8e3ad8f5915b2e8e58c21d Mon Sep 17 00:00:00 2001 From: tim Date: Mon, 10 Mar 2025 14:31:55 -0400 Subject: [PATCH] order pprint touchup --- src/dexorder/order/orderstate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dexorder/order/orderstate.py b/src/dexorder/order/orderstate.py index 803f022..b913854 100644 --- a/src/dexorder/order/orderstate.py +++ b/src/dexorder/order/orderstate.py @@ -308,7 +308,11 @@ class Order: ''' for i in range(len(self.order.tranches)): tranche = self.order.tranches[i] - msg += f' {tranche} filled {await adjust_decimals(amount_token, self.tranche_filled(i))}\n' + msg += f' {tranche}' + filled_amount = self.tranche_filled(i) + if filled_amount: + msg += f' filled {await adjust_decimals(amount_token, filled_amount)}' + msg += '\n' return msg # ORDER STATE