aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-11-22 12:08:36 +0800
committerDan Finlay <dan@danfinlay.com>2016-11-22 12:08:36 +0800
commitea56426b2355c1076c18256fb0b4e74f47ff4b39 (patch)
tree08b86f5f97838c863193d5e8bd996807da36cc23 /app
parentecfda5bcc54bc444f3620a18a561847d0d2634dd (diff)
downloadtangerine-wallet-browser-ea56426b2355c1076c18256fb0b4e74f47ff4b39.tar
tangerine-wallet-browser-ea56426b2355c1076c18256fb0b4e74f47ff4b39.tar.gz
tangerine-wallet-browser-ea56426b2355c1076c18256fb0b4e74f47ff4b39.tar.bz2
tangerine-wallet-browser-ea56426b2355c1076c18256fb0b4e74f47ff4b39.tar.lz
tangerine-wallet-browser-ea56426b2355c1076c18256fb0b4e74f47ff4b39.tar.xz
tangerine-wallet-browser-ea56426b2355c1076c18256fb0b4e74f47ff4b39.tar.zst
tangerine-wallet-browser-ea56426b2355c1076c18256fb0b4e74f47ff4b39.zip
Use callback in placeSeedWord method.
When displaying seed words, we were not using a callback, which had some race condition potential. This is simply a little cleaner and more correct. Fixes #842
Diffstat (limited to 'app')
-rw-r--r--app/scripts/keyring-controller.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index cf761c88c..49a41df66 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.js
@@ -173,10 +173,15 @@ module.exports = class KeyringController extends EventEmitter {
})
}
- placeSeedWords () {
+ placeSeedWords (cb) {
const firstKeyring = this.keyrings[0]
const seedWords = firstKeyring.serialize().mnemonic
this.configManager.setSeedWords(seedWords)
+
+ if (cb && typeof cb === 'function') {
+ cb()
+ this.emit('update')
+ }
}
submitPassword (password, cb) {