mirror of
https://github.com/lnbits/lnbits.git
synced 2025-06-06 13:11:13 +02:00
Data returned from wallet websocket was not json (#1823)
* Fixed walet websocket json * format
This commit is contained in:
parent
f384c5c366
commit
a3aafe4b6f
@ -251,10 +251,12 @@ async def pay_invoice(
|
|||||||
if wallet:
|
if wallet:
|
||||||
await websocketUpdater(
|
await websocketUpdater(
|
||||||
wallet_id,
|
wallet_id,
|
||||||
{
|
json.dumps(
|
||||||
"wallet_balance": wallet.balance or None,
|
{
|
||||||
"payment": payment._asdict(),
|
"wallet_balance": wallet.balance or None,
|
||||||
},
|
"payment": payment._asdict(),
|
||||||
|
}
|
||||||
|
),
|
||||||
)
|
)
|
||||||
logger.debug(f"payment successful {payment.checking_id}")
|
logger.debug(f"payment successful {payment.checking_id}")
|
||||||
elif payment.checking_id is None and payment.ok is False:
|
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
|
// update cache version every time there is a new deployment
|
||||||
// so the service worker reinitializes the cache
|
// so the service worker reinitializes the cache
|
||||||
const CACHE_VERSION = 48
|
const CACHE_VERSION = 50
|
||||||
const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-`
|
const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-`
|
||||||
|
|
||||||
const getApiKey = request => {
|
const getApiKey = request => {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
|
import json
|
||||||
from typing import Dict, Optional
|
from typing import Dict, Optional
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
@ -124,10 +125,12 @@ async def wait_for_paid_invoices(invoice_paid_queue: asyncio.Queue):
|
|||||||
if wallet:
|
if wallet:
|
||||||
await websocketUpdater(
|
await websocketUpdater(
|
||||||
payment.wallet_id,
|
payment.wallet_id,
|
||||||
{
|
json.dumps(
|
||||||
"wallet_balance": wallet.balance or None,
|
{
|
||||||
"payment": payment.dict(),
|
"wallet_balance": wallet.balance or None,
|
||||||
},
|
"payment": payment.dict(),
|
||||||
|
}
|
||||||
|
),
|
||||||
)
|
)
|
||||||
# dispatch webhook
|
# dispatch webhook
|
||||||
if payment.webhook and not payment.webhook_status:
|
if payment.webhook and not payment.webhook_status:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user