Fix Import Account link not hiding sidebar

feature/default_network_editable
Alexander Tseung 7 years ago committed by Chi Kei Chan
parent a9244f5e42
commit 7caa914223
  1. 9
      ui/app/components/dropdowns/components/account-dropdowns.js
  2. 3
      ui/app/components/wallet-view.js

@ -164,7 +164,7 @@ class AccountDropdowns extends Component {
}
renderAccountSelector () {
const { actions, useCssTransition, innerStyle } = this.props
const { actions, useCssTransition, innerStyle, sidebarOpen } = this.props
const { accountSelectorActive, menuItemStyles } = this.state
return h(
@ -223,7 +223,11 @@ class AccountDropdowns extends Component {
h(
DropdownMenuItem,
{
closeMenu: () => {},
closeMenu: () => {
if (sidebarOpen) {
actions.hideSidebar()
}
},
onClick: () => actions.showImportPage(),
style: Object.assign(
{},
@ -457,6 +461,7 @@ const mapDispatchToProps = (dispatch) => {
function mapStateToProps (state) {
return {
keyrings: state.metamask.keyrings,
sidebarOpen: state.appState.sidebarOpen,
}
}

@ -45,8 +45,9 @@ WalletView.prototype.renderWalletBalance = function () {
selectedAccount,
unsetSelectedToken,
hideSidebar,
sidebarOpen
sidebarOpen,
} = this.props
const selectedClass = selectedTokenAddress
? ''
: 'wallet-balance-wrapper--active'

Loading…
Cancel
Save