Skip to content

Commit

Permalink
fix(neuron-ui): fix the missing field in error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Nov 14, 2019
1 parent 98ba68d commit a7dc73b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/neuron-ui/src/components/NervosDAO/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { updateNervosDaoData, clearNervosDaoData } from 'states/stateProvider/ac
import calculateGlobalAPC from 'utils/calculateGlobalAPC'
import calculateFee from 'utils/calculateFee'
import { shannonToCKBFormatter, CKBToShannonFormatter } from 'utils/formatters'
import { MIN_DEPOSIT_AMOUNT, MEDIUM_FEE_RATE, SHANNON_CKB_RATIO, CapacityUnit } from 'utils/const'
import { MIN_DEPOSIT_AMOUNT, MEDIUM_FEE_RATE, SHANNON_CKB_RATIO, MAX_DECIMAL_DIGITS, CapacityUnit } from 'utils/const'
import { verifyAmount } from 'utils/validators'

import { generateDepositTx, generateWithdrawTx, generateClaimTx } from 'services/remote'
Expand Down Expand Up @@ -66,7 +66,7 @@ const NervosDAO = ({

const verifyRes = verifyAmount(value)
if (verifyRes !== true) {
setErrorMessage(t(`messages.codes.${verifyRes.code}`, { fieldName: 'deposit' }))
setErrorMessage(t(`messages.codes.${verifyRes.code}`, { fieldName: 'deposit', length: MAX_DECIMAL_DIGITS }))
return
}

Expand Down

0 comments on commit a7dc73b

Please sign in to comment.