lnurlp: fix ?amount satoshi -> msatoshi conversion.
This commit is contained in:
parent
091f9b74f3
commit
8947358c80
2 changed files with 2 additions and 12 deletions
|
|
@ -39,7 +39,7 @@ async def api_lnurl_callback(link_id):
|
||||||
return jsonify({"status": "ERROR", "reason": "LNURL-pay not found."}), HTTPStatus.OK
|
return jsonify({"status": "ERROR", "reason": "LNURL-pay not found."}), HTTPStatus.OK
|
||||||
|
|
||||||
min, max = link.min, link.max
|
min, max = link.min, link.max
|
||||||
rate = await get_fiat_rate(link.currency) if link.currency else 1
|
rate = await get_fiat_rate(link.currency) if link.currency else 1000
|
||||||
if link.currency:
|
if link.currency:
|
||||||
# allow some fluctuation (as the fiat price may have changed between the calls)
|
# allow some fluctuation (as the fiat price may have changed between the calls)
|
||||||
min = rate * 995 * link.min
|
min = rate * 995 * link.min
|
||||||
|
|
@ -76,10 +76,6 @@ async def api_lnurl_callback(link_id):
|
||||||
extra={"tag": "lnurlp", "link": link.id, "comment": comment},
|
extra={"tag": "lnurlp", "link": link.id, "comment": comment},
|
||||||
)
|
)
|
||||||
|
|
||||||
resp = LnurlPayActionResponse(
|
resp = LnurlPayActionResponse(pr=payment_request, success_action=link.success_action(payment_hash), routes=[],)
|
||||||
pr=payment_request,
|
|
||||||
success_action=link.success_action(payment_hash),
|
|
||||||
routes=[],
|
|
||||||
)
|
|
||||||
|
|
||||||
return jsonify(resp.dict()), HTTPStatus.OK
|
return jsonify(resp.dict()), HTTPStatus.OK
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,3 @@ class PayLink(NamedTuple):
|
||||||
return MessageAction(message=self.success_text)
|
return MessageAction(message=self.success_text)
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
class Invoice(NamedTuple):
|
|
||||||
payment_hash: str
|
|
||||||
link_id: int
|
|
||||||
webhook_sent: bool
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue