diff options
author | Jason Clark <jason@longview.tech> | 2017-11-25 01:35:17 +0800 |
---|---|---|
committer | Jason Clark <jason@longview.tech> | 2017-11-25 01:35:17 +0800 |
commit | fc46a16a329df296cb565e3a0b04f268d2aeceb5 (patch) | |
tree | ba5d45f1ad2f5b3a5f0fb4deb82cbf889b737612 /app | |
parent | 90fc4812bc75857581e56eb6d63484dbc5c48cb1 (diff) | |
download | tangerine-wallet-browser-fc46a16a329df296cb565e3a0b04f268d2aeceb5.tar tangerine-wallet-browser-fc46a16a329df296cb565e3a0b04f268d2aeceb5.tar.gz tangerine-wallet-browser-fc46a16a329df296cb565e3a0b04f268d2aeceb5.tar.bz2 tangerine-wallet-browser-fc46a16a329df296cb565e3a0b04f268d2aeceb5.tar.lz tangerine-wallet-browser-fc46a16a329df296cb565e3a0b04f268d2aeceb5.tar.xz tangerine-wallet-browser-fc46a16a329df296cb565e3a0b04f268d2aeceb5.tar.zst tangerine-wallet-browser-fc46a16a329df296cb565e3a0b04f268d2aeceb5.zip |
toggle wired up to preferences property store
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/controllers/preferences.js | 4 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js index c0454f77b..7ccb0e730 100644 --- a/app/scripts/controllers/preferences.js +++ b/app/scripts/controllers/preferences.js @@ -14,8 +14,8 @@ class PreferencesController { } // PUBLIC METHODS - toggleUseBlockie () { - this.store.updateState({ useBlockie: !this.useBlockie() }) + setUseBlockie (val) { + this.store.updateState({ useBlockie: val }) } getUseBlockie () { diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index bd71da8e0..3a935d895 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -315,6 +315,7 @@ module.exports = class MetamaskController extends EventEmitter { // etc getState: (cb) => cb(null, this.getState()), setCurrentCurrency: this.setCurrentCurrency.bind(this), + setUseBlockie: this.setUseBlockie.bind(this), markAccountsFound: this.markAccountsFound.bind(this), // coinbase @@ -774,4 +775,13 @@ module.exports = class MetamaskController extends EventEmitter { return rpcTarget } + setUseBlockie(val, cb) { + try { + this.preferencesController.setUseBlockie(val) + cb(null) + } catch (err) { + cb(err) + } + } + } |