chore: relabel total associated (#1531)

This commit is contained in:
Dexter Edwards 2022-09-29 15:47:09 +01:00 committed by GitHub
parent 65af6bc0a8
commit a7768f154b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -470,7 +470,7 @@
"notAssociated": "Not Associated", "notAssociated": "Not Associated",
"title": "VEGA TOKEN", "title": "VEGA TOKEN",
"Use the Ethereum wallet you want to send your tokens to. You'll also need enough Ethereum to pay gas.": "Connect to the Ethereum wallet that holds your $VEGA tokens to see what can be redeemed from vesting tranches. To redeem tokens you will need some ETH to pay gas fees.\n", "Use the Ethereum wallet you want to send your tokens to. You'll also need enough Ethereum to pay gas.": "Connect to the Ethereum wallet that holds your $VEGA tokens to see what can be redeemed from vesting tranches. To redeem tokens you will need some ETH to pay gas fees.\n",
"Staked on Vega validator": "Staked $VEGA", "Staked on Vega validator": "Associated to Vega key",
"You can associate tokens while they are held in the vesting contract, when they unlock you will need to disassociate them before they can be redeemed.": "You can associate tokens while they are held in the vesting contract, when they unlock you will need to disassociate them before they can be redeemed.", "You can associate tokens while they are held in the vesting contract, when they unlock you will need to disassociate them before they can be redeemed.": "You can associate tokens while they are held in the vesting contract, when they unlock you will need to disassociate them before they can be redeemed.",
"Nominate Stake to Validator Node": "Select a validator to nominate", "Nominate Stake to Validator Node": "Select a validator to nominate",
"successfullAssociationMessage": "Vega key {{vegaKey}} can now participate in governance and nominate a validator with your associated $VEGA.", "successfullAssociationMessage": "Vega key {{vegaKey}} can now participate in governance and nominate a validator with your associated $VEGA.",

View File

@ -14,7 +14,7 @@ import type { NodeData } from './__generated__/NodeData';
import { TokenDetails } from './token-details'; import { TokenDetails } from './token-details';
import { Button } from '@vegaprotocol/ui-toolkit'; import { Button } from '@vegaprotocol/ui-toolkit';
export const TOTAL_STAKED_QUERY = gql` export const TOTAL_ASSOCIATED_QUERY = gql`
query NodeData { query NodeData {
nodeData { nodeData {
stakedTotal stakedTotal
@ -27,8 +27,8 @@ const Home = ({ name }: RouteChildProps) => {
useDocumentTitle(name); useDocumentTitle(name);
const { t } = useTranslation(); const { t } = useTranslation();
const { appState } = useAppState(); const { appState } = useAppState();
const { data } = useQuery<NodeData>(TOTAL_STAKED_QUERY); const { data } = useQuery<NodeData>(TOTAL_ASSOCIATED_QUERY);
const totalStaked = React.useMemo(() => { const totalAssociated = React.useMemo(() => {
return new BigNumber(data?.nodeData?.stakedTotalFormatted || '0'); return new BigNumber(data?.nodeData?.stakedTotalFormatted || '0');
}, [data]); }, [data]);
@ -38,7 +38,7 @@ const Home = ({ name }: RouteChildProps) => {
<HomeSection> <HomeSection>
<TokenDetails <TokenDetails
totalSupply={appState.totalSupply} totalSupply={appState.totalSupply}
totalStaked={totalStaked} totalAssociated={totalAssociated}
/> />
</HomeSection> </HomeSection>
<HomeSection> <HomeSection>

View File

@ -13,10 +13,10 @@ import { useContracts } from '../../../contexts/contracts/contracts-context';
export const TokenDetails = ({ export const TokenDetails = ({
totalSupply, totalSupply,
totalStaked, totalAssociated,
}: { }: {
totalSupply: BigNumber; totalSupply: BigNumber;
totalStaked: BigNumber; totalAssociated: BigNumber;
}) => { }) => {
const { ETHERSCAN_URL } = useEnvironment(); const { ETHERSCAN_URL } = useEnvironment();
const { t } = useTranslation(); const { t } = useTranslation();
@ -81,7 +81,7 @@ export const TokenDetails = ({
<KeyValueTableRow> <KeyValueTableRow>
{t('Staked on Vega validator').toUpperCase()} {t('Staked on Vega validator').toUpperCase()}
<span data-testid="staked" className="font-mono"> <span data-testid="staked" className="font-mono">
{formatNumber(totalStaked, 2)} {formatNumber(totalAssociated, 2)}
</span> </span>
</KeyValueTableRow> </KeyValueTableRow>
</KeyValueTable> </KeyValueTable>