Skip to content

Commit

Permalink
fix(rewards stats): add percent for empty stats
Browse files Browse the repository at this point in the history
  • Loading branch information
solidovic committed Aug 7, 2024
1 parent dbccfff commit 543e02a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions features/rewards/components/stats/Stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ export const Stats: React.FC = () => {
) : (
'-'
)}
<Box display="inline-block" pl="3px">
%
</Box>
</Stat>
<Title hideMobile>
<Link href={`${config.rootOrigin}/ethereum#apr`}>
Expand Down
6 changes: 3 additions & 3 deletions features/rewards/utils/numberFormatting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export const simpleFormatCurrency = (
const decimals = decimalOverride
? HUMAN_DECIMALS_CURRENCY + decimalOverride
: manyDigits
? PRECISE_DECIMALS_CURRENCY
: HUMAN_DECIMALS_CURRENCY;
? PRECISE_DECIMALS_CURRENCY
: HUMAN_DECIMALS_CURRENCY;

const options = {
currency: 'USD', // TODO: make dynamic if beneficial
Expand Down Expand Up @@ -85,5 +85,5 @@ export const formatPercentage = (input: BigNumber, manyDigits: boolean) => {
? PRECISE_DECIMALS_PERCENT
: HUMAN_DECIMALS_PERCENT;

return input.decimalPlaces(decimals).toString() + '%';
return input.decimalPlaces(decimals).toString();
};

0 comments on commit 543e02a

Please sign in to comment.