Compare commits

...
Author SHA1 Message Date
Sam Keen c941893cdd fix(governance): ensure validators tables sorting on develop (#3176) 2023-03-14 09:16:12 +00:00
m.ray d049b471d8 chore(trading): mainnet sim 3 live banners (#3184) 2023-03-14 09:04:19 +00:00
m.ray 010ffc0f46 fix(trading): dropdown fix from testnet and validator-testnet (#3185) 2023-03-14 08:55:45 +00:00
dexturr dd56e4083b chore: update tranches
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-14 06:08:23 +00:00
dexturr 09d1ba68ba chore: update tranches
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-14 00:16:43 +00:00
Matthew Russell 3959daa2b7 chore(trading,explorer,governance): update validator testnet nodes (#3182) 2023-03-13 16:17:10 -07:00
Matthew Russell c599b02c89 fix(trading): add missing block explorer link for complete transfer (#3181) 2023-03-13 18:00:51 -04:00
13 changed files with 640 additions and 337 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
# App configuration variables
NX_VEGA_ENV=VALIDATOR_TESTNET
NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/validator-testnet-network.json
NX_VEGA_URL=https://api.validators-testnet.vega.xyz/graphql
NX_VEGA_URL=https://api-validators-testnet.vega.rocks/graphql
NX_VEGA_REST=https://api.validators-testnet.vega.xyz/
NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
+1 -1
View File
@@ -48,7 +48,7 @@ const MainnetSimAd = () => {
<Icon name="cross" className="w-6 h-6" ariaLabel="dismiss" />
</button>
<div>
<span className="pr-4">Mainnet sim 3 is coming soon!</span>
<span className="pr-4">Mainnet sim 3 is live!</span>
<ExternalLink href="https://fairground.wtf/">Learn more</ExternalLink>
</div>
</div>
+1 -1
View File
@@ -1,7 +1,7 @@
# App configuration variables
NX_VEGA_ENV=VALIDATOR_TESTNET
NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/validator-testnet-network.json
NX_VEGA_URL=https://api.validators-testnet.vega.xyz/graphql
NX_VEGA_URL=https://api-validators-testnet.vega.rocks/graphql
NX_VEGA_REST=https://api.validators-testnet.vega.xyz/
NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET3":"https://stagnet3.token.vega.xyz","TESTNET":"https://token.fairground.wtf","MAINNET":"https://token.vega.xyz"}'
NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
@@ -21,7 +21,7 @@ export function TemplateSidebar({ children, sidebar }: TemplateSidebarProps) {
<>
<AnnouncementBanner>
<div className="font-alpha calt uppercase text-center text-lg text-white">
<span className="pr-4">Mainnet sim 3 is coming soon!</span>
<span className="pr-4">Mainnet sim 3 is live!</span>
<ExternalLink href="https://fairground.wtf/">
Come help stress test the network
</ExternalLink>
@@ -166,10 +166,7 @@ export const ConsensusValidatorsTable = ({
avatarUrl,
name,
},
[ValidatorFields.STAKE]: formatNumber(
toBigNum(stakedTotal, decimals),
2
),
[ValidatorFields.STAKE]: stakedTotal,
[ValidatorFields.NORMALISED_VOTING_POWER]:
getNormalisedVotingPower(votingPower),
[ValidatorFields.UNNORMALISED_VOTING_POWER]:
@@ -198,10 +195,8 @@ export const ConsensusValidatorsTable = ({
stakedTotal,
totalStake
),
[ValidatorFields.PENDING_STAKE]: formatNumber(
toBigNum(pendingStake, decimals),
2
),
[ValidatorFields.PENDING_STAKE]: pendingStake,
decimals,
};
}
);
@@ -256,22 +251,18 @@ export const ConsensusValidatorsTable = ({
return {
...acc,
[ValidatorFields.STAKE]: formatNumber(
toBigNum(accStake, decimals).plus(toBigNum(stake, decimals)),
2
),
[ValidatorFields.STAKE]: toBigNum(accStake, decimals)
.plus(toBigNum(stake, decimals))
.toString(),
[ValidatorFields.STAKE_SHARE]: formatNumberPercentage(
new BigNumber(parseFloat(accStakeShare)).plus(
new BigNumber(parseFloat(stakeShare))
),
2
),
[ValidatorFields.PENDING_STAKE]: formatNumber(
toBigNum(accPendingStake, decimals).plus(
toBigNum(pendingStake, decimals)
),
2
),
[ValidatorFields.PENDING_STAKE]: toBigNum(accPendingStake, decimals)
.plus(toBigNum(pendingStake, decimals))
.toString(),
[ValidatorFields.NORMALISED_VOTING_POWER]: formatNumberPercentage(
new BigNumber(parseFloat(accNormalisedVotingPower)).plus(
new BigNumber(parseFloat(normalisedVotingPower))
@@ -349,6 +340,8 @@ export const ConsensusValidatorsTable = ({
field: ValidatorFields.PENDING_STAKE,
headerName: t(ValidatorFields.PENDING_STAKE).toString(),
headerTooltip: t('PendingStakeDescription').toString(),
valueFormatter: ({ value }) =>
formatNumber(toBigNum(value, decimals), 2),
width: 110,
},
],
@@ -12,6 +12,7 @@ import {
} from '@vegaprotocol/ui-toolkit';
import type { NodesFragmentFragment } from '../__generated___/Nodes';
import type { PreviousEpochQuery } from '../../__generated___/PreviousEpoch';
import { useAppState } from '../../../../contexts/app-state/app-state-context';
export enum ValidatorFields {
RANKING_INDEX = 'rankingIndex',
@@ -148,6 +149,11 @@ interface TotalStakeRendererProps {
export const TotalStakeRenderer = ({ data }: TotalStakeRendererProps) => {
const { t } = useTranslation();
const {
appState: { decimals },
} = useAppState();
const formattedStake = formatNumber(toBigNum(data.stake, decimals), 2);
return (
<Tooltip
@@ -160,12 +166,13 @@ export const TotalStakeRenderer = ({ data }: TotalStakeRendererProps) => {
{t('stakedByDelegates')}: {data.stakedByDelegates.toString()}
</div>
<div data-testid="total-staked-tooltip">
{t('totalStake')}: <span className="font-bold">{data.stake}</span>
{t('totalStake')}:{' '}
<span className="font-bold">{formattedStake}</span>
</div>
</>
}
>
<span>{data.stake}</span>
<span>{formattedStake}</span>
</Tooltip>
);
};
@@ -122,10 +122,7 @@ export const StandbyPendingValidatorsTable = ({
avatarUrl,
name,
},
[ValidatorFields.STAKE]: formatNumber(
toBigNum(stakedTotal, decimals),
2
),
[ValidatorFields.STAKE]: stakedTotal,
[ValidatorFields.STAKE_NEEDED_FOR_PROMOTION]:
individualStakeNeededForPromotion || null,
[ValidatorFields.STAKE_NEEDED_FOR_PROMOTION_DESCRIPTION]:
@@ -154,10 +151,7 @@ export const StandbyPendingValidatorsTable = ({
stakedTotal,
totalStake
),
[ValidatorFields.PENDING_STAKE]: formatNumber(
toBigNum(pendingStake, decimals),
2
),
[ValidatorFields.PENDING_STAKE]: pendingStake,
};
}
);
@@ -222,6 +216,8 @@ export const StandbyPendingValidatorsTable = ({
field: ValidatorFields.PENDING_STAKE,
headerName: t(ValidatorFields.PENDING_STAKE).toString(),
headerTooltip: t('PendingStakeDescription').toString(),
valueFormatter: ({ value }) =>
formatNumber(toBigNum(value, decimals), 2),
width: 110,
},
],
+1 -1
View File
@@ -1,5 +1,5 @@
# App configuration variables
NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/validator-testnet-network.json
NX_VEGA_URL=https://api.validators-testnet.vega.xyz/graphql
NX_VEGA_URL=https://api-validators-testnet.vega.rocks/graphql
NX_VEGA_NETWORKS='{"TESTNET":"https://multisig-signer.fairground.wtf","MAINNET":"https://multisig-signer.vega.xyz"}'
NX_VEGA_ENV=VALIDATOR_TESTNET
File diff suppressed because it is too large Load Diff
@@ -1,3 +1,6 @@
{
"hosts": ["https://api.validators-testnet.vega.xyz/graphql"]
"hosts": [
"https://api-validators-testnet.vega.rocks/graphql",
"https://vega-testnet.anyvalid.com/query"
]
}
+1 -1
View File
@@ -30,7 +30,7 @@ export const Banner = () => {
<Icon name="cross" className="w-6 h-6" ariaLabel="dismiss" />
</button>
<div>
<span className="pr-4">Mainnet sim 3 is coming soon!</span>
<span className="pr-4">Mainnet sim 3 is live!</span>
<ExternalLink href="https://fairground.wtf/">Learn more</ExternalLink>
</div>
</div>
@@ -523,6 +523,16 @@ const VegaTxCompleteToastsContent = ({ tx }: VegaTxToastContentProps) => {
<div>
<h3 className="font-bold">{t('Transfer complete')}</h3>
<p>{t('Your transaction has been confirmed ')}</p>
{tx.txHash && (
<p className="break-all">
<ExternalLink
href={explorerLink(EXPLORER_TX.replace(':hash', tx.txHash))}
rel="noreferrer"
>
{t('View in block explorer')}
</ExternalLink>
</p>
)}
<VegaTransactionDetails tx={tx} />
</div>
);
@@ -73,7 +73,7 @@ export const DropdownMenuContent = forwardRef<
<DropdownMenuPrimitive.Content
{...contentProps}
ref={forwardedRef}
className="min-w-[290px] bg-neutral-200 dark:bg-white p-2 rounded z-20"
className="min-w-[290px] bg-neutral-200 dark:bg-white p-2 rounded z-20 dark:text-black"
align="start"
sideOffset={10}
/>