mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-07 15:53:14 +00:00
fix: suggestions fix
This commit is contained in:
parent
144c037114
commit
f6c787e15f
@ -56,8 +56,6 @@ pub enum TokenProgramAgnosticSubcommand {
|
|||||||
///
|
///
|
||||||
/// Also if `definition` is private then it is owned, because
|
/// Also if `definition` is private then it is owned, because
|
||||||
/// we can not modify foreign accounts.
|
/// we can not modify foreign accounts.
|
||||||
///
|
|
||||||
/// ToDo: Return and add foreign variant when we could modify foreign accounts
|
|
||||||
Burn {
|
Burn {
|
||||||
/// definition - valid 32 byte base58 string with privacy prefix
|
/// definition - valid 32 byte base58 string with privacy prefix
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
|
|||||||
@ -312,7 +312,9 @@ impl Token<'_> {
|
|||||||
let (instruction, program) = token_program_preparation_burn(amount);
|
let (instruction, program) = token_program_preparation_burn(amount);
|
||||||
|
|
||||||
// ToDo: Fix this by updating `nssa::public_transaction::Message::try_new` to get raw bytes
|
// 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 {
|
let Ok(nonces) = self.0.get_accounts_nonces(vec![holder_account_id]).await else {
|
||||||
return Err(ExecutionFailureKind::SequencerError);
|
return Err(ExecutionFailureKind::SequencerError);
|
||||||
@ -323,16 +325,14 @@ impl Token<'_> {
|
|||||||
nonces,
|
nonces,
|
||||||
instruction,
|
instruction,
|
||||||
)
|
)
|
||||||
.unwrap();
|
.expect("Instruction should serialize");
|
||||||
|
|
||||||
let Some(signing_key) = self
|
let signing_key = self
|
||||||
.0
|
.0
|
||||||
.storage
|
.storage
|
||||||
.user_data
|
.user_data
|
||||||
.get_pub_account_signing_key(&holder_account_id)
|
.get_pub_account_signing_key(&holder_account_id)
|
||||||
else {
|
.ok_or(ExecutionFailureKind::KeyNotFoundError)?;
|
||||||
return Err(ExecutionFailureKind::KeyNotFoundError);
|
|
||||||
};
|
|
||||||
let witness_set =
|
let witness_set =
|
||||||
nssa::public_transaction::WitnessSet::for_message(&message, &[signing_key]);
|
nssa::public_transaction::WitnessSet::for_message(&message, &[signing_key]);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user