Merge pull request #9626 from ziggie1984/payment-lifecycle-small-fix

payment lifecycle small fix
This commit is contained in:
Oliver Gugger authored and GitHub committed 2025-03-25 08:15:48 -06:00
commit cf35be847c
6 files changed
+75 -1

No files matched your search

+12
View File
@@ -884,6 +884,18 @@ func (r *RouterBackend) extractIntentFromSendRequest(
}
payIntent.DestCustomRecords = customRecords
// Keysend payments do not support MPP payments.
//
// NOTE: There is no need to validate the `MaxParts` value here because
// it is set to 1 somewhere else in case it's a keysend payment.
if customRecords.IsKeysend() {
if payIntent.MaxShardAmt != nil {
return nil, errors.New("keysend payments cannot " +
"specify a max shard amount - MPP not " +
"supported with keysend payments")
}
}
firstHopRecords := lnwire.CustomRecords(rpcPayReq.FirstHopCustomRecords)
if err := firstHopRecords.Validate(); err != nil {
return nil, err