From 34d39e84f0e0691ef3f274dbf5f912b89f6fa5fd Mon Sep 17 00:00:00 2001
From: Sander van Grieken <sander@outrightsolutions.nl>
Date: Wed, 26 Oct 2022 11:18:01 +0200
Subject: [PATCH] qml: don't check min amount for amount-less invoice

---
 electrum/gui/qml/qeinvoice.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/electrum/gui/qml/qeinvoice.py b/electrum/gui/qml/qeinvoice.py
index 019abe890..5575b7f3c 100644
--- a/electrum/gui/qml/qeinvoice.py
+++ b/electrum/gui/qml/qeinvoice.py
@@ -280,7 +280,7 @@ class QEInvoiceParser(QEInvoice):
             if self.status in [PR_UNPAID, PR_FAILED]:
                 if self.get_max_spendable_lightning() >= self.amount.satsInt:
                     lnaddr = self._effectiveInvoice._lnaddr
-                    if self.amount.satsInt < lnaddr.amount * COIN:
+                    if lnaddr.amount and self.amount.satsInt < lnaddr.amount * COIN:
                         self.userinfo = _('Cannot pay less than the amount specified in the invoice')
                     else:
                         self.canPay = True