Skip to content

Update formatted number string to int parsing to fix different locales#436

Open
whizz wants to merge 2 commits intocryptosharks131:v1.11.0from
whizz:fix_balance_locale
Open

Update formatted number string to int parsing to fix different locales#436
whizz wants to merge 2 commits intocryptosharks131:v1.11.0from
whizz:fix_balance_locale

Conversation

@whizz
Copy link

@whizz whizz commented Jan 4, 2026

The helper function intcomma() uses toLocaleString(), but the reverse toInt() blindly assumes comma as a thousands separator and tries to remove just commas. In my locale, the thousand separator is space, so the functionality silently breaks. It parses "10 000" as 10. This fix addresses it by removing anything other than digits.

@medisoft
Copy link

it could be a problem in locales like some European countries.

@cryptosharks131 cryptosharks131 changed the base branch from master to v1.11.0 February 15, 2026 22:08
@cryptosharks131
Copy link
Owner

Could cause an issue with negative numbers like inbound fees.

@whizz
Copy link
Author

whizz commented Feb 17, 2026

Updated to also work with negative numbers, though it does not seem to be used for inbound fees

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.

3 participants

Comments