From 96242d7f683f3baa91331d629978783c29f11852 Mon Sep 17 00:00:00 2001 From: BobTheBuidler Date: Wed, 6 Sep 2023 02:34:00 +0000 Subject: [PATCH] Revert "fix: adapt staking pools to async events pr (#588)" This reverts commit 3b6eab67138cfebca52e677005078320a76a90ab. --- yearn/apy/staking_rewards.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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