Merge pull request #247 from cerc-io/ian_gas_price

use GasFeeCap for unmined tx GasPrice
This commit is contained in:
Ian Norden 2023-06-14 12:50:29 -05:00 committed by GitHub
commit 60b2f5f4f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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