aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-10-05 07:12:07 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-10-09 08:45:34 +0800
commitc9c940bfc13ddbf0dd021a1f638c050369e13017 (patch)
tree0f067864c9e7520eb1169c4bbfa61088f05a054a /ui/app/actions.js
parent583342bd566131815f59941958fb35b34fa3d8bb (diff)
downloadtangerine-wallet-browser-c9c940bfc13ddbf0dd021a1f638c050369e13017.tar
tangerine-wallet-browser-c9c940bfc13ddbf0dd021a1f638c050369e13017.tar.gz
tangerine-wallet-browser-c9c940bfc13ddbf0dd021a1f638c050369e13017.tar.bz2
tangerine-wallet-browser-c9c940bfc13ddbf0dd021a1f638c050369e13017.tar.lz
tangerine-wallet-browser-c9c940bfc13ddbf0dd021a1f638c050369e13017.tar.xz
tangerine-wallet-browser-c9c940bfc13ddbf0dd021a1f638c050369e13017.tar.zst
tangerine-wallet-browser-c9c940bfc13ddbf0dd021a1f638c050369e13017.zip
Clear selected token when changing network.
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index bf9a70c77..86ef4b4b4 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -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,
}
}