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:
Fitti 2021-06-14 07:15:03 +02:00 committed by fiatjaf
parent 0d3cc971a5
commit 1e0367a451

View File

@ -95,13 +95,17 @@ async def api_lnurl_callback(link_id):
extra={"tag": "lnurlp", "link": link.id, "comment": comment},
)
resp = {
"routes": [],
"pr": payment_request,
}
success_action = link.success_action(payment_hash)
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