Skip to content

Commit

Permalink
solana: fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kcsongor committed Mar 14, 2024
1 parent a5f2a56 commit 71dcc38
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,13 @@ pub trait NTTAccounts {
} = args;
let mut hasher = Keccak256::new();

hasher.update(&amount.to_be_bytes());
hasher.update(&recipient_chain.id.to_be_bytes());
hasher.update(&recipient_address);
hasher.update(&[*should_queue as u8]);
hasher.update(amount.to_be_bytes());
hasher.update(recipient_chain.id.to_be_bytes());
hasher.update(recipient_address);
hasher.update([*should_queue as u8]);

let (session_authority, _) = Pubkey::find_program_address(
&[
SESSION_AUTHORITY_SEED.as_ref(),
sender.as_ref(),
&hasher.finalize(),
],
&[SESSION_AUTHORITY_SEED, sender.as_ref(), &hasher.finalize()],
&self.program(),
);
session_authority
Expand All @@ -141,7 +137,7 @@ pub trait NTTAccounts {

fn token_authority(&self) -> Pubkey {
let (token_authority, _) =
Pubkey::find_program_address(&[TOKEN_AUTHORITY_SEED.as_ref()], &self.program());
Pubkey::find_program_address(&[TOKEN_AUTHORITY_SEED], &self.program());
token_authority
}

Expand Down

0 comments on commit 71dcc38

Please sign in to comment.