From 1756935d5ec7d6e427028ddbcc42983229c27bcf Mon Sep 17 00:00:00 2001 From: evalir Date: Mon, 9 Dec 2024 13:27:52 +0100 Subject: [PATCH] chore: correct names, skip serializing if none --- crates/blob-explorers/src/response.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/blob-explorers/src/response.rs b/crates/blob-explorers/src/response.rs index 2411e20..5e03e1c 100644 --- a/crates/blob-explorers/src/response.rs +++ b/crates/blob-explorers/src/response.rs @@ -51,8 +51,10 @@ pub struct FullTransactionDetails { /// Receiver address, pub to: Address, /// The category of this tx, if any. - pub cateogory: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub category: Option, /// The rollup this tx corresponds to, if any. + #[serde(skip_serializing_if = "Option::is_none")] pub rollup: Option, /// The max fee per blob gas for EIP-4844 blob transactions. #[serde(with = "alloy_serde::quantity")] @@ -132,8 +134,10 @@ pub struct TransactionDetails { /// The hash of the block this tx is contained in. pub block_hash: B256, /// The category of this tx, if any + #[serde(skip_serializing_if = "Option::is_none")] pub category: Option, /// The rollup this tx corresponds to, if any + #[serde(skip_serializing_if = "Option::is_none")] pub rollup: Option, /// The info about the blobs in this tx. pub blobs: Vec,