diff --git a/lnbits/__main__.py b/lnbits/__main__.py
index ff42138c..793f52dc 100644
--- a/lnbits/__main__.py
+++ b/lnbits/__main__.py
@@ -1,2 +1,3 @@
from .app import create_app
+
app = create_app()
diff --git a/lnbits/app.py b/lnbits/app.py
index 4a65e1e7..f15e54e4 100644
--- a/lnbits/app.py
+++ b/lnbits/app.py
@@ -16,7 +16,6 @@ from fastapi.staticfiles import StaticFiles
from loguru import logger
from lnbits.core.tasks import register_task_listeners
-
from lnbits.settings import WALLET, check_admin_settings, settings
from .commands import migrate_databases
@@ -60,14 +59,13 @@ def create_app() -> FastAPI:
name="core_static",
)
- origins = ["*"]
-
app.add_middleware(
- CORSMiddleware, allow_origins=origins, allow_methods=["*"], allow_headers=["*"]
+ CORSMiddleware, allow_origins=["*"], allow_methods=["*"], allow_headers=["*"]
)
+ # TODO: why those 2?
g().config = settings
- g().base_url = f"http://{settings.host}:{settings.port}"
+ # g().base_url = f"http://{settings.host}:{settings.port}"
app.add_middleware(GZipMiddleware, minimum_size=1000)
@@ -86,7 +84,6 @@ async def check_funding_source() -> None:
# def signal_handler(signal, frame):
# logger.debug(f"SIGINT received, terminating LNbits.")
# sys.exit(1)
-
# signal.signal(signal.SIGINT, signal_handler)
while True:
try:
diff --git a/lnbits/extensions/admin/templates/admin/_tab_funding.html b/lnbits/extensions/admin/templates/admin/_tab_funding.html
index 2ed0aae2..715f0e09 100644
--- a/lnbits/extensions/admin/templates/admin/_tab_funding.html
+++ b/lnbits/extensions/admin/templates/admin/_tab_funding.html
@@ -26,17 +26,8 @@
filled
v-model="data.settings.lnbits_backend_wallet_class"
hint="Select the active funding wallet"
- :options="data.settings.lnbits_funding_sources"
+ :options="data.settings.lnbits_allowed_funding_sources"
>
-
-
Fee reserve
@@ -72,7 +63,7 @@ dense type="text" filled - v-model="wallet.data.id" + v-model="wallet.id" label="Wallet ID" hint="Use the wallet ID to topup any wallet" > @@ -83,7 +74,7 @@ dense type="number" filled - v-model="wallet.data.amount" + v-model="wallet.amount" label="Topup amount" >Funding Sources
- {% raw %} -Admin Extensions