diff options
background - introduce ObservableStore
Diffstat (limited to 'mock-dev.js')
-rw-r--r-- | mock-dev.js | 8 |
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 = {} |