Skip to content

Commit

Permalink
fix: balancer v2 deepest_pool_for gt mixup (#587)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Apr 22, 2024
1 parent 295ba2f commit 332bf18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion y/prices/dex/balancer/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ async def deepest_pool_for(self, token_address: Address, block: Optional[Block]
deepest_pools = {vault.address: deepest_pool for vault, deepest_pool in zip(self.vaults, deepest_pools) if deepest_pool is not None}
if not deepest_pools:
return None
deepest_pool_balance = max(deepest_pools.values())
deepest_pool_balance = max(dp[1] for dp in deepest_pools.values())
for pool_address, pool_balance in deepest_pools.values():
if pool_balance == deepest_pool_balance and pool_address:
return BalancerV2Pool(pool_address, asynchronous=self.asynchronous)
Expand Down

0 comments on commit 332bf18

Please sign in to comment.