Merge pull request #9676 from accumulator/qml_send_to_same_address_invoice_status_fix
qml: don't confuse second payment to same address with previous uncon…
This commit is contained in:
@@ -167,6 +167,9 @@ class QEInvoice(QObject, QtEventListener):
|
|||||||
def status(self):
|
def status(self):
|
||||||
if not self._effectiveInvoice:
|
if not self._effectiveInvoice:
|
||||||
return PR_UNKNOWN
|
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)
|
return self._wallet.wallet.get_invoice_status(self._effectiveInvoice)
|
||||||
|
|
||||||
@pyqtProperty(str, notify=statusChanged)
|
@pyqtProperty(str, notify=statusChanged)
|
||||||
|
|||||||
Reference in New Issue
Block a user