From 0d2b2cdd798d846489a9a5af5d1700aec40522d0 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Fri, 4 Oct 2024 12:12:59 +0300 Subject: [PATCH] fix: some extra checks --- tasks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasks.py b/tasks.py index c695f5a..7f7d414 100644 --- a/tasks.py +++ b/tasks.py @@ -27,6 +27,9 @@ async def wait_for_paid_invoices(): async def on_invoice_paid(payment: Payment): + if not payment.extra: + return + if payment.extra.get("tag") != "lnurlp": return @@ -108,7 +111,7 @@ async def mark_webhook_sent( # NIP-57 - load the zap request async def send_zap(payment: Payment): - nostr = payment.extra.get("nostr") + nostr = payment.extra.get("nostr") if payment.extra else None if not nostr: return