|
|
|
@ -67,9 +67,11 @@ export const setupEvents = (plugin: RunTab) => { |
|
|
|
|
// Check if provider is changed or network is changed for same provider e.g; Metamask
|
|
|
|
|
if (currentNetwork.provider !== networkProvider() || (!isVM && currentNetwork.chainId !== network.id)) { |
|
|
|
|
currentNetwork.provider = networkProvider() |
|
|
|
|
if (!isVM) currentNetwork.chainId = network.id |
|
|
|
|
if (!isVM) { |
|
|
|
|
currentNetwork.chainId = network.id |
|
|
|
|
await loadPinnedContracts(plugin, dispatch, pinnedChainId) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
plugin.on('blockchain', 'shouldAddProvidertoUdapp', (name, provider) => addExternalProvider(dispatch, provider)) |
|
|
|
|