From 92ea0635d78d751bc0deb536539ce89f3014d789 Mon Sep 17 00:00:00 2001 From: benarc Date: Wed, 3 Nov 2021 16:14:47 +0000 Subject: [PATCH] another cln rpc sse try --- lnbits/wallets/clightning.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lnbits/wallets/clightning.py b/lnbits/wallets/clightning.py index 0eb961a6..1e3d8637 100644 --- a/lnbits/wallets/clightning.py +++ b/lnbits/wallets/clightning.py @@ -122,11 +122,12 @@ class CLightningWallet(Wallet): call = json.dumps( {"method": "waitanyinvoice", "id": 0, "params": [self.last_pay_index]} ) - writer.write(call.encode("utf-8")) + writer.write(call.encode()) await writer.drain() - data = await reader.read(100) + data = await reader.read(500) paid = json.loads(data.decode("ascii")) + print(paid) paid = self.ln.waitanyinvoice(self.last_pay_index) self.last_pay_index = paid["pay_index"]