feat: update account when join invoce paid

This commit is contained in:
Vlad Stan 2023-02-13 14:12:37 +02:00
parent 330fceaf34
commit bd5957b443
7 changed files with 138 additions and 11 deletions

View file

@ -1,9 +1,10 @@
import asyncio
from fastapi import APIRouter
from fastapi.staticfiles import StaticFiles
from lnbits.db import Database
from lnbits.helpers import template_renderer
from lnbits.settings import settings
from lnbits.tasks import catch_everything_and_restart
db = Database("ext_nostrrelay")
@ -22,12 +23,10 @@ def nostrrelay_renderer():
return template_renderer(["lnbits/extensions/nostrrelay/templates"])
from .models import NostrRelay
from .tasks import wait_for_paid_invoices
from .views import * # noqa
from .views_api import * # noqa
# settings.lnbits_relay_information = {
# "name": "LNbits Nostr Relay",
# "description": "Multiple relays are supported",
# **NostrRelay.info(),
# }
def nostrrelay_start():
loop = asyncio.get_event_loop()
loop.create_task(catch_everything_and_restart(wait_for_paid_invoices))