File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed
Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff line change @@ -341,15 +341,10 @@ pub fn set_authority<'info>(
341341 authority_type : spl_token_2022:: instruction:: AuthorityType ,
342342 new_authority : Option < Pubkey > ,
343343) -> Result < ( ) > {
344- let mut spl_new_authority: Option < & Pubkey > = None ;
345- if new_authority. is_some ( ) {
346- spl_new_authority = new_authority. as_ref ( )
347- }
348-
349344 let ix = spl_token_2022:: instruction:: set_authority (
350345 ctx. program . key ,
351346 ctx. accounts . account_or_mint . key ,
352- spl_new_authority ,
347+ new_authority . as_ref ( ) ,
353348 authority_type,
354349 ctx. accounts . current_authority . key ,
355350 & [ ] , // TODO: Support multisig signers.
You can’t perform that action at this time.
0 commit comments