From ecda577e3e8d9e484f6bc61487992f887b6e2bec Mon Sep 17 00:00:00 2001 From: ekzyis Date: Mon, 27 Nov 2023 21:58:19 +0100 Subject: [PATCH] Fix invoice amount check --- lnd/invoice.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnd/invoice.go b/lnd/invoice.go index 84d9163..83c833d 100644 --- a/lnd/invoice.go +++ b/lnd/invoice.go @@ -87,7 +87,7 @@ func (lnd *LNDClient) CheckInvoice(d *db.DB, hash lntypes.Hash) { log.Printf("invoice expired: hash=%s", hash) break } - if lnInvoice.AmountPaid > 0 { + if lnInvoice.AmountPaid == lnInvoice.Amount { if preimage, err = lntypes.MakePreimageFromStr(invoice.Preimage); err != nil { handleLoopError(err) continue