diff --git a/src/features/ballot/components/BallotOverview.tsx b/src/features/ballot/components/BallotOverview.tsx index da6ac32c..4c4b9d56 100644 --- a/src/features/ballot/components/BallotOverview.tsx +++ b/src/features/ballot/components/BallotOverview.tsx @@ -91,7 +91,7 @@ const SubmitBallotButton = ({ disabled = false }: ISubmitBallotButtonProps): JSX error: { title: "Error submitting vote", instructions: ( - + There was an error submitting the vote. ), diff --git a/src/features/projects/components/AddToBallot.tsx b/src/features/projects/components/AddToBallot.tsx index ae50a692..5df07067 100644 --- a/src/features/projects/components/AddToBallot.tsx +++ b/src/features/projects/components/AddToBallot.tsx @@ -64,7 +64,7 @@ const ProjectAllocation = ({ "text-primary-500": exceededProjectTokens, })} > - {formatNumber(total - amount)} + {formatNumber(initialVoiceCredits - total)} / diff --git a/src/pages/ballot/index.tsx b/src/pages/ballot/index.tsx index 34261506..cec67f7c 100644 --- a/src/pages/ballot/index.tsx +++ b/src/pages/ballot/index.tsx @@ -9,6 +9,7 @@ import { Dialog } from "~/components/ui/Dialog"; import { Form } from "~/components/ui/Form"; import { config } from "~/config"; import { useBallot } from "~/contexts/Ballot"; +import { useMaci } from "~/contexts/Maci"; import { AllocationFormWrapper } from "~/features/ballot/components/AllocationList"; import { BallotSchema, type Vote } from "~/features/ballot/types"; import { LayoutWithBallot } from "~/layouts/DefaultLayout"; @@ -79,11 +80,12 @@ const EmptyBallot = () => ( const TotalAllocation = () => { const { sumBallot } = useBallot(); + const { initialVoiceCredits } = useMaci(); const form = useFormContext<{ votes: Vote[] }>(); const votes = form.watch("votes"); const sum = sumBallot(votes); - return
{`${formatNumber(sum)} ${config.tokenName}`}
; + return
{`${formatNumber(sum)} / ${initialVoiceCredits} ${config.tokenName}`}
; }; const BallotAllocationForm = () => {