Skip to content

Commit

Permalink
Merge pull request #202 from pastelnetwork/feature/update-variable-type
Browse files Browse the repository at this point in the history
change variable type
  • Loading branch information
ngvtuan authored Nov 7, 2023
2 parents 5ed1f35 + 2421978 commit 18f1336
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Summary/Summary.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ export const calculateDifference = (
second: string | number,
key: string,
) => {
const firstValue = Number(first.toString());
const secondValue = Number(second.toString());
const firstValue = parseFloat(first.toString());
const secondValue = parseFloat(second.toString());

const difference = ((firstValue - secondValue) / ((firstValue + secondValue) / 2)) * 100;

Expand Down

0 comments on commit 18f1336

Please sign in to comment.