diff --git a/y/prices/dex/balancer/v2.py b/y/prices/dex/balancer/v2.py index 221adaa65..831332c3c 100644 --- a/y/prices/dex/balancer/v2.py +++ b/y/prices/dex/balancer/v2.py @@ -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