aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/account-menu/index.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-01-11 02:25:38 +0800
committerChi Kei Chan <chikeichan@gmail.com>2018-01-13 05:42:51 +0800
commit980e1bfcf82361185f6d1b22abd9593ba166825e (patch)
tree8bdb94affcc0c332f9ff681e53fa2a4fff695f1f /ui/app/components/account-menu/index.js
parent89a8267fe70b62739043c09e855d6aa97af8769e (diff)
downloadtangerine-wallet-browser-980e1bfcf82361185f6d1b22abd9593ba166825e.tar
tangerine-wallet-browser-980e1bfcf82361185f6d1b22abd9593ba166825e.tar.gz
tangerine-wallet-browser-980e1bfcf82361185f6d1b22abd9593ba166825e.tar.bz2
tangerine-wallet-browser-980e1bfcf82361185f6d1b22abd9593ba166825e.tar.lz
tangerine-wallet-browser-980e1bfcf82361185f6d1b22abd9593ba166825e.tar.xz
tangerine-wallet-browser-980e1bfcf82361185f6d1b22abd9593ba166825e.tar.zst
tangerine-wallet-browser-980e1bfcf82361185f6d1b22abd9593ba166825e.zip
New add account page with create and import options.
Diffstat (limited to 'ui/app/components/account-menu/index.js')
-rw-r--r--ui/app/components/account-menu/index.js16
1 files changed, 5 insertions, 11 deletions
diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js
index 1b62b42fb..aeb8a0b38 100644
--- a/ui/app/components/account-menu/index.js
+++ b/ui/app/components/account-menu/index.js
@@ -42,13 +42,8 @@ function mapDispatchToProps (dispatch) {
dispatch(actions.hideSidebar())
dispatch(actions.toggleAccountMenu())
},
- showNewAccountModal: () => {
- dispatch(actions.showModal({ name: 'NEW_ACCOUNT' }))
- dispatch(actions.hideSidebar())
- dispatch(actions.toggleAccountMenu())
- },
- showImportPage: () => {
- dispatch(actions.showImportPage())
+ showNewAccountPage: (formToSelect) => {
+ dispatch(actions.showNewAccountPage(formToSelect))
dispatch(actions.hideSidebar())
dispatch(actions.toggleAccountMenu())
},
@@ -64,8 +59,7 @@ AccountMenu.prototype.render = function () {
const {
isAccountMenuOpen,
toggleAccountMenu,
- showNewAccountModal,
- showImportPage,
+ showNewAccountPage,
lockMetamask,
showConfigPage,
showInfoPage,
@@ -85,12 +79,12 @@ AccountMenu.prototype.render = function () {
h('div.account-menu__accounts', this.renderAccounts()),
h(Divider),
h(Item, {
- onClick: showNewAccountModal,
+ onClick: () => showNewAccountPage('CREATE'),
icon: h('img', { src: 'images/plus-btn-white.svg' }),
text: 'Create Account',
}),
h(Item, {
- onClick: showImportPage,
+ onClick: () => showNewAccountPage('IMPORT'),
icon: h('img', { src: 'images/import-account.svg' }),
text: 'Import Account',
}),