Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit b4a3674

Browse files
s/AccountHolder/AccountOwner (#356)
1 parent 6761f44 commit b4a3674

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

token/cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ fn command_assign(config: &Config, account: Pubkey, new_owner: Pubkey) -> Commma
158158
&spl_token::id(),
159159
&account,
160160
Some(&new_owner),
161-
AuthorityType::AccountHolder,
161+
AuthorityType::AccountOwner,
162162
&config.owner.pubkey(),
163163
&[],
164164
)?],

token/program/inc/token.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ enum Token_AuthorityType
6161
*/
6262
Token_AuthorityType_FreezeAccount,
6363
/**
64-
* Holder of a given token account
64+
* Owner of a given token account
6565
*/
66-
Token_AuthorityType_AccountHolder,
66+
Token_AuthorityType_AccountOwner,
6767
/**
6868
* Authority to close a token account
6969
*/

token/program/src/instruction.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,8 @@ pub enum AuthorityType {
543543
MintTokens,
544544
/// Authority to freeze any account associated with the Mint
545545
FreezeAccount,
546-
/// Holder of a given token account
547-
AccountHolder,
546+
/// Owner of a given token account
547+
AccountOwner,
548548
/// Authority to close a token account
549549
CloseAccount,
550550
}
@@ -554,7 +554,7 @@ impl AuthorityType {
554554
match self {
555555
AuthorityType::MintTokens => 0,
556556
AuthorityType::FreezeAccount => 1,
557-
AuthorityType::AccountHolder => 2,
557+
AuthorityType::AccountOwner => 2,
558558
AuthorityType::CloseAccount => 3,
559559
}
560560
}
@@ -563,7 +563,7 @@ impl AuthorityType {
563563
match index {
564564
0 => Ok(AuthorityType::MintTokens),
565565
1 => Ok(AuthorityType::FreezeAccount),
566-
2 => Ok(AuthorityType::AccountHolder),
566+
2 => Ok(AuthorityType::AccountOwner),
567567
3 => Ok(AuthorityType::CloseAccount),
568568
_ => Err(TokenError::InvalidInstruction.into()),
569569
}

token/program/src/processor.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ impl Processor {
342342
}
343343

344344
match authority_type {
345-
AuthorityType::AccountHolder => {
345+
AuthorityType::AccountOwner => {
346346
Self::validate_owner(
347347
program_id,
348348
&account.owner,
@@ -1795,7 +1795,7 @@ mod tests {
17951795
&program_id,
17961796
&account_key,
17971797
Some(&owner2_key),
1798-
AuthorityType::AccountHolder,
1798+
AuthorityType::AccountOwner,
17991799
&owner_key,
18001800
&[]
18011801
)
@@ -1836,7 +1836,7 @@ mod tests {
18361836
&program_id,
18371837
&account_key,
18381838
Some(&owner_key),
1839-
AuthorityType::AccountHolder,
1839+
AuthorityType::AccountOwner,
18401840
&owner2_key,
18411841
&[]
18421842
)
@@ -1850,7 +1850,7 @@ mod tests {
18501850
&program_id,
18511851
&account_key,
18521852
Some(&owner2_key),
1853-
AuthorityType::AccountHolder,
1853+
AuthorityType::AccountOwner,
18541854
&owner_key,
18551855
&[],
18561856
)
@@ -1886,7 +1886,7 @@ mod tests {
18861886
&program_id,
18871887
&account_key,
18881888
None,
1889-
AuthorityType::AccountHolder,
1889+
AuthorityType::AccountOwner,
18901890
&owner_key,
18911891
&[],
18921892
)
@@ -1901,7 +1901,7 @@ mod tests {
19011901
&program_id,
19021902
&account_key,
19031903
Some(&owner2_key),
1904-
AuthorityType::AccountHolder,
1904+
AuthorityType::AccountOwner,
19051905
&owner_key,
19061906
&[],
19071907
)
@@ -2928,7 +2928,7 @@ mod tests {
29282928
&program_id,
29292929
&account_key,
29302930
Some(&owner_key),
2931-
AuthorityType::AccountHolder,
2931+
AuthorityType::AccountOwner,
29322932
&multisig_key,
29332933
&[&signer_keys[0]],
29342934
)
@@ -3858,7 +3858,7 @@ mod tests {
38583858
&program_id,
38593859
&account_key,
38603860
Some(&new_owner_key),
3861-
AuthorityType::AccountHolder,
3861+
AuthorityType::AccountOwner,
38623862
&owner_key,
38633863
&[]
38643864
)

0 commit comments

Comments
 (0)