Skip to content

Commit

Permalink
Merge pull request #1145 from interlay/tom/staking-page-fixes
Browse files Browse the repository at this point in the history
Tom/staking page fixes
  • Loading branch information
tomjeatt authored Apr 21, 2023
2 parents aa8f03a + 94945f4 commit 1072b37
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/assets/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@
}
},
"staking_page": {
"the_estimated_amount_of_governance_token_you_will_receive_as_rewards": "The estimated amount of {{governanceTokenSymbol}} you will receive as rewards. Depends on your proportion of the total {{voteGovernanceTokenSymbol}}.",
"the_estimated_amount_of_governance_token_you_will_receive_as_rewards": "The estimated amount of {{governanceTokenSymbol}} per year you will receive as rewards. Depends on your proportion of the total {{voteGovernanceTokenSymbol}}.",
"new_vote_governance_token_gained": "New {{voteGovernanceTokenSymbol}} Gained",
"the_increase_in_your_vote_governance_token_balance": "The increase in your {{voteGovernanceTokenSymbol}} balance",
"total_vote_governance_token_in_the_network": "Total {{voteGovernanceTokenSymbol}} in the network",
Expand Down
4 changes: 2 additions & 2 deletions src/config/relay-chains.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ switch (process.env.REACT_APP_RELAY_CHAIN_NAME) {
CROWDLOAN_LINK = INTERLAY_CROWDLOAN_LINK;
OPEN_GRAPH_IMAGE_FILE_NAME = 'interlay-meta-image.jpg';
STAKE_LOCK_TIME = {
MIN: 1,
MIN: 0,
MAX: 192
};
// TODO: temporary
Expand Down Expand Up @@ -191,7 +191,7 @@ switch (process.env.REACT_APP_RELAY_CHAIN_NAME) {
CROWDLOAN_LINK = KINTSUGI_CROWDLOAN_LINK;
OPEN_GRAPH_IMAGE_FILE_NAME = 'kintsugi-meta-image.jpg';
STAKE_LOCK_TIME = {
MIN: 1,
MIN: 0,
MAX: 96
};
// TODO: temporary
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Staking/BalancesUI/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const BalancesUI = ({ stakedAmount, voteStakedAmount, projectedRewardAmount }: P
tokenSymbol={VOTE_GOVERNANCE_TOKEN_SYMBOL}
/>
<BalanceItem
label={`Projected ${GOVERNANCE_TOKEN_SYMBOL} Rewards`}
label={`Projected Rewards p.a.`}
value={projectedRewardAmount}
tokenSymbol={GOVERNANCE_TOKEN_SYMBOL}
tooltip={t('staking_page.the_estimated_amount_of_governance_token_you_will_receive_as_rewards', {
Expand Down
5 changes: 2 additions & 3 deletions src/pages/Staking/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,7 @@ const Staking = (): JSX.Element => {
if (!stakedAmountAndEndBlock) return;

const lockTimeValue = Number(lockTime);
const extensionTime =
stakedAmountAndEndBlock.endBlock + currentBlockNumber + convertWeeksToBlockNumbers(lockTimeValue);
const extensionTime = stakedAmountAndEndBlock.endBlock + convertWeeksToBlockNumbers(lockTimeValue);

setBlockLockTimeExtension(extensionTime);
}, [currentBlockNumber, lockTime, stakedAmountAndEndBlock]);
Expand Down Expand Up @@ -841,7 +840,7 @@ const Staking = (): JSX.Element => {
tooltip={`The APR may change as the amount of total ${VOTE_GOVERNANCE_TOKEN_SYMBOL} changes.`}
/>
<InformationUI
label={`Estimated ${GOVERNANCE_TOKEN_SYMBOL} Rewards`}
label={`Projected Rewards p.a.`}
value={renderEstimatedRewardAmountLabel()}
tooltip={t('staking_page.the_estimated_amount_of_governance_token_you_will_receive_as_rewards', {
governanceTokenSymbol: GOVERNANCE_TOKEN_SYMBOL,
Expand Down

2 comments on commit 1072b37

@vercel
Copy link

@vercel vercel bot commented on 1072b37 Apr 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 1072b37 Apr 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.