diff --git a/bill_payments/src/lib.rs b/bill_payments/src/lib.rs index aaf86caa..e455b1e3 100644 --- a/bill_payments/src/lib.rs +++ b/bill_payments/src/lib.rs @@ -386,7 +386,7 @@ impl BillPayments { fn index_add_currency(env: &Env, owner: &Address, currency: &String, bill_id: u32) { let mut idx = Self::get_currency_index(env); let key = (owner.clone(), currency.clone()); - let mut ids = idx.get(key.clone()).unwrap_or_else(|| Vec::new(env)); + let ids = idx.get(key.clone()).unwrap_or_else(|| Vec::new(env)); // Insert in ascending order let mut new_ids: Vec = Vec::new(env); @@ -962,7 +962,7 @@ impl BillPayments { frequency_days: u32, external_ref: Option, currency: String, - schedule_id: Option, + _schedule_id: Option, ) -> Result { owner.require_auth(); Self::require_not_paused(&env, pause_functions::CREATE_BILL)?; diff --git a/insurance/src/test.rs b/insurance/src/test.rs index c3663f86..9d05eaf3 100644 --- a/insurance/src/test.rs +++ b/insurance/src/test.rs @@ -88,4 +88,4 @@ fn test_batch_pay() { ids.push_back(id2); let count = client.batch_pay_premiums(&owner, &ids).unwrap(); assert_eq!(count, 2); -} \ No newline at end of file +} diff --git a/orchestrator/src/lib.rs b/orchestrator/src/lib.rs index 2d6b4048..d713c32d 100644 --- a/orchestrator/src/lib.rs +++ b/orchestrator/src/lib.rs @@ -437,11 +437,11 @@ impl Orchestrator { Self::update_execution_stats(&env, false); Self::append_audit(&env, symbol_short!("flow_exec"), &executor, false); - /// Emit flow lifecycle event - flow failed - /// Topic: ("Remitwise", EventCategory::Transaction, EventPriority::High, "flow_fail") - /// Payload: (executor: Address, error_code: u32) - /// Emitted when a remittance flow fails. Error code corresponds to OrchestratorError enum. - /// Does not leak sensitive amounts - only includes error code for debugging. + // Emit flow lifecycle event - flow failed + // Topic: ("Remitwise", EventCategory::Transaction, EventPriority::High, "flow_fail") + // Payload: (executor: Address, error_code: u32) + // Emitted when a remittance flow fails. Error code corresponds to OrchestratorError enum. + // Does not leak sensitive amounts - only includes error code for debugging. RemitwiseEvents::emit( &env, EventCategory::Transaction, diff --git a/savings_goals/src/lib.rs b/savings_goals/src/lib.rs index d99db226..f1f8afa8 100644 --- a/savings_goals/src/lib.rs +++ b/savings_goals/src/lib.rs @@ -6,7 +6,6 @@ use soroban_sdk::{ Symbol, Vec, }; extern crate alloc; -use alloc::string::ToString; // Event topics const GOAL_CREATED: Symbol = symbol_short!("created"); @@ -309,17 +308,11 @@ impl SavingsGoalContract { } fn validate_goal_name(name: &String) -> Result<(), SavingsGoalError> { - let name_str = name.to_string(); - let name_len = name_str.len() as u32; + let name_len = name.len() as u32; if name_len == 0 || name_len > MAX_GOAL_NAME_LEN_BYTES { return Err(SavingsGoalError::InvalidGoalName); } - for &byte in name_str.as_bytes() { - if byte < 32 || byte > 126 { - return Err(SavingsGoalError::InvalidGoalName); - } - } Ok(()) }