fix: Return correct gas price fields for EIP2930 transactions (#2930)

This commit is contained in:
Peter Davies
2023-05-31 13:40:12 +01:00
committed by GitHub
parent cc90358371
commit 8a5fc9a974

View File

@ -111,7 +111,7 @@ impl Transaction {
let (gas_price, max_fee_per_gas) = match signed_tx.tx_type() {
TxType::Legacy => (Some(U128::from(signed_tx.max_fee_per_gas())), None),
TxType::EIP2930 => (None, Some(U128::from(signed_tx.max_fee_per_gas()))),
TxType::EIP2930 => (Some(U128::from(signed_tx.max_fee_per_gas())), None),
TxType::EIP1559 => {
// the gas price field for EIP1559 is set to `min(tip, gasFeeCap - baseFee) +
// baseFee`