added awaits
This commit is contained in:
parent
a838706090
commit
93417e5bdf
5 changed files with 17 additions and 13 deletions
10
.env.example
10
.env.example
|
|
@ -8,14 +8,14 @@ PORT=5000
|
||||||
LNBITS_SITE_TITLE=LNbits
|
LNBITS_SITE_TITLE=LNbits
|
||||||
LNBITS_ALLOWED_USERS=""
|
LNBITS_ALLOWED_USERS=""
|
||||||
LNBITS_DEFAULT_WALLET_NAME="LNbits wallet"
|
LNBITS_DEFAULT_WALLET_NAME="LNbits wallet"
|
||||||
LNBITS_DATA_FOLDER="."
|
LNBITS_DATA_FOLDER="/home/benarc/projects/lnbits/lnbits/data"
|
||||||
LNBITS_DISABLED_EXTENSIONS="amilk"
|
LNBITS_DISABLED_EXTENSIONS="amilk"
|
||||||
LNBITS_FORCE_HTTPS=true
|
LNBITS_FORCE_HTTPS=true
|
||||||
LNBITS_SERVICE_FEE="0.0"
|
LNBITS_SERVICE_FEE="0.0"
|
||||||
|
|
||||||
# Choose from LNPayWallet, OpenNodeWallet, LntxbotWallet, LndWallet (gRPC),
|
# Choose from LNPayWallet, OpenNodeWallet, LntxbotWallet, LndWallet (gRPC),
|
||||||
# LndRestWallet, CLightningWallet, LNbitsWallet, SparkWallet
|
# LndRestWallet, CLightningWallet, LNbitsWallet, SparkWallet
|
||||||
LNBITS_BACKEND_WALLET_CLASS=VoidWallet
|
LNBITS_BACKEND_WALLET_CLASS=LNPayWallet
|
||||||
# VoidWallet is just a fallback that works without any actual Lightning capabilities,
|
# VoidWallet is just a fallback that works without any actual Lightning capabilities,
|
||||||
# just so you can see the UI before dealing with this file.
|
# just so you can see the UI before dealing with this file.
|
||||||
|
|
||||||
|
|
@ -44,8 +44,8 @@ LND_REST_MACAROON="HEXSTRING"
|
||||||
|
|
||||||
# LNPayWallet
|
# LNPayWallet
|
||||||
LNPAY_API_ENDPOINT=https://lnpay.co/v1/
|
LNPAY_API_ENDPOINT=https://lnpay.co/v1/
|
||||||
LNPAY_API_KEY=LNPAY_API_KEY
|
LNPAY_API_KEY=sak_bbDwhLym3se3IAQFNzTHhQeTWP1enGMQ
|
||||||
LNPAY_WALLET_KEY=LNPAY_ADMIN_KEY
|
LNPAY_WALLET_KEY=waka_XyunFwrtyFrqMkv3UquVCqce
|
||||||
|
|
||||||
# LntxbotWallet
|
# LntxbotWallet
|
||||||
LNTXBOT_API_ENDPOINT=https://lntxbot.bigsun.xyz/
|
LNTXBOT_API_ENDPOINT=https://lntxbot.bigsun.xyz/
|
||||||
|
|
@ -53,4 +53,4 @@ LNTXBOT_KEY=LNTXBOT_ADMIN_KEY
|
||||||
|
|
||||||
# OpenNodeWallet
|
# OpenNodeWallet
|
||||||
OPENNODE_API_ENDPOINT=https://api.opennode.com/
|
OPENNODE_API_ENDPOINT=https://api.opennode.com/
|
||||||
OPENNODE_KEY=OPENNODE_ADMIN_KEY
|
OPENNODE_KEY=8261b1d8-3748-4d33-8a93-ae1b98f1a0f7
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
from quart import Blueprint
|
from quart import Blueprint
|
||||||
|
from lnbits.db import Database
|
||||||
|
|
||||||
|
db = Database("ext_watchonly")
|
||||||
|
|
||||||
|
|
||||||
watchonly_ext: Blueprint = Blueprint("watchonly", __name__, static_folder="static", template_folder="templates")
|
watchonly_ext: Blueprint = Blueprint("watchonly", __name__, static_folder="static", template_folder="templates")
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
from typing import List, Optional, Union
|
from typing import List, Optional, Union
|
||||||
|
|
||||||
from lnbits.db import open_ext_db
|
#from lnbits.db import open_ext_db
|
||||||
|
from . import db
|
||||||
from .models import Wallets, Payments, Addresses, Mempool
|
from .models import Wallets, Payments, Addresses, Mempool
|
||||||
|
|
||||||
from lnbits.helpers import urlsafe_short_hash
|
from lnbits.helpers import urlsafe_short_hash
|
||||||
|
|
||||||
from embit import bip32
|
from embit import bip32
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
def m001_initial(db):
|
async def m001_initial(db):
|
||||||
"""
|
"""
|
||||||
Initial wallet table.
|
Initial wallet table.
|
||||||
"""
|
"""
|
||||||
db.execute(
|
await db.execute(
|
||||||
"""
|
"""
|
||||||
CREATE TABLE IF NOT EXISTS wallets (
|
CREATE TABLE IF NOT EXISTS wallets (
|
||||||
id TEXT NOT NULL PRIMARY KEY,
|
id TEXT NOT NULL PRIMARY KEY,
|
||||||
|
|
@ -15,7 +15,7 @@ def m001_initial(db):
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
db.execute(
|
await db.execute(
|
||||||
"""
|
"""
|
||||||
CREATE TABLE IF NOT EXISTS addresses (
|
CREATE TABLE IF NOT EXISTS addresses (
|
||||||
address TEXT NOT NULL PRIMARY KEY,
|
address TEXT NOT NULL PRIMARY KEY,
|
||||||
|
|
@ -25,7 +25,7 @@ def m001_initial(db):
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
db.execute(
|
await db.execute(
|
||||||
"""
|
"""
|
||||||
CREATE TABLE IF NOT EXISTS payments (
|
CREATE TABLE IF NOT EXISTS payments (
|
||||||
id TEXT NOT NULL PRIMARY KEY,
|
id TEXT NOT NULL PRIMARY KEY,
|
||||||
|
|
@ -38,7 +38,7 @@ def m001_initial(db):
|
||||||
);
|
);
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
db.execute(
|
await db.execute(
|
||||||
"""
|
"""
|
||||||
CREATE TABLE IF NOT EXISTS mempool (
|
CREATE TABLE IF NOT EXISTS mempool (
|
||||||
user TEXT NOT NULL,
|
user TEXT NOT NULL,
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ from http import HTTPStatus
|
||||||
|
|
||||||
from lnbits.decorators import check_user_exists, validate_uuids
|
from lnbits.decorators import check_user_exists, validate_uuids
|
||||||
|
|
||||||
from lnbits.extensions.watchonly import watchonly_ext
|
from . import watchonly_ext
|
||||||
from .crud import get_payment
|
from .crud import get_payment
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue