From 8e5ed7d23d37eec78fde16c861d506f10e1cc343 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Wed, 15 Mar 2023 00:26:06 +0100 Subject: [PATCH] show comment extra only when present --- lnurl.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lnurl.py b/lnurl.py index d03faaa..0f94f54 100644 --- a/lnurl.py +++ b/lnurl.py @@ -71,10 +71,12 @@ async def api_lnurl_callback( extra = { "tag": "lnurlp", "link": link.id, - "comment": comment, "extra": request.query_params.get("amount"), } + if comment: + extra["comment"] = (comment,) + if lnaddress and link.username and link.domain: extra["lnaddress"] = f"{link.username}@{link.domain}"