mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-22 14:22:55 +01:00
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
|
||||
|
||||
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:
|
||||
# allow some fluctuation (as the fiat price may have changed between the calls)
|
||||
min = rate * 995 * link.min
|
||||
|
@ -76,10 +76,6 @@ async def api_lnurl_callback(link_id):
|
|||
extra={"tag": "lnurlp", "link": link.id, "comment": comment},
|
||||
)
|
||||
|
||||
resp = LnurlPayActionResponse(
|
||||
pr=payment_request,
|
||||
success_action=link.success_action(payment_hash),
|
||||
routes=[],
|
||||
)
|
||||
resp = LnurlPayActionResponse(pr=payment_request, success_action=link.success_action(payment_hash), routes=[],)
|
||||
|
||||
return jsonify(resp.dict()), HTTPStatus.OK
|
||||
|
|
|
@ -48,9 +48,3 @@ class PayLink(NamedTuple):
|
|||
return MessageAction(message=self.success_text)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
class Invoice(NamedTuple):
|
||||
payment_hash: str
|
||||
link_id: int
|
||||
webhook_sent: bool
|
||||
|
|
Loading…
Add table
Reference in a new issue