fix: paylinks in fiat (#101)

* fix unreachable code
* trying to fix fiat pay links
* don't drop support for python 3.10
* values are store as int when there's currency
* simplify js
* add hint for fiat denom
This commit is contained in:
Tiago Vasconcelos 2025-08-21 09:29:32 +01:00 committed by GitHub
commit a242f0e4b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 125 additions and 23 deletions

View file

@ -87,12 +87,11 @@ async def api_link_create_or_update(
detail="Min is greater than max.", status_code=HTTPStatus.BAD_REQUEST
)
if data.currency is None and (
round(data.min) != data.min or round(data.max) != data.max or data.min < 1
):
raise HTTPException(
detail="Must use full satoshis.", status_code=HTTPStatus.BAD_REQUEST
)
if not data.currency:
if round(data.min) != data.min or round(data.max) != data.max or data.min < 1:
raise HTTPException(
detail="Must use full satoshis.", status_code=HTTPStatus.BAD_REQUEST
)
if data.webhook_headers:
try: