fix: wallet not found error (#1063)

This commit is contained in:
Vlad Stan
2022-10-20 16:40:23 +02:00
committed by GitHub
parent 42704eaf1b
commit 9de38f908b
6 changed files with 33 additions and 31 deletions
+2 -3
View File
@@ -9,10 +9,9 @@ from starlette.responses import HTMLResponse
from lnbits.core.crud import get_wallet
from lnbits.core.models import User
from lnbits.decorators import check_user_exists
from lnbits.extensions.watchonly.crud import get_config
from . import satspay_ext, satspay_renderer
from .crud import get_charge
from .crud import get_charge, get_charge_config
templates = Jinja2Templates(directory="templates")
@@ -32,7 +31,7 @@ async def display(request: Request, charge_id: str):
status_code=HTTPStatus.NOT_FOUND, detail="Charge link does not exist."
)
wallet = await get_wallet(charge.lnbitswallet)
onchainwallet_config = await get_config(charge.user)
onchainwallet_config = await get_charge_config(charge_id)
inkey = wallet.inkey if wallet else None
mempool_endpoint = (
onchainwallet_config.mempool_endpoint if onchainwallet_config else None