Skip to content

Commit 03c460b

Browse files
committed
Fix merge
1 parent 66b24c3 commit 03c460b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: p-token/src/processor/set_authority.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ pub fn process_set_authority(accounts: &[AccountInfo], instruction_data: &[u8])
4545
return Err(TokenError::AccountFrozen.into());
4646
}
4747

48-
match args.authority_type()? {
48+
match authority_type {
4949
AuthorityType::AccountOwner => {
5050
validate_owner(&account.owner, authority_info, remaining)?;
5151

52-
if let Some(authority) = args.new_authority() {
52+
if let Some(authority) = new_authority {
5353
account.owner = *authority;
5454
} else {
5555
return Err(TokenError::InvalidInstruction.into());
@@ -66,7 +66,7 @@ pub fn process_set_authority(accounts: &[AccountInfo], instruction_data: &[u8])
6666
let authority = account.close_authority().unwrap_or(&account.owner);
6767
validate_owner(authority, authority_info, remaining)?;
6868

69-
if let Some(authority) = args.new_authority() {
69+
if let Some(authority) = new_authority {
7070
account.set_close_authority(authority);
7171
} else {
7272
account.clear_close_authority();
@@ -81,15 +81,15 @@ pub fn process_set_authority(accounts: &[AccountInfo], instruction_data: &[u8])
8181
// `load_mut` validates that the mint is initialized.
8282
let mint = unsafe { load_mut::<Mint>(account_info.borrow_mut_data_unchecked())? };
8383

84-
match args.authority_type()? {
84+
match authority_type {
8585
AuthorityType::MintTokens => {
8686
// Once a mint's supply is fixed, it cannot be undone by setting a new
8787
// mint_authority.
8888
let mint_authority = mint.mint_authority().ok_or(TokenError::FixedSupply)?;
8989

9090
validate_owner(mint_authority, authority_info, remaining)?;
9191

92-
if let Some(authority) = args.new_authority() {
92+
if let Some(authority) = new_authority {
9393
mint.set_mint_authority(authority);
9494
} else {
9595
mint.clear_mint_authority();
@@ -104,7 +104,7 @@ pub fn process_set_authority(accounts: &[AccountInfo], instruction_data: &[u8])
104104

105105
validate_owner(freeze_authority, authority_info, remaining)?;
106106

107-
if let Some(authority) = args.new_authority() {
107+
if let Some(authority) = new_authority {
108108
mint.set_freeze_authority(authority);
109109
} else {
110110
mint.clear_freeze_authority();

0 commit comments

Comments
 (0)