internal/ethapi: return maxFeePerGas for gasPrice for EIP-1559 txs (#23345)

This commit is contained in:
lightclient 2021-08-10 07:39:06 -06:00 committed by GitHub
parent 66948316f7
commit 39fe7eca6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1323,7 +1323,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