Skip to content

Commit

Permalink
Prepolutaing the Deposit Max Amount
Browse files Browse the repository at this point in the history
  • Loading branch information
kirksgithub authored Oct 16, 2023
1 parent b6ef959 commit 7506fda
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/DepositTokensButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ export const DepositTokensButton = ({
const depositTooltipContent = !connected
? 'Connect your wallet to deposit'
: !hasTokensInWallet
? "You don't have any governance tokens in your wallet to deposit."
: undefined
? "You don't have any governance tokens in your wallet to deposit."
: undefined

const ButtonToUse = as === 'primary' ? Button : SecondaryButton
const [openModal, setOpenModal] = useState(false)
const [amount, setAmount] = useState('')
const mint = useGoverningTokenMint(role)
const mintInfo = useMintInfoByPubkeyQuery(mint).data?.result

Expand All @@ -44,6 +43,8 @@ export const DepositTokensButton = ({
? undefined
: depositAmount.shiftedBy(-mintInfo.decimals).toNumber()

const [amount, setAmount] = useState(humanReadableMax)

const deposit = useDepositCallback(role)
return (
<>
Expand Down

0 comments on commit 7506fda

Please sign in to comment.