Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bill_payments/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<u32> = Vec::new(env);
Expand Down Expand Up @@ -962,7 +962,7 @@ impl BillPayments {
frequency_days: u32,
external_ref: Option<String>,
currency: String,
schedule_id: Option<u32>,
_schedule_id: Option<u32>,
) -> Result<u32, BillPaymentsError> {
owner.require_auth();
Self::require_not_paused(&env, pause_functions::CREATE_BILL)?;
Expand Down
2 changes: 1 addition & 1 deletion insurance/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
10 changes: 5 additions & 5 deletions orchestrator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 1 addition & 8 deletions savings_goals/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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(())
}

Expand Down
Loading