Skip to content

Commit

Permalink
When convert - floor the number
Browse files Browse the repository at this point in the history
  • Loading branch information
T-Damer committed Jul 12, 2024
1 parent 782e25f commit 145dc3d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Modals/ConvertModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ export default function ({ modalOpen, setModalOpen }: ModalProps) {

const onReversePress = useCallback(() => {
setIsWithdraw((isWithdraw) => {
isWithdraw ? setAmount(1000) : setAmount(hats || minimumWithdrawal)
isWithdraw
? setAmount(1000)
: setAmount(Math.floor(Number(hats)) || minimumWithdrawal)

return !isWithdraw
})
Expand Down

0 comments on commit 145dc3d

Please sign in to comment.