1
0

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"
This commit is contained in:
SomberNight
2025-01-09 16:10:46 +00:00
parent 01c913ddc8
commit 30028520e0

View File

@@ -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: