Skip to content

Commit

Permalink
fix: rename get_wallet_class (#26)
Browse files Browse the repository at this point in the history
* rename get wallet class
  • Loading branch information
dni authored Apr 15, 2024
1 parent 31fde30 commit 75c2b0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 75c2b0b

Please sign in to comment.