aboutsummaryrefslogtreecommitdiffstats
path: root/mascara
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-04-04 17:08:10 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-04-04 17:08:10 +0800
commit16c24db13b1c5da7afc222022af4bebf0f42f3aa (patch)
tree6e90ddff687c2935ee837de4ea18740e57f1703e /mascara
parent5baa4fd8968092d605a8768c9934cf4e9b8a820d (diff)
downloadtangerine-wallet-browser-16c24db13b1c5da7afc222022af4bebf0f42f3aa.tar
tangerine-wallet-browser-16c24db13b1c5da7afc222022af4bebf0f42f3aa.tar.gz
tangerine-wallet-browser-16c24db13b1c5da7afc222022af4bebf0f42f3aa.tar.bz2
tangerine-wallet-browser-16c24db13b1c5da7afc222022af4bebf0f42f3aa.tar.lz
tangerine-wallet-browser-16c24db13b1c5da7afc222022af4bebf0f42f3aa.tar.xz
tangerine-wallet-browser-16c24db13b1c5da7afc222022af4bebf0f42f3aa.tar.zst
tangerine-wallet-browser-16c24db13b1c5da7afc222022af4bebf0f42f3aa.zip
Fix first install flow
Diffstat (limited to 'mascara')
-rw-r--r--mascara/src/background.js13
-rw-r--r--mascara/src/lib/index-db-controller.js2
2 files changed, 4 insertions, 11 deletions
diff --git a/mascara/src/background.js b/mascara/src/background.js
index dd0e13239..fbfffa9b8 100644
--- a/mascara/src/background.js
+++ b/mascara/src/background.js
@@ -1,5 +1,4 @@
global.window = global
-const asyncQ = require('async-q')
const pipe = require('pump')
const SwGlobalListener = require('sw-stream/lib/sw-global-listener.js')
@@ -39,18 +38,12 @@ console.log('inside:open')
let diskStore
const dbController = new DbController({
key: STORAGE_KEY,
- global: self,
version: 2,
})
-asyncQ.waterfall([
- () => loadStateFromPersistence(),
- (initState) => setupController(initState),
-])
+loadStateFromPersistence()
+.then((initState) => setupController(initState))
.then(() => console.log('MetaMask initialization complete.'))
-.catch((err) => {
- console.log('WHILE SETTING UP:')
- console.error(err)
-})
+.catch((err) => console.error('WHILE SETTING UP:', err))
// initialization flow
diff --git a/mascara/src/lib/index-db-controller.js b/mascara/src/lib/index-db-controller.js
index 041ddae2e..8db1d5d21 100644
--- a/mascara/src/lib/index-db-controller.js
+++ b/mascara/src/lib/index-db-controller.js
@@ -38,7 +38,7 @@ module.exports = class IndexDbController extends EventEmitter {
if (!data) {
return this._add('dataStore', this.initialState)
.then(() => this.get('dataStore'))
- .then((versionedData) => Promise.resolve(versionedData.data))
+ .then((versionedData) => Promise.resolve(versionedData))
}
return Promise.resolve(data)
})