Fix: Partial Payment shows 'Could not update BTC (LNURL-Pay)' in invoice logs (#5670)

This commit is contained in:
Nicolas Dorier 2024-01-18 09:57:25 +09:00 committed by GitHub
parent 376067324b
commit a9252fd741
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -285,8 +285,12 @@ namespace BTCPayServer.Payments.Lightning
} }
if (oldDetails is LNURLPayPaymentMethodDetails lnurlPayPaymentMethodDetails && !string.IsNullOrEmpty(lnurlPayPaymentMethodDetails.BOLT11)) if (oldDetails is LNURLPayPaymentMethodDetails lnurlPayPaymentMethodDetails)
{ {
// LNUrlPay doesn't create a BOLT11 until it's actually scanned.
// So if no BOLT11 already created, which is likely the case, do nothing
if (string.IsNullOrEmpty(lnurlPayPaymentMethodDetails.BOLT11))
continue;
try try
{ {
var client = _lightningLikePaymentHandler.CreateLightningClient(lnurlPayPaymentMethodDetails.LightningSupportedPaymentMethod, var client = _lightningLikePaymentHandler.CreateLightningClient(lnurlPayPaymentMethodDetails.LightningSupportedPaymentMethod,
@ -375,7 +379,6 @@ namespace BTCPayServer.Payments.Lightning
InvoiceEventData.EventSeverity.Error); InvoiceEventData.EventSeverity.Error);
} }
} }
await _InvoiceRepository.AddInvoiceLogs(invoice.Id, logs); await _InvoiceRepository.AddInvoiceLogs(invoice.Id, logs);
_CheckInvoices.Writer.TryWrite(invoice.Id); _CheckInvoices.Writer.TryWrite(invoice.Id);
} }