diff options
author | Dan Finlay <dan@danfinlay.com> | 2017-12-07 12:20:15 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2017-12-07 12:20:15 +0800 |
commit | 31564e0a86072ae2b49923dcf28983075308c432 (patch) | |
tree | 6c284ec17f92e0619064a80e405bf0070bd2bdd7 | |
parent | 81fb9db1bcd08fb4e92d87d0c0905cb02dac63c2 (diff) | |
download | tangerine-wallet-browser-31564e0a86072ae2b49923dcf28983075308c432.tar tangerine-wallet-browser-31564e0a86072ae2b49923dcf28983075308c432.tar.gz tangerine-wallet-browser-31564e0a86072ae2b49923dcf28983075308c432.tar.bz2 tangerine-wallet-browser-31564e0a86072ae2b49923dcf28983075308c432.tar.lz tangerine-wallet-browser-31564e0a86072ae2b49923dcf28983075308c432.tar.xz tangerine-wallet-browser-31564e0a86072ae2b49923dcf28983075308c432.tar.zst tangerine-wallet-browser-31564e0a86072ae2b49923dcf28983075308c432.zip |
Fix retry action
-rw-r--r-- | app/scripts/metamask-controller.js | 10 | ||||
-rw-r--r-- | ui/app/actions.js | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 3a8100d12..9d126b416 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -363,7 +363,7 @@ module.exports = class MetamaskController extends EventEmitter { // txController cancelTransaction: nodeify(txController.cancelTransaction, txController), updateAndApproveTransaction: nodeify(txController.updateAndApproveTransaction, txController), - retryTransaction: nodeify(txController.retryTransaction, txController), + retryTransaction: nodeify(this.retryTransaction, this), // messageManager signMessage: nodeify(this.signMessage, this), @@ -574,6 +574,14 @@ module.exports = class MetamaskController extends EventEmitter { // // Identity Management // + // + + async retryTransaction (txId, cb) { + await this.txController.retryTransaction(txId) + const state = await this.getState() + return state + } + newUnsignedMessage (msgParams, cb) { const msgId = this.messageManager.addUnapprovedMessage(msgParams) diff --git a/ui/app/actions.js b/ui/app/actions.js index 0dc4f3832..52ea899aa 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -763,11 +763,11 @@ function markAccountsFound () { function retryTransaction (txId) { log.debug(`background.retryTransaction`) return (dispatch) => { - background.retryTransaction(txId, (err) => { + background.retryTransaction(txId, (err, newState) => { if (err) { return dispatch(actions.displayWarning(err.message)) } - forceUpdateMetamaskState(dispatch) + dispatch(actions.updateMetamaskState(newState)) dispatch(actions.viewPendingTx(txId)) }) } |