From 9eba84c6495ee9da16cc08cb7325298930832874 Mon Sep 17 00:00:00 2001 From: Karolina Kosiorowska Date: Mon, 8 Jan 2024 16:31:04 +0100 Subject: [PATCH] Update the submit form function for staking --- dapp/src/components/Modals/Staking/StakeForm.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dapp/src/components/Modals/Staking/StakeForm.tsx b/dapp/src/components/Modals/Staking/StakeForm.tsx index 4055fedb5..c5e6af4f9 100644 --- a/dapp/src/components/Modals/Staking/StakeForm.tsx +++ b/dapp/src/components/Modals/Staking/StakeForm.tsx @@ -20,10 +20,10 @@ function StakeForm({ goNext }: ModalStep) { const handleSubmitForm = useCallback( (values: TokenAmountFormValues) => { - if (values.amount) { - seTokenAmount({ amount: values.amount, currencyType: CURRENCY_TYPE }) - goNext() - } + if (!values.amount) return + + seTokenAmount({ amount: values.amount, currencyType: CURRENCY_TYPE }) + goNext() }, [goNext, seTokenAmount], )