From b1b3f42a62c0c3fea7013c77a966284fb3c0fbb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rui=20Sim=C3=A3o?= Date: Wed, 27 Sep 2023 10:42:58 +0100 Subject: [PATCH] fix: limit --- src/pages/Staking/components/StakingForm/StakingForm.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/Staking/components/StakingForm/StakingForm.tsx b/src/pages/Staking/components/StakingForm/StakingForm.tsx index 526cd7372..5d702154f 100644 --- a/src/pages/Staking/components/StakingForm/StakingForm.tsx +++ b/src/pages/Staking/components/StakingForm/StakingForm.tsx @@ -63,8 +63,9 @@ const StakingForm = ({ accountData, networkData, onStaking, ...props }: StakingF const hasStake = !!accountData; const governanceBalance = getAvailableBalance(GOVERNANCE_TOKEN.ticker) || newMonetaryAmount(0, GOVERNANCE_TOKEN); - const inputBalance = - accountData?.limit && governanceBalance && pickSmallerAmount(governanceBalance, accountData.limit); + const inputBalance = accountData?.limit + ? governanceBalance && pickSmallerAmount(governanceBalance, accountData.limit) + : governanceBalance; const getTransactionArgs = useCallback( async (values: StakingFormData) => {