Data returned from wallet websocket was not json (#1823)

* Fixed walet websocket json

* format
This commit is contained in:
Arc
2023-07-19 12:14:03 +01:00
committed by GitHub
parent f384c5c366
commit a3aafe4b6f
3 changed files with 14 additions and 9 deletions
+7 -4
View File
@@ -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: