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 da067c3d..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 } 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 - {unshiftValue(currentTokens)} + {formatToFourDecimals(unshiftValue(currentTokens))} diff --git a/src/app/components/points/components/points-table/points-table.tsx b/src/app/components/points/components/points-table/points-table.tsx index f6aa7a2c..e26a52da 100644 --- a/src/app/components/points/components/points-table/points-table.tsx +++ b/src/app/components/points/components/points-table/points-table.tsx @@ -11,7 +11,7 @@ interface PointsTableProps { } export function PointsTable({ items }: PointsTableProps): React.JSX.Element { - const dynamicHeight = items ? items.length * 59 + 20 : 20; + const dynamicHeight = items ? items.length * 59 + 50 : 20; const isMobile = useBreakpointValue({ base: true, md: false }); return ( diff --git a/src/app/components/points/points.tsx b/src/app/components/points/points.tsx index dacd3040..30ada3e0 100644 --- a/src/app/components/points/points.tsx +++ b/src/app/components/points/points.tsx @@ -70,7 +70,7 @@ export function Points(): React.JSX.Element { diff --git a/src/shared/utils.ts b/src/shared/utils.ts index bdf6bdc2..53f98c03 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -51,5 +51,9 @@ export function formatEvent(event: DetailedEvent): FormattedEvent { }; } +export function formatToFourDecimals(value: number): number { + return parseFloat(value.toFixed(4)); +} + export const breakpoints = ['300px', '400px', '600px', '850px', '1280px', '1400px']; export const titleTextSize = ['2xl', '2xl', '4xl', '6xl'];