Skip to content

Commit

Permalink
Update the submit form function for staking
Browse files Browse the repository at this point in the history
  • Loading branch information
kkosiorowska committed Jan 8, 2024
1 parent acda15a commit 9eba84c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dapp/src/components/Modals/Staking/StakeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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],
)
Expand Down

0 comments on commit 9eba84c

Please sign in to comment.