@@ -348,7 +348,7 @@ func (h *NoPrivacyTransferWithAuthorityFulfillmentHandler) MakeOnDemandTransacti
348
348
return nil , err
349
349
}
350
350
351
- _ , destinationeMemory , destinationIndex , err := getVirtualTimelockAccountStateInMemory (ctx , h .vmIndexerClient , common .CodeVmAccount , destinationAuthority )
351
+ _ , destinationMemory , destinationIndex , err := getVirtualTimelockAccountStateInMemory (ctx , h .vmIndexerClient , common .CodeVmAccount , destinationAuthority )
352
352
if err != nil {
353
353
return nil , err
354
354
}
@@ -364,15 +364,22 @@ func (h *NoPrivacyTransferWithAuthorityFulfillmentHandler) MakeOnDemandTransacti
364
364
nonceIndex ,
365
365
sourceMemory ,
366
366
sourceIndex ,
367
- destinationeMemory ,
367
+ destinationMemory ,
368
368
destinationIndex ,
369
369
370
370
* actionRecord .Quantity ,
371
371
)
372
372
} else {
373
- isCreateOnSend , err := h .data .HasFeeAction (ctx , fulfillmentRecord .Intent , transactionpb .FeePaymentAction_CREATE_ON_SEND_WITHDRAWAL )
374
- if err != nil {
375
- return & solana.Transaction {}, err
373
+ isFeePayment := actionRecord .FeeType != nil
374
+
375
+ var isCreateOnSend bool
376
+ // The Fee payment can be an external transfer, but we know the account
377
+ // already exists and doesn't need an idempotent create instruction
378
+ if ! isFeePayment {
379
+ isCreateOnSend , err = h .data .HasFeeAction (ctx , fulfillmentRecord .Intent , transactionpb .FeePaymentAction_CREATE_ON_SEND_WITHDRAWAL )
380
+ if err != nil {
381
+ return & solana.Transaction {}, err
382
+ }
376
383
}
377
384
378
385
var destinationOwnerAccount * common.Account
@@ -540,7 +547,7 @@ func (h *NoPrivacyWithdrawFulfillmentHandler) MakeOnDemandTransaction(ctx contex
540
547
return nil , err
541
548
}
542
549
543
- _ , destinationeMemory , destinationIndex , err := getVirtualTimelockAccountStateInMemory (ctx , h .vmIndexerClient , common .CodeVmAccount , destinationAuthority )
550
+ _ , destinationMemory , destinationIndex , err := getVirtualTimelockAccountStateInMemory (ctx , h .vmIndexerClient , common .CodeVmAccount , destinationAuthority )
544
551
if err != nil {
545
552
return nil , err
546
553
}
@@ -556,7 +563,7 @@ func (h *NoPrivacyWithdrawFulfillmentHandler) MakeOnDemandTransaction(ctx contex
556
563
nonceIndex ,
557
564
sourceMemory ,
558
565
sourceIndex ,
559
- destinationeMemory ,
566
+ destinationMemory ,
560
567
destinationIndex ,
561
568
)
562
569
} else {
0 commit comments