aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-06-25 08:00:35 +0800
committerDan Finlay <dan@danfinlay.com>2016-06-25 08:00:35 +0800
commit60fec24c003605047f3ab7c011a1ee98432b369b (patch)
tree97dd5c8c228ba18b63ca1071b3bd469f8014417c /app
parentd3e0e7fe45a1dc2159b26155b974ced16548ea44 (diff)
downloadtangerine-wallet-browser-60fec24c003605047f3ab7c011a1ee98432b369b.tar
tangerine-wallet-browser-60fec24c003605047f3ab7c011a1ee98432b369b.tar.gz
tangerine-wallet-browser-60fec24c003605047f3ab7c011a1ee98432b369b.tar.bz2
tangerine-wallet-browser-60fec24c003605047f3ab7c011a1ee98432b369b.tar.lz
tangerine-wallet-browser-60fec24c003605047f3ab7c011a1ee98432b369b.tar.xz
tangerine-wallet-browser-60fec24c003605047f3ab7c011a1ee98432b369b.tar.zst
tangerine-wallet-browser-60fec24c003605047f3ab7c011a1ee98432b369b.zip
Debugged by using a real dapp
Diffstat (limited to 'app')
-rw-r--r--app/scripts/metamask-controller.js7
1 files changed, 4 insertions, 3 deletions
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),
}