Skip to content

Commit a7dc73b

Browse files
committed
fix(neuron-ui): fix the missing field in error message.
1 parent 98ba68d commit a7dc73b

File tree

1 file changed

+2
-2
lines changed
  • packages/neuron-ui/src/components/NervosDAO

1 file changed

+2
-2
lines changed

packages/neuron-ui/src/components/NervosDAO/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { updateNervosDaoData, clearNervosDaoData } from 'states/stateProvider/ac
1111
import calculateGlobalAPC from 'utils/calculateGlobalAPC'
1212
import calculateFee from 'utils/calculateFee'
1313
import { shannonToCKBFormatter, CKBToShannonFormatter } from 'utils/formatters'
14-
import { MIN_DEPOSIT_AMOUNT, MEDIUM_FEE_RATE, SHANNON_CKB_RATIO, CapacityUnit } from 'utils/const'
14+
import { MIN_DEPOSIT_AMOUNT, MEDIUM_FEE_RATE, SHANNON_CKB_RATIO, MAX_DECIMAL_DIGITS, CapacityUnit } from 'utils/const'
1515
import { verifyAmount } from 'utils/validators'
1616

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

6767
const verifyRes = verifyAmount(value)
6868
if (verifyRes !== true) {
69-
setErrorMessage(t(`messages.codes.${verifyRes.code}`, { fieldName: 'deposit' }))
69+
setErrorMessage(t(`messages.codes.${verifyRes.code}`, { fieldName: 'deposit', length: MAX_DECIMAL_DIGITS }))
7070
return
7171
}
7272

0 commit comments

Comments
 (0)