more comments

pull/4724/head
aniket-engg 7 months ago committed by Aniket
parent d726d92980
commit acb0de6b5c
  1. 2
      libs/remix-ui/run-tab/src/lib/actions/events.ts

@ -55,6 +55,8 @@ export const setupEvents = (plugin: RunTab, dispatch: React.Dispatch<any>) => {
const pinnedChainId = !isVM ? network.id : networkProvider() const pinnedChainId = !isVM ? network.id : networkProvider()
setNetworkNameFromProvider(dispatch, netUI) setNetworkNameFromProvider(dispatch, netUI)
setPinnedChainId(dispatch, pinnedChainId) 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)) { if (currentNetwork.provider !== networkProvider() || (!isVM && currentNetwork.chainId !== network.id)) {
currentNetwork.provider = networkProvider() currentNetwork.provider = networkProvider()
if (!isVM) currentNetwork.chainId = network.id if (!isVM) currentNetwork.chainId = network.id

Loading…
Cancel
Save