aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-05-21 03:40:44 +0800
committerDan Finlay <dan@danfinlay.com>2016-05-21 03:40:44 +0800
commit7d5aaaa5bd8a0f34694eb3e8ce5ba6bbecf03d71 (patch)
tree9032a488654844f1aad0c4c0bfc892e2786c4aa2 /ui/app/actions.js
parentb0f92e05b12fa5cde453c7b53a19f6b0bca74f75 (diff)
downloadtangerine-wallet-browser-7d5aaaa5bd8a0f34694eb3e8ce5ba6bbecf03d71.tar
tangerine-wallet-browser-7d5aaaa5bd8a0f34694eb3e8ce5ba6bbecf03d71.tar.gz
tangerine-wallet-browser-7d5aaaa5bd8a0f34694eb3e8ce5ba6bbecf03d71.tar.bz2
tangerine-wallet-browser-7d5aaaa5bd8a0f34694eb3e8ce5ba6bbecf03d71.tar.lz
tangerine-wallet-browser-7d5aaaa5bd8a0f34694eb3e8ce5ba6bbecf03d71.tar.xz
tangerine-wallet-browser-7d5aaaa5bd8a0f34694eb3e8ce5ba6bbecf03d71.tar.zst
tangerine-wallet-browser-7d5aaaa5bd8a0f34694eb3e8ce5ba6bbecf03d71.zip
Add ability to add account to vault
Scrolling to the bottom of the accounts page now reveals a downward-facing chevron button. Pressing this button shows loading indication, adds a new account to the identity vault, displays it in the list, and scrolls the list to the bottom of the page. Any number of accounts can be generated in this way, and the UX feels intuitive without having to overly explain how HD paths work.
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index ee5e417d4..5d6f503e2 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -48,6 +48,8 @@ var actions = {
SHOW_ACCOUNTS_PAGE: 'SHOW_ACCOUNTS_PAGE',
SHOW_CONF_TX_PAGE: 'SHOW_CONF_TX_PAGE',
SHOW_CONF_MSG_PAGE: 'SHOW_CONF_MSG_PAGE',
+ REVEAL_ACCOUNT: 'REVEAL_ACCOUNT',
+ revealAccount: revealAccount,
// account detail screen
SHOW_SEND_PAGE: 'SHOW_SEND_PAGE',
showSendPage: showSendPage,
@@ -175,6 +177,19 @@ function setSelectedAddress(address) {
}
}
+function revealAccount() {
+ return (dispatch) => {
+ dispatch(this.showLoadingIndication())
+ _accountManager.revealAccount((err) => {
+ dispatch(this.hideLoadingIndication())
+ if (err) return dispatch(this.displayWarning(err.message))
+ dispatch({
+ type: this.REVEAL_ACCOUNT,
+ })
+ })
+ }
+}
+
function signMsg(msgData) {
return (dispatch) => {
dispatch(this.showLoadingIndication())