From 31820e041c99b61ae2f09787f1f67180632869a1 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Fri, 9 Oct 2020 21:08:01 -0300 Subject: [PATCH] /sse returns payment as objects instead of arrays. --- lnbits/core/views/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnbits/core/views/api.py b/lnbits/core/views/api.py index 2f85c7f6..206332cc 100644 --- a/lnbits/core/views/api.py +++ b/lnbits/core/views/api.py @@ -164,7 +164,7 @@ async def api_payments_sse(): message = [f"event: {typ}".encode("utf-8")] if data: - jdata = json.dumps(data) + jdata = json.dumps(data._asdict()) message.append(f"data: {jdata}".encode("utf-8")) yield b"\n".join(message) + b"\r\n\r\n"