Skip to content

Commit

Permalink
fix: staking rewards apy KeyError (#590)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Sep 5, 2023
1 parent df8ccfd commit 555fbaf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion yearn/apy/staking_rewards.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ async def get_staking_rewards_apr(vault, samples: ApySamples):
if await staking_pool.periodFinish.coroutine() < now:
return 0

rewards_vault = vault.registry._vaults[await staking_pool.rewardsToken.coroutine()]
vaults = await vault.registry.vaults
rewards_vault = vaults[await staking_pool.rewardsToken.coroutine()]
(
reward_rate,
rewards_vault_scale,
Expand Down

0 comments on commit 555fbaf

Please sign in to comment.