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

This commit is contained in:
Alexander Tseung 2018-01-11 15:49:10 -08:00 committed by Chi Kei Chan
parent 7c97b2f37c
commit b8310ac62e
2 changed files with 6 additions and 2 deletions

View File

@ -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 }))
}
}

View File

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