fake wallet queue issue

This commit is contained in:
dni ⚡ 2022-12-05 12:18:59 +01:00
parent c3e6ed9089
commit 9e60b5374c
2 changed files with 2 additions and 4 deletions

View File

@ -47,7 +47,7 @@ def create_app() -> FastAPI:
description="API for LNbits, the free and open source bitcoin wallet and accounts system with plugins.",
license_info={
"name": "MIT License",
"url": "https://raw.githubusercontent.com/lnbits/lnbits-legend/main/LICENSE",
"url": "https://raw.githubusercontent.com/lnbits/lnbits/main/LICENSE",
},
)
@ -58,8 +58,6 @@ def create_app() -> FastAPI:
name="core_static",
)
# needed for lnurlw?
# g().config = settings
g().base_url = f"http://{settings.host}:{settings.port}"
app.add_middleware(

View File

@ -19,6 +19,7 @@ from .base import (
class FakeWallet(Wallet):
queue: asyncio.Queue = asyncio.Queue(0)
secret: str = settings.fake_wallet_secret
privkey: str = hashlib.pbkdf2_hmac(
"sha256",
@ -97,7 +98,6 @@ class FakeWallet(Wallet):
return PaymentStatus(None)
async def paid_invoices_stream(self) -> AsyncGenerator[str, None]:
self.queue: asyncio.Queue = asyncio.Queue(0)
while True:
value: Invoice = await self.queue.get()
yield value.payment_hash