@@ -549,14 +549,24 @@ export namespace NTT {
549
549
nttMessage : Ntt . Message ;
550
550
revertOnDelay : boolean ;
551
551
recipient ?: PublicKey ;
552
- multisigTokenAuthority ?: PublicKey ;
553
552
} ,
554
553
pdas ?: Pdas
555
554
) : Promise < TransactionInstruction > {
556
555
const [ major , , , ] = parseVersion ( program . idl . version ) ;
557
556
558
557
pdas = pdas ?? NTT . pdas ( program . programId ) ;
559
558
559
+ const mintInfo = await splToken . getMint (
560
+ program . provider . connection ,
561
+ config . mint ,
562
+ undefined ,
563
+ config . tokenProgram
564
+ ) ;
565
+ let multisigTokenAuthority : PublicKey | null = null ;
566
+ if ( ! mintInfo . mintAuthority ?. equals ( pdas . tokenAuthority ( ) ) ) {
567
+ multisigTokenAuthority = mintInfo . mintAuthority ;
568
+ }
569
+
560
570
const recipientAddress =
561
571
args . recipient ??
562
572
( await getInboxItem ( program , args . chain , args . nttMessage ) )
@@ -584,19 +594,12 @@ export namespace NTT {
584
594
} ,
585
595
// NOTE: SPL Multisig token authority is only support for versions >= 3.x.x
586
596
...( major >= 3 && {
587
- multisigTokenAuthority : args . multisigTokenAuthority ?? null ,
597
+ multisigTokenAuthority,
588
598
} ) ,
589
599
} )
590
600
. instruction ( ) ;
591
601
592
- const mintInfo = await splToken . getMint (
593
- program . provider . connection ,
594
- config . mint ,
595
- undefined ,
596
- config . tokenProgram
597
- ) ;
598
602
const transferHook = splToken . getTransferHook ( mintInfo ) ;
599
-
600
603
if ( transferHook ) {
601
604
const source = await custodyAccountAddress ( pdas , config ) ;
602
605
const mint = config . mint ;
0 commit comments