diff --git a/src/app/components/points/components/points-table/components/points-table-item.tsx b/src/app/components/points/components/points-table/components/points-table-item.tsx index 283ce66f..e6a05407 100644 --- a/src/app/components/points/components/points-table/components/points-table-item.tsx +++ b/src/app/components/points/components/points-table/components/points-table-item.tsx @@ -3,7 +3,7 @@ import { CustomSkeleton } from '@components/custom-skeleton/custom-skeleton'; import { ProtocolRewards } from '@models/points.models'; import { unshiftValue } from 'dlc-btc-lib/utilities'; -import { formatNumber, formatToThreeDecimals } from '@shared/utils'; +import { formatNumber, formatToFourDecimals } from '@shared/utils'; export function PointsTableItem(pointsTableItem: ProtocolRewards): React.JSX.Element { const isMobile = useBreakpointValue({ base: true, md: false }); @@ -49,7 +49,7 @@ export function PointsTableItem(pointsTableItem: ProtocolRewards): React.JSX.Ele {'dlc - {formatToThreeDecimals(unshiftValue(currentTokens))} + {formatToFourDecimals(unshiftValue(currentTokens))} diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 0b53ae2e..6f00659a 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -51,8 +51,8 @@ export function formatEvent(event: DetailedEvent): FormattedEvent { }; } -export function formatToThreeDecimals(value: number): number { - const formattedValue = parseFloat(value.toFixed(3)); +export function formatToFourDecimals(value: number): number { + const formattedValue = parseFloat(value.toFixed(4)); return formattedValue === 0 ? 0 : formattedValue; }