chore: show total supply on governance page (#967)
* chore: show total supply on governance page * Update apps/token/src/i18n/translations/dev.json Co-authored-by: Edd <edd@vega.xyz> * Update apps/token/src/i18n/translations/dev.json Co-authored-by: Edd <edd@vega.xyz>
This commit is contained in:
parent
25c3ac8b4a
commit
eed6a83572
@ -625,5 +625,6 @@
|
|||||||
"FilterProposalsDescription": "Filter by proposal ID or proposer ID",
|
"FilterProposalsDescription": "Filter by proposal ID or proposer ID",
|
||||||
"Freeform proposal": "Freeform proposal",
|
"Freeform proposal": "Freeform proposal",
|
||||||
"NewProposal": "New proposal",
|
"NewProposal": "New proposal",
|
||||||
"MinProposalRequirements": "You must have at least 1 VEGA to make a proposal"
|
"MinProposalRequirements": "You must have at least 1 VEGA associated to make a proposal",
|
||||||
|
"totalSupply": "Total Supply"
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import {
|
|||||||
} from '../../../../lib/format-number';
|
} from '../../../../lib/format-number';
|
||||||
import { useVoteInformation } from '../../hooks';
|
import { useVoteInformation } from '../../hooks';
|
||||||
import type { Proposals_proposals } from '../../proposals/__generated__/Proposals';
|
import type { Proposals_proposals } from '../../proposals/__generated__/Proposals';
|
||||||
|
import { useAppState } from '../../../../contexts/app-state/app-state-context';
|
||||||
|
|
||||||
interface ProposalVotesTableProps {
|
interface ProposalVotesTableProps {
|
||||||
proposal: Proposals_proposals;
|
proposal: Proposals_proposals;
|
||||||
@ -14,6 +15,9 @@ interface ProposalVotesTableProps {
|
|||||||
|
|
||||||
export const ProposalVotesTable = ({ proposal }: ProposalVotesTableProps) => {
|
export const ProposalVotesTable = ({ proposal }: ProposalVotesTableProps) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const {
|
||||||
|
appState: { totalSupply },
|
||||||
|
} = useAppState();
|
||||||
const {
|
const {
|
||||||
willPass,
|
willPass,
|
||||||
totalTokensPercentage,
|
totalTokensPercentage,
|
||||||
@ -55,6 +59,10 @@ export const ProposalVotesTable = ({ proposal }: ProposalVotesTableProps) => {
|
|||||||
{t('tokenForProposal')}
|
{t('tokenForProposal')}
|
||||||
{formatNumber(yesTokens, 2)}
|
{formatNumber(yesTokens, 2)}
|
||||||
</KeyValueTableRow>
|
</KeyValueTableRow>
|
||||||
|
<KeyValueTableRow>
|
||||||
|
{t('totalSupply')}
|
||||||
|
{formatNumber(totalSupply, 2)}
|
||||||
|
</KeyValueTableRow>
|
||||||
<KeyValueTableRow>
|
<KeyValueTableRow>
|
||||||
{t('tokensAgainstProposal')}
|
{t('tokensAgainstProposal')}
|
||||||
{formatNumber(noTokens, 2)}
|
{formatNumber(noTokens, 2)}
|
||||||
|
Loading…
Reference in New Issue
Block a user