Skip to content

Commit

Permalink
fix(explorer): can't convert too large of stake to number (#23876)
Browse files Browse the repository at this point in the history
  • Loading branch information
oJshua authored Mar 23, 2022
1 parent 5541a58 commit 911aa5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions explorer/src/components/account/StakeAccountSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,11 @@ function isFullyInactivated(
return false;
}

const delegatedStake = stake.delegation.stake.toNumber();
const inactiveStake = activation.inactive;
const delegatedStake = stake.delegation.stake;
const inactiveStake = new BN(activation.inactive);

return (
!stake.delegation.deactivationEpoch.eq(MAX_EPOCH) &&
delegatedStake === inactiveStake
delegatedStake.eq(inactiveStake)
);
}

1 comment on commit 911aa5b

@denispalab
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for explorer ready!

✅ Preview
https://explorer-c3fnduuxw-solana-labs.vercel.app

Built with commit 911aa5b.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.