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:
Dexter Edwards 2022-08-09 16:54:41 +01:00 committed by GitHub
parent 25c3ac8b4a
commit eed6a83572
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -625,5 +625,6 @@
"FilterProposalsDescription": "Filter by proposal ID or proposer ID",
"Freeform proposal": "Freeform 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"
}

View File

@ -7,6 +7,7 @@ import {
} from '../../../../lib/format-number';
import { useVoteInformation } from '../../hooks';
import type { Proposals_proposals } from '../../proposals/__generated__/Proposals';
import { useAppState } from '../../../../contexts/app-state/app-state-context';
interface ProposalVotesTableProps {
proposal: Proposals_proposals;
@ -14,6 +15,9 @@ interface ProposalVotesTableProps {
export const ProposalVotesTable = ({ proposal }: ProposalVotesTableProps) => {
const { t } = useTranslation();
const {
appState: { totalSupply },
} = useAppState();
const {
willPass,
totalTokensPercentage,
@ -55,6 +59,10 @@ export const ProposalVotesTable = ({ proposal }: ProposalVotesTableProps) => {
{t('tokenForProposal')}
{formatNumber(yesTokens, 2)}
</KeyValueTableRow>
<KeyValueTableRow>
{t('totalSupply')}
{formatNumber(totalSupply, 2)}
</KeyValueTableRow>
<KeyValueTableRow>
{t('tokensAgainstProposal')}
{formatNumber(noTokens, 2)}