Skip to content

Commit

Permalink
fix number string
Browse files Browse the repository at this point in the history
  • Loading branch information
bryzettler committed Mar 16, 2023
1 parent 7f5447f commit 68f0716
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions HeliumVotePlugin/components/LockTokensModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,13 @@ export const LockTokensModal: React.FC<{
setValue('lockupPeriodInDays', Number(value))
}}
onBlur={({ target: { value } }) => {
const val = Number(value)
setValue(
'lockupPeriodInDays',
value > minLockupTimeInDays
? value > maxLockupTimeInDays
val > minLockupTimeInDays
? val > maxLockupTimeInDays
? maxLockupTimeInDays
: value
: val
: minLockupTimeInDays
)
}}
Expand Down

0 comments on commit 68f0716

Please sign in to comment.