We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7cd636d commit 221cf19Copy full SHA for 221cf19
spl/src/token.rs
@@ -304,15 +304,10 @@ pub fn set_authority<'info>(
304
authority_type: spl_token::instruction::AuthorityType,
305
new_authority: Option<Pubkey>,
306
) -> 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
-
312
let ix = spl_token::instruction::set_authority(
313
&spl_token::ID,
314
ctx.accounts.account_or_mint.key,
315
- spl_new_authority,
+ new_authority.as_ref(),
316
authority_type,
317
ctx.accounts.current_authority.key,
318
&[], // TODO: Support multisig signers.
0 commit comments