@@ -196,9 +196,9 @@ export class EvmPricePusher implements IPricePusher {
196196 this . gasPrice ??
197197 Number (
198198 await ( this . customGasStation ?. getCustomGasPrice ( ) ??
199- ( this . useRecentGasPriceEstimate
200- ? this . getMedianRecentGasPrice ( )
201- : this . client . getGasPrice ( ) ) ) ,
199+ ( this . useRecentGasPriceEstimate
200+ ? this . getMedianRecentGasPrice ( )
201+ : this . client . getGasPrice ( ) ) ) ,
202202 ) ;
203203 this . metrics ?. updateGasPrice ( this . network , gasPrice ) ;
204204
@@ -443,18 +443,20 @@ export class EvmPricePusher implements IPricePusher {
443443 } ) ;
444444 this . logger . info ( { baseFeePerGas, reward } , "feeHistory" ) ;
445445 // remove the next block base fee
446- const trimmedBaseFees = baseFeePerGas . slice ( 0 , - 1 )
446+ const trimmedBaseFees = baseFeePerGas . slice ( 0 , - 1 ) ;
447447 const gasPrices = trimmedBaseFees . map ( ( base , i ) => {
448448 const medianTip = reward ?. [ i ] ?. [ 0 ] ?? 0n ;
449449 return base + medianTip ;
450- } )
451- this . logger . info ( { gasPrices} , "gasPrices:" ) ;
450+ } ) ;
451+ this . logger . info ( { gasPrices } , "gasPrices:" ) ;
452452
453453 if ( gasPrices . length === 0 ) {
454454 return 0n ;
455455 } else {
456- const sorted = [ ...gasPrices ] . sort ( ( a , b ) => ( a < b ? - 1 : a > b ? 1 : 0 ) )
457- const medianIndex = Math . floor ( sorted . length / 2 )
456+ const sorted = [ ...gasPrices ] . sort ( ( a , b ) =>
457+ a < b ? - 1 : a > b ? 1 : 0 ,
458+ ) ;
459+ const medianIndex = Math . floor ( sorted . length / 2 ) ;
458460 const medianPrice = sorted [ medianIndex ] ;
459461 this . logger . info ( { medianPrice } , "medianPrice:" ) ;
460462 return medianPrice ;
0 commit comments