Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"short_description": "Access lnbits from BlueWallet or Zeus",
"tile": "/lndhub/static/image/lndhub.png",
"contributors": ["fiatjaf"],
"min_lnbits_version": "0.11.0"
"min_lnbits_version": "0.12.6"
}
6 changes: 3 additions & 3 deletions views_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from lnbits.core.crud import get_payments
from lnbits.core.services import create_invoice, pay_invoice
from lnbits.decorators import WalletTypeInfo
from lnbits.settings import get_wallet_class, settings
from lnbits.settings import get_funding_source, settings

from . import lndhub_ext
from .decorators import check_wallet, require_admin_key
Expand Down Expand Up @@ -165,7 +165,7 @@ async def lndhub_getuserinvoices(
limit: int = Query(20, ge=1, le=200),
offset: int = Query(0, ge=0),
):
WALLET = get_wallet_class()
funding_source = get_funding_source()
for invoice in await get_payments(
wallet_id=wallet.wallet.id,
complete=False,
Expand All @@ -177,7 +177,7 @@ async def lndhub_getuserinvoices(
exclude_uncheckable=True,
):
await invoice.set_pending(
(await WALLET.get_invoice_status(invoice.checking_id)).pending
(await funding_source.invoice_status(invoice.checking_id)).pending
)

return [
Expand Down