Skip to content

Commit

Permalink
FIx TPoS looking for removed lnbits_commit hash (#22)
Browse files Browse the repository at this point in the history
* Update views_api.py

fix tpos not working in some cases due to missing lnbits_commit in settings

* remove the settings import
  • Loading branch information
gorrdy authored Oct 6, 2023
1 parent 82dc2c4 commit 759d9ee
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions views_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
get_key_type,
require_admin_key,
)
from lnbits.settings import settings
from lnbits.utils.exchange_rates import get_fiat_rate_satoshis

from . import scheduled_tasks, tpos_ext
Expand Down Expand Up @@ -165,7 +164,7 @@ async def api_tpos_pay_invoice(

async with httpx.AsyncClient() as client:
try:
headers = {"user-agent": f"lnbits/tpos commit {settings.lnbits_commit[:7]}"}
headers = {"user-agent": f"lnbits/tpos"}
r = await client.get(lnurl, follow_redirects=True, headers=headers)
if r.is_error:
lnurl_response = {"success": False, "detail": "Error loading"}
Expand Down

0 comments on commit 759d9ee

Please sign in to comment.