Skip to content

Commit 03fcbdc

Browse files
authored
Merge branch 'master' into joe-patch-016
2 parents 7b08ce4 + 9731597 commit 03fcbdc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apps/remix-ide/src/blockchain/blockchain.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ const profile = {
2525
displayName: 'Blockchain',
2626
description: 'Blockchain - Logic',
2727
methods: ['dumpState', 'getCode', 'getTransactionReceipt', 'addProvider', 'removeProvider', 'getCurrentFork', 'isSmartAccount', 'getAccounts', 'web3VM', 'web3', 'getProvider', 'getCurrentProvider', 'getCurrentNetworkStatus', 'getCurrentNetworkCurrency', 'getAllProviders', 'getPinnedProviders', 'changeExecutionContext', 'getProviderObject', 'runTx', 'getBalanceInEther', 'getCurrentProvider', 'deployContractAndLibraries', 'runOrCallContractMethod'],
28-
2928
version: packageJson.version
3029
}
3130

@@ -123,6 +122,7 @@ export class Blockchain extends Plugin {
123122
this.registeredPluginEvents.push(plugin.name)
124123
this.on(plugin.name, 'chainChanged', () => {
125124
if (plugin.name === this.executionContext.executionContext) {
125+
this.changeExecutionContext({ context: plugin.name }, null, null, null)
126126
this.detectNetwork((error, network) => {
127127
this.networkStatus = { network, error }
128128
if (network.networkNativeCurrency) this.networkNativeCurrency = network.networkNativeCurrency

apps/remix-ide/src/blockchain/execution-context.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function track(event) {
2020
}
2121
if (typeof window !== 'undefined' && typeof window.ethereum !== 'undefined') {
2222
var injectedProvider = window.ethereum
23-
provider = new ethers.BrowserProvider(injectedProvider)
23+
provider = new ethers.BrowserProvider(injectedProvider, 'any')
2424
} else {
2525
provider = new ethers.JsonRpcProvider('http://localhost:8545')
2626
}
@@ -180,7 +180,7 @@ export class ExecutionContext {
180180
await network.init()
181181
this.currentFork = network.config.fork
182182
// injected
183-
provider = new ethers.BrowserProvider(network.provider)
183+
provider = new ethers.BrowserProvider(network.provider, 'any')
184184
this.executionContext = context
185185
this.isConnected = await this._updateChainContext()
186186
this.event.trigger('contextChanged', [context])

0 commit comments

Comments
 (0)