diff --git a/nssa/src/state.rs b/nssa/src/state.rs index ad429ff9..7ddb9a5d 100644 --- a/nssa/src/state.rs +++ b/nssa/src/state.rs @@ -460,25 +460,6 @@ pub mod tests { } } - fn transfer_transaction( - from: AccountId, - from_key: &PrivateKey, - from_nonce: u128, - to: AccountId, - to_key: &PrivateKey, - to_nonce: u128, - balance: u128, - ) -> PublicTransaction { - let account_ids = vec![from, to]; - let nonces = vec![Nonce(from_nonce), Nonce(to_nonce)]; - let program_id = Program::authenticated_transfer_program().id(); - let message = - public_transaction::Message::try_new(program_id, account_ids, nonces, balance).unwrap(); - let witness_set = - public_transaction::WitnessSet::for_message(&message, &[from_key, to_key]); - PublicTransaction::new(message, witness_set) - } - // ── Flash Swap types (mirrors of guest types for host-side serialisation) ── #[derive(serde::Serialize, serde::Deserialize)] @@ -510,6 +491,25 @@ pub mod tests { }, } + fn transfer_transaction( + from: AccountId, + from_key: &PrivateKey, + from_nonce: u128, + to: AccountId, + to_key: &PrivateKey, + to_nonce: u128, + balance: u128, + ) -> PublicTransaction { + let account_ids = vec![from, to]; + let nonces = vec![Nonce(from_nonce), Nonce(to_nonce)]; + let program_id = Program::authenticated_transfer_program().id(); + let message = + public_transaction::Message::try_new(program_id, account_ids, nonces, balance).unwrap(); + let witness_set = + public_transaction::WitnessSet::for_message(&message, &[from_key, to_key]); + PublicTransaction::new(message, witness_set) + } + fn build_flash_swap_tx( initiator: &Program, vault_id: AccountId,