show comment extra only when present

This commit is contained in:
callebtc 2023-03-15 00:26:06 +01:00
commit 8e5ed7d23d

View file

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