fix: domain variable assignment in pay_lnurl.
This commit is contained in:
parent
0dc60d4795
commit
ec4b558638
1 changed files with 2 additions and 1 deletions
|
|
@ -147,6 +147,8 @@ async def api_payments_create():
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
async def api_payments_pay_lnurl():
|
async def api_payments_pay_lnurl():
|
||||||
|
domain = urlparse(g.data["callback"]).netloc
|
||||||
|
|
||||||
try:
|
try:
|
||||||
r = httpx.get(
|
r = httpx.get(
|
||||||
g.data["callback"],
|
g.data["callback"],
|
||||||
|
|
@ -160,7 +162,6 @@ async def api_payments_pay_lnurl():
|
||||||
|
|
||||||
params = json.loads(r.text)
|
params = json.loads(r.text)
|
||||||
if params.get("status") == "ERROR":
|
if params.get("status") == "ERROR":
|
||||||
domain = urlparse(g.data["callback"]).netloc
|
|
||||||
return jsonify({"message": f"{domain} said: '{params.get('reason', '')}'"}), HTTPStatus.BAD_REQUEST
|
return jsonify({"message": f"{domain} said: '{params.get('reason', '')}'"}), HTTPStatus.BAD_REQUEST
|
||||||
|
|
||||||
invoice = bolt11.decode(params["pr"])
|
invoice = bolt11.decode(params["pr"])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue