From 0950f9f78ce22ced9aa3ab431de61d4fd39f405c Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 2 Oct 2020 09:54:02 +0200 Subject: [PATCH] Don't show countdown on fully vested (#3809) --- packages/react-components/src/AddressInfo.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/react-components/src/AddressInfo.tsx b/packages/react-components/src/AddressInfo.tsx index 203fb62aa0..da243894de 100644 --- a/packages/react-components/src/AddressInfo.tsx +++ b/packages/react-components/src/AddressInfo.tsx @@ -272,10 +272,14 @@ function renderBalances (props: Props, allAccounts: string[], bestNumber: BlockN
{formatBalance(balancesAll.vestedClaimable, { forceUnit: '-' })}
{t('available to be unlocked')}
- -
{t('until block')} {formatNumber(balancesAll.vestingEndBlock)}
- {formatBalance(balancesAll.vestingPerBlock)} -
{t('per block')}
+ {bestNumber.lt(balancesAll.vestingEndBlock) && ( + <> + +
{t('until block')} {formatNumber(balancesAll.vestingEndBlock)}
+ {formatBalance(balancesAll.vestingPerBlock)} +
{t('per block')}
+ + )}
} trigger={`${address}-vested-trigger`}