Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
samkim-crypto committed Oct 8, 2024
1 parent 1e094bb commit 14cd128
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ pub enum ConfidentialTransferInstruction {
/// account.
///
/// Data expected by this instruction:
/// None if an `ElGamalRegistry` address is provided in the list of accounts
/// `ConfigureAccountInstructionData` otherwise
/// None if an `ElGamalRegistry` address is provided in the list of
/// accounts `ConfigureAccountInstructionData` otherwise
ConfigureAccount,

/// Approves a token account for confidential transfers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ fn process_update_mint(
Ok(())
}

/// Processes a [ConfigureAccount] instruction with the assumption that an ElGamal registry is
/// provided.
/// Processes a [ConfigureAccount] instruction with the assumption that an
/// ElGamal registry is provided.
fn process_configure_account_from_registry(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down Expand Up @@ -162,8 +162,8 @@ fn process_configure_account(
}

if let Some(registry_account) = elgamal_registry_account {
// if ElGamal registry was provided, then just verify that the registry owner and the
// account match, then skip the signature verification check
// if ElGamal registry was provided, then just verify that the registry owner
// and the account match, then skip the signature verification check
if registry_account.owner != *authority_info.key {
return Err(TokenError::OwnerMismatch.into());
}
Expand Down
14 changes: 6 additions & 8 deletions token/program-2022/src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -711,10 +711,9 @@ pub enum TokenInstruction<'a> {
/// Initialize an ElGamal public key registry for an account.
///
/// 0. `[writable]` The account to initialize
/// 1. `[]` Instructions sysvar if `VerifyPubkeyValidity` is included in
/// the same transaction or context state account if
/// `VerifyPubkeyValidity` is pre-verified into a context state
/// account.
/// 1. `[]` Instructions sysvar if `VerifyPubkeyValidity` is included in the
/// same transaction or context state account if `VerifyPubkeyValidity`
/// is pre-verified into a context state account.
/// 2. `[]` (Optional) Record account if the accompanying proof is to be
/// read from a record account.
CreateElGamalRegistry {
Expand All @@ -731,10 +730,9 @@ pub enum TokenInstruction<'a> {
///
/// 0. `[writable]` The account to initialize
/// 1. `[signer]` The owner of the ElGamal public key registry
/// 2. `[]` Instructions sysvar if `VerifyPubkeyValidity` is included in
/// the same transaction or context state account if
/// `VerifyPubkeyValidity` is pre-verified into a context state
/// account.
/// 2. `[]` Instructions sysvar if `VerifyPubkeyValidity` is included in the
/// same transaction or context state account if `VerifyPubkeyValidity`
/// is pre-verified into a context state account.
/// 3. `[]` (Optional) Record account if the accompanying proof is to be
/// read from a record account.
UpdateElGamalRegistry {
Expand Down
6 changes: 4 additions & 2 deletions token/program-2022/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,8 @@ impl Processor {
Ok(())
}

/// Processes an [CreateElGamalRegistry](enum.TokenInstruction.html) instruction
/// Processes an [CreateElGamalRegistry](enum.TokenInstruction.html)
/// instruction
pub fn process_create_elgamal_registry(
accounts: &[AccountInfo],
owner: &Pubkey,
Expand All @@ -1568,7 +1569,8 @@ impl Processor {
Ok(())
}

/// Processes an [UpdateElGamalRegistry](enum.TokenInstruction.html) instruction
/// Processes an [UpdateElGamalRegistry](enum.TokenInstruction.html)
/// instruction
pub fn process_update_elgamal_registry(
program_id: &Pubkey,
accounts: &[AccountInfo],
Expand Down

0 comments on commit 14cd128

Please sign in to comment.