mirror of
https://github.com/status-im/safe-react.git
synced 2025-01-24 00:29:02 +00:00
close all notifications on network change
This commit is contained in:
parent
55e63566a5
commit
bfdc36c612
@ -43,11 +43,11 @@ const providerWatcherMware = (store: Store<GlobalState>) => (next: Function) =>
|
||||
|
||||
const networkChanged = currentProviderProps.network !== providerInfo.network
|
||||
|
||||
store.dispatch(closeSnackbar({ dismissAll: true }))
|
||||
if (
|
||||
currentProviderProps.account !== providerInfo.account
|
||||
|| networkChanged
|
||||
) {
|
||||
if (networkChanged) {
|
||||
store.dispatch(closeSnackbar({ dismissAll: true }))
|
||||
}
|
||||
|
||||
if (currentProviderProps.account !== providerInfo.account || networkChanged) {
|
||||
store.dispatch(fetchProvider(web3))
|
||||
}
|
||||
}, 2000)
|
||||
|
Loading…
x
Reference in New Issue
Block a user