aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-01-25 07:33:33 +0800
committerkumavis <aaron@kumavis.me>2017-01-25 07:33:33 +0800
commit463a56ff54b0d850c86348e260e5f7c17b138ccb (patch)
tree615d9f36de26cbeca6ca38e0f86c2037dea72e64 /ui/app
parentbef4b78196d83fe7c1babad5c42a6c217d4acf0a (diff)
downloadtangerine-wallet-browser-463a56ff54b0d850c86348e260e5f7c17b138ccb.tar
tangerine-wallet-browser-463a56ff54b0d850c86348e260e5f7c17b138ccb.tar.gz
tangerine-wallet-browser-463a56ff54b0d850c86348e260e5f7c17b138ccb.tar.bz2
tangerine-wallet-browser-463a56ff54b0d850c86348e260e5f7c17b138ccb.tar.lz
tangerine-wallet-browser-463a56ff54b0d850c86348e260e5f7c17b138ccb.tar.xz
tangerine-wallet-browser-463a56ff54b0d850c86348e260e5f7c17b138ccb.tar.zst
tangerine-wallet-browser-463a56ff54b0d850c86348e260e5f7c17b138ccb.zip
background controller - extract KeyringC.placeSeedWords to MetamaskC
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/actions.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 9a68d231a..5b2ad8a79 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -230,7 +230,21 @@ function createNewVaultAndRestore (password, seed) {
}
function createNewVaultAndKeychain (password) {
- return callBackgroundThenUpdate(background.createNewVaultAndKeychain, password)
+ return (dispatch) => {
+ dispatch(actions.showLoadingIndication())
+ background.createNewVaultAndKeychain(password, (err, newState) => {
+ if (err) {
+ return dispatch(actions.displayWarning(err.message))
+ }
+ background.placeSeedWords((err, newState) => {
+ if (err) {
+ return dispatch(actions.displayWarning(err.message))
+ }
+ dispatch(actions.hideLoadingIndication())
+ dispatch(actions.updateMetamaskState(newState))
+ })
+ })
+ }
}
function revealSeedConfirmation () {