Skip to content

Conversation

@lempira
Copy link
Contributor

@lempira lempira commented Feb 12, 2026

Fixes #564

This PR fixes a critical bug preventing users with Spanish, Portuguese (Portugal), or Italian browser locales from accessing the testnet dispenser due to a number formatting separator collision error.

The issue stemmed from using 1000 to detect thousand separators, but these locales only apply thousand grouping for numbers ≥10,000. This caused the thousand separator detection to fall back to comma, which conflicted with the comma decimal separator, triggering the error "Decimal separator can't be same as thousand separator". The fix updates the detection to use 10000 instead, ensuring proper grouping appears in all locales. Additional defensive validation was added to the NumericFormat component as a safety net against future locale detection edge cases.

Comprehensive test coverage for Spanish locale was added to both unit and integration tests to prevent regression. A maintenance commit also updates the .nsprc file to reflect changes in npm audit vulnerability IDs.

Before fix when navigating to http://localhost:5173/testnet/fund
image

After fix
image

…ian locales

Spanish (es-ES), Portuguese (pt-PT), and Italian (it-IT) only apply
thousand grouping for numbers ≥10,000. Using 1000 caused the function
to fall back to comma, creating a separator collision error in forms.

- Change getThousandSeparator to use 10000 instead of 1000
- Add defensive validation in NumericFormat component
- Add comprehensive test coverage for es-ES locale
- Add integration test for Spanish locale in dispenser
Copy link
Contributor

@p2arthur p2arthur left a comment

Choose a reason for hiding this comment

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

Interesting edge case!

@lempira lempira merged commit 242337e into main Feb 13, 2026
1 check passed
engineering-ci bot pushed a commit that referenced this pull request Feb 13, 2026
## [2.3.2-beta.1](v2.3.1...v2.3.2-beta.1) (2026-02-13)

### 🐛 Bug Fixes

* correct thousand separator detection for certain locales ([#565](#565)) ([242337e](242337e))
engineering-ci bot pushed a commit that referenced this pull request Feb 13, 2026
## [2.3.2](v2.3.1...v2.3.2) (2026-02-13)

### 🐛 Bug Fixes

* correct thousand separator detection for certain locales ([#565](#565)) ([242337e](242337e))
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.

Error while using Testnet dispenser

3 participants