fix: mempool hostname

This commit is contained in:
Vlad Stan
2022-11-24 17:20:12 +02:00
parent 00ba09d201
commit d3c3622d22
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,
},
)