Skip to content

Commit

Permalink
(fix) unstaking fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
GSaphal committed Mar 3, 2024
1 parent feeab3e commit 41ad575
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/app/components/forms/stake/unstake/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { useGetBalanceQuery } from "@/store/api/statsApi"

const UnstakingForm = ({
validator,
callback
callback,
}: {
validator: ValidatorType | undefined,
validator: ValidatorType | undefined
callback?: () => void
}) => {
const {
Expand Down Expand Up @@ -62,7 +62,14 @@ const UnstakingForm = ({
e.preventDefault()
setValue(
"stakeAmount",
formatTokenPrice({ amount: Number(balanceData?.stakes.find(item => item.validator.key === validator?.key).amount), precision: 9 }),
formatTokenPrice({
amount: Number(
balanceData?.stakes?.find(
(item) => item.validator.key === validator?.key,
)?.amount,
),
precision: 9,
}),
)
}}
/>
Expand All @@ -73,7 +80,7 @@ const UnstakingForm = ({
size="large"
variant="primary"
className="w-full justify-center"
onClick={() => { }}
onClick={() => {}}
>
Unstake $COMAI
</Button>
Expand Down

0 comments on commit 41ad575

Please sign in to comment.