chore: relabel total associated (#1531)
This commit is contained in:
parent
65af6bc0a8
commit
a7768f154b
@ -470,7 +470,7 @@
|
||||
"notAssociated": "Not Associated",
|
||||
"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",
|
||||
"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.",
|
||||
"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.",
|
||||
|
@ -14,7 +14,7 @@ import type { NodeData } from './__generated__/NodeData';
|
||||
import { TokenDetails } from './token-details';
|
||||
import { Button } from '@vegaprotocol/ui-toolkit';
|
||||
|
||||
export const TOTAL_STAKED_QUERY = gql`
|
||||
export const TOTAL_ASSOCIATED_QUERY = gql`
|
||||
query NodeData {
|
||||
nodeData {
|
||||
stakedTotal
|
||||
@ -27,8 +27,8 @@ const Home = ({ name }: RouteChildProps) => {
|
||||
useDocumentTitle(name);
|
||||
const { t } = useTranslation();
|
||||
const { appState } = useAppState();
|
||||
const { data } = useQuery<NodeData>(TOTAL_STAKED_QUERY);
|
||||
const totalStaked = React.useMemo(() => {
|
||||
const { data } = useQuery<NodeData>(TOTAL_ASSOCIATED_QUERY);
|
||||
const totalAssociated = React.useMemo(() => {
|
||||
return new BigNumber(data?.nodeData?.stakedTotalFormatted || '0');
|
||||
}, [data]);
|
||||
|
||||
@ -38,7 +38,7 @@ const Home = ({ name }: RouteChildProps) => {
|
||||
<HomeSection>
|
||||
<TokenDetails
|
||||
totalSupply={appState.totalSupply}
|
||||
totalStaked={totalStaked}
|
||||
totalAssociated={totalAssociated}
|
||||
/>
|
||||
</HomeSection>
|
||||
<HomeSection>
|
||||
|
@ -13,10 +13,10 @@ import { useContracts } from '../../../contexts/contracts/contracts-context';
|
||||
|
||||
export const TokenDetails = ({
|
||||
totalSupply,
|
||||
totalStaked,
|
||||
totalAssociated,
|
||||
}: {
|
||||
totalSupply: BigNumber;
|
||||
totalStaked: BigNumber;
|
||||
totalAssociated: BigNumber;
|
||||
}) => {
|
||||
const { ETHERSCAN_URL } = useEnvironment();
|
||||
const { t } = useTranslation();
|
||||
@ -81,7 +81,7 @@ export const TokenDetails = ({
|
||||
<KeyValueTableRow>
|
||||
{t('Staked on Vega validator').toUpperCase()}
|
||||
<span data-testid="staked" className="font-mono">
|
||||
{formatNumber(totalStaked, 2)}
|
||||
{formatNumber(totalAssociated, 2)}
|
||||
</span>
|
||||
</KeyValueTableRow>
|
||||
</KeyValueTable>
|
||||
|
Loading…
Reference in New Issue
Block a user