Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed Oct 30, 2024
1 parent bf7fb1a commit d0ecf1d
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions programs/protocol-contracts-solana/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ pub mod gateway {
}

pub fn whitelist_spl_mint(
ctx: Context<Whitelist>,
signature: [u8; 64],
recovery_id: u8,
message_hash: [u8; 32],
nonce: u64
ctx: Context<Whitelist>,
signature: [u8; 64],
recovery_id: u8,
message_hash: [u8; 32],
nonce: u64,
) -> Result<()> {
let pda = &mut ctx.accounts.pda;

Expand All @@ -106,29 +106,29 @@ pub mod gateway {
recovery_id,
message_hash,
nonce,
"whitelist_spl_mint"
"whitelist_spl_mint",
)?;

Ok(())
}

pub fn unwhitelist_spl_mint(
ctx: Context<Unwhitelist>,
signature: [u8; 64],
recovery_id: u8,
message_hash: [u8; 32],
nonce: u64
ctx: Context<Unwhitelist>,
signature: [u8; 64],
recovery_id: u8,
message_hash: [u8; 32],
nonce: u64,
) -> Result<()> {
let pda = &mut ctx.accounts.pda;

validate_signature_or_authority(
pda,
&ctx.accounts.authority,
signature,
recovery_id,
message_hash,
nonce,
"unwhitelist_spl_mint"
"unwhitelist_spl_mint",
)?;

Ok(())
Expand Down Expand Up @@ -458,7 +458,7 @@ fn validate_signature_or_authority(
msg!("ECDSA signature error");
return err!(Errors::TSSAuthenticationFailed);
}

pda.nonce += 1;
} else {
// no signature provided, fallback to authority check
Expand Down

0 comments on commit d0ecf1d

Please sign in to comment.