From ec8ba0ba6a75f6d8404c335ad95236496fef037f Mon Sep 17 00:00:00 2001 From: msobh13 <78115394+msobh13@users.noreply.github.com> Date: Mon, 19 Feb 2024 16:20:46 +0400 Subject: [PATCH] Update tx.rs to include return_code in server respone (#141) --- src/server/tx.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/server/tx.rs b/src/server/tx.rs index 42c9ea1..eda0780 100644 --- a/src/server/tx.rs +++ b/src/server/tx.rs @@ -93,6 +93,7 @@ pub struct TxInfo { code: Option>, #[serde(serialize_with = "serialize_optional_hex")] data: Option>, + return_code: Option, // New field for return_code /// Inner transaction type tx: Option, @@ -204,10 +205,10 @@ impl TryFrom for TxInfo { let gas_limit_multiplier = row.try_get("gas_limit_multiplier")?; let code: Option> = row.try_get("code")?; let data: Option> = row.try_get("data")?; - let return_code: Option = row.try_get("return_code")?; + let return_code = row.try_get("return_code")?; Ok(Self { - hash, + hash, block_id, tx_type, wrapper_id, @@ -216,7 +217,7 @@ impl TryFrom for TxInfo { gas_limit_multiplier, code, data, - return_code, + return_code, // Assigning return_code to the struct field tx: None, }) }