aboutsummaryrefslogtreecommitdiffstats
path: root/mock-dev.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-01-12 11:04:19 +0800
committerkumavis <aaron@kumavis.me>2017-01-12 11:31:21 +0800
commit8012ede12698477692b80769781096b559159a32 (patch)
tree17f75325da8f5d0abf2c1f37fa0573320730b6a7 /mock-dev.js
parentcc5e9aca4fa2a1e78c49be680405d93ac918bccf (diff)
downloadtangerine-wallet-browser-8012ede12698477692b80769781096b559159a32.tar
tangerine-wallet-browser-8012ede12698477692b80769781096b559159a32.tar.gz
tangerine-wallet-browser-8012ede12698477692b80769781096b559159a32.tar.bz2
tangerine-wallet-browser-8012ede12698477692b80769781096b559159a32.tar.lz
tangerine-wallet-browser-8012ede12698477692b80769781096b559159a32.tar.xz
tangerine-wallet-browser-8012ede12698477692b80769781096b559159a32.tar.zst
tangerine-wallet-browser-8012ede12698477692b80769781096b559159a32.zip
background - introduce ObservableStore
Diffstat (limited to 'mock-dev.js')
-rw-r--r--mock-dev.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/mock-dev.js b/mock-dev.js
index 283bc2c79..dfd0b4961 100644
--- a/mock-dev.js
+++ b/mock-dev.js
@@ -47,11 +47,13 @@ const controller = new MetamaskController({
showUnconfirmedMessage: noop,
unlockAccountMessage: noop,
showUnapprovedTx: noop,
- // Persistence Methods:
- setData,
- loadData,
+ // initial state
+ initState: loadData(),
})
+// setup state persistence
+controller.store.subscribe(setData)
+
// Stub out localStorage for non-browser environments
if (!window.localStorage) {
window.localStorage = {}