From 72bcce1c76f23fc8e3129adf9b5fd54f927d996e 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 bc3fa2107aab..9b03e8c5e6ea 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1922,7 +1922,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