WALLET outside of loop
This commit is contained in:
parent
9e60b5374c
commit
04b67c3551
1 changed files with 1 additions and 1 deletions
|
|
@ -165,6 +165,7 @@ async def lndhub_getuserinvoices(
|
||||||
limit: int = Query(20, ge=1, le=20),
|
limit: int = Query(20, ge=1, le=20),
|
||||||
offset: int = Query(0, ge=0),
|
offset: int = Query(0, ge=0),
|
||||||
):
|
):
|
||||||
|
WALLET = get_wallet_class()
|
||||||
for invoice in await get_payments(
|
for invoice in await get_payments(
|
||||||
wallet_id=wallet.wallet.id,
|
wallet_id=wallet.wallet.id,
|
||||||
complete=False,
|
complete=False,
|
||||||
|
|
@ -175,7 +176,6 @@ async def lndhub_getuserinvoices(
|
||||||
offset=offset,
|
offset=offset,
|
||||||
exclude_uncheckable=True,
|
exclude_uncheckable=True,
|
||||||
):
|
):
|
||||||
WALLET = get_wallet_class()
|
|
||||||
await invoice.set_pending(
|
await invoice.set_pending(
|
||||||
(await WALLET.get_invoice_status(invoice.checking_id)).pending
|
(await WALLET.get_invoice_status(invoice.checking_id)).pending
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue