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 unhandled exception when locale specifies unknown country/region code. #6029

Merged
merged 1 commit into from Feb 7, 2022
Merged

Conversation

ghost
Copy link

@ghost ghost commented Feb 5, 2022

In some cases an unknown country code is obtained from the locale. According to the documentation, country code is "ISO 3166 alpha-2 country code or UN M.49 numeric-3 area code" (e.g. 419 = Spanish in Latin America and the Caribbean). Bisq uses the country code to choose the "Default Currency" setting for new users, but if a region is specified instead, we cannot determine the currency automatically.

  • PRE: If the country code was unknown we would get an exception resulting in a blank screen and no app start up.
  • POST: Locale setting will be logged at startup.
  • POST: If the country code is unknown the default currency will fallback to USD and startup will continue normally.
  • Language preference will still come from the locale setting.

Fixes #5877
Ref: #1204


Example:

INFO  b.core.locale.GlobalSettings: Locale info: es_419

WARN  bisq.core.user.Preferences: Could not determine currency for country 419 [java.lang.IllegalArgumentException] 

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

utACK

Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

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

utACK

@ripcurlx ripcurlx added this to the v1.8.3 milestone Feb 7, 2022
@ripcurlx ripcurlx merged commit 9c70a8a into bisq-network:master Feb 7, 2022
@ghost ghost mentioned this pull request Feb 21, 2022
@ghost ghost deleted the fix_issue_5877 branch October 18, 2023 16:03
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.

App remain in white screen on MacOS Big Sur 11.1 on M1
1 participant