mirror of
https://github.com/lnbits/lnbits.git
synced 2025-04-23 23:10:42 +02:00
fiat_base_multiplier also in rate conversion
This commit is contained in:
parent
6617450c21
commit
c5ddd1a2c6
@ -29,7 +29,11 @@ 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) / 100 if link.currency else 1
|
||||
rate = (
|
||||
await get_fiat_rate_satoshis(link.currency) / link.fiat_base_multiplier
|
||||
if link.currency
|
||||
else 1
|
||||
)
|
||||
|
||||
resp = LnurlPayResponse(
|
||||
callback=request.url_for("lnurlp.api_lnurl_callback", link_id=link.id),
|
||||
|
@ -34,6 +34,7 @@ class PayLink(BaseModel):
|
||||
currency: Optional[str]
|
||||
comment_chars: int
|
||||
max: float
|
||||
fiat_base_multiplier: int
|
||||
|
||||
@classmethod
|
||||
def from_row(cls, row: Row) -> "PayLink":
|
||||
|
Loading…
x
Reference in New Issue
Block a user