Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getNumberString utils function #1703

Merged
merged 1 commit into from
Jun 28, 2024
Merged

Fix getNumberString utils function #1703

merged 1 commit into from
Jun 28, 2024

Conversation

hectorgomezv
Copy link
Member

Closes #1701

Changes

  • Changes getNumberString implementation to use a fixed locale, standard notation, and no grouping.

@hectorgomezv hectorgomezv self-assigned this Jun 28, 2024
@hectorgomezv hectorgomezv requested a review from a team as a code owner June 28, 2024 13:55
@hectorgomezv hectorgomezv linked an issue Jun 28, 2024 that may be closed by this pull request
@@ -1,6 +1,7 @@
export function getNumberString(value: number): string {
// Prevent scientific notation
return value.toLocaleString('fullwide', {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'fullwide' is not a standard locale identifier. This seems to be a bug in the original implementation, which JS is probably ignoring and therefore defaulting to the host locale.

@hectorgomezv hectorgomezv merged commit d165657 into main Jun 28, 2024
13 checks passed
@hectorgomezv hectorgomezv deleted the issue/1701 branch June 28, 2024 13:59
@coveralls
Copy link

coveralls commented Jun 28, 2024

Pull Request Test Coverage Report for Build 9713953727

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 48.809%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/domain/common/utils/utils.ts 0 1 0.0%
Totals Coverage Status
Change from base Build 9703788481: 0.04%
Covered Lines: 4197
Relevant Lines: 6937

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky test while testing balances fiatTotal values
2 participants