aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/account-menu/index.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-01-30 10:22:52 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-01-30 10:22:52 +0800
commitecc39c5a7abd8c8794d5565c1bc7d213d3514d61 (patch)
tree746f0a2bada5d8cd6636789d3c498c1ef13901fb /ui/app/components/account-menu/index.js
parentd905b86ba775aad888d1dfd22257958fd9415909 (diff)
parentb05d21b1ba308bdb5b758d53dd79593a7a2bf26e (diff)
downloadtangerine-wallet-browser-ecc39c5a7abd8c8794d5565c1bc7d213d3514d61.tar
tangerine-wallet-browser-ecc39c5a7abd8c8794d5565c1bc7d213d3514d61.tar.gz
tangerine-wallet-browser-ecc39c5a7abd8c8794d5565c1bc7d213d3514d61.tar.bz2
tangerine-wallet-browser-ecc39c5a7abd8c8794d5565c1bc7d213d3514d61.tar.lz
tangerine-wallet-browser-ecc39c5a7abd8c8794d5565c1bc7d213d3514d61.tar.xz
tangerine-wallet-browser-ecc39c5a7abd8c8794d5565c1bc7d213d3514d61.tar.zst
tangerine-wallet-browser-ecc39c5a7abd8c8794d5565c1bc7d213d3514d61.zip
Merge branch 'uat' of https://github.com/MetaMask/metamask-extension into cb-254
Diffstat (limited to 'ui/app/components/account-menu/index.js')
-rw-r--r--ui/app/components/account-menu/index.js28
1 files changed, 19 insertions, 9 deletions
diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js
index 0d3b43ae9..f031f2446 100644
--- a/ui/app/components/account-menu/index.js
+++ b/ui/app/components/account-menu/index.js
@@ -33,15 +33,28 @@ function mapDispatchToProps (dispatch) {
toggleAccountMenu: () => dispatch(actions.toggleAccountMenu()),
showAccountDetail: address => {
dispatch(actions.showAccountDetail(address))
+ dispatch(actions.hideSidebar())
dispatch(actions.toggleAccountMenu())
},
lockMetamask: () => {
dispatch(actions.lockMetamask())
- dispatch(actions.displayWarning(null))
+ dispatch(actions.hideWarning())
+ dispatch(actions.hideSidebar())
dispatch(actions.toggleAccountMenu())
},
- showNewAccountModal: () => {
- dispatch(actions.showModal({ name: 'NEW_ACCOUNT' }))
+ showConfigPage: () => {
+ dispatch(actions.showConfigPage())
+ dispatch(actions.hideSidebar())
+ dispatch(actions.toggleAccountMenu())
+ },
+ showNewAccountPage: (formToSelect) => {
+ dispatch(actions.showNewAccountPage(formToSelect))
+ dispatch(actions.hideSidebar())
+ dispatch(actions.toggleAccountMenu())
+ },
+ showInfoPage: () => {
+ dispatch(actions.showInfoPage())
+ dispatch(actions.hideSidebar())
dispatch(actions.toggleAccountMenu())
},
}
@@ -51,7 +64,7 @@ AccountMenu.prototype.render = function () {
const {
isAccountMenuOpen,
toggleAccountMenu,
- showNewAccountModal,
+ showNewAccountPage,
lockMetamask,
history,
} = this.props
@@ -73,15 +86,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: () => {
- toggleAccountMenu()
- history.push(IMPORT_ACCOUNT_ROUTE)
- },
+ onClick: () => showNewAccountPage('IMPORT'),
icon: h('img', { src: 'images/import-account.svg' }),
text: 'Import Account',
}),