Skip to content

Commit

Permalink
chore: merge branch 'dev' into feat/add-waterdrip-capital
Browse files Browse the repository at this point in the history
  • Loading branch information
Polybius93 committed Oct 22, 2024
2 parents a427ef1 + 3a332f4 commit edc8236
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { BitcoinTransactionConfirmationsContext } from '@providers/bitcoin-query
import { BitcoinWalletContextState } from '@providers/bitcoin-wallet-context-provider';
import { useForm } from '@tanstack/react-form';
import Decimal from 'decimal.js';
import { isEmpty } from 'ramda';

import { TransactionFormNavigateButtonGroup } from './components/transaction-screen.transaction-form.navigate-button-group';
import { TransactionFormProgressStack } from './components/transaction-screen.transaction-form.progress-stack/components/transaction-screen.transaction-form.progress-stack';
Expand Down Expand Up @@ -140,7 +141,8 @@ export function VaultTransactionForm({
},
validators: {
onChange: ({ value }) => {
setCurrentFieldValue(new Decimal(value.assetAmount).toNumber());
const assetAmount = value.assetAmount;
setCurrentFieldValue(isEmpty(assetAmount) ? 0 : new Decimal(value.assetAmount).toNumber());
return {
fields: {
assetAmount: validateFormAmount(
Expand Down

0 comments on commit edc8236

Please sign in to comment.