fix getting the current fork

pull/5370/head
yann300 2 years ago committed by Aniket
parent 284bfc8a00
commit 4ade58a3d4
  1. 5
      apps/remix-ide/src/app/udapp/run-tab.js
  2. 2
      apps/remix-ide/src/blockchain/execution-context.js

@ -113,7 +113,10 @@ export class RunTab extends ViewPlugin {
title,
init: async function () {
const options = await udapp.call(name, 'init')
if (options) { this.options = options }
if (options) {
this.options = options
if (options['fork']) this.fork = options['fork']
}
},
provider: {
async sendAsync (payload, callback) {

@ -132,9 +132,9 @@ export class ExecutionContext {
if (!infoCb) infoCb = () => { /* Do nothing. */ }
if (this.customNetWorks[context]) {
var network = this.customNetWorks[context]
await network.init()
this.currentFork = network.fork
this.executionContext = context
await network.init()
// injected
web3.setProvider(network.provider)
await this._updateChainContext()

Loading…
Cancel
Save