Fix prism on bolt11 specific payment

This commit is contained in:
Kukks
2023-08-04 14:58:59 +02:00
parent 646554d5d6
commit 9fd89dffbb
4 changed files with 8 additions and 11 deletions

View File

@@ -340,14 +340,12 @@ var onChainCatchAllIdentifier = "*"+ PaymentTypes.BTCLike.ToStringNormalized();
}
else
{
if (pmd is null)
{
pm = invoiceEvent.Invoice.GetPaymentMethod(new PaymentMethodId("BTC", PaymentTypes.LightningLike));
}
pm = invoiceEvent.Invoice.GetPaymentMethod(invoiceEvent.Invoice.GetPayments(true)
.FirstOrDefault()?.GetPaymentMethodId());
prism = catchAllPrism;
}
var splits = prism?.Destinations;
if (splits?.Any() is not true)
if (splits?.Any() is not true || pm is null)
{
return;
}