Skip to content

Commit 1fa4e1e

Browse files
committed
remove timestamp for kovan
1 parent 6c99904 commit 1fa4e1e

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

libs/remix-lib/src/execution/txRunnerWeb3.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,19 @@ export class TxRunnerWeb3 {
7272
const tx = { from: from, to: to, data: data, value: value }
7373

7474
if (useCall) {
75-
const tag = Date.now() // for e2e reference
7675
tx['gas'] = gasLimit
77-
// tx['timestamp'] = timestamp
78-
return this.getWeb3().eth.call(tx, function (error, result: any) {
79-
if (error) return callback(error)
80-
callback(null, {
81-
result: result
76+
tx['timestamp'] = timestamp
77+
return this._api.detectNetwork((err, network) => {
78+
if (err) {
79+
console.log(err)
80+
return
81+
} else if (network && network.name === 'Kovan') delete tx['timestamp']
82+
83+
return this.getWeb3().eth.call(tx, function (error, result: any) {
84+
if (error) return callback(error)
85+
callback(null, {
86+
result: result
87+
})
8288
})
8389
})
8490
}

0 commit comments

Comments
 (0)