From ce851a66de9babf4d5fa27e9629d592f0f84a933 Mon Sep 17 00:00:00 2001 From: Adamantios Date: Thu, 20 Jun 2024 15:43:58 +0300 Subject: [PATCH] fix: also account for the redeemed invalid markets --- trades.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/trades.py b/trades.py index 80585a72..0005f4ab 100644 --- a/trades.py +++ b/trades.py @@ -720,6 +720,15 @@ def parse_user( # pylint: disable=too-many-locals,too-many-statements earnings = collateral_amount output += " Final answer: Market has been declared invalid.\n" output += f" Earnings: {wei_to_xdai(earnings)}\n" + redeemed = _is_redeemed(user_json, fpmmTrade) + if redeemed: + statistics_table[MarketAttribute.NUM_REDEEMED][ + market_status + ] += 1 + statistics_table[MarketAttribute.REDEMPTIONS][ + market_status + ] += earnings + elif outcome_index == current_answer: earnings = outcomes_tokens_traded output += f" Final answer: {fpmm['outcomes'][current_answer]!r} - Congrats! The trade was for the winner answer.\n"