Skip to content

Commit

Permalink
refactor: added constant
Browse files Browse the repository at this point in the history
  • Loading branch information
samh-nl committed Sep 22, 2023
1 parent e3a47e4 commit 2fc4738
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,7 @@ const CONST = {
DISTANCE_UNIT_KILOMETERS: 'km',
MILEAGE_IRS_RATE: 0.655,
DEFAULT_RATE: 'Default Rate',
RATE_DECIMALS: 3,
},

TERMS: {
Expand Down
2 changes: 1 addition & 1 deletion src/libs/PolicyUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function getNumericValue(value, toLocaleDigit) {
if (Number.isNaN(numValue)) {
return NaN;
}
return numValue.toFixed(3);
return numValue.toFixed(CONST.CUSTOM_UNITS.RATE_DECIMALS);
}

/**
Expand Down

0 comments on commit 2fc4738

Please sign in to comment.