mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add background method for updating and approving a tx in one call
This commit is contained in:
parent
4370ca0cef
commit
1eb4a5d62c
@ -276,8 +276,9 @@ module.exports = class MetamaskController extends EventEmitter {
|
|||||||
exportAccount: nodeify(keyringController.exportAccount).bind(keyringController),
|
exportAccount: nodeify(keyringController.exportAccount).bind(keyringController),
|
||||||
|
|
||||||
// txManager
|
// txManager
|
||||||
approveTransaction: txManager.approveTransaction.bind(txManager),
|
approveTransaction: txManager.approveTransaction.bind(txManager),
|
||||||
cancelTransaction: txManager.cancelTransaction.bind(txManager),
|
cancelTransaction: txManager.cancelTransaction.bind(txManager),
|
||||||
|
updateAndApproveTransaction: this.updateAndApproveTx.bind(this),
|
||||||
|
|
||||||
// messageManager
|
// messageManager
|
||||||
signMessage: nodeify(this.signMessage).bind(this),
|
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) {
|
signMessage (msgParams, cb) {
|
||||||
log.info('MetaMaskController - signMessage')
|
log.info('MetaMaskController - signMessage')
|
||||||
const msgId = msgParams.metamaskId
|
const msgId = msgParams.metamaskId
|
||||||
|
Loading…
Reference in New Issue
Block a user