diff options
-rw-r--r-- | app/scripts/keyring-controller.js | 7 | ||||
-rw-r--r-- | ui/app/actions.js | 6 |
2 files changed, 10 insertions, 3 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) { diff --git a/ui/app/actions.js b/ui/app/actions.js index e69b743e9..4a5507d33 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -221,9 +221,11 @@ function requestRevealSeed (password) { return (dispatch) => { dispatch(actions.showLoadingIndication()) background.submitPassword(password, (err) => { - dispatch(actions.hideLoadingIndication()) if (err) return dispatch(actions.displayWarning(err.message)) - background.placeSeedWords() + background.placeSeedWords((err) => { + if (err) return dispatch(actions.displayWarning(err.message)) + dispatch(actions.hideLoadingIndication()) + }) }) } } |