From d4fb326f66926596f64cdf5104a4ee6bb6d6924e Mon Sep 17 00:00:00 2001 From: Moudy Date: Tue, 31 Mar 2026 14:37:41 +0200 Subject: [PATCH] fix: remove stale validity_window ref and add missing timestamp args --- .../src/pages/transaction_page.rs | 20 ------------------- nssa/src/state.rs | 8 ++++---- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/explorer_service/src/pages/transaction_page.rs b/explorer_service/src/pages/transaction_page.rs index 99f974c7..0a3fc8e2 100644 --- a/explorer_service/src/pages/transaction_page.rs +++ b/explorer_service/src/pages/transaction_page.rs @@ -184,26 +184,6 @@ pub fn TransactionPage() -> impl IntoView { signatures_and_public_keys: _, proof, } = witness_set; - let (block_from, block_to, ts_from, ts_to) = validity_window.0; - let block_part = match (block_from, block_to) { - (Some(start), Some(end)) => format!("block {start}..{end}"), - (Some(start), None) => format!("block {start}.."), - (None, Some(end)) => format!("block ..{end}"), - (None, None) => String::new(), - }; - let ts_part = match (ts_from, ts_to) { - (Some(start), Some(end)) => format!("ts {start}..{end}"), - (Some(start), None) => format!("ts {start}.."), - (None, Some(end)) => format!("ts ..{end}"), - (None, None) => String::new(), - }; - let validity_window_formatted = match (block_part.is_empty(), ts_part.is_empty()) { - (true, true) => "unbounded".to_owned(), - (false, true) => block_part, - (true, false) => ts_part, - (false, false) => format!("{block_part}, {ts_part}"), - }; - let proof_len = proof.map_or(0, |p| p.0.len()); view! {
diff --git a/nssa/src/state.rs b/nssa/src/state.rs index 962b5094..a300e6c7 100644 --- a/nssa/src/state.rs +++ b/nssa/src/state.rs @@ -2293,7 +2293,7 @@ pub mod tests { let witness_set = public_transaction::WitnessSet::for_message(&message, &[]); let tx = PublicTransaction::new(message, witness_set); - let result = state.transition_from_public_transaction(&tx, 1); + let result = state.transition_from_public_transaction(&tx, 1, 0); assert!(matches!(result, Err(NssaError::ProgramExecutionFailed(_)))); assert_eq!(state.get_account_by_id(account_id), Account::default()); @@ -2318,7 +2318,7 @@ pub mod tests { let witness_set = public_transaction::WitnessSet::for_message(&message, &[&account_key]); let tx = PublicTransaction::new(message, witness_set); - state.transition_from_public_transaction(&tx, 1).unwrap(); + state.transition_from_public_transaction(&tx, 1, 0).unwrap(); assert_eq!( state.get_account_by_id(account_id), @@ -2577,7 +2577,7 @@ pub mod tests { let tx = PrivacyPreservingTransaction::new(message, witness_set); state - .transition_from_privacy_preserving_transaction(&tx, 1) + .transition_from_privacy_preserving_transaction(&tx, 1, 0) .unwrap(); let nullifier = Nullifier::for_account_update(&sender_commitment, &sender_keys.nsk); @@ -2973,7 +2973,7 @@ pub mod tests { let tx = PrivacyPreservingTransaction::new(message, witness_set); state - .transition_from_privacy_preserving_transaction(&tx, 1) + .transition_from_privacy_preserving_transaction(&tx, 1, 0) .unwrap(); let nullifier = Nullifier::for_account_initialization(&private_keys.npk());