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 7b633ab30e..14334adad2 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/events.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/events.ts @@ -55,6 +55,8 @@ export const setupEvents = (plugin: RunTab, dispatch: React.Dispatch) => { const pinnedChainId = !isVM ? network.id : networkProvider() setNetworkNameFromProvider(dispatch, netUI) setPinnedChainId(dispatch, pinnedChainId) + + // 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