From 7ed7b27dba2347258657f5e7edc81d6e6f63a9b3 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 59fbea76146c..57617622415f 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