diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-03-24 05:22:05 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-03-24 05:22:05 +0800 |
commit | 412cc2394a89a3ba1c0ca82cecf03c29254b7381 (patch) | |
tree | d239ada79184784fd46c645564902506ccaa90c4 /library/sw-core.js | |
parent | 45ab81fb45ec1043d617f66c308e2e7911c8e0ad (diff) | |
download | tangerine-wallet-browser-412cc2394a89a3ba1c0ca82cecf03c29254b7381.tar tangerine-wallet-browser-412cc2394a89a3ba1c0ca82cecf03c29254b7381.tar.gz tangerine-wallet-browser-412cc2394a89a3ba1c0ca82cecf03c29254b7381.tar.bz2 tangerine-wallet-browser-412cc2394a89a3ba1c0ca82cecf03c29254b7381.tar.lz tangerine-wallet-browser-412cc2394a89a3ba1c0ca82cecf03c29254b7381.tar.xz tangerine-wallet-browser-412cc2394a89a3ba1c0ca82cecf03c29254b7381.tar.zst tangerine-wallet-browser-412cc2394a89a3ba1c0ca82cecf03c29254b7381.zip |
Get mascara to send a transaction in the ui
Diffstat (limited to 'library/sw-core.js')
-rw-r--r-- | library/sw-core.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/sw-core.js b/library/sw-core.js index 9ceaf1dc5..3972e361b 100644 --- a/library/sw-core.js +++ b/library/sw-core.js @@ -87,7 +87,7 @@ function loadStateFromPersistence() { const initialState = migrator.generateInitialState(firstTimeState) dbController.initialState = initialState return dbController.open() - .then((stuff) => { + .then((openRequest) => { return dbController.get('dataStore') }) .then((data) => { @@ -141,14 +141,14 @@ function setupController (initState, client) { // storeTransform(versionifyData), // diskStore // ) - controller.store.subscribe((store) => { - dbController.put('dataStore', store) - // .then((event) => {debugger}) - // .catch((err) => {debugger}) + controller.store.subscribe((state) => { + dbController.put(versionifyData(controller.store)) + .catch((err) => {console.error(err)}) }) function versionifyData(state) { - let versionedData = diskStore.getState() - versionedData.data = state + // let versionedData = diskStore.getState() + // versionedData.data = state + let versionedData = {data: state} return versionedData } |