diff options
author | frankiebee <frankie.diamond@gmail.com> | 2018-04-20 02:49:11 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2018-04-20 02:49:11 +0800 |
commit | c20c97ce625207c7afcd48a12f6e7891d582ae99 (patch) | |
tree | b5e063ee7cfd0d0e99fcdb0409fe3106c010bf79 /ui/app/send-v2.js | |
parent | eeb9390de81ce6fc92247d5c499e991dce8330bd (diff) | |
parent | 00efcf9e8ba34d448b628c98d32ad12d5be2ffc9 (diff) | |
download | tangerine-wallet-browser-c20c97ce625207c7afcd48a12f6e7891d582ae99.tar tangerine-wallet-browser-c20c97ce625207c7afcd48a12f6e7891d582ae99.tar.gz tangerine-wallet-browser-c20c97ce625207c7afcd48a12f6e7891d582ae99.tar.bz2 tangerine-wallet-browser-c20c97ce625207c7afcd48a12f6e7891d582ae99.tar.lz tangerine-wallet-browser-c20c97ce625207c7afcd48a12f6e7891d582ae99.tar.xz tangerine-wallet-browser-c20c97ce625207c7afcd48a12f6e7891d582ae99.tar.zst tangerine-wallet-browser-c20c97ce625207c7afcd48a12f6e7891d582ae99.zip |
Merge branch 'master' into tx-controller-rewrite-v3
Diffstat (limited to 'ui/app/send-v2.js')
-rw-r--r-- | ui/app/send-v2.js | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/ui/app/send-v2.js b/ui/app/send-v2.js index 094743ff0..30d3d3152 100644 --- a/ui/app/send-v2.js +++ b/ui/app/send-v2.js @@ -30,6 +30,7 @@ const { getGasTotal, } = require('./components/send/send-utils') const { isValidAddress } = require('./util') +const { CONFIRM_TRANSACTION_ROUTE, DEFAULT_ROUTE } = require('./routes') SendTransactionScreen.contextTypes = { t: PropTypes.func, @@ -87,17 +88,6 @@ SendTransactionScreen.prototype.updateSendTokenBalance = function (usersToken) { } SendTransactionScreen.prototype.componentWillMount = function () { - const { - updateTokenExchangeRate, - selectedToken = {}, - } = this.props - - const { symbol } = selectedToken || {} - - if (symbol) { - updateTokenExchangeRate(symbol) - } - this.updateGas() } @@ -182,7 +172,7 @@ SendTransactionScreen.prototype.componentDidUpdate = function (prevProps) { } SendTransactionScreen.prototype.renderHeader = function () { - const { selectedToken, clearSend, goHome } = this.props + const { selectedToken, clearSend, history } = this.props return h('div.page-container__header', [ @@ -193,7 +183,7 @@ SendTransactionScreen.prototype.renderHeader = function () { h('div.page-container__header-close', { onClick: () => { clearSend() - goHome() + history.push(DEFAULT_ROUTE) }, }), @@ -495,12 +485,12 @@ SendTransactionScreen.prototype.renderForm = function () { SendTransactionScreen.prototype.renderFooter = function () { const { - goHome, clearSend, gasTotal, tokenBalance, selectedToken, errors: { amount: amountError, to: toError }, + history, } = this.props const missingTokenBalance = selectedToken && !tokenBalance @@ -510,7 +500,7 @@ SendTransactionScreen.prototype.renderFooter = function () { h('button.btn-secondary--lg.page-container__footer-button', { onClick: () => { clearSend() - goHome() + history.push(DEFAULT_ROUTE) }, }, this.context.t('cancel')), h('button.btn-primary--lg.page-container__footer-button', { @@ -621,7 +611,6 @@ SendTransactionScreen.prototype.onSubmit = function (event) { if (editingTransactionId) { const editedTx = this.getEditedTx() - updateTx(editedTx) } else { @@ -645,4 +634,6 @@ SendTransactionScreen.prototype.onSubmit = function (event) { ? signTokenTx(selectedToken.address, to, amount, txParams) : signTx(txParams) } + + this.props.history.push(CONFIRM_TRANSACTION_ROUTE) } |