From df08a894cc22372ef8037ce84ef426fd40b7fc8f Mon Sep 17 00:00:00 2001 From: fmtabbara Date: Fri, 23 Jul 2021 14:34:17 +0100 Subject: [PATCH] only display alert when stakeValue is loaded --- wallet-web/components/delegation-check/DelegationCheck.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wallet-web/components/delegation-check/DelegationCheck.tsx b/wallet-web/components/delegation-check/DelegationCheck.tsx index 135724d89d..db590eb710 100644 --- a/wallet-web/components/delegation-check/DelegationCheck.tsx +++ b/wallet-web/components/delegation-check/DelegationCheck.tsx @@ -21,7 +21,7 @@ const DelegationCheck = () => { const [checkError, setCheckError] = React.useState(null) const [nodeType, setNodeType] = React.useState(NodeType.Mixnode) - const [stakeValue, setStakeValue] = React.useState('0') + const [stakeValue, setStakeValue] = React.useState() const [nodeIdentity, setNodeIdentity] = React.useState('') useEffect(() => { @@ -75,13 +75,14 @@ const DelegationCheck = () => { } const getDelegationCheckContent = () => { + console.log(isLoading) // we're not signed in if (client === null) { return } // we haven't clicked delegate button yet - if (!isLoading) { + if (!isLoading && !stakeValue) { return ( <>