diff --git a/apps/token/src/i18n/translations/dev.json b/apps/token/src/i18n/translations/dev.json index bafd0d2a2..5f96f96fa 100644 --- a/apps/token/src/i18n/translations/dev.json +++ b/apps/token/src/i18n/translations/dev.json @@ -470,6 +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", + "Connect to see your stake": "Connect to see your stake", "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", diff --git a/apps/token/src/routes/staking/staking-node.tsx b/apps/token/src/routes/staking/staking-node.tsx index 510a58091..54044649d 100644 --- a/apps/token/src/routes/staking/staking-node.tsx +++ b/apps/token/src/routes/staking/staking-node.tsx @@ -16,21 +16,17 @@ import { YourStake } from './your-stake'; export const StakingNodeContainer = () => { return ( - {({ currVegaKey }) => - currVegaKey ? ( - - {({ data }) => } - - ) : ( - - ) - } + {({ currVegaKey }) => ( + + {({ data }) => } + + )} ); }; interface StakingNodeProps { - vegaKey: VegaKeyExtended; + vegaKey: VegaKeyExtended | null; data?: StakingQueryResult; } @@ -88,14 +84,14 @@ export const StakingNode = ({ vegaKey, data }: StakingNodeProps) => { if (!nodeInfo) { return ( - + {t('stakingNodeNotFound', { node })} ); } return ( - <> +

{nodeInfo.name ? t('validatorTitle', { nodeName: nodeInfo.name }) @@ -117,22 +113,33 @@ export const StakingNode = ({ vegaKey, data }: StakingNodeProps) => { /> )} -
- -
-
- -
- + + {vegaKey ? ( + <> +
+ +
+ +
+ +
+ + ) : ( + <> +

{t('Connect to see your stake')}

+ + + )} +
); }; diff --git a/apps/token/src/routes/staking/staking-nodes-container.tsx b/apps/token/src/routes/staking/staking-nodes-container.tsx index 29cad5031..20a371617 100644 --- a/apps/token/src/routes/staking/staking-nodes-container.tsx +++ b/apps/token/src/routes/staking/staking-nodes-container.tsx @@ -85,7 +85,6 @@ export const StakingNodesContainer = ({ STAKING_QUERY, { variables: { partyId: keypair?.pub || '' }, - skip: !keypair?.pub, } );