general cleanup and unused imports removal
This commit is contained in:
@@ -77,7 +77,6 @@ async def get_subdomainBySubdomain(subdomain: str) -> Optional[Subdomains]:
|
||||
"SELECT s.*, d.domain as domain_name FROM subdomains.subdomain s INNER JOIN domain d ON (s.domain = d.id) WHERE s.subdomain = ?",
|
||||
(subdomain,),
|
||||
)
|
||||
print(row)
|
||||
return Subdomains(**row) if row else None
|
||||
|
||||
|
||||
|
||||
@@ -18,17 +18,6 @@ async def wait_for_paid_invoices():
|
||||
await on_invoice_paid(payment)
|
||||
|
||||
|
||||
# async def register_listeners():
|
||||
# invoice_paid_chan_send, invoice_paid_chan_recv = trio.open_memory_channel(2)
|
||||
# register_invoice_listener(invoice_paid_chan_send)
|
||||
# await wait_for_paid_invoices(invoice_paid_chan_recv)
|
||||
|
||||
|
||||
# async def wait_for_paid_invoices(invoice_paid_chan: trio.MemoryReceiveChannel):
|
||||
# async for payment in invoice_paid_chan:
|
||||
# await on_invoice_paid(payment)
|
||||
|
||||
|
||||
async def on_invoice_paid(payment: Payment) -> None:
|
||||
if "lnsubdomain" != payment.extra.get("tag"):
|
||||
# not an lnurlp invoice
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
from lnbits.extensions.subdomains.models import Subdomains
|
||||
|
||||
# Python3 program to validate
|
||||
# domain name
|
||||
# using regular expression
|
||||
import re
|
||||
import socket
|
||||
|
||||
|
||||
# Function to validate domain name.
|
||||
def isValidDomain(str):
|
||||
# Regex to check valid
|
||||
|
||||
Reference in New Issue
Block a user