From ee6f759d821620a3bd7a9b37f6fd7c0aef23019e Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 25 Jun 2021 10:36:26 +0200 Subject: [PATCH] don't set a current fork if injected or web3 is used --- apps/remix-ide/src/blockchain/execution-context.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide/src/blockchain/execution-context.js b/apps/remix-ide/src/blockchain/execution-context.js index 352a689df3..0e1debeb2b 100644 --- a/apps/remix-ide/src/blockchain/execution-context.js +++ b/apps/remix-ide/src/blockchain/execution-context.js @@ -21,8 +21,7 @@ export class ExecutionContext { this.executionContext = null this.blockGasLimitDefault = 4300000 this.blockGasLimit = this.blockGasLimitDefault - this.defaultFork = 'berlin' - this.currentFork = this.defaultFork + this.currentFork = ' - ' this.mainNetGenesisHash = '0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3' this.customNetWorks = {} this.blocks = {} @@ -125,18 +124,17 @@ export class ExecutionContext { executionContextChange (value, endPointUrl, confirmCb, infoCb, cb) { const context = value.context - const fork = value.fork || this.defaultFork if (!cb) cb = () => {} if (!confirmCb) confirmCb = () => {} if (!infoCb) infoCb = () => {} if (context === 'vm') { this.executionContext = context - this.currentFork = fork + this.currentFork = value.fork this.event.trigger('contextChanged', ['vm']) return cb() } - this.currentFork = this.defaultFork // in the case of injected and web3, we default to the last fork. + this.currentFork = ' - ' if (context === 'injected') { if (injectedProvider === undefined) {