aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-11-02 02:25:38 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-11-02 02:30:10 +0800
commitdb356a181a3fde4ad528c699f6da517053171866 (patch)
treeba339827fef6685e097d6fc247dae47f3d0a8f70 /ui/app/actions.js
parente2f67a2cb85552bd8fcf2f7929c14a9d028adccb (diff)
downloadtangerine-wallet-browser-db356a181a3fde4ad528c699f6da517053171866.tar
tangerine-wallet-browser-db356a181a3fde4ad528c699f6da517053171866.tar.gz
tangerine-wallet-browser-db356a181a3fde4ad528c699f6da517053171866.tar.bz2
tangerine-wallet-browser-db356a181a3fde4ad528c699f6da517053171866.tar.lz
tangerine-wallet-browser-db356a181a3fde4ad528c699f6da517053171866.tar.xz
tangerine-wallet-browser-db356a181a3fde4ad528c699f6da517053171866.tar.zst
tangerine-wallet-browser-db356a181a3fde4ad528c699f6da517053171866.zip
Made progress on parity for MultiVault
- Deleted some unused items - Renamed files and paths to match with new locations. - Modified keyring controller logic to separate concerns. - Fix account naming issues. - Enable creation of new vault with default HD keyring. - Formatting issues.
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js23
1 files changed, 17 insertions, 6 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 5068d1848..458145380 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -23,7 +23,8 @@ var actions = {
showCreateVault: showCreateVault,
showRestoreVault: showRestoreVault,
showInitializeMenu: showInitializeMenu,
- createNewVault: createNewVault,
+ createNewVaultAndKeychain: createNewVaultAndKeychain,
+ createNewVaultAndRestore: createNewVaultAndRestore,
createNewVaultInProgress: createNewVaultInProgress,
addNewKeyring,
addNewAccount,
@@ -188,17 +189,27 @@ function confirmSeedWords () {
}
}
-function createNewVault (password, entropy) {
+function createNewVaultAndRestore (password, seed) {
return (dispatch) => {
- // dispatch(actions.createNewVaultInProgress())
- background.createNewVault(password, entropy, (err, newState) => {
+ dispatch(actions.showLoadingIndication())
+ background.createNewVaultAndRestore(password, seed, (err, newState) => {
+ dispatch(actions.hideLoadingIndication())
+ if (err) return dispatch(actions.displayWarning(err.message))
+
+ dispatch(this.updateMetamaskState(newState))
+ })
+ }
+}
+
+function createNewVaultAndKeychain (password, entropy) {
+ return (dispatch) => {
+ background.createNewVaultAndKeychain(password, entropy, (err, newState) => {
if (err) {
return dispatch(actions.showWarning(err.message))
}
dispatch(this.updateMetamaskState(newState))
- dispatch(this.showAccountsPage())
- dispatch(this.hideLoadingIndication())
+ dispatch(this.showNewVaultSeed())
})
}
}