From 48616d5d4becefe9e9d2f7137751b3d8a04601b3 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Tue, 28 May 2024 17:16:54 +0800 Subject: [PATCH] internal/ethapi/api: return maxFeePerGas for gasPrice for EIP-1559 txs (#23345) --- internal/ethapi/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 0a7c12a5c2fc..b5e2f329dd65 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1928,7 +1928,7 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber price := math.BigMin(new(big.Int).Add(tx.GasTipCap(), baseFee), tx.GasFeeCap()) result.GasPrice = (*hexutil.Big)(price) } else { - result.GasPrice = nil + result.GasPrice = (*hexutil.Big)(tx.GasFeeCap()) } } return result