aboutsummaryrefslogtreecommitdiffstats
path: root/library/controllers
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-03-22 06:35:01 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-03-22 06:35:01 +0800
commitd4e8ff188bc82a974fd0a767c2676d4a4b9747b4 (patch)
tree9e092a35d765f2a12e3b60bc2111551b267e0eb8 /library/controllers
parent60f00a950cbe90edda4d9de4a67c3e0c528f6638 (diff)
downloadtangerine-wallet-browser-d4e8ff188bc82a974fd0a767c2676d4a4b9747b4.tar.gz
tangerine-wallet-browser-d4e8ff188bc82a974fd0a767c2676d4a4b9747b4.tar.zst
tangerine-wallet-browser-d4e8ff188bc82a974fd0a767c2676d4a4b9747b4.zip
WIP:stream
Diffstat (limited to 'library/controllers')
-rw-r--r--library/controllers/index-db-controller.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/library/controllers/index-db-controller.js b/library/controllers/index-db-controller.js
index 4c53e1094..3373de113 100644
--- a/library/controllers/index-db-controller.js
+++ b/library/controllers/index-db-controller.js
@@ -5,9 +5,9 @@ module.exports = class IndexDbController extends EventEmitter {
super()
this.migrations = opts.migrations
this.key = opts.key
- this.dbObject = opts.global.indexedDB
- this.IDBTransaction = opts.global.IDBTransaction || opts.global.webkitIDBTransaction || opts.global.msIDBTransaction || {READ_WRITE: "readwrite"}; // This line should only be needed if it is needed to support the object's constants for older browsers
- this.IDBKeyRange = opts.global.IDBKeyRange || opts.global.webkitIDBKeyRange || opts.global.msIDBKeyRange;
+ this.dbObject = global.indexedDB
+ this.IDBTransaction = global.IDBTransaction || global.webkitIDBTransaction || global.msIDBTransaction || {READ_WRITE: "readwrite"}; // This line should only be needed if it is needed to support the object's constants for older browsers
+ this.IDBKeyRange = global.IDBKeyRange || global.webkitIDBKeyRange || global.msIDBKeyRange;
this.version = opts.version
this.logging = opts.logging
this.initialState = opts.initialState
@@ -72,8 +72,7 @@ module.exports = class IndexDbController extends EventEmitter {
}
migrate () {
- // Place holder for future migrations eg:
- this.db.createObjectStore('dataStore')
+ this.db.createObjectStore(this.name)
}
_add (key, objStore, cb = logger) {