From 3ebf5077de29264bb402f55a4899d2e86eb97086 Mon Sep 17 00:00:00 2001 From: vetalcore Date: Fri, 23 Feb 2024 13:53:11 +0200 Subject: [PATCH 1/2] feat(extension): add missing ros tooltip for stake pools table --- apps/browser-extension-wallet/src/lib/translations/en.json | 2 +- packages/staking/src/features/i18n/translations/en.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/browser-extension-wallet/src/lib/translations/en.json b/apps/browser-extension-wallet/src/lib/translations/en.json index 2596248f3..5b37984d1 100644 --- a/apps/browser-extension-wallet/src/lib/translations/en.json +++ b/apps/browser-extension-wallet/src/lib/translations/en.json @@ -1092,7 +1092,7 @@ }, "ros": { "title": "ROS", - "tooltip": "Estimated 'Return On Stake' based on previous pool performance" + "tooltip": "An estimation of the potential rewards you will earn per epoch if you delegate the intended amount of stake. The system looks at the pool's parameters and historical performance data to calculate potential rewards, assuming that the pool reaches optimal saturation." }, "saturation": { "title": "Saturation", diff --git a/packages/staking/src/features/i18n/translations/en.ts b/packages/staking/src/features/i18n/translations/en.ts index a49d7db21..aeaf8c18d 100644 --- a/packages/staking/src/features/i18n/translations/en.ts +++ b/packages/staking/src/features/i18n/translations/en.ts @@ -51,7 +51,7 @@ export const en: Translations = { 'An amount of self‐bonded assets intended to remain staked to the pool for as long as it operates', 'browsePools.stakePoolTableBrowser.tableHeader.ros.title': 'ROS', 'browsePools.stakePoolTableBrowser.tableHeader.ros.tooltip': - "Estimated 'Return On Stake' based on previous pool performance", + "An estimation of the potential rewards you will earn per epoch if you delegate the intended amount of stake. The system looks at the pool's parameters and historical performance data to calculate potential rewards, assuming that the pool reaches optimal saturation.", 'browsePools.stakePoolTableBrowser.tableHeader.saturation.title': 'Saturation', 'browsePools.stakePoolTableBrowser.tableHeader.saturation.tooltip': 'Once a pool reaches the point of saturation, it will offer diminishing rewards', From 38611ff405b38968de3ae9ea8c4d9fcaf89e1893 Mon Sep 17 00:00:00 2001 From: vetalcore Date: Tue, 27 Feb 2024 14:07:03 +0200 Subject: [PATCH 2/2] fix(extension): resolve sdet comments --- apps/browser-extension-wallet/src/lib/translations/en.json | 2 +- .../staking/components/StakePoolsTable/StakePoolsTable.tsx | 4 ++-- packages/staking/src/features/BrowsePools/BrowsePools.tsx | 2 +- .../src/features/DelegationCard/DelegationTooltip.tsx | 2 +- packages/staking/src/features/i18n/translations/en.ts | 6 +++--- packages/staking/src/features/i18n/types.ts | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/browser-extension-wallet/src/lib/translations/en.json b/apps/browser-extension-wallet/src/lib/translations/en.json index 5b37984d1..f3c53ef46 100644 --- a/apps/browser-extension-wallet/src/lib/translations/en.json +++ b/apps/browser-extension-wallet/src/lib/translations/en.json @@ -1090,7 +1090,7 @@ "title": "Cost", "tooltip": "The cost is not directly paid by the delegator; they are deducted from a pool's rewards, consisting of a fixed cost and a variable cost, which fund the pool's operational costs" }, - "ros": { + "apy": { "title": "ROS", "tooltip": "An estimation of the potential rewards you will earn per epoch if you delegate the intended amount of stake. The system looks at the pool's parameters and historical performance data to calculate potential rewards, assuming that the pool reaches optimal saturation." }, diff --git a/apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakePoolsTable/StakePoolsTable.tsx b/apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakePoolsTable/StakePoolsTable.tsx index 575748599..aa3107592 100644 --- a/apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakePoolsTable/StakePoolsTable.tsx +++ b/apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakePoolsTable/StakePoolsTable.tsx @@ -63,7 +63,7 @@ export const StakePoolsTable = ({ scrollableTargetId }: stakePoolsTableProps): R const tableHeaderTranslations: TranslationsFor = { ticker: t('cardano.stakePoolTableBrowser.tableHeader.ticker.title'), - apy: t('cardano.stakePoolTableBrowser.tableHeader.ros.title'), + apy: t('cardano.stakePoolTableBrowser.tableHeader.apy.title'), cost: t('cardano.stakePoolTableBrowser.tableHeader.cost.title'), saturation: t('cardano.stakePoolTableBrowser.tableHeader.saturation.title'), margin: t('cardano.stakePoolTableBrowser.tableHeader.margin.title'), @@ -73,7 +73,7 @@ export const StakePoolsTable = ({ scrollableTargetId }: stakePoolsTableProps): R }; const tableHeaderTooltipsTranslations: TranslationsFor = { ticker: t('cardano.stakePoolTableBrowser.tableHeader.ticker.tooltip'), - apy: t('cardano.stakePoolTableBrowser.tableHeader.ros.tooltip'), + apy: t('cardano.stakePoolTableBrowser.tableHeader.apy.tooltip'), cost: t('cardano.stakePoolTableBrowser.tableHeader.cost.tooltip'), saturation: t('cardano.stakePoolTableBrowser.tableHeader.saturation.tooltip'), margin: t('cardano.stakePoolTableBrowser.tableHeader.margin.tooltip'), diff --git a/packages/staking/src/features/BrowsePools/BrowsePools.tsx b/packages/staking/src/features/BrowsePools/BrowsePools.tsx index b33c3dbb5..427d40b28 100644 --- a/packages/staking/src/features/BrowsePools/BrowsePools.tsx +++ b/packages/staking/src/features/BrowsePools/BrowsePools.tsx @@ -54,7 +54,7 @@ export const BrowsePools = () => { const fetchingPools = walletStoreStakePoolSearchResultsStatus === StateStatus.LOADING; const tableHeaderTranslations = { - apy: t('browsePools.stakePoolTableBrowser.tableHeader.ros.title'), + apy: t('browsePools.stakePoolTableBrowser.tableHeader.apy.title'), blocks: t('browsePools.stakePoolTableBrowser.tableHeader.blocks.title'), cost: t('browsePools.stakePoolTableBrowser.tableHeader.cost.title'), liveStake: t('browsePools.stakePoolTableBrowser.tableHeader.liveStake.title'), diff --git a/packages/staking/src/features/DelegationCard/DelegationTooltip.tsx b/packages/staking/src/features/DelegationCard/DelegationTooltip.tsx index 0f031606b..748691076 100644 --- a/packages/staking/src/features/DelegationCard/DelegationTooltip.tsx +++ b/packages/staking/src/features/DelegationCard/DelegationTooltip.tsx @@ -19,7 +19,7 @@ export const DelegationTooltip = ({ description={ - {t('browsePools.stakePoolTableBrowser.tableHeader.ros.title')} + {t('browsePools.stakePoolTableBrowser.tableHeader.apy.title')} {apy ? `${apy}%` : '-'} diff --git a/packages/staking/src/features/i18n/translations/en.ts b/packages/staking/src/features/i18n/translations/en.ts index aeaf8c18d..638ceedae 100644 --- a/packages/staking/src/features/i18n/translations/en.ts +++ b/packages/staking/src/features/i18n/translations/en.ts @@ -35,6 +35,9 @@ export const en: Translations = { 'browsePools.stakePoolTableBrowser.sortByTitle.saturation': 'Saturation', 'browsePools.stakePoolTableBrowser.sortByTitle.ticker': 'Ticker name', 'browsePools.stakePoolTableBrowser.stake': 'Stake', + 'browsePools.stakePoolTableBrowser.tableHeader.apy.title': 'ROS', + 'browsePools.stakePoolTableBrowser.tableHeader.apy.tooltip': + "An estimation of the potential rewards you will earn per epoch if you delegate the intended amount of stake. The system looks at the pool's parameters and historical performance data to calculate potential rewards, assuming that the pool reaches optimal saturation.", 'browsePools.stakePoolTableBrowser.tableHeader.blocks.title': 'Blocks', 'browsePools.stakePoolTableBrowser.tableHeader.blocks.tooltip': 'Total blocks created by the pool.', 'browsePools.stakePoolTableBrowser.tableHeader.cost.title': 'Cost', @@ -49,9 +52,6 @@ export const en: Translations = { 'browsePools.stakePoolTableBrowser.tableHeader.pledge.title': 'Pledge', 'browsePools.stakePoolTableBrowser.tableHeader.pledge.tooltip': 'An amount of self‐bonded assets intended to remain staked to the pool for as long as it operates', - 'browsePools.stakePoolTableBrowser.tableHeader.ros.title': 'ROS', - 'browsePools.stakePoolTableBrowser.tableHeader.ros.tooltip': - "An estimation of the potential rewards you will earn per epoch if you delegate the intended amount of stake. The system looks at the pool's parameters and historical performance data to calculate potential rewards, assuming that the pool reaches optimal saturation.", 'browsePools.stakePoolTableBrowser.tableHeader.saturation.title': 'Saturation', 'browsePools.stakePoolTableBrowser.tableHeader.saturation.tooltip': 'Once a pool reaches the point of saturation, it will offer diminishing rewards', diff --git a/packages/staking/src/features/i18n/types.ts b/packages/staking/src/features/i18n/types.ts index 6c1e397ca..961901a44 100644 --- a/packages/staking/src/features/i18n/types.ts +++ b/packages/staking/src/features/i18n/types.ts @@ -72,7 +72,7 @@ type KeysStructure = { title: ''; tooltip: ''; }; - ros: { + apy: { title: ''; tooltip: ''; };