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/controllers/index-db-controller.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/controllers/index-db-controller.js')
-rw-r--r-- | library/controllers/index-db-controller.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/library/controllers/index-db-controller.js b/library/controllers/index-db-controller.js index 3373de113..bf840b98a 100644 --- a/library/controllers/index-db-controller.js +++ b/library/controllers/index-db-controller.js @@ -58,21 +58,17 @@ module.exports = class IndexDbController extends EventEmitter { }) } - put (key, store) { - return this.requestObjectStore(key, 'readwrite') + put (state) { + return this.requestObjectStore('dataStore', 'readwrite') .then((dataObject)=> { - const putRequest = dataObject.put(store) + const putRequest = dataObject.put(state, 'dataStore') putRequest.onsuccess = (event) => Promise.resolve(event.currentTarget.result) putRequest.onerror = (event) => Promise.reject(event) }) } - update (key, value) { - - } - migrate () { - this.db.createObjectStore(this.name) + this.db.createObjectStore('dataStore') } _add (key, objStore, cb = logger) { |