Allow more than 2-nd level domain in incoming ln-addresses (#914)

This commit is contained in:
Anton Kovalenko 2022-10-24 13:23:11 +03:00 committed by GitHub
parent fc1a87f617
commit 193d037ad6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -476,7 +476,7 @@ async def api_lnurlscan(code: str, wallet: WalletTypeInfo = Depends(get_key_type
except:
# parse internet identifier (user@domain.com)
name_domain = code.split("@")
if len(name_domain) == 2 and len(name_domain[1].split(".")) == 2:
if len(name_domain) == 2 and len(name_domain[1].split(".")) >= 2:
name, domain = name_domain
url = (
("http://" if domain.endswith(".onion") else "https://")