Skip to content

Commit e66611c

Browse files
committed
chore: fix 2 minor potential bugs
1 parent c5a95dc commit e66611c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

freqtrade/rpc/rpc.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def _rpc_status_table(
301301
# Format profit as a string with the right sign
302302
profit = f"{trade['profit_ratio']:.2%}"
303303
fiat_profit = trade.get("profit_fiat", None)
304-
if isnan(fiat_profit):
304+
if fiat_profit is None or isnan(fiat_profit):
305305
fiat_profit: float = trade.get("profit_abs", 0.0)
306306
if not isnan(fiat_profit):
307307
profit += f" ({fiat_profit:.2f})"
@@ -314,11 +314,9 @@ def _rpc_status_table(
314314
orders = trade.get("orders", [])
315315
if orders:
316316
active_order_side = ".".join(
317-
"*"
318-
if (o.get("ft_is_open") and o.get("ft_order_side") == trade.get("entry_side"))
319-
else "**"
317+
"*" if (o.get("is_open") and o.get("ft_is_entry")) else "**"
320318
for o in orders
321-
if o.get("ft_is_open")
319+
if o.get("is_open")
322320
)
323321

324322
# Direction string for non-spot

0 commit comments

Comments
 (0)