From 27fa2d5b69b06d2a817136b6f66317e9a1d20013 Mon Sep 17 00:00:00 2001 From: Andrew Camilleri Date: Thu, 20 Dec 2018 09:21:20 +0100 Subject: [PATCH] do not add ln payment if amount couldn't be parsed --- BTCPayServer/Payments/Lightning/LightningListener.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BTCPayServer/Payments/Lightning/LightningListener.cs b/BTCPayServer/Payments/Lightning/LightningListener.cs index 1fef6f9c6..abf56011b 100644 --- a/BTCPayServer/Payments/Lightning/LightningListener.cs +++ b/BTCPayServer/Payments/Lightning/LightningListener.cs @@ -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))