mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 20:39:08 +01:00
Allow provider to init before keyringController
This commit is contained in:
parent
6c0916c28d
commit
8684fc40c7
@ -151,7 +151,6 @@ module.exports = class MetamaskController extends EventEmitter {
|
||||
//
|
||||
|
||||
initializeProvider () {
|
||||
const keyringController = this.keyringController
|
||||
|
||||
let provider = MetaMaskProvider({
|
||||
static: {
|
||||
@ -173,7 +172,7 @@ module.exports = class MetamaskController extends EventEmitter {
|
||||
// new style msg signing
|
||||
approvePersonalMessage: this.approvePersonalMessage.bind(this),
|
||||
signPersonalMessage: nodeify(this.signPersonalMessage).bind(this),
|
||||
personalRecoverSigner: nodeify(keyringController.recoverPersonalMessage).bind(keyringController),
|
||||
personalRecoverSigner: nodeify(this.recoverPersonalMessage).bind(this),
|
||||
})
|
||||
return provider
|
||||
}
|
||||
@ -493,6 +492,11 @@ module.exports = class MetamaskController extends EventEmitter {
|
||||
})
|
||||
}
|
||||
|
||||
recoverPersonalMessage (msgParams) {
|
||||
const keyringController = this.keyringController
|
||||
return keyringController.recoverPersonalMessage(msgParams)
|
||||
}
|
||||
|
||||
markAccountsFound (cb) {
|
||||
this.configManager.setLostAccounts([])
|
||||
this.sendUpdate()
|
||||
|
Loading…
Reference in New Issue
Block a user