mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-19 18:11:30 +01: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:
parent
0d3cc971a5
commit
1e0367a451
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user