fix: mempool hostname

This commit is contained in:
Vlad Stan
2022-12-01 12:21:25 +01:00
committed by dni ⚡
parent 13203055e9
commit 683eb6992a
2 changed files with 20 additions and 10 deletions
+5 -5
View File
@@ -30,17 +30,17 @@ async def display(request: Request, charge_id: str):
raise HTTPException(
status_code=HTTPStatus.NOT_FOUND, detail="Charge link does not exist."
)
wallet = await get_wallet(charge.lnbitswallet)
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
)
if onchainwallet_config:
mempool_endpoint = onchainwallet_config.mempool_endpoint
network = onchainwallet_config.network
return satspay_renderer().TemplateResponse(
"satspay/display.html",
{
"request": request,
"charge_data": charge.dict(),
"mempool_endpoint": mempool_endpoint,
"network": network,
},
)