@@ -366,6 +366,7 @@ export namespace NTT {
366
366
) : Promise < TransactionInstruction > {
367
367
pdas = pdas ?? NTT . pdas ( program . programId ) ;
368
368
369
+ const custody = await custodyAccountAddress ( pdas , config ) ;
369
370
const recipientChain = toChain ( args . transferArgs . recipientChain . id ) ;
370
371
const transferIx = await program . methods
371
372
. transferBurn ( args . transferArgs )
@@ -378,8 +379,8 @@ export namespace NTT {
378
379
tokenProgram : config . tokenProgram ,
379
380
outboxItem : args . outboxItem ,
380
381
outboxRateLimit : pdas . outboxRateLimitAccount ( ) ,
381
- custody : await custodyAccountAddress ( pdas , config ) ,
382
382
systemProgram : SystemProgram . programId ,
383
+ custody,
383
384
} ,
384
385
peer : pdas . peerAccount ( recipientChain ) ,
385
386
inboxRateLimit : pdas . inboxRateLimitAccount ( recipientChain ) ,
@@ -448,10 +449,10 @@ export namespace NTT {
448
449
pdas = pdas ?? NTT . pdas ( program . programId ) ;
449
450
450
451
const chain = toChain ( args . transferArgs . recipientChain . id ) ;
451
-
452
+ const custody = await custodyAccountAddress ( pdas , config ) ;
452
453
const transferIx = await program . methods
453
454
. transferLock ( args . transferArgs )
454
- . accounts ( {
455
+ . accountsStrict ( {
455
456
common : {
456
457
payer : args . payer ,
457
458
config : { config : pdas . configAccount ( ) } ,
@@ -460,14 +461,16 @@ export namespace NTT {
460
461
tokenProgram : config . tokenProgram ,
461
462
outboxItem : args . outboxItem ,
462
463
outboxRateLimit : pdas . outboxRateLimitAccount ( ) ,
463
- custody : await custodyAccountAddress ( pdas , config ) ,
464
+ custody,
465
+ systemProgram : SystemProgram . programId ,
464
466
} ,
465
467
peer : pdas . peerAccount ( chain ) ,
466
468
inboxRateLimit : pdas . inboxRateLimitAccount ( chain ) ,
467
469
sessionAuthority : pdas . sessionAuthority (
468
470
args . fromAuthority ,
469
471
args . transferArgs
470
472
) ,
473
+ custody,
471
474
} )
472
475
. instruction ( ) ;
473
476
@@ -647,6 +650,7 @@ export namespace NTT {
647
650
. recipientAddress ;
648
651
649
652
pdas = pdas ?? NTT . pdas ( program . programId ) ;
653
+ const custody = await custodyAccountAddress ( pdas , config ) ;
650
654
651
655
const transferIx = await program . methods
652
656
. releaseInboundUnlock ( {
@@ -666,9 +670,9 @@ export namespace NTT {
666
670
mint : config . mint ,
667
671
tokenAuthority : pdas . tokenAuthority ( ) ,
668
672
tokenProgram : config . tokenProgram ,
669
- custody : await custodyAccountAddress ( pdas , config ) ,
673
+ custody,
670
674
} ,
671
- custody : "" ,
675
+ custody,
672
676
} )
673
677
. instruction ( ) ;
674
678
0 commit comments