aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-09-22 06:47:25 +0800
committerDan Finlay <dan@danfinlay.com>2017-09-22 06:47:25 +0800
commite9043f22dfa7856e3360b312ce480e71f36d9381 (patch)
tree1aa65923003c554ce84e86aad02645f5f7d4cb75 /app/scripts
parent9bd55f4897938bfdc363987252be6f5f390ab7a5 (diff)
downloadtangerine-wallet-browser-e9043f22dfa7856e3360b312ce480e71f36d9381.tar
tangerine-wallet-browser-e9043f22dfa7856e3360b312ce480e71f36d9381.tar.gz
tangerine-wallet-browser-e9043f22dfa7856e3360b312ce480e71f36d9381.tar.bz2
tangerine-wallet-browser-e9043f22dfa7856e3360b312ce480e71f36d9381.tar.lz
tangerine-wallet-browser-e9043f22dfa7856e3360b312ce480e71f36d9381.tar.xz
tangerine-wallet-browser-e9043f22dfa7856e3360b312ce480e71f36d9381.tar.zst
tangerine-wallet-browser-e9043f22dfa7856e3360b312ce480e71f36d9381.zip
Allow custom encryptor to be passed to MetaMaskController and KeyringControllers.
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/keyring-controller.js2
-rw-r--r--app/scripts/metamask-controller.js3
2 files changed, 3 insertions, 2 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index fd57fac70..adfa4a813 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.js
@@ -36,7 +36,7 @@ class KeyringController extends EventEmitter {
identities: {},
})
this.ethStore = opts.ethStore
- this.encryptor = encryptor
+ this.encryptor = opts.encryptor || encryptor
this.keyrings = []
this.getNetwork = opts.getNetwork
}
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index fef16c3a9..42248827f 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -95,6 +95,7 @@ module.exports = class MetamaskController extends EventEmitter {
initState: initState.KeyringController,
ethStore: this.ethStore,
getNetwork: this.networkController.getNetworkState.bind(this.networkController),
+ encryptor: opts.encryptor || undefined,
})
this.keyringController.on('newAccount', (address) => {
this.preferencesController.setSelectedAddress(address)
@@ -674,4 +675,4 @@ module.exports = class MetamaskController extends EventEmitter {
return Promise.resolve(rpcTarget)
})
}
-} \ No newline at end of file
+}