do not add ln payment if amount couldn't be parsed

This commit is contained in:
Andrew Camilleri
2018-12-20 09:21:20 +01:00
parent 47ef7661d8
commit 27fa2d5b69

View File

@@ -156,7 +156,8 @@ namespace BTCPayServer.Payments.Lightning
if (notification.Id == listenedInvoice.PaymentMethodDetails.InvoiceId &&
notification.BOLT11 == listenedInvoice.PaymentMethodDetails.BOLT11)
{
if (notification.Status == LightningInvoiceStatus.Paid && notification.PaidAt.HasValue)
if (notification.Status == LightningInvoiceStatus.Paid &&
notification.PaidAt.HasValue && notification.Amount != null)
{
await AddPayment(network, notification, listenedInvoice);
if (DoneListening(listenedInvoice))