Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ocp/rpc/transaction/intent_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,12 @@ func (h *SendPublicPaymentIntentHandler) validateActions(
return NewIntentValidationError("payments to external destinations must be withdrawals")
}

// A fee payment funds creation of the destination ATA, so the destination
// owner must be provided to validate the ATA derivation.
if simResult.HasAnyFeePayments() && metadata.DestinationOwner == nil {
return NewIntentValidationErrorf("destination owner account is required when paying %s fee", transactionpb.FeePaymentAction_CREATE_ON_SEND_WITHDRAWAL.String())
}

// Ensure the destination is the intent mint ATA for the client-provided owner,
// if provided. We'll check later if this is absolutely required.
var isDestinationOwnerVmSwapPda bool
Expand Down
Loading