aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-02-28 10:25:46 +0800
committerDan Finlay <dan@danfinlay.com>2017-02-28 10:25:46 +0800
commit1eb4a5d62c4fdc8a16c7913c9027e0b11c01da52 (patch)
tree870c68ea65c193b4b9ac31ba022bf6f4764837b5 /app/scripts
parent4370ca0cef1f58e78b7d596c0976d6b18fe998f8 (diff)
downloadtangerine-wallet-browser-1eb4a5d62c4fdc8a16c7913c9027e0b11c01da52.tar
tangerine-wallet-browser-1eb4a5d62c4fdc8a16c7913c9027e0b11c01da52.tar.gz
tangerine-wallet-browser-1eb4a5d62c4fdc8a16c7913c9027e0b11c01da52.tar.bz2
tangerine-wallet-browser-1eb4a5d62c4fdc8a16c7913c9027e0b11c01da52.tar.lz
tangerine-wallet-browser-1eb4a5d62c4fdc8a16c7913c9027e0b11c01da52.tar.xz
tangerine-wallet-browser-1eb4a5d62c4fdc8a16c7913c9027e0b11c01da52.tar.zst
tangerine-wallet-browser-1eb4a5d62c4fdc8a16c7913c9027e0b11c01da52.zip
Add background method for updating and approving a tx in one call
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/metamask-controller.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index f172c67a8..105bb3d19 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -276,8 +276,9 @@ module.exports = class MetamaskController extends EventEmitter {
exportAccount: nodeify(keyringController.exportAccount).bind(keyringController),
// txManager
- approveTransaction: txManager.approveTransaction.bind(txManager),
- cancelTransaction: txManager.cancelTransaction.bind(txManager),
+ approveTransaction: txManager.approveTransaction.bind(txManager),
+ cancelTransaction: txManager.cancelTransaction.bind(txManager),
+ updateAndApproveTransaction: this.updateAndApproveTx.bind(this),
// messageManager
signMessage: nodeify(this.signMessage).bind(this),
@@ -462,6 +463,12 @@ module.exports = class MetamaskController extends EventEmitter {
})
}
+ updateAndApproveTx(txMeta, cb) {
+ const txManager = this.txManager
+ txManager.updateTx(txMeta)
+ txManager.approveTransaction(txMeta.id, cb)
+ }
+
signMessage (msgParams, cb) {
log.info('MetaMaskController - signMessage')
const msgId = msgParams.metamaskId