diff --git a/src/typescript/frontend/src/components/FormattedNumber.tsx b/src/typescript/frontend/src/components/FormattedNumber.tsx index 839357685..a3bd0ef17 100644 --- a/src/typescript/frontend/src/components/FormattedNumber.tsx +++ b/src/typescript/frontend/src/components/FormattedNumber.tsx @@ -29,6 +29,16 @@ const ScrambledNumberLabel = ({ return {`${prefix}${value}${suffix}`}; }; +type NominalizedBigIntOrAnyNumberString = + | { + value: bigint; + nominalize: true; + } + | { + value: AnyNumberString; + nominalize?: undefined | false; + }; + /** * Formats a number, string or bigint and scrambles it if desired. * @@ -51,11 +61,9 @@ export const FormattedNumber = ({ prefix = "", className, style = "sliding-precision", -}: { - value: AnyNumberString; +}: NominalizedBigIntOrAnyNumberString & { decimals?: number; scramble?: boolean; - nominalize?: boolean; suffix?: string; prefix?: string; className?: string;