diff options
-rw-r--r-- | app/scripts/metamask-controller.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 62242bd83..06c133bb2 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -24,7 +24,6 @@ const autoFaucet = require('./lib/auto-faucet') const nodeify = require('./lib/nodeify') const IdStoreMigrator = require('./lib/idStore-migrator') const accountImporter = require('./account-import-strategies') -const sigUtil = require('eth-sig-util') const version = require('../manifest.json').version @@ -152,6 +151,8 @@ module.exports = class MetamaskController extends EventEmitter { // initializeProvider () { + const keyringController = this.keyringController + let provider = MetaMaskProvider({ static: { eth_syncing: false, @@ -171,8 +172,8 @@ module.exports = class MetamaskController extends EventEmitter { // new style msg signing approvePersonalMessage: this.approvePersonalMessage.bind(this), - signPersonalMessage: this.signPersonalMessage.bind(this), - personalRecoverSigner: this.personalRecoverSigner.bind(this), + signPersonalMessage: nodeify(this.signPersonalMessage).bind(this), + personalRecoverSigner: nodeify(keyringController.recoverPersonalMessage).bind(keyringController), }) return provider } @@ -459,7 +460,7 @@ module.exports = class MetamaskController extends EventEmitter { } // Prefixed Style Message Signing Methods: - approvePersonalMessage (cb) { + approvePersonalMessage (msgParams, cb) { let msgId = this.personalMessageManager.addUnapprovedMessage(msgParams) this.sendUpdate() this.opts.showUnconfirmedMessage() @@ -492,11 +493,6 @@ module.exports = class MetamaskController extends EventEmitter { }) } - personalRecoverSigner (msgParams) { - const recovered = sigUtil.recoverPersonalSignature(msgParams) - return Promise.resolve(recovered) - } - markAccountsFound (cb) { this.configManager.setLostAccounts([]) this.sendUpdate() |