general cleanup and unused imports removal
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import asyncio
|
||||
from fastapi import APIRouter, FastAPI
|
||||
|
||||
from fastapi import APIRouter
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
from starlette.routing import Mount
|
||||
|
||||
from lnbits.db import Database
|
||||
from lnbits.helpers import template_renderer
|
||||
from lnbits.tasks import catch_everything_and_restart
|
||||
@@ -23,14 +24,9 @@ splitpayments_ext: APIRouter = APIRouter(
|
||||
def splitpayments_renderer():
|
||||
return template_renderer(["lnbits/extensions/splitpayments/templates"])
|
||||
|
||||
|
||||
# from lnbits.tasks import record_async
|
||||
# splitpayments_ext.record(record_async(register_listeners))
|
||||
|
||||
|
||||
from .views_api import * # noqa
|
||||
from .views import * # noqa
|
||||
from .tasks import wait_for_paid_invoices
|
||||
from .views import * # noqa
|
||||
from .views_api import * # noqa
|
||||
|
||||
|
||||
def splitpayments_start():
|
||||
|
||||
@@ -1,21 +1,15 @@
|
||||
import asyncio
|
||||
import json
|
||||
|
||||
from lnbits.core.models import Payment
|
||||
from lnbits.core.crud import create_payment
|
||||
from lnbits.core import db as core_db
|
||||
from lnbits.tasks import register_invoice_listener, internal_invoice_queue
|
||||
from lnbits.core.crud import create_payment
|
||||
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 get_targets
|
||||
|
||||
|
||||
import asyncio
|
||||
import httpx
|
||||
|
||||
from lnbits.core import db as core_db
|
||||
from lnbits.core.models import Payment
|
||||
|
||||
|
||||
async def wait_for_paid_invoices():
|
||||
invoice_queue = asyncio.Queue()
|
||||
register_invoice_listener(invoice_queue)
|
||||
|
||||
@@ -26,7 +26,6 @@ async def api_targets_set(
|
||||
targets = []
|
||||
data = TargetPut.parse_obj(body["targets"])
|
||||
for entry in data.__root__:
|
||||
print("ENTRY", entry)
|
||||
wallet = await get_wallet(entry.wallet)
|
||||
if not wallet:
|
||||
wallet = await get_wallet_for_key(entry.wallet, "invoice")
|
||||
|
||||
Reference in New Issue
Block a user