From 04b67c35517dedac8d97e559043a8488eeb53b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Mon, 5 Dec 2022 12:20:37 +0100 Subject: [PATCH] WALLET outside of loop --- lnbits/extensions/lndhub/views_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnbits/extensions/lndhub/views_api.py b/lnbits/extensions/lndhub/views_api.py index 4503b53b2..fa98289b1 100644 --- a/lnbits/extensions/lndhub/views_api.py +++ b/lnbits/extensions/lndhub/views_api.py @@ -165,6 +165,7 @@ async def lndhub_getuserinvoices( limit: int = Query(20, ge=1, le=20), offset: int = Query(0, ge=0), ): + WALLET = get_wallet_class() for invoice in await get_payments( wallet_id=wallet.wallet.id, complete=False, @@ -175,7 +176,6 @@ async def lndhub_getuserinvoices( offset=offset, exclude_uncheckable=True, ): - WALLET = get_wallet_class() await invoice.set_pending( (await WALLET.get_invoice_status(invoice.checking_id)).pending )