@@ -33,7 +33,7 @@ var utils = require('web3-utils');
33
33
var helpers = require ( 'web3-core-helpers' ) ;
34
34
var { TransactionFactory} = require ( '@ethereumjs/tx' ) ;
35
35
var Common = require ( '@ethereumjs/common' ) . default ;
36
-
36
+ var HardForks = require ( '@ethereumjs/common' ) . Hardfork ;
37
37
38
38
var isNot = function ( value ) {
39
39
return ( typeof value === 'undefined' ) || value === null ;
@@ -178,7 +178,7 @@ Accounts.prototype.signTransaction = function signTransaction(tx, privateKey, ca
178
178
networkId : transaction . networkId ,
179
179
chainId : transaction . chainId
180
180
} ,
181
- transaction . hardfork || "london"
181
+ transaction . hardfork || HardForks . London
182
182
) ;
183
183
184
184
delete transaction . networkId ;
@@ -191,7 +191,7 @@ Accounts.prototype.signTransaction = function signTransaction(tx, privateKey, ca
191
191
networkId : transaction . common . customChain . networkId ,
192
192
chainId : transaction . common . customChain . chainId
193
193
} ,
194
- transaction . common . hardfork || "london" ,
194
+ transaction . common . hardfork || HardForks . London ,
195
195
) ;
196
196
197
197
delete transaction . common ;
@@ -333,16 +333,16 @@ function _handleTxType(tx) {
333
333
if (
334
334
hasEip1559 ||
335
335
(
336
- ( tx . common && tx . common . hardfork && tx . common . hardfork . toLowerCase ( ) === 'london' ) ||
337
- ( tx . hardfork && tx . hardfork . toLowerCase ( ) === 'london' )
336
+ ( tx . common && tx . common . hardfork && tx . common . hardfork . toLowerCase ( ) === HardForks . London ) ||
337
+ ( tx . hardfork && tx . hardfork . toLowerCase ( ) === HardForks . London )
338
338
)
339
339
) {
340
340
txType = '0x2' ;
341
341
} else if (
342
342
tx . accessList ||
343
343
(
344
- ( tx . common && tx . common . hardfork && tx . common . hardfork . toLowerCase ( ) === 'berlin' ) ||
345
- ( tx . hardfork && tx . hardfork . toLowerCase ( ) === 'berlin' )
344
+ ( tx . common && tx . common . hardfork && tx . common . hardfork . toLowerCase ( ) === HardForks . Berlin ) ||
345
+ ( tx . hardfork && tx . hardfork . toLowerCase ( ) === HardForks . Berlin )
346
346
)
347
347
) {
348
348
txType = '0x1' ;
0 commit comments