Skip to content

Commit

Permalink
Fixes edge cases where APY is not available for inactive validator (M…
Browse files Browse the repository at this point in the history
…ystenLabs#11734)

## Description 
Fixes edge cases where wallet APY is not available for inactive
validator
  • Loading branch information
Jibz-Mysten authored May 4, 2023
1 parent ba31e37 commit b942321
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/wallet/src/ui/app/shared/delegated-apy/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function DelegatedAPY({ stakedValidators }: DelegatedAPYProps) {
let stakedAPYs = 0;

stakedValidators.forEach((validatorAddress) => {
stakedAPYs += rollingAverageApys?.[validatorAddress].apy || 0;
stakedAPYs += rollingAverageApys?.[validatorAddress]?.apy || 0;
});

const averageAPY = stakedAPYs / stakedValidators.length;
Expand Down

0 comments on commit b942321

Please sign in to comment.