diff options
Diffstat (limited to 'ui/app/components/send_/send.utils.js')
-rw-r--r-- | ui/app/components/send_/send.utils.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ui/app/components/send_/send.utils.js b/ui/app/components/send_/send.utils.js index 2e17b04a3..e537d5624 100644 --- a/ui/app/components/send_/send.utils.js +++ b/ui/app/components/send_/send.utils.js @@ -10,6 +10,11 @@ const { const { conversionGreaterThan, } = require('../../conversion-util') +const { + INSUFFICIENT_FUNDS_ERROR, + INSUFFICIENT_TOKENS_ERROR, + NEGATIVE_ETH_ERROR, +} = require('./send.constants') module.exports = { calcGasTotal, @@ -125,11 +130,11 @@ function getAmountErrorObject ({ let amountError = null if (insufficientFunds) { - amountError = 'insufficientFunds' + amountError = INSUFFICIENT_FUNDS_ERROR } else if (inSufficientTokens) { - amountError = 'insufficientTokens' + amountError = INSUFFICIENT_TOKENS_ERROR } else if (amountLessThanZero) { - amountError = 'negativeETH' + amountError = NEGATIVE_ETH_ERROR } return { amount: amountError } |