mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
metamask-controller - wrap txController.addUnapprovedTx for wallet middleware reference before txController is instantiated
This commit is contained in:
parent
2b54d948da
commit
76cfb10864
@ -247,7 +247,7 @@ module.exports = class MetamaskController extends EventEmitter {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// tx signing
|
// tx signing
|
||||||
processTransaction: this.txController.newUnapprovedTransaction.bind(this.txController),
|
processTransaction: this.newUnapprovedTransaction.bind(this),
|
||||||
// msg signing
|
// msg signing
|
||||||
processEthSignMessage: this.newUnsignedMessage.bind(this),
|
processEthSignMessage: this.newUnsignedMessage.bind(this),
|
||||||
processPersonalMessage: this.newUnsignedPersonalMessage.bind(this),
|
processPersonalMessage: this.newUnsignedPersonalMessage.bind(this),
|
||||||
@ -617,6 +617,18 @@ module.exports = class MetamaskController extends EventEmitter {
|
|||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Identity Management (signature operations)
|
// Identity Management (signature operations)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when a Dapp suggests a new tx to be signed.
|
||||||
|
* this wrapper needs to exist so we can provide a reference to
|
||||||
|
* "newUnapprovedTransaction" before "txController" is instantiated
|
||||||
|
*
|
||||||
|
* @param {Object} msgParams - The params passed to eth_sign.
|
||||||
|
* @param {Object} req - (optional) the original request, containing the origin
|
||||||
|
*/
|
||||||
|
async newUnapprovedTransaction(txParams, req) {
|
||||||
|
return await this.txController.newUnapprovedTransaction(txParams, req)
|
||||||
|
}
|
||||||
|
|
||||||
// eth_sign methods:
|
// eth_sign methods:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user