From 911aa5bad32449f36ca937504ae6cf2d873a931e Mon Sep 17 00:00:00 2001 From: Josh Date: Wed, 23 Mar 2022 09:34:43 -0700 Subject: [PATCH] fix(explorer): can't convert too large of stake to number (#23876) --- explorer/src/components/account/StakeAccountSection.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/explorer/src/components/account/StakeAccountSection.tsx b/explorer/src/components/account/StakeAccountSection.tsx index 4f653550861677..49385820a2febc 100644 --- a/explorer/src/components/account/StakeAccountSection.tsx +++ b/explorer/src/components/account/StakeAccountSection.tsx @@ -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) ); }