Adjust payback function name and migratiop drop to column
This commit is contained in:
parent
ccd17c5585
commit
4c203da24e
@ -24,4 +24,4 @@ def upgrade():
|
|||||||
|
|
||||||
|
|
||||||
def downgrade():
|
def downgrade():
|
||||||
op.drop_table("liquidations")
|
op.drop_column("liquidations", "received_token_address")
|
||||||
|
@ -52,9 +52,10 @@ def get_aave_liquidations(
|
|||||||
trace.transaction_hash, trace.trace_address, traces
|
trace.transaction_hash, trace.trace_address, traces
|
||||||
)
|
)
|
||||||
|
|
||||||
received_amount, received_token_address = _get_liquidator_payback(
|
(
|
||||||
trace, child_traces, liquidator
|
received_amount,
|
||||||
)
|
received_token_address,
|
||||||
|
) = _get_payback_amount_and_token_address(trace, child_traces, liquidator)
|
||||||
|
|
||||||
liquidations.append(
|
liquidations.append(
|
||||||
Liquidation(
|
Liquidation(
|
||||||
@ -75,7 +76,7 @@ def get_aave_liquidations(
|
|||||||
return liquidations
|
return liquidations
|
||||||
|
|
||||||
|
|
||||||
def _get_liquidator_payback(
|
def _get_payback_amount_and_token_address(
|
||||||
liquidation: DecodedCallTrace, child_traces: List[ClassifiedTrace], liquidator: str
|
liquidation: DecodedCallTrace, child_traces: List[ClassifiedTrace], liquidator: str
|
||||||
) -> Tuple[int, str]:
|
) -> Tuple[int, str]:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user