aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-11-24 03:58:34 +0800
committerDan Finlay <dan@danfinlay.com>2016-11-24 03:58:34 +0800
commit230a0ab876df82edc8147fd3c0ba18f10ffc4e3c (patch)
tree8058230a99ebe4a415cd19432ec54216ec252935 /app
parent600f5c31db47a06c0c9bb9a97c01476d77b0a0df (diff)
downloadtangerine-wallet-browser-230a0ab876df82edc8147fd3c0ba18f10ffc4e3c.tar
tangerine-wallet-browser-230a0ab876df82edc8147fd3c0ba18f10ffc4e3c.tar.gz
tangerine-wallet-browser-230a0ab876df82edc8147fd3c0ba18f10ffc4e3c.tar.bz2
tangerine-wallet-browser-230a0ab876df82edc8147fd3c0ba18f10ffc4e3c.tar.lz
tangerine-wallet-browser-230a0ab876df82edc8147fd3c0ba18f10ffc4e3c.tar.xz
tangerine-wallet-browser-230a0ab876df82edc8147fd3c0ba18f10ffc4e3c.tar.zst
tangerine-wallet-browser-230a0ab876df82edc8147fd3c0ba18f10ffc4e3c.zip
Fix more keyring asyncifying tests
Diffstat (limited to 'app')
-rw-r--r--app/scripts/keyring-controller.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index a36f5b752..f93202523 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.js
@@ -281,7 +281,7 @@ module.exports = class KeyringController extends EventEmitter {
}
persistAllKeyrings () {
- Promise.all(this.keyrings.map((keyring) => {
+ return Promise.all(this.keyrings.map((keyring) => {
return Promise.all([keyring.type, keyring.serialize()])
.then((serializedKeyringArray) => {
// Label the output values on each serialized Keyring:
@@ -314,13 +314,14 @@ module.exports = class KeyringController extends EventEmitter {
const { type, data } = serialized
const Keyring = this.getKeyringClassForType(type)
const keyring = new Keyring()
- keyring.deserialize(data)
+ return keyring.deserialize(data)
.then(() => {
return keyring.getAccounts()
})
.then((accounts) => {
this.setupAccounts(accounts)
this.keyrings.push(keyring)
+ return keyring
})
}