invoice listeners support on lnd and other fixes around wallets/

This commit is contained in:
fiatjaf
2020-10-04 12:05:01 -03:00
parent 90c640b659
commit b3c69ad49c
12 changed files with 217 additions and 151 deletions
+5 -1
View File
@@ -1,5 +1,5 @@
from os import getenv
from typing import Optional, Dict
from typing import Optional, Dict, AsyncGenerator
from requests import post
from .base import InvoiceResponse, PaymentResponse, PaymentStatus, Wallet
@@ -75,3 +75,7 @@ class LntxbotWallet(Wallet):
statuses = {"complete": True, "failed": False, "pending": None, "unknown": None}
return PaymentStatus(statuses[r.json().get("status", "unknown")])
async def paid_invoices_stream(self) -> AsyncGenerator[str, None]:
print("lntxbot does not support paid invoices stream yet")
yield ""