Skip to content

Commit

Permalink
checking if humanReadable is set
Browse files Browse the repository at this point in the history
  • Loading branch information
kirksgithub committed Oct 16, 2023
1 parent 1607801 commit 1922acc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/DepositTokensButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ export const DepositTokensButton = ({
? undefined
: depositAmount.shiftedBy(-mintInfo.decimals).toNumber()

const [amount, setAmount] = useState((humanReadableMax && humanReadableMax?.toString() && humanReadableMax > 0) ? humanReadableMax.toString() : '')
const [amount, setAmount] = useState(humanReadableMax ? humanReadableMax?.toString() : '')

const deposit = useDepositCallback(role)

return (
<>
<ButtonToUse
Expand Down

0 comments on commit 1922acc

Please sign in to comment.