mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-15 12:20:21 +01:00
Data returned from wallet websocket was not json (#1823)
* Fixed walet websocket json * format
This commit is contained in:
parent
f384c5c366
commit
a3aafe4b6f
3 changed files with 14 additions and 9 deletions
|
@ -251,10 +251,12 @@ async def pay_invoice(
|
|||
if wallet:
|
||||
await websocketUpdater(
|
||||
wallet_id,
|
||||
{
|
||||
"wallet_balance": wallet.balance or None,
|
||||
"payment": payment._asdict(),
|
||||
},
|
||||
json.dumps(
|
||||
{
|
||||
"wallet_balance": wallet.balance or None,
|
||||
"payment": payment._asdict(),
|
||||
}
|
||||
),
|
||||
)
|
||||
logger.debug(f"payment successful {payment.checking_id}")
|
||||
elif payment.checking_id is None and payment.ok is False:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// update cache version every time there is a new deployment
|
||||
// so the service worker reinitializes the cache
|
||||
const CACHE_VERSION = 48
|
||||
const CACHE_VERSION = 50
|
||||
const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-`
|
||||
|
||||
const getApiKey = request => {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import asyncio
|
||||
import json
|
||||
from typing import Dict, Optional
|
||||
|
||||
import httpx
|
||||
|
@ -124,10 +125,12 @@ async def wait_for_paid_invoices(invoice_paid_queue: asyncio.Queue):
|
|||
if wallet:
|
||||
await websocketUpdater(
|
||||
payment.wallet_id,
|
||||
{
|
||||
"wallet_balance": wallet.balance or None,
|
||||
"payment": payment.dict(),
|
||||
},
|
||||
json.dumps(
|
||||
{
|
||||
"wallet_balance": wallet.balance or None,
|
||||
"payment": payment.dict(),
|
||||
}
|
||||
),
|
||||
)
|
||||
# dispatch webhook
|
||||
if payment.webhook and not payment.webhook_status:
|
||||
|
|
Loading…
Add table
Reference in a new issue