diff options
author | Dan <danjm.com@gmail.com> | 2017-12-21 01:17:16 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-12-21 09:37:18 +0800 |
commit | bf4043c59bb67ea93599207d91cb7a4f4426e75f (patch) | |
tree | 04013dc75d07ede37a6b0dbbf616a1dbff0c75b1 /app | |
parent | 1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f (diff) | |
download | tangerine-wallet-browser-bf4043c59bb67ea93599207d91cb7a4f4426e75f.tar tangerine-wallet-browser-bf4043c59bb67ea93599207d91cb7a4f4426e75f.tar.gz tangerine-wallet-browser-bf4043c59bb67ea93599207d91cb7a4f4426e75f.tar.bz2 tangerine-wallet-browser-bf4043c59bb67ea93599207d91cb7a4f4426e75f.tar.lz tangerine-wallet-browser-bf4043c59bb67ea93599207d91cb7a4f4426e75f.tar.xz tangerine-wallet-browser-bf4043c59bb67ea93599207d91cb7a4f4426e75f.tar.zst tangerine-wallet-browser-bf4043c59bb67ea93599207d91cb7a4f4426e75f.zip |
Adds updateTransaction to background and used it to update after editing in send-v2.
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/controllers/transactions.js | 9 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index 0d6b97d51..5b687f67a 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -184,16 +184,15 @@ module.exports = class TransactionController extends EventEmitter { return await this.txGasUtil.analyzeGasUsage(txMeta) } + async updateTransaction (txMeta) { + this.txStateManager.updateTx(txMeta, 'confTx: user updated transaction') + } + async updateAndApproveTransaction (txMeta) { this.txStateManager.updateTx(txMeta, 'confTx: user approved transaction') 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 935a3e76e..a2d584cf9 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -365,8 +365,8 @@ module.exports = class MetamaskController extends EventEmitter { // txController cancelTransaction: nodeify(txController.cancelTransaction, txController), + updateTransaction: nodeify(txController.updateTransaction, txController), updateAndApproveTransaction: nodeify(txController.updateAndApproveTransaction, txController), - updateAndCancelTransaction: nodeify(txController.updateAndCancelTransaction, txController), // messageManager signMessage: nodeify(this.signMessage, this), |