s/AccountHolder/AccountOwner (#356)

This commit is contained in:
Tyera Eulberg 2020-08-28 12:11:57 -06:00 committed by GitHub
parent 6761f440ab
commit b4a3674437
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 15 deletions

View File

@ -158,7 +158,7 @@ fn command_assign(config: &Config, account: Pubkey, new_owner: Pubkey) -> Commma
&spl_token::id(),
&account,
Some(&new_owner),
AuthorityType::AccountHolder,
AuthorityType::AccountOwner,
&config.owner.pubkey(),
&[],
)?],

View File

@ -61,9 +61,9 @@ enum Token_AuthorityType
*/
Token_AuthorityType_FreezeAccount,
/**
* Holder of a given token account
* Owner of a given token account
*/
Token_AuthorityType_AccountHolder,
Token_AuthorityType_AccountOwner,
/**
* Authority to close a token account
*/

View File

@ -543,8 +543,8 @@ pub enum AuthorityType {
MintTokens,
/// Authority to freeze any account associated with the Mint
FreezeAccount,
/// Holder of a given token account
AccountHolder,
/// Owner of a given token account
AccountOwner,
/// Authority to close a token account
CloseAccount,
}
@ -554,7 +554,7 @@ impl AuthorityType {
match self {
AuthorityType::MintTokens => 0,
AuthorityType::FreezeAccount => 1,
AuthorityType::AccountHolder => 2,
AuthorityType::AccountOwner => 2,
AuthorityType::CloseAccount => 3,
}
}
@ -563,7 +563,7 @@ impl AuthorityType {
match index {
0 => Ok(AuthorityType::MintTokens),
1 => Ok(AuthorityType::FreezeAccount),
2 => Ok(AuthorityType::AccountHolder),
2 => Ok(AuthorityType::AccountOwner),
3 => Ok(AuthorityType::CloseAccount),
_ => Err(TokenError::InvalidInstruction.into()),
}

View File

@ -342,7 +342,7 @@ impl Processor {
}
match authority_type {
AuthorityType::AccountHolder => {
AuthorityType::AccountOwner => {
Self::validate_owner(
program_id,
&account.owner,
@ -1795,7 +1795,7 @@ mod tests {
&program_id,
&account_key,
Some(&owner2_key),
AuthorityType::AccountHolder,
AuthorityType::AccountOwner,
&owner_key,
&[]
)
@ -1836,7 +1836,7 @@ mod tests {
&program_id,
&account_key,
Some(&owner_key),
AuthorityType::AccountHolder,
AuthorityType::AccountOwner,
&owner2_key,
&[]
)
@ -1850,7 +1850,7 @@ mod tests {
&program_id,
&account_key,
Some(&owner2_key),
AuthorityType::AccountHolder,
AuthorityType::AccountOwner,
&owner_key,
&[],
)
@ -1886,7 +1886,7 @@ mod tests {
&program_id,
&account_key,
None,
AuthorityType::AccountHolder,
AuthorityType::AccountOwner,
&owner_key,
&[],
)
@ -1901,7 +1901,7 @@ mod tests {
&program_id,
&account_key,
Some(&owner2_key),
AuthorityType::AccountHolder,
AuthorityType::AccountOwner,
&owner_key,
&[],
)
@ -2928,7 +2928,7 @@ mod tests {
&program_id,
&account_key,
Some(&owner_key),
AuthorityType::AccountHolder,
AuthorityType::AccountOwner,
&multisig_key,
&[&signer_keys[0]],
)
@ -3858,7 +3858,7 @@ mod tests {
&program_id,
&account_key,
Some(&new_owner_key),
AuthorityType::AccountHolder,
AuthorityType::AccountOwner,
&owner_key,
&[]
)