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:
parent
a8e8658ff5
commit
a242f0e4b6
6 changed files with 125 additions and 23 deletions
11
views_api.py
11
views_api.py
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue