From b599dff24d0d003dc5a29a6c84ec5c3ec1d4c2bb Mon Sep 17 00:00:00 2001 From: Gui Heise Date: Tue, 18 Jan 2022 14:39:27 -0500 Subject: [PATCH] replace value with repay input and init received to None --- mev_inspect/classifiers/specs/compound.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mev_inspect/classifiers/specs/compound.py b/mev_inspect/classifiers/specs/compound.py index 76271ac..33e9e05 100644 --- a/mev_inspect/classifiers/specs/compound.py +++ b/mev_inspect/classifiers/specs/compound.py @@ -24,9 +24,9 @@ class CompoundLiquidationClassifier(LiquidationClassifier): liquidator = liquidation_trace.from_address liquidated = liquidation_trace.inputs["borrower"] debt_token_address = liquidation_trace.to_address - debt_purchase_amount = liquidation_trace.value + debt_purchase_amount = liquidation_trace.inputs["repayAmount"] received_token_address = liquidation_trace.inputs["cTokenCollateral"] - received_amount = 0 + received_amount = None debt_transfer = _get_debt_transfer(liquidator, child_transfers) @@ -45,7 +45,7 @@ class CompoundLiquidationClassifier(LiquidationClassifier): elif seize_trace is not None and seize_trace.inputs is not None: received_amount = seize_trace.inputs["seizeTokens"] - if received_amount == 0: + if received_amount is None: return None return Liquidation(