From a307c9ffd28f819e7ddff06f920795f5faa804c8 Mon Sep 17 00:00:00 2001 From: Michael de Hoog Date: Tue, 3 Oct 2023 07:44:36 -1000 Subject: [PATCH] Re-enable the other field for optimism feature --- ethers-core/src/types/transaction/optimism.rs | 1 + ethers-core/src/types/transaction/response.rs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ethers-core/src/types/transaction/optimism.rs b/ethers-core/src/types/transaction/optimism.rs index bcf0faaee..15e389d2e 100644 --- a/ethers-core/src/types/transaction/optimism.rs +++ b/ethers-core/src/types/transaction/optimism.rs @@ -157,6 +157,7 @@ mod test { max_priority_fee_per_gas: None, max_fee_per_gas: None, chain_id: None, + other: crate::types::OtherFields::default(), }; let rlp = deposited_tx.rlp(); diff --git a/ethers-core/src/types/transaction/response.rs b/ethers-core/src/types/transaction/response.rs index 3c04b5766..24ae021db 100644 --- a/ethers-core/src/types/transaction/response.rs +++ b/ethers-core/src/types/transaction/response.rs @@ -132,7 +132,7 @@ pub struct Transaction { pub chain_id: Option, /// Captures unknown fields such as additional fields used by L2s - #[cfg(not(any(feature = "celo", feature = "optimism")))] + #[cfg(not(any(feature = "celo")))] #[serde(flatten)] pub other: crate::types::OtherFields, } @@ -649,6 +649,8 @@ mod tests { max_priority_fee_per_gas: None, max_fee_per_gas: None, chain_id: None, + #[cfg(not(feature = "celo"))] + other: crate::types::OtherFields::default(), }; let encoded_rlp_bytes = deposited_tx.rlp();