lnurl: better handle unimplemented lnurl subtypes
fixes https://github.com/spesmilo/electrum/issues/7971
This commit is contained in:
@@ -237,9 +237,12 @@ class SendScreen(CScreen, Logger):
|
||||
def set_lnurl6(self, lnurl: str):
|
||||
url = decode_lnurl(lnurl)
|
||||
domain = urlparse(url).netloc
|
||||
# FIXME network request blocking GUI thread:
|
||||
lnurl_data = Network.run_from_another_thread(request_lnurl(url))
|
||||
if not lnurl_data:
|
||||
try:
|
||||
# FIXME network request blocking GUI thread:
|
||||
lnurl_data = Network.run_from_another_thread(request_lnurl(url))
|
||||
except LNURLError as e:
|
||||
self.app.show_error(f"LNURL request encountered error: {e}")
|
||||
self.do_clear()
|
||||
return
|
||||
self.lnurl_data = lnurl_data
|
||||
self.address = "invoice from lnurl"
|
||||
|
||||
Reference in New Issue
Block a user