aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pending-tx/confirm-send-token.js
diff options
context:
space:
mode:
authorJenny Pollack <jennypollack3@gmail.com>2018-06-08 05:10:56 +0800
committerJenny Pollack <jennypollack3@gmail.com>2018-06-08 05:10:56 +0800
commite7c2710a55a49b8a266fa61cfed1caecc2623de7 (patch)
treec8553c02b63b10626ef561ca0bfe26c560b295d6 /ui/app/components/pending-tx/confirm-send-token.js
parentfd8bcc9cb1b9f9c1cc5ef48eda4952182b23e499 (diff)
parentc0d2dab28b4083ee3ef65b6b561e28c811c6773d (diff)
downloadtangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar
tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar.gz
tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar.bz2
tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar.lz
tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar.xz
tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar.zst
tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.zip
Merge branch 'develop' into save-brave
Diffstat (limited to 'ui/app/components/pending-tx/confirm-send-token.js')
-rw-r--r--ui/app/components/pending-tx/confirm-send-token.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/ui/app/components/pending-tx/confirm-send-token.js b/ui/app/components/pending-tx/confirm-send-token.js
index ddaa13d22..1802d3143 100644
--- a/ui/app/components/pending-tx/confirm-send-token.js
+++ b/ui/app/components/pending-tx/confirm-send-token.js
@@ -21,9 +21,9 @@ const {
addCurrencies,
} = require('../../conversion-util')
const {
- getGasTotal,
+ calcGasTotal,
isBalanceSufficient,
-} = require('../send/send-utils')
+} = require('../send_/send.utils')
const {
calcTokenAmount,
} = require('../../token-util')
@@ -31,7 +31,7 @@ const classnames = require('classnames')
const currencyFormatter = require('currency-formatter')
const currencies = require('currency-formatter/currencies')
-const { MIN_GAS_PRICE_HEX } = require('../send/send-constants')
+const { MIN_GAS_PRICE_HEX } = require('../send_/send.constants')
const {
getTokenExchangeRate,
@@ -40,6 +40,10 @@ const {
} = require('../../selectors')
const { SEND_ROUTE, DEFAULT_ROUTE } = require('../../routes')
+import {
+ updateSendErrors,
+} from '../../ducks/send.duck'
+
const {
ENVIRONMENT_TYPE_POPUP,
ENVIRONMENT_TYPE_NOTIFICATION,
@@ -109,7 +113,7 @@ function mapDispatchToProps (dispatch, ownProps) {
to,
amount: tokenAmountInHex,
errors: { to: null, amount: null },
- editingTransactionId: id,
+ editingTransactionId: id && id.toString(),
token: ownProps.token,
}))
dispatch(actions.showSendTokenPage())
@@ -147,7 +151,7 @@ function mapDispatchToProps (dispatch, ownProps) {
}))
dispatch(actions.showModal({ name: 'CUSTOMIZE_GAS' }))
},
- updateSendErrors: error => dispatch(actions.updateSendErrors(error)),
+ updateSendErrors: error => dispatch(updateSendErrors(error)),
}
}
@@ -589,9 +593,9 @@ ConfirmSendToken.prototype.onSubmit = function (event) {
if (valid && this.verifyGasParams() && balanceIsSufficient) {
this.props.sendTransaction(txMeta, event)
} else if (!balanceIsSufficient) {
- updateSendErrors({ insufficientFunds: this.context.t('insufficientFunds') })
+ updateSendErrors({ insufficientFunds: 'insufficientFunds' })
} else {
- updateSendErrors({ invalidGasParams: this.context.t('invalidGasParams') })
+ updateSendErrors({ invalidGasParams: 'invalidGasParams' })
this.setState({ submitting: false })
}
}
@@ -607,7 +611,7 @@ ConfirmSendToken.prototype.isBalanceSufficient = function (txMeta) {
gasPrice,
},
} = txMeta
- const gasTotal = getGasTotal(gas, gasPrice)
+ const gasTotal = calcGasTotal(gas, gasPrice)
return isBalanceSufficient({
amount: '0',