diff options
author | Jacky Chan <jchan@uber.com> | 2017-08-21 19:56:09 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-10-21 12:51:37 +0800 |
commit | e1497fafa64b5f8e25407611709920dc5e0eaf77 (patch) | |
tree | 11f1b6eaddf131e4c733ec990ef67b476d6a86db /ui/app/actions.js | |
parent | 4e446410eb76c1bd5d27b6dd4f413bfbf3df0e2d (diff) | |
download | tangerine-wallet-browser-e1497fafa64b5f8e25407611709920dc5e0eaf77.tar tangerine-wallet-browser-e1497fafa64b5f8e25407611709920dc5e0eaf77.tar.gz tangerine-wallet-browser-e1497fafa64b5f8e25407611709920dc5e0eaf77.tar.bz2 tangerine-wallet-browser-e1497fafa64b5f8e25407611709920dc5e0eaf77.tar.lz tangerine-wallet-browser-e1497fafa64b5f8e25407611709920dc5e0eaf77.tar.xz tangerine-wallet-browser-e1497fafa64b5f8e25407611709920dc5e0eaf77.tar.zst tangerine-wallet-browser-e1497fafa64b5f8e25407611709920dc5e0eaf77.zip |
Add UniqueImageScreen
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index 84990922e..11cd14c16 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -243,19 +243,26 @@ function createNewVaultAndKeychain (password) { return (dispatch) => { dispatch(actions.showLoadingIndication()) log.debug(`background.createNewVaultAndKeychain`) - background.createNewVaultAndKeychain(password, (err) => { - if (err) { - return dispatch(actions.displayWarning(err.message)) - } - log.debug(`background.placeSeedWords`) - background.placeSeedWords((err) => { + + return new Promise((resolve, reject) => { + background.createNewVaultAndKeychain(password, (err) => { if (err) { - return dispatch(actions.displayWarning(err.message)) + dispatch(actions.displayWarning(err.message)) + return reject(err) } - dispatch(actions.hideLoadingIndication()) - forceUpdateMetamaskState(dispatch) + log.debug(`background.placeSeedWords`) + background.placeSeedWords((err) => { + if (err) { + dispatch(actions.displayWarning(err.message)) + return reject(err) + } + dispatch(actions.hideLoadingIndication()) + forceUpdateMetamaskState(dispatch) + resolve() + }) }) - }) + }); + } } |