From 8a5fc9a9743ea7db7cdf3f692c5c6d65b19ec827 Mon Sep 17 00:00:00 2001 From: Peter Davies Date: Wed, 31 May 2023 13:40:12 +0100 Subject: [PATCH] fix: Return correct gas price fields for EIP2930 transactions (#2930) --- crates/rpc/rpc-types/src/eth/transaction/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rpc/rpc-types/src/eth/transaction/mod.rs b/crates/rpc/rpc-types/src/eth/transaction/mod.rs index ba5bff233..1fc2e3ca8 100644 --- a/crates/rpc/rpc-types/src/eth/transaction/mod.rs +++ b/crates/rpc/rpc-types/src/eth/transaction/mod.rs @@ -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`