aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/metamask-controller.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-06-25 07:13:27 +0800
committerDan Finlay <dan@danfinlay.com>2016-06-25 07:13:27 +0800
commit122018a96a1b2b6d9b7eefe150ff76a9de69bdd7 (patch)
treecc72b18de256dad9db7055b4c4631cfa9d192347 /app/scripts/metamask-controller.js
parentfa7e4665594525256b846de93bdd46115a3a53a7 (diff)
downloadtangerine-wallet-browser-122018a96a1b2b6d9b7eefe150ff76a9de69bdd7.tar
tangerine-wallet-browser-122018a96a1b2b6d9b7eefe150ff76a9de69bdd7.tar.gz
tangerine-wallet-browser-122018a96a1b2b6d9b7eefe150ff76a9de69bdd7.tar.bz2
tangerine-wallet-browser-122018a96a1b2b6d9b7eefe150ff76a9de69bdd7.tar.lz
tangerine-wallet-browser-122018a96a1b2b6d9b7eefe150ff76a9de69bdd7.tar.xz
tangerine-wallet-browser-122018a96a1b2b6d9b7eefe150ff76a9de69bdd7.tar.zst
tangerine-wallet-browser-122018a96a1b2b6d9b7eefe150ff76a9de69bdd7.zip
Fixed tests
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r--app/scripts/metamask-controller.js23
1 files changed, 12 insertions, 11 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index aef280310..262c20b96 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -13,11 +13,13 @@ class MetamaskController {
constructor (opts) {
this.configManager = new ConfigManager(opts)
- this.idStore = new IdentityStore({ configManager })
- this.messageManager = messageManager
this.provider = this.initializeProvider(opts)
this.ethStore = new EthStore(this.provider)
- this.idStore.setStore(this.ethStore)
+ this.idStore = new IdentityStore({
+ configManager: this.configManager,
+ ethStore: this.ethStore,
+ })
+ this.messageManager = messageManager
this.publicConfigStore = this.initPublicConfigStore()
}
@@ -203,7 +205,7 @@ class MetamaskController {
}
setupPublicConfig (stream) {
- var storeStream = publicConfigStore.createStream()
+ var storeStream = this.publicConfigStore.createStream()
stream.pipe(storeStream).pipe(stream)
}
@@ -223,7 +225,7 @@ class MetamaskController {
// config
//
- function agreeToDisclaimer (cb) {
+ agreeToDisclaimer (cb) {
try {
this.configManager.setConfirmed(true)
cb()
@@ -233,23 +235,22 @@ class MetamaskController {
}
// called from popup
- function setRpcTarget (rpcTarget) {
+ setRpcTarget (rpcTarget) {
this.configManager.setRpcTarget(rpcTarget)
chrome.runtime.reload()
- idStore.getNetwork()
+ this.idStore.getNetwork()
}
- function setProviderType (type) {
+ setProviderType (type) {
this.configManager.setProviderType(type)
chrome.runtime.reload()
- idStore.getNetwork()
+ this.idStore.getNetwork()
}
- function useEtherscanProvider () {
+ useEtherscanProvider () {
this.configManager.useEtherscanProvider()
chrome.runtime.reload()
}
-
}
function noop () {}