From 970187ace4ca39d938d676f901e395986f0a9e3d Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Tue, 3 Dec 2019 20:41:46 +0100 Subject: [PATCH] invoices: remove unnecessary invoice value check --- invoices/update.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/invoices/update.go b/invoices/update.go index 467f17fc..7a1b0324 100644 --- a/invoices/update.go +++ b/invoices/update.go @@ -107,8 +107,9 @@ func updateInvoice(ctx *invoiceUpdateCtx, inv *channeldb.Invoice) ( // If an invoice amount is specified, check that enough is paid. Also // check this for duplicate payments if the invoice is already settled - // or accepted. - if inv.Terms.Value > 0 && ctx.amtPaid < inv.Terms.Value { + // or accepted. In case this is a zero-valued invoice, it will always be + // enough. + if ctx.amtPaid < inv.Terms.Value { return nil, resultAmountTooLow, nil }