File tree Expand file tree Collapse file tree 2 files changed +7
-15
lines changed
apps/remix-ide/src/blockchain
libs/remix-lib/src/execution Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ class Blockchain {
2323 detectNetwork : ( cb ) => {
2424 this . executionContext . detectNetwork ( cb )
2525 } ,
26+ isVM : ( ) => { return this . executionContext . isVM ( ) } ,
2627 personalMode : ( ) => {
2728 return this . getProvider ( ) === 'web3' ? this . config . get ( 'settings/personal-mode' ) : false
2829 }
@@ -322,6 +323,7 @@ class Blockchain {
322323 detectNetwork : ( cb ) => {
323324 this . executionContext . detectNetwork ( cb )
324325 } ,
326+ isVM : ( ) => { return this . executionContext . isVM ( ) } ,
325327 personalMode : ( ) => {
326328 return this . getProvider ( ) === 'web3' ? this . config . get ( 'settings/personal-mode' ) : false
327329 }
Original file line number Diff line number Diff line change @@ -73,21 +73,11 @@ export class TxRunnerWeb3 {
7373
7474 if ( useCall ) {
7575 tx [ 'gas' ] = gasLimit
76- tx [ 'timestamp' ] = timestamp
77- return this . _api . detectNetwork ( ( err , network ) => {
78- if ( err ) {
79- console . log ( err )
80- return
81- // Remove `timestamp` from tx if network is Kovan
82- // It shows: 'Error: Returned error: Invalid params: unknown field `timestamp`'
83- // See: https://github.com/ethereum/remix-project/issues/1282
84- } else if ( network && network . name === 'Kovan' ) delete tx [ 'timestamp' ]
85-
86- return this . getWeb3 ( ) . eth . call ( tx , function ( error , result : any ) {
87- if ( error ) return callback ( error )
88- callback ( null , {
89- result : result
90- } )
76+ if ( this . _api && this . _api . isVM ( ) ) tx [ 'timestamp' ] = timestamp
77+ return this . getWeb3 ( ) . eth . call ( tx , function ( error , result : any ) {
78+ if ( error ) return callback ( error )
79+ callback ( null , {
80+ result : result
9181 } )
9282 } )
9383 }
You can’t perform that action at this time.
0 commit comments