lnurlp: support for floating point fiat values

This commit is contained in:
callebtc
2022-06-10 15:35:35 +02:00
parent 77fbea25af
commit b7008495b8
4 changed files with 16 additions and 11 deletions
+1 -5
View File
@@ -76,10 +76,6 @@ async def api_link_create_or_update(
link_id=None,
wallet: WalletTypeInfo = Depends(get_key_type),
):
if data.min < 1:
raise HTTPException(
detail="Min must be more than 1.", status_code=HTTPStatus.BAD_REQUEST
)
if data.min > data.max:
raise HTTPException(
@@ -87,7 +83,7 @@ async def api_link_create_or_update(
)
if data.currency == None and (
round(data.min) != data.min or round(data.max) != data.max
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