From d0ecf1d2fe203660666f521465ba258cdce6372d Mon Sep 17 00:00:00 2001 From: skosito Date: Wed, 30 Oct 2024 19:11:37 +0100 Subject: [PATCH] fmt --- programs/protocol-contracts-solana/src/lib.rs | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/programs/protocol-contracts-solana/src/lib.rs b/programs/protocol-contracts-solana/src/lib.rs index 16a7a05..dcfd8af 100644 --- a/programs/protocol-contracts-solana/src/lib.rs +++ b/programs/protocol-contracts-solana/src/lib.rs @@ -91,11 +91,11 @@ pub mod gateway { } pub fn whitelist_spl_mint( - ctx: Context, - signature: [u8; 64], - recovery_id: u8, - message_hash: [u8; 32], - nonce: u64 + ctx: Context, + signature: [u8; 64], + recovery_id: u8, + message_hash: [u8; 32], + nonce: u64, ) -> Result<()> { let pda = &mut ctx.accounts.pda; @@ -106,21 +106,21 @@ pub mod gateway { recovery_id, message_hash, nonce, - "whitelist_spl_mint" + "whitelist_spl_mint", )?; - + Ok(()) } - + pub fn unwhitelist_spl_mint( - ctx: Context, - signature: [u8; 64], - recovery_id: u8, - message_hash: [u8; 32], - nonce: u64 + ctx: Context, + 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, @@ -128,7 +128,7 @@ pub mod gateway { recovery_id, message_hash, nonce, - "unwhitelist_spl_mint" + "unwhitelist_spl_mint", )?; Ok(()) @@ -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