fixed bug when multi convert has perfect multiples of max iterations

This commit is contained in:
Alexander 2024-07-27 08:27:19 -04:00
parent 3b2237f048
commit ecdeac0274

View file

@ -252,7 +252,7 @@ def convert_tokens_multi(account, multi_address, token0_address, token1_address,
if get_beacon_gas_prices('rapid', beacon_gasnow_cache_seconds) > rapid_gas_fee_limit: if get_beacon_gas_prices('rapid', beacon_gasnow_cache_seconds) > rapid_gas_fee_limit:
logging.warning("Gas fees are too high") logging.warning("Gas fees are too high")
return None return None
if i + 1 < loops or iterations == routes_functions[multi_address]['max_iterations']: if i + 1 < loops or iterations % routes_functions[multi_address]['max_iterations'] == 0:
# do max iterations during loop # do max iterations during loop
call_iterations = routes_functions[multi_address]['max_iterations'] call_iterations = routes_functions[multi_address]['max_iterations']
else: else: