From fe2be38ebb87932ab7da54cd2e9d5eb8f076fb7a Mon Sep 17 00:00:00 2001 From: Lee Salminen Date: Sat, 24 Dec 2022 05:40:34 -0600 Subject: [PATCH] add manual activate button --- lnbits/extensions/nostrnip5/tasks.py | 6 +++- .../nostrnip5/templates/nostrnip5/index.html | 36 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/lnbits/extensions/nostrnip5/tasks.py b/lnbits/extensions/nostrnip5/tasks.py index b494dbdf..3cedc9f5 100644 --- a/lnbits/extensions/nostrnip5/tasks.py +++ b/lnbits/extensions/nostrnip5/tasks.py @@ -5,7 +5,7 @@ from lnbits.core.models import Payment from lnbits.helpers import urlsafe_short_hash from lnbits.tasks import internal_invoice_queue, register_invoice_listener -from .crud import activate_address, get_domain +from .crud import activate_address async def wait_for_paid_invoices(): @@ -25,6 +25,10 @@ async def on_invoice_paid(payment: Payment) -> None: domain_id = payment.extra.get("domain_id") address_id = payment.extra.get("address_id") + print("Activating NOSTR NIP-05") + print(domain_id) + print(address_id) + active = await activate_address(domain_id, address_id) return diff --git a/lnbits/extensions/nostrnip5/templates/nostrnip5/index.html b/lnbits/extensions/nostrnip5/templates/nostrnip5/index.html index 3740e0b6..e6544d62 100644 --- a/lnbits/extensions/nostrnip5/templates/nostrnip5/index.html +++ b/lnbits/extensions/nostrnip5/templates/nostrnip5/index.html @@ -128,6 +128,15 @@ target="_blank" :href="'rotate/' + props.row.domain_id + '/' + props.row.id" > +