Skip to content

Commit

Permalink
fix: balancer v2 tokens case when all are precached (#836)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Dec 1, 2024
1 parent 8b645e1 commit 50a034c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions y/prices/dex/balancer/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,12 @@ async def pools_for_token(
# start the task now, we can await it later
tasks[pool]

async for pool, tokens in tasks.map(pop=True):
if token in tokens:
if debug_logs:
logger._log(DEBUG, "%s contains %s", (pool, token))
yield pool
if tasks:
async for pool, tokens in tasks.map(pop=True):
if token in tokens:
if debug_logs:
logger._log(DEBUG, "%s contains %s", (pool, token))
yield pool

@a_sync_ttl_cache
@stuck_coro_debugger
Expand Down

0 comments on commit 50a034c

Please sign in to comment.