lnurlp: do not divide twice (#669)

This commit is contained in:
calle 2022-06-15 12:48:13 +02:00 committed by GitHub
parent 8e9972ead1
commit 1dec874af7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,11 +29,7 @@ async def api_lnurl_response(request: Request, link_id):
status_code=HTTPStatus.NOT_FOUND, detail="Pay link does not exist."
)
rate = (
await get_fiat_rate_satoshis(link.currency) / link.fiat_base_multiplier
if link.currency
else 1
)
rate = await get_fiat_rate_satoshis(link.currency) if link.currency else 1
resp = LnurlPayResponse(
callback=request.url_for("lnurlp.api_lnurl_callback", link_id=link.id),