Skip to content

Commit 221cf19

Browse files
committed
simplify
1 parent 7cd636d commit 221cf19

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

spl/src/token.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,15 +304,10 @@ pub fn set_authority<'info>(
304304
authority_type: spl_token::instruction::AuthorityType,
305305
new_authority: Option<Pubkey>,
306306
) -> Result<()> {
307-
let mut spl_new_authority: Option<&Pubkey> = None;
308-
if new_authority.is_some() {
309-
spl_new_authority = new_authority.as_ref()
310-
}
311-
312307
let ix = spl_token::instruction::set_authority(
313308
&spl_token::ID,
314309
ctx.accounts.account_or_mint.key,
315-
spl_new_authority,
310+
new_authority.as_ref(),
316311
authority_type,
317312
ctx.accounts.current_authority.key,
318313
&[], // TODO: Support multisig signers.

0 commit comments

Comments
 (0)