mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix retry action
This commit is contained in:
parent
81fb9db1bc
commit
31564e0a86
@ -363,7 +363,7 @@ module.exports = class MetamaskController extends EventEmitter {
|
|||||||
// txController
|
// txController
|
||||||
cancelTransaction: nodeify(txController.cancelTransaction, txController),
|
cancelTransaction: nodeify(txController.cancelTransaction, txController),
|
||||||
updateAndApproveTransaction: nodeify(txController.updateAndApproveTransaction, txController),
|
updateAndApproveTransaction: nodeify(txController.updateAndApproveTransaction, txController),
|
||||||
retryTransaction: nodeify(txController.retryTransaction, txController),
|
retryTransaction: nodeify(this.retryTransaction, this),
|
||||||
|
|
||||||
// messageManager
|
// messageManager
|
||||||
signMessage: nodeify(this.signMessage, this),
|
signMessage: nodeify(this.signMessage, this),
|
||||||
@ -574,6 +574,14 @@ module.exports = class MetamaskController extends EventEmitter {
|
|||||||
//
|
//
|
||||||
// Identity Management
|
// Identity Management
|
||||||
//
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
async retryTransaction (txId, cb) {
|
||||||
|
await this.txController.retryTransaction(txId)
|
||||||
|
const state = await this.getState()
|
||||||
|
return state
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
newUnsignedMessage (msgParams, cb) {
|
newUnsignedMessage (msgParams, cb) {
|
||||||
const msgId = this.messageManager.addUnapprovedMessage(msgParams)
|
const msgId = this.messageManager.addUnapprovedMessage(msgParams)
|
||||||
|
@ -763,11 +763,11 @@ function markAccountsFound () {
|
|||||||
function retryTransaction (txId) {
|
function retryTransaction (txId) {
|
||||||
log.debug(`background.retryTransaction`)
|
log.debug(`background.retryTransaction`)
|
||||||
return (dispatch) => {
|
return (dispatch) => {
|
||||||
background.retryTransaction(txId, (err) => {
|
background.retryTransaction(txId, (err, newState) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return dispatch(actions.displayWarning(err.message))
|
return dispatch(actions.displayWarning(err.message))
|
||||||
}
|
}
|
||||||
forceUpdateMetamaskState(dispatch)
|
dispatch(actions.updateMetamaskState(newState))
|
||||||
dispatch(actions.viewPendingTx(txId))
|
dispatch(actions.viewPendingTx(txId))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user