diff --git a/yearn/apy/staking_rewards.py b/yearn/apy/staking_rewards.py index 812b1975c..de51ee2c8 100644 --- a/yearn/apy/staking_rewards.py +++ b/yearn/apy/staking_rewards.py @@ -13,12 +13,11 @@ async def get_staking_rewards_apr(vault, samples: ApySamples): if not vault or isinstance(vault, VaultV1): return 0 - staking_pools = await vault.registry.staking_pools vault_address = str(vault.vault) - if vault_address not in staking_pools: + if vault_address not in vault.registry.staking_pools: return 0 - staking_pool = await Contract.coroutine(staking_pools[vault_address]) + staking_pool = await Contract.coroutine(vault.registry.staking_pools[vault_address]) if await staking_pool.periodFinish.coroutine() < now: return 0