1
0

qml: don't confuse second payment to same address with previous unconfirmed payment to that address

QEInvoiceParser creates a zero amount output invoice when pasting an address, which would return the
wrong status when calling wallet.get_invoice_status() (there is some address heuristic in
wallet._is_onchain_invoice_paid which is associating with the previous payment)
This commit is contained in:
Sander van Grieken
2025-03-27 11:09:31 +01:00
parent 96793d6e43
commit 7391a1039d

View File

@@ -167,6 +167,9 @@ class QEInvoice(QObject, QtEventListener):
def status(self):
if not self._effectiveInvoice:
return PR_UNKNOWN
if self.invoiceType == QEInvoice.Type.OnchainInvoice and self._effectiveInvoice.get_amount_sat() == 0:
# no amount set, not a final invoice, get_invoice_status would be wrong
return PR_UNPAID
return self._wallet.wallet.get_invoice_status(self._effectiveInvoice)
@pyqtProperty(str, notify=statusChanged)