mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-22 14:22:55 +01:00
Fix/tipjar desc and satspay (#824)
* fix tipjar description from screwing charges * small fix for charges when onchain isn't set * make dni happy * make black happy
This commit is contained in:
parent
c36da4172c
commit
9154660479
2 changed files with 5 additions and 2 deletions
|
@ -34,12 +34,15 @@ async def display(request: Request, charge_id: str):
|
|||
wallet = await get_wallet(charge.lnbitswallet)
|
||||
onchainwallet_config = await get_config(charge.user)
|
||||
inkey = wallet.inkey if wallet else None
|
||||
mempool_endpoint = (
|
||||
onchainwallet_config.mempool_endpoint if onchainwallet_config else None
|
||||
)
|
||||
return satspay_renderer().TemplateResponse(
|
||||
"satspay/display.html",
|
||||
{
|
||||
"request": request,
|
||||
"charge_data": charge.dict(),
|
||||
"wallet_inkey": inkey,
|
||||
"mempool_endpoint": onchainwallet_config.mempool_endpoint,
|
||||
"mempool_endpoint": mempool_endpoint,
|
||||
},
|
||||
)
|
||||
|
|
|
@ -57,7 +57,7 @@ async def api_create_tip(data: createTips):
|
|||
name = name.replace('"', "''")
|
||||
if not name:
|
||||
name = "Anonymous"
|
||||
description = f'"{name}": {message}'
|
||||
description = f"{name}: {message}"
|
||||
charge = await create_charge(
|
||||
user=charge_details["user"],
|
||||
data=CreateCharge(
|
||||
|
|
Loading…
Add table
Reference in a new issue