mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-27 12:26:19 +02:00
Fixes #212
This is a quick and dirty fix of issue #212.
Partially reverts previous changes from commit 5fbd1f08c4
Re-implements the change in a slightly different way.
This commit is contained in:
@@ -95,13 +95,17 @@ async def api_lnurl_callback(link_id):
|
|||||||
extra={"tag": "lnurlp", "link": link.id, "comment": comment},
|
extra={"tag": "lnurlp", "link": link.id, "comment": comment},
|
||||||
)
|
)
|
||||||
|
|
||||||
resp = {
|
|
||||||
"routes": [],
|
|
||||||
"pr": payment_request,
|
|
||||||
}
|
|
||||||
|
|
||||||
success_action = link.success_action(payment_hash)
|
success_action = link.success_action(payment_hash)
|
||||||
if success_action:
|
if success_action:
|
||||||
resp["success_action"] = success_action
|
resp = LnurlPayActionResponse(
|
||||||
|
pr=payment_request,
|
||||||
|
success_action=success_action,
|
||||||
|
routes=[],
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
resp = LnurlPayActionResponse(
|
||||||
|
pr=payment_request,
|
||||||
|
routes=[],
|
||||||
|
)
|
||||||
|
|
||||||
return jsonify(resp), HTTPStatus.OK
|
return jsonify(resp.dict()), HTTPStatus.OK
|
||||||
|
Reference in New Issue
Block a user