diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-10-24 07:21:11 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-10-24 07:21:11 +0800 |
commit | 16e2f029d8b76e6f1e951d35307d955c2346cd8d (patch) | |
tree | 645d3b227f6323e0339f68eb1d36529a6efc4761 /ui/app/actions.js | |
parent | b99b5484fec53629a25e9a3e2b4d43f1b1bc7e34 (diff) | |
parent | 152419a79bd26d9b6f5af43c2066eb1e6f619716 (diff) | |
download | tangerine-wallet-browser-16e2f029d8b76e6f1e951d35307d955c2346cd8d.tar tangerine-wallet-browser-16e2f029d8b76e6f1e951d35307d955c2346cd8d.tar.gz tangerine-wallet-browser-16e2f029d8b76e6f1e951d35307d955c2346cd8d.tar.bz2 tangerine-wallet-browser-16e2f029d8b76e6f1e951d35307d955c2346cd8d.tar.lz tangerine-wallet-browser-16e2f029d8b76e6f1e951d35307d955c2346cd8d.tar.xz tangerine-wallet-browser-16e2f029d8b76e6f1e951d35307d955c2346cd8d.tar.zst tangerine-wallet-browser-16e2f029d8b76e6f1e951d35307d955c2346cd8d.zip |
Merge branch 'i328-MultiVault' of github.com:MetaMask/metamask-plugin into i328-MultiVault
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index 230ffee78..525ceca54 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -25,6 +25,7 @@ var actions = { showInitializeMenu: showInitializeMenu, createNewVault: createNewVault, createNewVaultInProgress: createNewVaultInProgress, + addNewKeyring: addNewKeyring, showNewVaultSeed: showNewVaultSeed, showInfoPage: showInfoPage, // unlock screen @@ -136,6 +137,7 @@ var actions = { SHOW_NEW_KEYCHAIN: 'SHOW_NEW_KEYCHAIN', showNewKeychain: showNewKeychain, + } module.exports = actions @@ -187,6 +189,20 @@ function createNewVault (password, entropy) { } } +function addNewKeyring (type, opts) { + return (dispatch) => { + dispatch(actions.showLoadingIndication()) + background.addNewKeyring(type, opts, (err, newState) => { + dispatch(this.hideLoadingIndication()) + if (err) { + return dispatch(actions.showWarning(err)) + } + dispatch(this.updateMetamaskState(newState)) + dispatch(this.showAccountsPage()) + }) + } +} + function showInfoPage () { return { type: actions.SHOW_INFO_PAGE, |