From e2bb7df54a2f59e944bbe5af0f9ca36b4bd201db Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Wed, 17 Jan 2024 14:09:57 +0100 Subject: [PATCH] qml: invert, more strict check in determine_can_pay for invoice types, also disable paste button while PI is being evaluated --- electrum/gui/qml/components/SendDialog.qml | 1 + electrum/gui/qml/qeinvoice.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qml/components/SendDialog.qml b/electrum/gui/qml/components/SendDialog.qml index 2e77a3737..6fe8201ad 100644 --- a/electrum/gui/qml/components/SendDialog.qml +++ b/electrum/gui/qml/components/SendDialog.qml @@ -66,6 +66,7 @@ ElDialog { FlatButton { Layout.fillWidth: true Layout.preferredWidth: 1 + enabled: !invoiceParser.busy icon.source: '../../icons/copy_bw.png' text: qsTr('Paste') onClicked: { diff --git a/electrum/gui/qml/qeinvoice.py b/electrum/gui/qml/qeinvoice.py index 1e3c79b64..77c500ced 100644 --- a/electrum/gui/qml/qeinvoice.py +++ b/electrum/gui/qml/qeinvoice.py @@ -337,7 +337,7 @@ class QEInvoice(QObject, QtEventListener): self.canPay = False self.canSave = False - if self.invoiceType in [QEInvoice.Type.Invalid, QEInvoice.Type.LNURLPayRequest]: + if self.invoiceType not in [QEInvoice.Type.LightningInvoice, QEInvoice.Type.OnchainInvoice]: return if not self.amountOverride.isEmpty: