From 72d7e426a6c509f21f7bf8174536eb740f7e7101 Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Tue, 16 Nov 2021 10:08:22 +0100 Subject: [PATCH] explorer: fix stake account activating state (#21294) --- explorer/src/components/account/StakeAccountSection.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/explorer/src/components/account/StakeAccountSection.tsx b/explorer/src/components/account/StakeAccountSection.tsx index 416a86ad8..548f1ce01 100644 --- a/explorer/src/components/account/StakeAccountSection.tsx +++ b/explorer/src/components/account/StakeAccountSection.tsx @@ -296,5 +296,11 @@ function isFullyInactivated( return false; } - return stake.delegation.stake.toString() === activation.inactive.toString(); + const delegatedStake = stake.delegation.stake.toNumber(); + const inactiveStake = activation.inactive; + + return ( + !stake.delegation.deactivationEpoch.eq(MAX_EPOCH) && + delegatedStake === inactiveStake + ); }