Skip to content

Commit

Permalink
fix(): denied negative values
Browse files Browse the repository at this point in the history
  • Loading branch information
tetogomez committed Oct 6, 2020
1 parent 377935d commit 945dc00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/routes/Evodex/BackLayer/Liquidity/LiquidityBackLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,9 @@ const LiquidityBackLayer = ({
onChange={handleOnChange}
value={youGive}
decimalScale={6}
isValueAllowed={({ floatValue }) => {
isValueAllowed={({ floatValue, value }) => {
if (value === '-' || floatValue < 0) return false

if (!floatValue) return true

return floatValue < LIQUIDITY_MAX_VALUE
Expand Down

0 comments on commit 945dc00

Please sign in to comment.