From 30028520e0b55a48fc59938140648c417659513a Mon Sep 17 00:00:00 2001 From: SomberNight Date: Thu, 9 Jan 2025 16:10:46 +0000 Subject: [PATCH] qml/qeinvoice.py: show error details when scanning e.g. lnurl-withdraw saying the lnurl type is not supported is more informative than "could not resolve" --- 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 f4d23f046..a09d5eb79 100644 --- a/electrum/gui/qml/qeinvoice.py +++ b/electrum/gui/qml/qeinvoice.py @@ -573,7 +573,7 @@ class QEInvoiceParser(QEInvoice): def resolve_pi(self): assert self._pi.need_resolve() - def on_finished(pi): + def on_finished(pi: PaymentIdentifier): self._busy = False self.busyChanged.emit() @@ -581,7 +581,7 @@ class QEInvoiceParser(QEInvoice): if pi.type in [PaymentIdentifierType.EMAILLIKE, PaymentIdentifierType.DOMAINLIKE]: msg = _('Could not resolve address') elif pi.type == PaymentIdentifierType.LNURLP: - msg = _('Could not resolve LNURL') + msg = _('Could not resolve LNURL') + "\n\n" + pi.get_error() elif pi.type == PaymentIdentifierType.BIP70: msg = _('Could not resolve BIP70 payment request: {}').format(pi.error) else: