diff options
author | Dan <danjm.com@gmail.com> | 2017-12-19 22:46:11 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-12-21 09:37:18 +0800 |
commit | 1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f (patch) | |
tree | 0f955a1491de5363cf49e5b6c6ccafdd1c058d64 /app | |
parent | bccbf14b39ab2b1670c9c30b276404fe4f949cd7 (diff) | |
download | tangerine-wallet-browser-1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f.tar tangerine-wallet-browser-1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f.tar.gz tangerine-wallet-browser-1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f.tar.bz2 tangerine-wallet-browser-1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f.tar.lz tangerine-wallet-browser-1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f.tar.xz tangerine-wallet-browser-1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f.tar.zst tangerine-wallet-browser-1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f.zip |
Canceled, edited transactions show edited amount.
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/controllers/transactions.js | 5 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index ce709bd28..0d6b97d51 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -189,6 +189,11 @@ module.exports = class TransactionController extends EventEmitter { await this.approveTransaction(txMeta.id) } + async updateAndCancelTransaction (txMeta) { + this.txStateManager.updateTx(txMeta, 'confTx: user rejected transaction') + await this.cancelTransaction(txMeta.id) + } + async approveTransaction (txId) { let nonceLock try { diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 018eb2c76..935a3e76e 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -366,6 +366,7 @@ module.exports = class MetamaskController extends EventEmitter { // txController cancelTransaction: nodeify(txController.cancelTransaction, txController), updateAndApproveTransaction: nodeify(txController.updateAndApproveTransaction, txController), + updateAndCancelTransaction: nodeify(txController.updateAndCancelTransaction, txController), // messageManager signMessage: nodeify(this.signMessage, this), |