mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-20 02:28:10 +01:00
fix: domain variable assignment in pay_lnurl.
This commit is contained in:
parent
0dc60d4795
commit
ec4b558638
@ -147,6 +147,8 @@ async def api_payments_create():
|
||||
}
|
||||
)
|
||||
async def api_payments_pay_lnurl():
|
||||
domain = urlparse(g.data["callback"]).netloc
|
||||
|
||||
try:
|
||||
r = httpx.get(
|
||||
g.data["callback"],
|
||||
@ -160,7 +162,6 @@ async def api_payments_pay_lnurl():
|
||||
|
||||
params = json.loads(r.text)
|
||||
if params.get("status") == "ERROR":
|
||||
domain = urlparse(g.data["callback"]).netloc
|
||||
return jsonify({"message": f"{domain} said: '{params.get('reason', '')}'"}), HTTPStatus.BAD_REQUEST
|
||||
|
||||
invoice = bolt11.decode(params["pr"])
|
||||
|
Loading…
Reference in New Issue
Block a user