1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Clear selected token when changing network.

This commit is contained in:
Dan 2017-10-04 20:42:07 -02:30 committed by Chi Kei Chan
parent 583342bd56
commit c9c940bfc1

View File

@ -155,6 +155,7 @@ var actions = {
UPDATE_TOKENS: 'UPDATE_TOKENS',
setRpcTarget: setRpcTarget,
setProviderType: setProviderType,
updateProviderType,
// loading overlay
SHOW_LOADING: 'SHOW_LOADING_INDICATION',
HIDE_LOADING: 'HIDE_LOADING_INDICATION',
@ -869,11 +870,17 @@ function setProviderType (type) {
log.error(err)
return dispatch(self.displayWarning('Had a problem changing networks!'))
}
dispatch(actions.updateProviderType(type))
dispatch(actions.setSelectedToken())
})
return {
type: actions.SET_PROVIDER_TYPE,
value: type,
}
}
}
function updateProviderType(type) {
return {
type: actions.SET_PROVIDER_TYPE,
value: type,
}
}