aboutsummaryrefslogtreecommitdiffstats
path: root/mock-dev.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-01-25 11:47:00 +0800
committerkumavis <aaron@kumavis.me>2017-01-25 11:47:00 +0800
commit76ce348a04b83693eda0e8a40f9888c1f5fe7ef5 (patch)
treed31aeddd6752f03ca1c65569e4fadf203ca8692f /mock-dev.js
parenta06ee454045b9087160d3af1c081556662bbd3cb (diff)
downloadtangerine-wallet-browser-76ce348a04b83693eda0e8a40f9888c1f5fe7ef5.tar
tangerine-wallet-browser-76ce348a04b83693eda0e8a40f9888c1f5fe7ef5.tar.gz
tangerine-wallet-browser-76ce348a04b83693eda0e8a40f9888c1f5fe7ef5.tar.bz2
tangerine-wallet-browser-76ce348a04b83693eda0e8a40f9888c1f5fe7ef5.tar.lz
tangerine-wallet-browser-76ce348a04b83693eda0e8a40f9888c1f5fe7ef5.tar.xz
tangerine-wallet-browser-76ce348a04b83693eda0e8a40f9888c1f5fe7ef5.tar.zst
tangerine-wallet-browser-76ce348a04b83693eda0e8a40f9888c1f5fe7ef5.zip
obs-store - use published module
Diffstat (limited to 'mock-dev.js')
-rw-r--r--mock-dev.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/mock-dev.js b/mock-dev.js
index a404c64b0..f5760bd1f 100644
--- a/mock-dev.js
+++ b/mock-dev.js
@@ -18,6 +18,8 @@ if (!global.localStorage) global.localStorage
const extend = require('xtend')
const render = require('react-dom').render
const h = require('react-hyperscript')
+const pipe = require('mississippi').pipe
+const LocalStorageStore = require('obs-store/lib/localStorage')
const Root = require('./ui/app/root')
const configureStore = require('./ui/app/store')
const actions = require('./ui/app/actions')
@@ -25,8 +27,6 @@ const states = require('./development/states')
const Selector = require('./development/selector')
const MetamaskController = require('./app/scripts/metamask-controller')
const firstTimeState = require('./app/scripts/first-time-state')
-const LocalStorageStore = require('./app/scripts/lib/observable/local-storage')
-const synchronizeStore = require('./app/scripts/lib/observable/util/sync')
const extension = require('./development/mockExtension')
const noop = function () {}
@@ -61,8 +61,8 @@ const injectCss = require('inject-css')
let dataStore = new LocalStorageStore({ storageKey: STORAGE_KEY })
// initial state for first time users
-if (!dataStore.get()) {
- dataStore.put(firstTimeState)
+if (!dataStore.getState()) {
+ dataStore.putState(firstTimeState)
}
const controller = new MetamaskController({
@@ -71,11 +71,14 @@ const controller = new MetamaskController({
unlockAccountMessage: noop,
showUnapprovedTx: noop,
// initial state
- initState: dataStore.get(),
+ initState: dataStore.getState(),
})
// setup state persistence
-synchronizeStore(controller.store, dataStore)
+pipe(
+ controller.store,
+ dataStore
+)
//
// User Interface