diff --git a/libs/remix-ui/run-tab/src/lib/actions/events.ts b/libs/remix-ui/run-tab/src/lib/actions/events.ts index 0ddbd79c73..9ad078be92 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/events.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/events.ts @@ -67,8 +67,10 @@ 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 - await loadPinnedContracts(plugin, dispatch, pinnedChainId) + if (!isVM) { + currentNetwork.chainId = network.id + await loadPinnedContracts(plugin, dispatch, pinnedChainId) + } } })