From 23baef36dfa519573dc5fad44b5fab95a3b69f7f Mon Sep 17 00:00:00 2001 From: kate-deriv Date: Wed, 6 Nov 2024 16:35:15 +0300 Subject: [PATCH] chore: apply suggestion --- lib/utils/common-utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/utils/common-utils.ts b/lib/utils/common-utils.ts index ea53da6c..26eac07a 100644 --- a/lib/utils/common-utils.ts +++ b/lib/utils/common-utils.ts @@ -27,10 +27,10 @@ export const reactNodeToString = (reactNode: React.ReactNode): string => { }; const toFixedWithoutRounding = (value: number, decimals: number) => { - const stringified_value = value.toString(); - const result = stringified_value.slice( + const stringifiedValue = value.toString(); + const result = stringifiedValue.slice( 0, - stringified_value.indexOf(".") + decimals + 1, + stringifiedValue.indexOf(".") + decimals + 1, ); return Number(result); };