description

This commit is contained in:
callebtc 2023-03-21 19:02:20 +01:00
commit cdf137b484
2 changed files with 3 additions and 4 deletions

View file

@ -11,6 +11,7 @@ from . import lnurlp_ext
from .crud import increment_pay_link, get_pay_link, get_address_data
from loguru import logger
from urllib.parse import urlparse
import json
@lnurlp_ext.get(
@ -88,7 +89,7 @@ async def api_lnurl_callback(
wallet_id=link.wallet,
amount=int(amount_received / 1000),
memo=link.description,
unhashed_description=nostr.encode()
unhashed_description=json.dumps(nostr).encode()
if nostr
else link.lnurlpay_metadata.encode(),
extra=extra,

View file

@ -91,14 +91,12 @@ async def on_invoice_paid(payment: Payment):
if tag:
tags.append([t, tag])
tags.append(["bolt11", payment.bolt11])
tags.append(["description", json.dumps(event_json)])
tags.append(["description", nostr])
zap_receipt = Event(kind=9735, tags=tags, content="asd")
private_key.sign_event(zap_receipt)
def send_event(_):
ws.send(zap_receipt.to_message())
# nonlocal wst
# wst.join(timeout=1)
ws = WebSocketApp(
f"ws://localhost:{settings.port}/nostrclient/api/v1/relay",