From 60fec24c003605047f3ab7c011a1ee98432b369b Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Fri, 24 Jun 2016 17:00:35 -0700 Subject: Debugged by using a real dapp --- app/scripts/metamask-controller.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/scripts') diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index d09b4c5f9..398086274 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -10,6 +10,7 @@ const ConfigManager = require('./lib/config-manager') module.exports = class MetamaskController { constructor (opts) { + this.opts = opts this.configManager = new ConfigManager(opts) this.idStore = new IdentityStore({ configManager: this.configManager, @@ -108,16 +109,16 @@ module.exports = class MetamaskController { var providerOpts = { rpcUrl: this.configManager.getCurrentRpcAddress(), // account mgmt - getAccounts: function (cb) { + getAccounts: (cb) => { var selectedAddress = idStore.getSelectedAddress() var result = selectedAddress ? [selectedAddress] : [] cb(null, result) }, // tx signing - approveTransaction: this.newUnsignedTransaction, + approveTransaction: this.newUnsignedTransaction.bind(this), signTransaction: idStore.signTransaction.bind(idStore), // msg signing - approveMessage: this.newUnsignedMessage, + approveMessage: this.newUnsignedMessage.bind(this), signMessage: idStore.signMessage.bind(idStore), } -- cgit