From 6f6971af680b4fc88028559ce1047f450819af35 Mon Sep 17 00:00:00 2001 From: cpl121 <100352899+cpl121@users.noreply.github.com> Date: Mon, 11 Nov 2024 18:36:47 +0100 Subject: [PATCH] fix(wallet): show insufficient remaining funds warning logic (#3910) * fix(wallet): shouldShowInsufficientRemainingFundsWarning logic * fix: clean debris --------- Co-authored-by: Bran <52735957+brancoder@users.noreply.github.com> Co-authored-by: Marc Espin --- apps/wallet/src/ui/app/staking/stake/StakeForm.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/wallet/src/ui/app/staking/stake/StakeForm.tsx b/apps/wallet/src/ui/app/staking/stake/StakeForm.tsx index be49fc823e5..19e6617977e 100644 --- a/apps/wallet/src/ui/app/staking/stake/StakeForm.tsx +++ b/apps/wallet/src/ui/app/staking/stake/StakeForm.tsx @@ -67,8 +67,6 @@ function StakeForm({ validatorAddress, coinBalance, coinType, epoch }: StakeFrom const hasEnoughRemaingBalance = maxTokenBalance > parseAmount(values.amount, decimals) + BigInt(2) * gasBudget; - const shouldShowInsufficientRemainingFundsWarning = - maxTokenFormatted >= values.amount && !hasEnoughRemaingBalance; return (
- {shouldShowInsufficientRemainingFundsWarning ? ( + {!hasEnoughRemaingBalance ? (