Skip to content

Commit

Permalink
Revert "fix: adapt staking pools to async events pr (#588)"
Browse files Browse the repository at this point in the history
This reverts commit 3b6eab6.
  • Loading branch information
BobTheBuidler committed Sep 6, 2023
1 parent 5557c33 commit 96242d7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions yearn/apy/staking_rewards.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 96242d7

Please sign in to comment.