diff options
author | Dan Finlay <flyswatter@users.noreply.github.com> | 2017-09-12 05:31:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-12 05:31:59 +0800 |
commit | e7159f0e4857d3f1d4fcf793faf2b36159214e75 (patch) | |
tree | ed46605e46452f1b2b484b11eea79044ece70ec4 /ui/app/conf-tx.js | |
parent | 96107556dcc57f04aeebfc7d775d5a60a88cb450 (diff) | |
parent | 27ba7f6ed3b0c55f6f5d7fa7e3829bdc06e0df9f (diff) | |
download | tangerine-wallet-browser-e7159f0e4857d3f1d4fcf793faf2b36159214e75.tar tangerine-wallet-browser-e7159f0e4857d3f1d4fcf793faf2b36159214e75.tar.gz tangerine-wallet-browser-e7159f0e4857d3f1d4fcf793faf2b36159214e75.tar.bz2 tangerine-wallet-browser-e7159f0e4857d3f1d4fcf793faf2b36159214e75.tar.lz tangerine-wallet-browser-e7159f0e4857d3f1d4fcf793faf2b36159214e75.tar.xz tangerine-wallet-browser-e7159f0e4857d3f1d4fcf793faf2b36159214e75.tar.zst tangerine-wallet-browser-e7159f0e4857d3f1d4fcf793faf2b36159214e75.zip |
Merge pull request #2045 from MetaMask/rejectallunapproved
Feature - Reject all unapproved transactions button (MM Submission: feat. @davidp94)
Diffstat (limited to 'ui/app/conf-tx.js')
-rw-r--r-- | ui/app/conf-tx.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js index 34727ff78..1ee4166f7 100644 --- a/ui/app/conf-tx.js +++ b/ui/app/conf-tx.js @@ -52,6 +52,8 @@ ConfirmTxScreen.prototype.render = function () { log.info(`rendering a combined ${unconfTxList.length} unconf msg & txs`) if (unconfTxList.length === 0) return h(Loading, { isLoading: true }) + const unconfTxListLength = unconfTxList.length + return ( h('.flex-column.flex-grow', [ @@ -101,10 +103,12 @@ ConfirmTxScreen.prototype.render = function () { conversionRate, currentCurrency, blockGasLimit, + unconfTxListLength, // Actions buyEth: this.buyEth.bind(this, txParams.from || props.selectedAddress), sendTransaction: this.sendTransaction.bind(this), cancelTransaction: this.cancelTransaction.bind(this, txData), + cancelAllTransactions: this.cancelAllTransactions.bind(this, unconfTxList), signMessage: this.signMessage.bind(this, txData), signPersonalMessage: this.signPersonalMessage.bind(this, txData), cancelMessage: this.cancelMessage.bind(this, txData), @@ -151,6 +155,12 @@ ConfirmTxScreen.prototype.cancelTransaction = function (txData, event) { this.props.dispatch(actions.cancelTx(txData)) } +ConfirmTxScreen.prototype.cancelAllTransactions = function (unconfTxList, event) { + this.stopPropagation(event) + event.preventDefault() + this.props.dispatch(actions.cancelAllTx(unconfTxList)) +} + ConfirmTxScreen.prototype.signMessage = function (msgData, event) { log.info('conf-tx.js: signing message') var params = msgData.msgParams |