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:
parent
583342bd56
commit
c9c940bfc1
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user