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: (cherry-pick) use intl locale for compatibility with Intl.NumberFormat (#30113) #30120

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

micaelae
Copy link
Member

@micaelae micaelae commented Feb 5, 2025

Cherry-picks #30113 into v12.10.4

Open in GitHub Codespaces

Fixes:
https://app.intercom.com/a/inbox/txttgas6/inbox/conversation/833280?view=Table

  1. Select Portuguese (Brazilian) language
  2. Request bridge quotes
  3. Page should not crash

image

Screenshot 2025-02-04 at 10 07 05 AM

  • I've followed MetaMask Contributor Docs and MetaMask Extension Coding
    Standards
    .

  • I've completed the PR template to the best of my ability

  • I’ve included tests if applicable

  • [] I’ve documented my code using JSDoc format if applicable

  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).

  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Description

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

The locale used in the bridge experience is not compatible with the
`Intl.NumberFormat` library, which causes the page to crash for certain
languages. We need to use the `getIntlLocale` selector instead

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/30113?quickstart=1)

Fixes:
https://app.intercom.com/a/inbox/txttgas6/inbox/conversation/833280?view=Table

1. Select Portuguese (Brazilian) language
2. Request bridge quotes
3. Page should not crash

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

![image](https://github.com/user-attachments/assets/045c74fc-d939-4f85-8cb3-27298f91bcd9)

![Screenshot 2025-02-04 at 10 07
05 AM](https://github.com/user-attachments/assets/0c665074-936d-4837-acce-8a3729b901c7)

- [X] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [X] I've completed the PR template to the best of my ability
- [X] I’ve included tests if applicable
- [] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if
applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
@micaelae micaelae marked this pull request as ready for review February 5, 2025 02:09
@micaelae micaelae requested a review from a team as a code owner February 5, 2025 02:09
@danjm danjm merged commit 4491fbf into Version-v12.10.4 Feb 5, 2025
65 of 69 checks passed
@danjm danjm deleted the cp-fix-bridge-number-formatter branch February 5, 2025 08:18
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [448affe]
Page Load Metrics (1843 ± 103 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint143022161847217104
domContentLoaded139322021808217104
load144022231843215103
domInteractive268239157
backgroundConnect127235199
firstReactRender1694382813
getState578242311
initialActions01000
loadScripts10021641134017283
setupStore76820209
uiStartup173125532148229110

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

Successfully merging this pull request may close these issues.

3 participants