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 string splitting in format_satoshis #285

Merged
merged 1 commit into from
May 2, 2023

Conversation

PiRK
Copy link
Collaborator

@PiRK PiRK commented Mar 28, 2023

This hopefully addresses #283, but I'm not sure because I don't know how to reproduce the issue.

The try: except... clause previously used was nonsense that did not catch any error. Replace it with a simple check to find out if the amount string contains a decimal point. If not, assume it only contains an integer. I'm not sure what could cause the string not to have a decimal point, but then I 'm not entirely in control of what locale.format_string produces. Maybe their is an exotic/buggy locale setting that produces values without a dp.

This hopefully addresses Bitcoin-ABC#283, but I'm not sure because I don't know how to reproduce the issue.

The `try: except...` clause previously used was nonsense that did not catch any error. Replace it with a simple check to find out if the amount string contains a decimal point. If not, assume it only contains an integer. I'm not sure what could cause the string not to have a decimal point, but then I 'm not entirely in control of what `locale.format_string` produces. Maybe their is an exotic/buggy locale setting that produces values without a dp.
@PiRK PiRK merged commit d06338b into Bitcoin-ABC:master May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant