Skip to content

Commit

Permalink
chore: apply suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
kate-deriv committed Nov 6, 2024
1 parent abea159 commit 23baef3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/utils/common-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down

0 comments on commit 23baef3

Please sign in to comment.