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",
|
||||
"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"
|
||||
}
|
||||
|
@ -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)}
|
||||
|
Loading…
Reference in New Issue
Block a user