fix error/None

This commit is contained in:
Taarush Vemulapalli 2021-12-22 10:17:12 -05:00
parent b59daa8269
commit 55e1736a51

View File

@ -52,16 +52,17 @@ def _get_arbitrages_from_swaps(swaps: List[Swap]) -> List[Arbitrage]:
]
routes = _get_all_routes(start, end, potential_intermediate_swaps)
error = ""
for swap in swaps:
if swap.error is not None:
error = swap.error
error = None
for route in routes:
start_amount = route[0].token_in_amount
end_amount = route[-1].token_out_amount
profit_amount = end_amount - start_amount
for swap in route:
if swap.error is not None:
error = swap.error
arb = Arbitrage(
swaps=route,
block_number=route[0].block_number,