aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-02-22 06:30:07 +0800
committerDan Finlay <dan@danfinlay.com>2017-02-22 06:32:35 +0800
commit92fb07999a011fa6939c0068f15dd55a6bcd7506 (patch)
treecd95292c7055e5dc777dfd01259205e44015313c
parent0584988688a471698e9b3ad05cb0597f0270ea9e (diff)
downloadtangerine-wallet-browser-92fb07999a011fa6939c0068f15dd55a6bcd7506.tar
tangerine-wallet-browser-92fb07999a011fa6939c0068f15dd55a6bcd7506.tar.gz
tangerine-wallet-browser-92fb07999a011fa6939c0068f15dd55a6bcd7506.tar.bz2
tangerine-wallet-browser-92fb07999a011fa6939c0068f15dd55a6bcd7506.tar.lz
tangerine-wallet-browser-92fb07999a011fa6939c0068f15dd55a6bcd7506.tar.xz
tangerine-wallet-browser-92fb07999a011fa6939c0068f15dd55a6bcd7506.tar.zst
tangerine-wallet-browser-92fb07999a011fa6939c0068f15dd55a6bcd7506.zip
Point metamask-controller personalSignRecover method to keyring-controller
-rw-r--r--app/scripts/metamask-controller.js14
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()