fix: suggestions fix

This commit is contained in:
Pravdyvy 2025-12-22 04:02:12 +02:00
parent 144c037114
commit f6c787e15f
2 changed files with 6 additions and 8 deletions

View File

@ -56,8 +56,6 @@ pub enum TokenProgramAgnosticSubcommand {
///
/// Also if `definition` is private then it is owned, because
/// we can not modify foreign accounts.
///
/// ToDo: Return and add foreign variant when we could modify foreign accounts
Burn {
/// definition - valid 32 byte base58 string with privacy prefix
#[arg(long)]

View File

@ -312,7 +312,9 @@ impl Token<'_> {
let (instruction, program) = token_program_preparation_burn(amount);
// ToDo: Fix this by updating `nssa::public_transaction::Message::try_new` to get raw bytes
let instruction: [u32; 23] = instruction.try_into().unwrap();
let instruction: [u32; 23] = instruction
.try_into()
.expect("Instruction vector should have len 32");
let Ok(nonces) = self.0.get_accounts_nonces(vec![holder_account_id]).await else {
return Err(ExecutionFailureKind::SequencerError);
@ -323,16 +325,14 @@ impl Token<'_> {
nonces,
instruction,
)
.unwrap();
.expect("Instruction should serialize");
let Some(signing_key) = self
let signing_key = self
.0
.storage
.user_data
.get_pub_account_signing_key(&holder_account_id)
else {
return Err(ExecutionFailureKind::KeyNotFoundError);
};
.ok_or(ExecutionFailureKind::KeyNotFoundError)?;
let witness_set =
nssa::public_transaction::WitnessSet::for_message(&message, &[signing_key]);