fix: lnurl_decode changed to url_decode (#3303)

This commit is contained in:
Arc 2025-08-04 08:25:09 +01:00 committed by GitHub
parent 5b9f244a9f
commit 75016d1a27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -7,7 +7,7 @@ from fastapi import Cookie, Depends, Query, Request
from fastapi.exceptions import HTTPException
from fastapi.responses import FileResponse, HTMLResponse, RedirectResponse
from fastapi.routing import APIRouter
from lnurl import decode as lnurl_decode
from lnurl import url_decode
from pydantic.types import UUID4
from lnbits.core.helpers import to_valid_user_id
@ -456,7 +456,7 @@ async def lnurlwallet(request: Request, lightning: str = ""):
if not settings.lnbits_allow_new_accounts:
return {"status": "ERROR", "reason": "New accounts are not allowed."}
lnurl = lnurl_decode(lightning)
lnurl = url_decode(lightning)
async with httpx.AsyncClient() as client:
check_callback_url(lnurl)

View file

@ -10,7 +10,7 @@ from fastapi import (
Query,
)
from fastapi.responses import JSONResponse
from lnurl import decode as lnurl_decode
from lnurl import url_decode
from lnbits import bolt11
from lnbits.core.crud.payments import (
@ -318,7 +318,7 @@ async def api_payments_decode(data: DecodePayment) -> JSONResponse:
payment_str = data.data
try:
if payment_str[:5] == "LNURL":
url = str(lnurl_decode(payment_str))
url = str(url_decode(payment_str))
return JSONResponse({"domain": url})
else:
invoice = bolt11.decode(payment_str)