close all notifications on network change

This commit is contained in:
mmv 2019-11-11 14:43:41 +04:00
parent 55e63566a5
commit bfdc36c612

View File

@ -43,11 +43,11 @@ const providerWatcherMware = (store: Store<GlobalState>) => (next: Function) =>
const networkChanged = currentProviderProps.network !== providerInfo.network const networkChanged = currentProviderProps.network !== providerInfo.network
store.dispatch(closeSnackbar({ dismissAll: true })) if (networkChanged) {
if ( store.dispatch(closeSnackbar({ dismissAll: true }))
currentProviderProps.account !== providerInfo.account }
|| networkChanged
) { if (currentProviderProps.account !== providerInfo.account || networkChanged) {
store.dispatch(fetchProvider(web3)) store.dispatch(fetchProvider(web3))
} }
}, 2000) }, 2000)