Skip to content

Commit

Permalink
Fix a couple type errors introduced in batching.
Browse files Browse the repository at this point in the history
  • Loading branch information
dowlandaiello committed Jul 24, 2024
1 parent e923318 commit 429f91d
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/strategies/naive.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,19 @@ async def eval_route(
# Ensure that there is at least 5k of the base chain denom
# at all times
if ctx.cli_args["base_denom"] == "untrn":
gas_base_denom += sum(
(
gas_base_denom += int(
sum(
(
sum((leg.backend.swap_fee for leg in legs)) * GAS_DISCOUNT_BATCHED
if len(legs) > 1
else sum((leg.backend.swap_fee for leg in legs))
(
sum((leg.backend.swap_fee for leg in legs))
* GAS_DISCOUNT_BATCHED
if len(list(legs)) > 1
else sum((leg.backend.swap_fee for leg in legs))
)
for (_, legs) in groupby(
route, key=lambda elem: elem.backend.chain_id
)
)
for legs in groupby(route, key=lambda elem: elem.backend.chain_id)
)
)

Expand Down

0 comments on commit 429f91d

Please sign in to comment.