Update public.rs

This commit is contained in:
jonesmarvin8 2026-04-28 20:48:02 -04:00
parent 01cc7e24b6
commit d22a884b5e

View File

@ -34,23 +34,23 @@ impl NativeTokenTransfer<'_> {
// Fetch nonces for both accounts unconditionally
let mut nonces = self
.0
.get_accounts_nonces(vec![from])
.await
.map_err(ExecutionFailureKind::SequencerError)?;
let to_signing_key = self.0.storage.user_data.get_pub_account_signing_key(to);
if let Some(_to_signing_key) = to_signing_key {
let to_nonces = self
.0
.get_accounts_nonces(vec![from])
.get_accounts_nonces(vec![to])
.await
.map_err(ExecutionFailureKind::SequencerError)?;
let to_signing_key = self.0.storage.user_data.get_pub_account_signing_key(to);
if let Some(_to_signing_key) = to_signing_key {
let to_nonces = self
.0
.get_accounts_nonces(vec![to])
.await
.map_err(ExecutionFailureKind::SequencerError)?;
nonces.extend(to_nonces);
} else {
println!(
"Receiver's account ({to}) private key not found in wallet. Proceeding with only sender's key."
);
}
nonces.extend(to_nonces);
} else {
println!(
"Receiver's account ({to}) private key not found in wallet. Proceeding with only sender's key."
);
}
let message = Message::try_new(program_id, account_ids, nonces, balance_to_move).unwrap();