From 1fa4e1ee661fd65e99df20fe2fd34c5a07cb2f43 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 15 Jun 2021 14:07:49 +0530 Subject: [PATCH] remove timestamp for kovan --- libs/remix-lib/src/execution/txRunnerWeb3.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/libs/remix-lib/src/execution/txRunnerWeb3.ts b/libs/remix-lib/src/execution/txRunnerWeb3.ts index f4bf3a662f..bd766f57ec 100644 --- a/libs/remix-lib/src/execution/txRunnerWeb3.ts +++ b/libs/remix-lib/src/execution/txRunnerWeb3.ts @@ -72,13 +72,19 @@ export class TxRunnerWeb3 { const tx = { from: from, to: to, data: data, value: value } if (useCall) { - const tag = Date.now() // for e2e reference tx['gas'] = gasLimit - // tx['timestamp'] = timestamp - return this.getWeb3().eth.call(tx, function (error, result: any) { - if (error) return callback(error) - callback(null, { - result: result + tx['timestamp'] = timestamp + return this._api.detectNetwork((err, network) => { + if (err) { + console.log(err) + return + } else if (network && network.name === 'Kovan') delete tx['timestamp'] + + return this.getWeb3().eth.call(tx, function (error, result: any) { + if (error) return callback(error) + callback(null, { + result: result + }) }) }) }