1
0

lnurl: better handle unimplemented lnurl subtypes

fixes https://github.com/spesmilo/electrum/issues/7971
This commit is contained in:
SomberNight
2022-09-20 16:00:20 +00:00
parent 20bcb15480
commit e5f21fb7b5
2 changed files with 8 additions and 5 deletions

View File

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