Fix logging out of old UI causing infinite spinner (#2914)

feature/default_network_editable
Alexander Tseung 7 years ago committed by Chi Kei Chan
parent 7c97b2f37c
commit b8310ac62e
  1. 6
      ui/app/actions.js
  2. 2
      ui/app/components/account-menu/index.js

@ -925,9 +925,13 @@ function lockMetamask () {
})
.then(newState => {
dispatch(actions.updateMetamaskState(newState))
dispatch(actions.hideLoadingIndication())
dispatch({ type: actions.LOCK_METAMASK })
})
.catch(() => {
dispatch(actions.hideLoadingIndication())
dispatch({ type: actions.LOCK_METAMASK })
})
.catch(() => dispatch({ type: actions.LOCK_METAMASK }))
}
}

@ -33,7 +33,7 @@ function mapDispatchToProps (dispatch) {
},
lockMetamask: () => {
dispatch(actions.lockMetamask())
dispatch(actions.displayWarning(null))
dispatch(actions.hideWarning())
dispatch(actions.hideSidebar())
dispatch(actions.toggleAccountMenu())
},

Loading…
Cancel
Save