From 2ef3501966eb0b4d2e7afe7bec6421eb824bd7fa Mon Sep 17 00:00:00 2001 From: ci-bot Date: Thu, 13 Nov 2025 15:20:48 +0100 Subject: [PATCH 1/2] fix updating provider --- apps/remix-ide/src/blockchain/blockchain.tsx | 1 + apps/remix-ide/src/blockchain/execution-context.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/blockchain/blockchain.tsx b/apps/remix-ide/src/blockchain/blockchain.tsx index b0fd85afcc3..57e9486c59e 100644 --- a/apps/remix-ide/src/blockchain/blockchain.tsx +++ b/apps/remix-ide/src/blockchain/blockchain.tsx @@ -123,6 +123,7 @@ export class Blockchain extends Plugin { this.registeredPluginEvents.push(plugin.name) this.on(plugin.name, 'chainChanged', () => { if (plugin.name === this.executionContext.executionContext) { + this.changeExecutionContext({ context: plugin.name }, null, null, null) this.detectNetwork((error, network) => { this.networkStatus = { network, error } if (network.networkNativeCurrency) this.networkNativeCurrency = network.networkNativeCurrency diff --git a/apps/remix-ide/src/blockchain/execution-context.js b/apps/remix-ide/src/blockchain/execution-context.js index b79511bbf96..0cf11d173f4 100644 --- a/apps/remix-ide/src/blockchain/execution-context.js +++ b/apps/remix-ide/src/blockchain/execution-context.js @@ -20,7 +20,7 @@ function track(event) { } if (typeof window !== 'undefined' && typeof window.ethereum !== 'undefined') { var injectedProvider = window.ethereum - provider = new ethers.BrowserProvider(injectedProvider) + provider = new ethers.BrowserProvider(injectedProvider, 'any') } else { provider = new ethers.JsonRpcProvider('http://localhost:8545') } @@ -180,7 +180,7 @@ export class ExecutionContext { await network.init() this.currentFork = network.config.fork // injected - provider = new ethers.BrowserProvider(network.provider) + provider = new ethers.BrowserProvider(network.provider, 'any') this.executionContext = context this.isConnected = await this._updateChainContext() this.event.trigger('contextChanged', [context]) From 023ef2dc6bcd9973232f83a72fbb6503c08e5e01 Mon Sep 17 00:00:00 2001 From: Aniket <30843294+Aniket-Engg@users.noreply.github.com> Date: Fri, 14 Nov 2025 18:52:33 +0530 Subject: [PATCH 2/2] Update blockchain.tsx --- apps/remix-ide/src/blockchain/blockchain.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/remix-ide/src/blockchain/blockchain.tsx b/apps/remix-ide/src/blockchain/blockchain.tsx index 57e9486c59e..6fa4b5707cf 100644 --- a/apps/remix-ide/src/blockchain/blockchain.tsx +++ b/apps/remix-ide/src/blockchain/blockchain.tsx @@ -25,7 +25,6 @@ const profile = { displayName: 'Blockchain', description: 'Blockchain - Logic', methods: ['dumpState', 'getCode', 'getTransactionReceipt', 'addProvider', 'removeProvider', 'getCurrentFork', 'isSmartAccount', 'getAccounts', 'web3VM', 'web3', 'getProvider', 'getCurrentProvider', 'getCurrentNetworkStatus', 'getCurrentNetworkCurrency', 'getAllProviders', 'getPinnedProviders', 'changeExecutionContext', 'getProviderObject', 'runTx', 'getBalanceInEther', 'getCurrentProvider', 'deployContractAndLibraries', 'runOrCallContractMethod'], - version: packageJson.version }