From 7997668f1572c98ba09665bfcca4fb7dcfe29117 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 11 Apr 2023 16:47:44 +0200 Subject: [PATCH] remove uneeded property --- apps/remix-ide/src/blockchain/blockchain.tsx | 4 ++-- libs/remix-lib/src/execution/txRunner.ts | 5 +---- libs/remix-lib/src/execution/txRunnerVM.ts | 3 --- libs/remix-simulator/src/methods/transactions.ts | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/apps/remix-ide/src/blockchain/blockchain.tsx b/apps/remix-ide/src/blockchain/blockchain.tsx index 0aec55082c..bd9817269e 100644 --- a/apps/remix-ide/src/blockchain/blockchain.tsx +++ b/apps/remix-ide/src/blockchain/blockchain.tsx @@ -82,7 +82,7 @@ export class Blockchain extends Plugin { return this.getProvider() === 'web3' ? this.config.get('settings/personal-mode') : false } }, _ => this.executionContext.web3(), _ => this.executionContext.currentblockGasLimit()) - this.txRunner = new TxRunner(web3Runner, { runAsync: true }) + this.txRunner = new TxRunner(web3Runner, {}) this.networkcallid = 0 this.networkStatus = { network: { name: ' - ', id: ' - ' } } @@ -598,7 +598,7 @@ export class Blockchain extends Plugin { } }) }) - this.txRunner = new TxRunner(web3Runner, { runAsync: true }) + this.txRunner = new TxRunner(web3Runner, {}) } /** diff --git a/libs/remix-lib/src/execution/txRunner.ts b/libs/remix-lib/src/execution/txRunner.ts index 544b9ef1a9..47f7458ec9 100644 --- a/libs/remix-lib/src/execution/txRunner.ts +++ b/libs/remix-lib/src/execution/txRunner.ts @@ -14,7 +14,6 @@ export type Transaction = { export class TxRunner { event - runAsync pendingTxs queusTxs opt @@ -24,8 +23,6 @@ export class TxRunner { this.internalRunner = internalRunner this.event = new EventManager() - this.runAsync = this.opt.runAsync || true // We have to run like this cause the VM Event Manager does not support running multiple txs at the same time. - this.pendingTxs = {} this.queusTxs = [] } @@ -44,7 +41,7 @@ export class TxRunner { } function run (self, tx: Transaction, stamp, confirmationCb, gasEstimationForceSend = null, promptCb = null, callback = null) { - if (!self.runAsync && Object.keys(self.pendingTxs).length) { + if (Object.keys(self.pendingTxs).length) { return self.queusTxs.push({ tx, stamp, callback }) } self.pendingTxs[stamp] = tx diff --git a/libs/remix-lib/src/execution/txRunnerVM.ts b/libs/remix-lib/src/execution/txRunnerVM.ts index 64b44b9926..2da4c6ac45 100644 --- a/libs/remix-lib/src/execution/txRunnerVM.ts +++ b/libs/remix-lib/src/execution/txRunnerVM.ts @@ -21,7 +21,6 @@ export type VMExecutionCallBack = (error: string | Error, result?: VMexecutionRe export class TxRunnerVM { event blockNumber - runAsync pendingTxs vmaccounts queusTxs @@ -38,9 +37,7 @@ export class TxRunnerVM { // has a default for now for backwards compatability this.getVMObject = getVMObject this.commonContext = this.getVMObject().common - this.runAsync = true this.blockNumber = 0 - this.runAsync = false // We have to run like this cause the VM Event Manager does not support running multiple txs at the same time. this.pendingTxs = {} this.vmaccounts = vmaccounts this.queusTxs = [] diff --git a/libs/remix-simulator/src/methods/transactions.ts b/libs/remix-simulator/src/methods/transactions.ts index e7fbe6c225..dc6d940e65 100644 --- a/libs/remix-simulator/src/methods/transactions.ts +++ b/libs/remix-simulator/src/methods/transactions.ts @@ -56,7 +56,7 @@ export class Transactions { } this.txRunnerVMInstance = new TxRunnerVM(accounts, api, _ => this.vmContext.vmObject()) - this.txRunnerInstance = new TxRunner(this.txRunnerVMInstance, { runAsync: false }) + this.txRunnerInstance = new TxRunner(this.txRunnerVMInstance, {}) this.txRunnerInstance.vmaccounts = accounts }