Skip to content

Commit

Permalink
Hide historical rewards rate after inflation
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitayutanov committed Feb 21, 2024
1 parent 0844994 commit 4da5a27
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/pages/Overview/Stats/HistoricalRewardsRate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Text } from 'library/StatBoxList/Text';
export const HistoricalRewardsRateStat = () => {
const { t } = useTranslation('pages');
const { metrics } = useNetworkMetrics();
const { inflation, stakedReturn } = useInflation();
const { stakedReturn } = useInflation();
const { totalIssuance } = metrics;

const value = `${
Expand All @@ -19,12 +19,14 @@ export const HistoricalRewardsRateStat = () => {
: new BigNumber(stakedReturn).decimalPlaces(2).toFormat()
}%`;

const secondaryValue =
totalIssuance.isZero() || stakedReturn === 0
? undefined
: `/ ${new BigNumber(Math.max(0, stakedReturn - inflation))
.decimalPlaces(2)
.toFormat()}% ${t('overview.afterInflation')}`;
// const secondaryValue =
// totalIssuance.isZero() || stakedReturn === 0
// ? undefined
// : `/ ${new BigNumber(Math.max(0, stakedReturn - inflation))
// .decimalPlaces(2)
// .toFormat()}% ${t('overview.afterInflation')}`;

const secondaryValue = undefined;

const params = {
label: t('overview.historicalRewardsRate'),
Expand Down

0 comments on commit 4da5a27

Please sign in to comment.