From cc778356eb32f11fcacd9a8b3224f43d7d1a602b Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Wed, 6 Jul 2022 16:28:03 +0200 Subject: [PATCH] allow paying when lightning invoice is in status FAILED --- electrum/gui/qml/qeinvoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electrum/gui/qml/qeinvoice.py b/electrum/gui/qml/qeinvoice.py index 08e90531d..82378b4e7 100644 --- a/electrum/gui/qml/qeinvoice.py +++ b/electrum/gui/qml/qeinvoice.py @@ -244,12 +244,12 @@ class QEInvoiceParser(QEInvoice): def determine_can_pay(self): if self.invoiceType == QEInvoice.Type.LightningInvoice: - if self.status == PR_UNPAID: + if self.status in [PR_UNPAID, PR_FAILED]: if self.get_max_spendable_lightning() >= self.amount.satsInt: self.canPay = True else: self.userinfo = _('Can\'t pay, insufficient balance') - else: + else: # TODO: proper text for other possible states self.userinfo = _('Can\'t pay, invoice is expired') elif self.invoiceType == QEInvoice.Type.OnchainInvoice: if self.get_max_spendable_onchain() >= self.amount.satsInt: