Skip to content

Commit

Permalink
Merge pull request #682 from HeliSwap/sss-update
Browse files Browse the repository at this point in the history
SSS format updated
  • Loading branch information
RAMTO authored Jan 15, 2024
2 parents 2c48266 + 1229677 commit e349b1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/SingleSidedStaking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
formatContractNumberPercentage,
formatContractTimestamp,
formatHeliStringToPrice,
formatHeliStringToPriceShort,
formatStringETHtoPriceFormatted,
formatStringToPercentage,
formatStringToPrice,
Expand Down Expand Up @@ -838,8 +839,8 @@ const SingleSidedStaking = () => {
<div className="col-6 col-md-8 d-md-flex align-items-center">
<p className="d-flex align-items-center">
<span className="text-subheader text-numeric">
{formatStringToPrice(sssData.totalDeposited.inETH)}/
{formatStringToPrice(sssData.maxSupply.inETH)}
{formatHeliStringToPriceShort(sssData.totalDeposited.inETH)}/
{formatHeliStringToPriceShort(sssData.maxSupply.inETH)}
</span>

<IconToken className="ms-3" symbol="HELI" />
Expand Down
4 changes: 4 additions & 0 deletions src/utils/numberUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ export const formatHeliStringToPrice = (stringToFormat: string) => {
return `${numeral(stringToFormat).format('0,0')}`;
};

export const formatHeliStringToPriceShort = (stringToFormat: string) => {
return `${numeral(stringToFormat).format('0.00a')}`;
};

export const formatNumberToBigNumber = (numberToFormat: number) => {
const numberToFormatBN = new BigNumber(numberToFormat);

Expand Down

0 comments on commit e349b1d

Please sign in to comment.