diff options
author | Ellie Day <heyellieday@gmail.com> | 2018-01-03 13:53:11 +0800 |
---|---|---|
committer | Ellie Day <heyellieday@gmail.com> | 2018-01-03 13:53:11 +0800 |
commit | 3c6a5b16ad37c83f548028d5b6fa3d0f75293ca5 (patch) | |
tree | ae70957dfd672881ff5bcf4a67b1feb7139311bb /app/scripts/lib | |
parent | 7184db7632ef79d4bde0e643fdc1a4ee910c77fb (diff) | |
download | tangerine-wallet-browser-3c6a5b16ad37c83f548028d5b6fa3d0f75293ca5.tar.gz tangerine-wallet-browser-3c6a5b16ad37c83f548028d5b6fa3d0f75293ca5.tar.zst tangerine-wallet-browser-3c6a5b16ad37c83f548028d5b6fa3d0f75293ca5.zip |
conditionally use extension store if supported or enabled
Diffstat (limited to 'app/scripts/lib')
-rw-r--r-- | app/scripts/lib/extension-store.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/scripts/lib/extension-store.js b/app/scripts/lib/extension-store.js index dd0f82f36..67ee71f16 100644 --- a/app/scripts/lib/extension-store.js +++ b/app/scripts/lib/extension-store.js @@ -14,6 +14,10 @@ const handleDisabledSyncAndResolve = (resolve, toResolve) => { } module.exports = class ExtensionStore { + constructor() { + this.isSupported = !!(extension.storage.sync) + this.isEnabled = true // TODO: get value from user settings + } async fetch() { return new Promise((resolve) => { extension.storage.sync.get(KEYS_TO_SYNC, (data) => { |