aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-11-15 00:04:55 +0800
committerDan <danjm.com@gmail.com>2017-12-05 10:38:23 +0800
commit7f795240706c013dc4a9ece0e9c9e33897c7fc71 (patch)
tree631ca16db8ea6d5efd2e57f4c25699e3482512ca /app/scripts/controllers
parent6561e75aa2fb03c77544da3c090ad6ea2883d29a (diff)
downloadtangerine-wallet-browser-7f795240706c013dc4a9ece0e9c9e33897c7fc71.tar
tangerine-wallet-browser-7f795240706c013dc4a9ece0e9c9e33897c7fc71.tar.gz
tangerine-wallet-browser-7f795240706c013dc4a9ece0e9c9e33897c7fc71.tar.bz2
tangerine-wallet-browser-7f795240706c013dc4a9ece0e9c9e33897c7fc71.tar.lz
tangerine-wallet-browser-7f795240706c013dc4a9ece0e9c9e33897c7fc71.tar.xz
tangerine-wallet-browser-7f795240706c013dc4a9ece0e9c9e33897c7fc71.tar.zst
tangerine-wallet-browser-7f795240706c013dc4a9ece0e9c9e33897c7fc71.zip
Add UI selection
Diffstat (limited to 'app/scripts/controllers')
-rw-r--r--app/scripts/controllers/preferences.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js
index 0aed4dbdf..0dd9eae1b 100644
--- a/app/scripts/controllers/preferences.js
+++ b/app/scripts/controllers/preferences.js
@@ -10,6 +10,7 @@ class PreferencesController {
currentAccountTab: 'history',
tokens: [],
useBlockie: false,
+ featureFlags: {},
}, opts.initState)
this.store = new ObservableStore(initState)
}
@@ -100,6 +101,22 @@ class PreferencesController {
getFrequentRpcList () {
return this.store.getState().frequentRpcList
}
+
+ setFeatureFlag (feature, activated) {
+ const currentFeatureFlags = this.store.getState().featureFlags
+ const updatedFeatureFlags = {
+ ...currentFeatureFlags,
+ [feature]: activated,
+ }
+
+ this.store.updateState({ featureFlags: updatedFeatureFlags })
+ console.log(`!!! updatedFeatureFlags`, updatedFeatureFlags);
+ return Promise.resolve(updatedFeatureFlags)
+ }
+
+ getFeatureFlags () {
+ return this.store.getState().featureFlags
+ }
//
// PRIVATE METHODS
//