Skip to content

Commit

Permalink
Fix support
Browse files Browse the repository at this point in the history
  • Loading branch information
vkulinich-cl committed Jan 2, 2025
1 parent a42eae5 commit be9e821
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/components/ReferendumCard/Referenda.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ export const OpenGovReferenda = ({
const { data: subscanInfo, isLoading } = useReferendumInfo(id)

const minApprovalThreshold = useMinApprovalThreshold(track, referenda)
const { threshold, maxSupportBarValue, barPercentage, markPercentage } =
useSupportThreshold(track, referenda, totalIssuance ?? "0")
const {
threshold,
maxSupportBarValue,
barPercentage,
markPercentage,
support,
} = useSupportThreshold(track, referenda, totalIssuance ?? "0")
const votes = useReferendaVotes(referenda)

const isNoVotes = votes.percAyes.eq(0) && votes.percNays.eq(0)
Expand Down Expand Up @@ -171,7 +176,7 @@ export const OpenGovReferenda = ({
<div sx={{ flex: "column", gap: 8 }}>
<InfoTooltip
text={t("referenda.support", {
value: t("value.percentage", { value: barPercentage }),
value: getPerbillPercentage(support),
})}
align="center"
>
Expand Down

0 comments on commit be9e821

Please sign in to comment.