diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index b129290735..cd481db974 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1648,9 +1648,8 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber result.GasFeeCap = (*hexutil.Big)(tx.GasFeeCap()) result.GasTipCap = (*hexutil.Big)(tx.GasTipCap()) // if the transaction has been mined, compute the effective gas price - if baseFee != nil && blockHash != (common.Hash{}) { - // price = min(gasTipCap + baseFee, gasFeeCap) - result.GasPrice = (*hexutil.Big)(effectiveGasPrice(tx, baseFee)) + if receipt != nil { + result.GasPrice = (*hexutil.Big)(receipt.EffectiveGasPrice) } else { result.GasPrice = (*hexutil.Big)(tx.GasFeeCap()) }