[pull] main from MetaMask:main#303
Merged
Merged
Conversation
…odal and Tutorial flow (#20356) - fix: cp-7.56.0 Misc Fixes for Perps GTM fullscreen modal and Tutorial flow (#20348) <!-- 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. --> ## **Description** <!-- 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? --> ## **Changelog** ### Changes: - Updated Perps tutorial carousel copy - Updated Perps tutorial carousel UI element positioning for better scaling across device sizes - Fixed app freeze when geo block modal is displayed by clicking on account balance card above market list - Added font-scaling helpers to ensure the GTM and tutorial text fits for variety of languages - Fixed font-scaling issues for non-latin character-based languages for Perps GTM fullscreen modal - Fixed incorrect font color for rewards display. Was primary -> now alternative <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: misc fixes for perps gtm fullscreen modal and tutorial flow ## **Related issues** Fixes: - [TAT-1486: Update tutorial animations](https://consensys.atlassian.net/browse/TAT-1486) - [TAT-1709: UI bug: Perps GTM full page modal has weird spacing](https://consensys.atlassian.net/browse/TAT-1709) - [TAT-1790: font issues with rewards addition](https://consensys.atlassian.net/browse/TAT-1790) - [TAT-1792: Implement font scaling for modal title](https://consensys.atlassian.net/browse/TAT-1792) - [TAT-1795: Perps account card above market list freezes on Android when geo blocked](https://consensys.atlassian.net/browse/TAT-1795) ## **Manual testing steps** ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **After** <!-- [screenshots/recordings] --> English (Using desired font) <img width="222" height="480" alt="image" src="https://github.com/user-attachments/assets/f49bb2af-e596-4a3e-815f-71c2c868fa02" /> Spanish (Using desired font) <img width="333" height="720" alt="image" src="https://github.com/user-attachments/assets/f19bb588-8b21-4408-bb90-2f987394ea31" /> Korean (Using system fallback font since characters aren't latin) <img width="222" height="480" alt="image" src="https://github.com/user-attachments/assets/c5c62127-1907-45d7-a518-7a9704b5c5b4" /> Greek (Using system fallback font since characters aren't latin) <img width="952" height="2026" alt="image" src="https://github.com/user-attachments/assets/074610db-473e-47a6-8b6a-5f95039584ea" /> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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 - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. [4a8664a](4a8664a)
<!--
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.
-->
Bumps version of `utils` package to `11.8.1`, which includes performance
improvements.
<!--
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?
-->
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: null
Fixes:
```gherkin
Feature: my feature name
Scenario: user [verb for user action]
Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
```
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
<!-- [screenshots/recordings] -->
<!-- [screenshots/recordings] -->
- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] 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](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/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.
- chore: bump utils version (#20320) <!-- 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. --> ## **Description** Bumps version of `utils` package to `11.8.1`, which includes performance improvements. <!-- 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? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] 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](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. [535d24b](535d24b)
…etTooltip freezing on android (#20398) <!-- 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. --> ## **Description** This PR fixes a rendering issue impacting Android devices for the `PerpsBottomSheetTooltip` component. Context: We wrap the `PerpsBottomSheetTooltip` in a `<Modal>` component in order to render from the root. This allows the modal to display on-top of all other UI elements instead of being constrained to the parent container. <!-- 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? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: fix PerpsBottomSheetTooltip (e.g. geo-block tooltip) freezing on Android devices ## **Related issues** Fixes: [TAT-1789: Geo-restriction bottom sheet don't open efficiently](https://consensyssoftware.atlassian.net/browse/TAT-1789) ## **Manual testing steps** While geo-blocked, visit the Perps tab and spam click the "available balance" button to render the geo-block modal. Try opening and closing the geo-block modal many times in quick succession. There should no longer be any freezing ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> App freezes on Android when opening the geo-block modal ### **After** https://github.com/user-attachments/assets/3a3923cf-782c-4a18-b9d3-d4184af2d0f8 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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 - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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.
…n fetching (#20211) <!-- 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. --> <!-- 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? --> This PR does the following: 1. Fixes an issue where Swaps source token picker would make an API request to fetch tokens after selecting a token when it was not needed 2. Use `TokenListController`'s token cache as a first hit before reaching out to Bridge API 4. Memoizes all `fetchBridgeTokens` calls 5. Uses `FlatList` for both iOS and Android now. `FlashList` seemed to have some initial rendering issues when memoizing `fetchBridgeTokens`. 6. Fix an issue where if you were partially scrolled down on the destination token picker and then changed dest networks, the scroll position would remain, which caused rendering issues. <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 7. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: Fixed some performance issues with Swaps asset picker Fixes: #20177 https://consensyssoftware.atlassian.net/browse/SWAPS-3067 ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> Before https://github.com/user-attachments/assets/e572ed95-3f10-4dcf-8b25-27864c178299 After https://github.com/user-attachments/assets/c672a932-0bca-413b-80b7-d4a5c8451eba No /getTokens call https://github.com/user-attachments/assets/d454b6a3-dbbd-4f90-8097-fd192200c0b5 - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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 - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/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.
…ttom sheet for social login user cp-7.56.0 (#20379) <!-- 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. --> Resolves: #20376 and #20371 ## **Description** Do not prompt enhance experience bottom sheet for social login flow Pressing "Done" on the keyboard to dismisses it during confirm-password is pressed <!-- 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? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: Removed `enhance user experience` bottom sheet prompting ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: remove enhance user experience bottom sheet Scenario: user create wallet with Metametrics consent but do not tick marketing data collection When user lock then unlock wallet Then user will not prompted enhance user experience bottomsheet ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/9013a2fd-ba60-486f-b659-ec4e32fe1c30 ### **After** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/c272b0fb-1beb-4ff7-afab-ef0aa749f361 ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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 - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. --------- Co-authored-by: Gaurav Goel <grvgoel19@gmail.com> Co-authored-by: himanshuchawla009 <himanshuchawla2014@gmail.com>
…oken in useEffect (#20403) - fix: cp-7.46.0 wrap useInitialSource/DestToken in useEffect (#20336) <!-- 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. --> ## **Description** <!-- 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? --> This PR fixes an issue where `useInitialSourceToken` and `useInitialDestToken` were not wrapped in a `useEffect` causing them to render too often. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: Fixed an issue where Swaps hooks were rendering too much ## **Related issues** Fixes: #20330 ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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 - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. [e0bf668](e0bf668)
…etTooltip freezing on android (#20410) - fix: cp-7.56.0 TAT-1789 fix PerpsBottomSheetTooltip freezing on android (#20398) <!-- 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. --> ## **Description** This PR fixes a rendering issue impacting Android devices for the `PerpsBottomSheetTooltip` component. Context: We wrap the `PerpsBottomSheetTooltip` in a `<Modal>` component in order to render from the root. This allows the modal to display on-top of all other UI elements instead of being constrained to the parent container. <!-- 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? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: fix PerpsBottomSheetTooltip (e.g. geo-block tooltip) freezing on Android devices ## **Related issues** Fixes: [TAT-1789: Geo-restriction bottom sheet don't open efficiently](https://consensyssoftware.atlassian.net/browse/TAT-1789) ## **Manual testing steps** While geo-blocked, visit the Perps tab and spam click the "available balance" button to render the geo-block modal. Try opening and closing the geo-block modal many times in quick succession. There should no longer be any freezing ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> App freezes on Android when opening the geo-block modal ### **After** https://github.com/user-attachments/assets/3a3923cf-782c-4a18-b9d3-d4184af2d0f8 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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 - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. [54c14ba](54c14ba)
…change, skip token fetching (#20405) - fix: cp-7.56.0 speed up source token picker network change, skip token fetching (#20211) <!-- 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. --> ## **Description** <!-- 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? --> This PR does the following: 1. Fixes an issue where Swaps source token picker would make an API request to fetch tokens after selecting a token when it was not needed 2. Use `TokenListController`'s token cache as a first hit before reaching out to Bridge API 4. Memoizes all `fetchBridgeTokens` calls 5. Uses `FlatList` for both iOS and Android now. `FlashList` seemed to have some initial rendering issues when memoizing `fetchBridgeTokens`. 6. Fix an issue where if you were partially scrolled down on the destination token picker and then changed dest networks, the scroll position would remain, which caused rendering issues. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 7. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: Fixed some performance issues with Swaps asset picker ## **Related issues** Fixes: #20177 https://consensyssoftware.atlassian.net/browse/SWAPS-3067 ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> Before https://github.com/user-attachments/assets/e572ed95-3f10-4dcf-8b25-27864c178299 After https://github.com/user-attachments/assets/c672a932-0bca-413b-80b7-d4a5c8451eba No /getTokens call https://github.com/user-attachments/assets/d454b6a3-dbbd-4f90-8097-fd192200c0b5 ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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 - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. [425d58d](425d58d)
…ttom sheet for social login user cp-7.56.0 (#20411) - fix: remove redundant marketing consent bottom sheet for social login user cp-7.56.0 (#20379) <!-- 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. --> Resolves: #20376 and #20371 ## **Description** Do not prompt enhance experience bottom sheet for social login flow Pressing "Done" on the keyboard to dismisses it during confirm-password is pressed <!-- 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? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: Removed `enhance user experience` bottom sheet prompting ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: remove enhance user experience bottom sheet Scenario: user create wallet with Metametrics consent but do not tick marketing data collection When user lock then unlock wallet Then user will not prompted enhance user experience bottomsheet ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/9013a2fd-ba60-486f-b659-ec4e32fe1c30 ### **After** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/c272b0fb-1beb-4ff7-afab-ef0aa749f361 ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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 - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. --------- Co-authored-by: Gaurav Goel <grvgoel19@gmail.com> Co-authored-by: himanshuchawla009 <himanshuchawla2014@gmail.com> [2eef00b](2eef00b)
…lockdown option (#20430) - fix: keep error stack trace with modified lockdown option (#19736) <!-- 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. --> ## **Description** Patch @lavamoat/react-native-lockdown so that error stack trace integrity is kept [follow up issue](#19735) to update package once a fix is available. Context on what the patch is doing: https://github.com/endojs/endo/blob/master/packages/ses/docs/reference.md#options-quick-reference ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** Fixes: MetaMask/mobile-planning#2304 ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] 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](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. [d96644d](d96644d)
…_case (#20455) ## **Description** Updates Perps analytics event properties and values to use snake_case formatting for consistency with MetaMask's standard analytics convention. **Changes Made:** - Updated all string values in `PerpsEventProperties` from mixed-case/camelCase to snake_case (e.g., `'Leverage Used'` → `'leverage_used'`) - Updated all string values in `PerpsEventValues` to snake_case (e.g., `'Long'` → `'long'`, `'mainActionButton'` → `'main_action_button'`) - No functional changes; purely cosmetic for analytics schema compliance **Reason:** The segment schema has been updated to use snake_case property names and values to match MetaMask's analytics standards. ## **Changelog** CHANGELOG entry: Updated Perps analytics properties and values to use snake_case formatting for consistency with MetaMask analytics standards ## **Related issues** Fixes: Analytics schema compliance for Perps events ## **Manual testing steps** ```gherkin Feature: Perps analytics snake_case formatting Scenario: Analytics events use correct property names and values Given user performs Perps trading actions (e.g., opening position, closing position, viewing charts) When analytics events are triggered Then event properties should use snake_case format (e.g., 'leverage_used', 'direction', 'order_size') And event values should use snake_case format (e.g., 'long', 'market', 'main_action_button') And events should fire without errors Scenario: Dashboard compatibility Given analytics data is sent to segment When viewing analytics dashboard Then property names and values should match expected snake_case format And no data mismatches should occur due to formatting changes ``` ## **Screenshots/Recordings** No visual changes to the app interface. This is a data formatting update only. ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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 - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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.
## **Description** Fixes most of the missing translation strings documented in this issue: #19902 There are a few English strings that we are surfacing that come directly from Hyperliquid, specifically related to transaction history. These strings might need a bit more thought, and I will address these in a follow up task. ## **Changelog** CHANGELOG entry: Various localization string updates for Perps feature ## **Related issues** Fixes: #19902 (partially) ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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 - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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.
-->
## **Description**
<!--
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?
-->
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry:
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
Feature: my feature name
Scenario: user [verb for user action]
Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
```
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] 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](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **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.
…_case (#20466) - fix(perps): cp-7.56.0 events name in snake_case (#20455) ## **Description** Updates Perps analytics event properties and values to use snake_case formatting for consistency with MetaMask's standard analytics convention. **Changes Made:** - Updated all string values in `PerpsEventProperties` from mixed-case/camelCase to snake_case (e.g., `'Leverage Used'` → `'leverage_used'`) - Updated all string values in `PerpsEventValues` to snake_case (e.g., `'Long'` → `'long'`, `'mainActionButton'` → `'main_action_button'`) - No functional changes; purely cosmetic for analytics schema compliance **Reason:** The segment schema has been updated to use snake_case property names and values to match MetaMask's analytics standards. ## **Changelog** CHANGELOG entry: Updated Perps analytics properties and values to use snake_case formatting for consistency with MetaMask analytics standards ## **Related issues** Fixes: Analytics schema compliance for Perps events ## **Manual testing steps** ```gherkin Feature: Perps analytics snake_case formatting Scenario: Analytics events use correct property names and values Given user performs Perps trading actions (e.g., opening position, closing position, viewing charts) When analytics events are triggered Then event properties should use snake_case format (e.g., 'leverage_used', 'direction', 'order_size') And event values should use snake_case format (e.g., 'long', 'market', 'main_action_button') And events should fire without errors Scenario: Dashboard compatibility Given analytics data is sent to segment When viewing analytics dashboard Then property names and values should match expected snake_case format And no data mismatches should occur due to formatting changes ``` ## **Screenshots/Recordings** No visual changes to the app interface. This is a data formatting update only. ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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 - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. [6bf6e8a](6bf6e8a)
## **Description** Fixes most of the missing translation strings documented in this issue: #19902 There are a few English strings that we are surfacing that come directly from Hyperliquid, specifically related to transaction history. These strings might need a bit more thought, and I will address these in a follow up task. ## **Changelog** CHANGELOG entry: Various localization string updates for Perps feature ## **Related issues** Fixes: #19902 (partially) ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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 - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. --> ## **Description** <!-- 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? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] 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](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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.
…D v4 test coverage (#22166) - fix: resolve TypeScript errors and add UUID v4 test coverage cp-7.58.0 (#22149) ## **Description** This PR adds comprehensive test coverage for UUID version 4 validation in the MetaMetrics ID generation logic and fixes related TypeScript type errors. **What is the reason for the change?** The validation logic at `MetaMetrics.ts:313-316` checks that stored MetaMetrics IDs are valid UUIDv4 format using `validate()` and `version()` checks. However, there were no test cases covering the `version(metametricsId) !== 4` condition, and several existing tests were using invalid UUIDs (NIL UUID with all zeros) which is not a version 4 UUID. Additionally, TypeScript was reporting errors because `getMetaMetricsId()` was typed to return `Promise<string | undefined>`, but the implementation always returns a string (generates a new UUID if none exists). **What is the improvement/solution?** 1. **Added 4 new test cases** to cover UUID version validation: - Regenerates ID when stored ID is version 1 UUID (time-based) - Regenerates ID when stored ID is version 3 UUID (MD5-based) - Regenerates ID when stored ID is version 5 UUID (SHA1-based) - Regenerates ID when stored ID is NIL UUID (all zeros) 2. **Fixed 3 existing tests** that were incorrectly using `'00000000-0000-0000-0000-000000000000'` (NIL UUID, version 0) as test data. Changed to use valid UUIDv4 format `'12345678-1234-4234-b234-123456789012'`. 3. **Fixed TypeScript errors**: - Changed `getMetaMetricsId()` return type from `Promise<string | undefined>` to `Promise<string>` in `MetaMetrics.ts` - Updated `ControllerInitRequest` type to reflect that `metaMetricsId` is always provided at runtime - Added temporary `@ts-expect-error` comment in `Engine.ts` (see Related issues below) All tests now pass and properly validate that only UUIDv4 format is accepted. ## **Changelog** CHANGELOG entry: null ## **Related issues** Refs: #22148 > **Note**: This PR adds a temporary `@ts-expect-error` comment in `Engine.ts` to handle a type compatibility issue. The complete fix (restructuring Engine constructor parameters) will be addressed in the follow-up issue #22148 to avoid scope creep. ## **Manual testing steps** ```gherkin Feature: MetaMetrics UUID Version Validation Scenario: user has corrupted MetaMetrics ID with wrong UUID version Given the app has a stored MetaMetrics ID that is not version 4 UUID When the app initializes and MetaMetrics configures Then a new valid UUIDv4 should be generated And the new ID should be stored And a log message should indicate the corrupted ID was detected Scenario: user has valid UUIDv4 MetaMetrics ID Given the app has a stored valid version 4 UUID When the app initializes and MetaMetrics configures Then the existing UUID should be preserved And no new ID should be generated ``` **Testing commands:** ```bash # Run the specific test suite yarn jest app/core/Analytics/MetaMetrics.test.ts # Run with coverage yarn test:unit:coverage -- app/core/Analytics/MetaMetrics.test.ts ``` ## **Screenshots/Recordings** N/A - This is a test coverage and TypeScript fix PR with no UI changes. ### **Before** - 3 tests failing due to NIL UUID validation - TypeScript errors for `metaMetricsId` type mismatches - No test coverage for UUID version validation ### **After** - All 57 tests passing (54 existing + 3 newly fixed tests) - 4 new test cases covering UUID version validation (v1, v3, v5, NIL) - TypeScript errors resolved - Complete test coverage for the UUID validation logic ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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 - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. [5be4d69](5be4d69) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Enforces UUIDv4 validation for MetaMetrics IDs, adds targeted tests, and updates Engine/types to require a non-optional metaMetricsId. > > - **Analytics**: > - Enforce UUIDv4 MetaMetrics ID by validating `validate(id)` and `version(id) === 4` in `MetaMetrics.ts`. > - Change `IMetaMetrics#getMetaMetricsId` and implementation to return `Promise<string>` (non-optional). > - **Tests**: > - Add cases to regenerate ID for NIL (all zeros) and UUID v1/v3/v5; accept valid v4. > - Fix existing tests to use valid UUIDv4 samples instead of NIL UUIDs. > - **Engine/Types**: > - Make `metaMetricsId` required in `ControllerInitRequest` and init wiring; adjust `remote-feature-flag-controller-init` to return it directly. > - Add temporary `@ts-expect-error` in `Engine.ts` where `metaMetricsId` is passed until follow-up refactor. > - Update test utils to provide a mock `metaMetricsId`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit f1df7d9. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com> Co-authored-by: João Loureiro <175489935+joaoloureirop@users.noreply.github.com>
) - fix: cp-7.57.2 remove currency rates multichain (#21996) <!-- 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. --> This PR removes the `RatesController` to reduce redundant CryptoCompare API calls in the multichain architecture. The `RatesController` was introduced for fetching cryptocurrency conversion rates (primarily for BTC and SOL) to support non-EVM chains. However, this resulted in duplicate API calls to CryptoCompare since we already have `MultichainAssetsRatesController` and `TokenRatesController` handling rate fetching functionality. This redundancy increased API usage unnecessarily. - Removed `RatesController` initialization and configuration from the Engine - Deleted `RatesController` messenger setup and related controller initialization files - Removed multichain selectors that depended on `RatesController` state (`selectMultichainConversionRate`, `selectMultichainCoinRates`) - Cleaned up type definitions and state management to remove `RatesController` references - Updated test snapshots and initial background state The existing `MultichainAssetsRatesController` and `TokenRatesController` will continue to handle all rate-fetching needs without the additional overhead of `RatesController`. CHANGELOG entry: Removed redundant RatesController to optimize API usage Fixes: <!-- Add issue number if applicable --> ```gherkin Feature: Multichain rate fetching Scenario: User views portfolio balance with non-EVM accounts Given user has Bitcoin and Solana accounts configured And user is viewing their portfolio When the app fetches cryptocurrency rates Then rates should be fetched only through MultichainAssetsRatesController And no redundant API calls should be made to CryptoCompare And account balances should display with correct fiat conversions Scenario: User switches between EVM and non-EVM accounts Given user has both EVM and non-EVM accounts And user is viewing their wallet When user switches between different account types Then appropriate conversion rates should display for each account And rate updates should continue to work correctly ``` <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> <!-- RatesController making redundant API calls alongside MultichainAssetsRatesController --> <!-- Single source of rate fetching through MultichainAssetsRatesController, reducing API overhead --> - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] 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](https://jsdoc.app/) format if applicable - [ ] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Removes the legacy RatesController across Engine, selectors, types, and fixtures, and adds migration 106 to delete its persisted state. > > - **Engine**: > - Remove `RatesController` creation, messenger setup, currency rate sync, and `start()` call in `startPolling`. > - Drop `RatesController` from `context`, initialization, and state exposure. > - **Selectors**: > - Delete `selectMultichainConversionRate` and `selectMultichainCoinRates` from `app/selectors/multichain/multichain.ts` and related tests. > - **Store/Migrations**: > - Add migration `106` to remove `backgroundState.RatesController` with tests. > - **Types/Constants**: > - Remove `RatesController` types, actions/events, and state from `app/core/Engine/types.ts` and `constants.ts`. > - **Tests/Fixtures**: > - Update `Engine.test.ts`, multichain selector tests, snapshots, and `initial-background-state.json` to exclude `RatesController`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c676194. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> [43c399b](43c399b) Co-authored-by: Salim TOUBAL <salim.toubal@outlook.com>
…wards cp-7.57.2 (#22021) - feat: Accurate opt out translations for rewards cp-7.57.2 (#22011) <!-- 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. --> <!-- 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? --> Uses more accurate content and tone for most translations of Rewards opt-out content. <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: improved translations for Rewards Fixes: n/a ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> <!-- [screenshots/recordings] --> <!-- [screenshots/recordings] --> - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] 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](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Updates Rewards opt-out titles, descriptions, confirm labels, and select error messages across many locales for clearer, irreversible-action phrasing. > > - **i18n – Rewards opt-out copy updates**: > - Adjust `title`, `description`, and `confirm` strings in `locales/languages/*.json` for clearer deletion/exit language and irreversibility. > - Locales updated: `de`, `el`, `es`, `fr`, `hi`, `id`, `ja`, `ko`, `pt`, `tl`, `tr`, `vi`, `zh`. > - Minor tweaks: > - `es`: capitalization fix in `settings.title`. > - `zh`, `vi`, `tl`, `tr`, `ko`: refine specific `error_message` or phrasing within `optout.modal`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 1f650a8. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Laurel <153323700+i18nlaurel@users.noreply.github.com> [4890aaa](4890aaa) Co-authored-by: Christian Montoya <christian.montoya@consensys.net> Co-authored-by: Laurel <153323700+i18nlaurel@users.noreply.github.com>
# 🚀 v7.58.0 Testing & Release Quality Process Hi Team, As part of our new **MetaMask Release Quality Process**, here’s a quick overview of the key processes, testing strategies, and milestones to ensure a smooth and high-quality deployment. --- ## 📋 Key Processes ### Testing Strategy - **Developer Teams:** Conduct regression and exploratory testing for your functional areas, including automated and manual tests for critical workflows. - **QA Team:** Focus on exploratory testing across the wallet, prioritize high-impact areas, and triage any Sentry errors found during testing. - **Customer Success Team:** Validate new functionalities and provide feedback to support release monitoring. ### GitHub Signoff - Each team must **sign off on the Release Candidate (RC)** via GitHub by the end of the validation timeline (**Tuesday EOD PT**). - Ensure all tests outlined in the Testing Plan are executed, and any identified issues are addressed. ### Issue Resolution - **Resolve all Release Blockers** (Sev0 and Sev1) by **Tuesday EOD PT**. - For unresolved blockers, PRs may be reverted, or feature flags disabled to maintain release quality and timelines. ### Cherry-Picking Criteria - Only **critical fixes** meeting outlined criteria will be cherry-picked. - Developers must ensure these fixes are thoroughly reviewed, tested, and merged by **Tuesday EOD PT**. --- ## 🗓️ Timeline and Milestones 1. **Today (Friday):** Begin Release Candidate validation. 2. **Tuesday EOD PT:** Finalize RC with all fixes and cherry-picks. 3. **Wednesday:** Buffer day for final checks. 4. **Thursday:** Submit release to app stores and begin rollout to 1% of users. 5. **Monday:** Scale deployment to 10%. 6. **Tuesday:** Full rollout to 100%. --- ## ✅ Signoff Checklist Each team is responsible for signing off via GitHub. Use the checkbox below to track signoff completion: # Team sign-off checklist - [x] Mobile Platform - [x] Perps - [x] Earn - [x] Wallet Integrations - [x] Rewards - [x] Core Platform - [x] Ramp - [x] Accounts Framework - [x] Confirmations - [x] Extension Platform - [x] Swaps and Bridge - [x] Assets - [x] Design System - [x] New Networks - [x] Web3Auth - [x] Mobile UX - [x] Predict - [x] Network Enablement - [x] Transactions - [x] Card This process is a major step forward in ensuring release stability and quality. Let’s stay aligned and make this release a success! 🚀 Feel free to reach out if you have questions or need clarification. Many thanks in advance # Reference - Testing plan sheet - https://docs.google.com/spreadsheets/d/1tsoodlAlyvEUpkkcNcbZ4PM9HuC9cEM80RZeoVv5OCQ/edit?gid=404070372#gid=404070372 <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds comprehensive CI workflows and supporting scripts for Android/iOS e2e builds/tests, release automation, labeling, and related configs. > > - **CI/CD** > - **GitHub Actions**: Add workflows for building Android/iOS e2e apps (`build-android-e2e.yml`, `build-ios-e2e.yml`), uploading to BrowserStack, running e2e smoke/regression tests, API specs, test app build checks, and release PR automation. > - Add helper/reusable workflows (`needs-e2e-build.yml`, `run-e2e-workflow.yml`) and team labeling automation. > - **E2E Testing** > - **Detox/Env**: Add `detoxrc.js` and example env files for e2e setup. > - **Scripts**: Add utilities to split shards/tags, check build necessity, run tagged tests, merge JUnit reports, create JSON reports, and generate Slack summaries. > - **AI Analysis**: Add action and scripts for AI-driven e2e analysis. > - **Repo/Quality** > - Add `CODEOWNERS`, actionlint config, and labeling guidelines. > - Add `.claude` and `.cursor` rules/guidelines for coding, PRs, and testing. > - **Tooling** > - Add Yarn releases and package patches under `.yarn/`. > - Add Storybook setup files and example `.env`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit db05755. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!--
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.
-->
## **Description**
the goal of this PR is to add load tests for assets
<!--
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?
-->
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: add load tests for balance
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
Feature: my feature name
Scenario: user [verb for user action]
Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
```
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] 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](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds a performance test to measure aggregated balance stabilization
after login and extends `WalletMainScreen` with balance selectors and
Appwright tab tap helpers.
>
> - **Tests (performance)**:
> - Add `appwright/tests/performance/login/asset-balances.spec.js` to
measure aggregated balance load time via UI polling, capturing total
time, render-to-stable, and time-to-first-non-zero; records history in
test annotations and performance tracker.
> - **Screen Objects**:
> - `wdio/screen-objects/WalletMainScreen.js`:
> - Add getters: `totalBalanceText`, `balanceContainer`,
`tokenBalancesLoadedMarker` (Appwright-aware selectors).
> - Enhance navigation helpers: `tapNFTTab`, `tapTokensTab` to support
Appwright text tapping.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
ed3dcfe. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Curtis David <Curtis.David7@gmail.com>
# Add Deeplink Support for Predict Markets ## 📋 Summary This PR adds deeplink support for Predict markets, allowing users to navigate directly to specific prediction markets or the market list via external links. CHANGELOG entry: null https://github.com/user-attachments/assets/a547cdcb-8ca7-4dc3-ac07-b546429f5d1b ## 🎯 Objective Enable deep linking to Predict markets from external sources (marketing campaigns, push notifications, web links, etc.) to improve user engagement and provide a seamless entry point to specific markets. ## 🔗 Supported URL Formats ### Production Domains ``` https://metamask.app.link/predict https://metamask.app.link/predict?market=23246 https://metamask.app.link/predict?marketId=23246 metamask://predict metamask://predict?market=23246 ``` ## 🔧 Changes ### 1. Core Implementation #### Added Files - `app/core/DeeplinkManager/Handlers/handlePredictUrl.ts` - Handler for Predict deeplink navigation - `app/core/DeeplinkManager/Handlers/handlePredictUrl.test.ts` - Comprehensive test suite (25 tests) #### Modified Files - `app/constants/deeplinks.ts` - Added `PREDICT` action constant - `app/core/DeeplinkManager/DeeplinkManager.ts` - Added `_handlePredict` method - `app/core/DeeplinkManager/ParseManager/handleUniversalLink.ts` - Wired up PREDICT action routing - `app/core/DeeplinkManager/ParseManager/handleUniversalLink.test.ts` - Added integration tests ### 2. Implementation Details **Handler Architecture:** - Follows the same pattern as existing handlers (`handlePerpsUrl`, `handleRewardsUrl`) - Parses URL parameters to extract market information - Provides fallback navigation to market list on errors - Includes comprehensive logging for debugging **Navigation Logic:** - **With market ID**: Navigates to `Routes.PREDICT.MODALS.ROOT` → `MARKET_DETAILS` with marketId - **Without market ID**: Navigates to `Routes.PREDICT.ROOT` → `MARKET_LIST` **Parameter Support:** - Supports both `market` and `marketId` query parameters for flexibility - `market` parameter takes priority when both are present - Handles additional query parameters gracefully (e.g., UTM tracking) ### Test Domain ``` https://link-test.metamask.io/predict?market=23246 ``` ### URL Behavior | URL Pattern | Navigation Target | Entry Point | |------------|-------------------|-------------| | `/predict` | Market list | `deeplink` | | `/predict?market=X` | Market details (ID: X) | `deeplink` | | `/predict?marketId=X` | Market details (ID: X) | `deeplink` | ## 🧪 Testing ### Unit Tests **handlePredictUrl Tests (25 tests)** - ✅ Navigation with `market` parameter - ✅ Navigation with `marketId` parameter - ✅ Parameter priority when both present - ✅ Navigation to market list (no parameters) - ✅ Error handling and fallbacks - ✅ Logging behavior - ✅ URL parsing edge cases (encoded params, special characters, malformed URLs) **handleUniversalLink Integration Tests (4 tests)** - ✅ PREDICT action routing without parameters - ✅ PREDICT action routing with `market` parameter - ✅ PREDICT action routing with `marketId` parameter - ✅ Query string preservation with multiple parameters **Test Results:** ```bash PASS app/core/DeeplinkManager/Handlers/handlePredictUrl.test.ts ✓ 25 tests passed PASS app/core/DeeplinkManager/ParseManager/handleUniversalLink.test.ts (PREDICT tests) ✓ 4 tests passed ``` ### Manual Testing #### iOS Simulator ```bash xcrun simctl openurl booted "https://link.metamask.io/predict?market=23246" ``` #### Android Emulator ```bash adb shell am start -W -a android.intent.action.VIEW \ -d "https://link.metamask.io/predict?market=23246" \ com.metamask.debug ``` #### Test Scenarios 1. **Market List Navigation** - URL: `https://link.metamask.io/predict` - Expected: Opens Predict market list 2. **Specific Market Navigation** - URL: `https://link.metamask.io/predict?market=23246` - Expected: Opens market details for market ID 23246 3. **Alternative Parameter** - URL: `https://link.metamask.io/predict?marketId=12345` - Expected: Opens market details for market ID 12345 4. **With Tracking Parameters** - URL: `https://link.metamask.io/predict?market=23246&utm_source=campaign` - Expected: Opens market details, preserves tracking params 5. **Invalid/Missing Market** - URL: `https://link.metamask.io/predict?market=` - Expected: Falls back to market list ## 📊 Code Quality - ✅ No linter errors - ✅ Follows MetaMask testing guidelines - ✅ 100% test coverage of new handler - ✅ TypeScript strict mode compliant - ✅ Follows existing deeplink handler patterns - ✅ Comprehensive error handling - ✅ DevLogger integration for debugging ## 🔍 Code Review Checklist - [ ] Unit tests cover all code paths - [ ] Tests follow MetaMask guidelines (no "should", AAA pattern) - [ ] Error handling provides graceful fallbacks - [ ] Logging is appropriate for debugging - [ ] URL parameter parsing handles edge cases - [ ] Navigation routes are correct - [ ] Code follows existing patterns - [ ] TypeScript types are properly defined ## 📝 Additional Notes ### Design Decisions 1. **Dual Parameter Support**: Supporting both `market` and `marketId` provides flexibility for different link sources while maintaining backward compatibility if parameter names change. 2. **Modal Stack Navigation**: Market details are under `MODALS.ROOT` rather than the main `ROOT` stack, which matches the existing navigation structure used by the Predict feature. 3. **Fallback Strategy**: All error conditions fall back to the market list rather than showing error screens, providing a better user experience. 4. **Entry Point Tracking**: The `entryPoint: 'deeplink'` parameter allows analytics to track that users arrived via deeplink. ### Future Enhancements Potential additions for future PRs: - Support for additional parameters (outcome selection, buy amount pre-fill) - Deep linking to specific positions or activity - Support for market slugs in addition to IDs - Analytics tracking for deeplink conversions ## 🔗 Related Documentation - [Deeplink Implementation Guide](docs/readme/deeplinking.md) - [Predict Feature Documentation](app/components/UI/Predict/README.md) - [Navigation Routes](app/constants/navigation/Routes.ts) ## 📸 Screenshots <!-- Add screenshots of the deeplink flow if needed --> --- **Commits:** 1. `a618f8d2ae` - feat: add deeplink support for Predict markets 2. `8594437f0b` - test: add comprehensive tests for Predict deeplink handling
<!-- 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. --> ## **Description** This PR implements Over the Air update using EAS updates. In this PR, I've implemented the following: - install eas-updates package - set up eas updates configs in app.config.js, AndroidManifest.xml, Expo.plist, Info.plist - Add eas updates configs in app information as part of the easter egg so we can check channel + runtimeVersion - create a build script to set EAS updates channel and runtimeVersion. These values are set in build time: 1. Only set configs for non production envs such as RC, EXP ...etc so we don't ship it to production by accident 2. We are setting eas updates to disabled for now until the Rive Animation issue is resolved in the next PR 3. We set runtimeVersion the same as app version 4. No real changes in the existing app For more details on why we do this: https://docs.google.com/document/d/1yFJPGr30HXtc5geDVRX_99vb6_TDtTh1dExeR415ulY/edit?tab=t.0#heading=h.n03xwvqkz3ix See build [2942](https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/5a577895-03ef-44a7-850b-7857e7f96825) In these builds, you can't really see much since the EAS updates is disabled. As long as the app functioning normally we are good. In my next PR where I will enable EAS updates, you can test updates if needed. <!-- 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? 6. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 3. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: Added EAS updates base ## **Related issues** Fixes: #21214 ## **Manual testing steps** To confirm channel and runtimeVersion: 1. Go to app information screen 2. Press down Fox image for 10 seconds 5. Should see OTA Update enabled is set to false ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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 - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Introduces EAS OTA updates with runtime/channel config at build time, adds required Expo/iOS deps, and surfaces OTA info in App Information. > > - **OTA/EAS Updates**: > - Add `expo-updates` and `expo-asset` deps; install iOS pods (`EXUpdates`, `EASClient`, etc.) and add `ios/Expo.plist` to Xcode project. > - Configure Expo in `app.config.js` with `runtimeVersion`, updates `url`, and Hermes JS engine for iOS. > - New `ota.config.js` (single source of truth) and `app/constants/ota.ts` to append OTA version; import `expo-asset` in `index.js` for asset resolution. > - New `scripts/update-expo-channel.js` and hook in `scripts/build.sh` to set channel/runtime and toggle updates (non-production) at build time; CODEOWNERS updated for the script. > - Settings > App Information: show OTA status, channel, runtime version, and full version string; add Jest mock for `expo-updates`. > - **iOS/Tooling**: > - Enable Hermes in Podfile and iOS config; update `Podfile.lock` and `Podfile.properties.json`. > - Jest config maps `expo-updates` to new mock. > - `.js.env.example`: add `EXPO_PROJECT_ID`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a5b4e41. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
## **Description** **Summary:** This PR updates Buy Aggregator flow nav bars and webview to match Buy Deposit by using the same code --- This pull request refactors and enhances the `Checkout` view in the Ramp Aggregator feature, focusing on UI consistency, improved error handling, and codebase maintainability. The main changes include replacing the legacy navigation bar and error display with a new bottom sheet-based interface, updating imports and file structure for better modularity, and improving test reliability by switching to test IDs. **UI and UX Improvements:** * Refactored the `Checkout` view to use a consistent full-screen bottom sheet for displaying the webview and error states, including a new close button in the header for dismissing the sheet. (`app/components/UI/Ramp/Aggregator/Views/Checkout/Checkout.tsx`, `app/components/UI/Ramp/Aggregator/Views/Checkout/Checkout.styles.ts`) [[1]](diffhunk://#diff-717c6665fd2c75624df0766e75661f4c70eccea23f94c7830cd50b570b7cf4f6R176-R197) [[2]](diffhunk://#diff-717c6665fd2c75624df0766e75661f4c70eccea23f94c7830cd50b570b7cf4f6R206-R233) [[3]](diffhunk://#diff-717c6665fd2c75624df0766e75661f4c70eccea23f94c7830cd50b570b7cf4f6R247-R277) [[4]](diffhunk://#diff-717c6665fd2c75624df0766e75661f4c70eccea23f94c7830cd50b570b7cf4f6L217-R300) [[5]](diffhunk://#diff-de7c448468208478f0035ffd5bc10bc769920c162064c9b3cfa3bf4cc13f0184R1-R14) * Updated the navigation bar for both `Checkout` and `BuildQuote` views to use `getDepositNavbarOptions` for consistency and maintainability, removing the old `getFiatOnRampAggNavbar` function. (`app/components/UI/Navbar/index.js`, `app/components/UI/Ramp/Aggregator/Views/BuildQuote/BuildQuote.tsx`, `app/components/UI/Ramp/Aggregator/Views/Checkout/Checkout.tsx`) [[1]](diffhunk://#diff-f2cb25f3b00b5754b8b022c689f98cdbe6e3a26ce9cf80906f443477cbe40e94R2044-L2142) [[2]](diffhunk://#diff-8f431ed27f208e5f873f504bd846413111f1b8554ff5e60d1fb34080fa569b4eL55-R55) [[3]](diffhunk://#diff-8f431ed27f208e5f873f504bd846413111f1b8554ff5e60d1fb34080fa569b4eL451-R461) [[4]](diffhunk://#diff-717c6665fd2c75624df0766e75661f4c70eccea23f94c7830cd50b570b7cf4f6L80-R102) **Testing and Reliability:** * Updated tests to use `getByTestId` instead of `getByRole` for more reliable button selection, and adjusted event tracking assertions for accuracy. (`app/components/UI/Ramp/Aggregator/Views/BuildQuote/BuildQuote.test.tsx`) [[1]](diffhunk://#diff-65a8de4d5905fd0ee2ecb35e83684172ea625155e9c957192d88670847637a41L433-R435) [[2]](diffhunk://#diff-65a8de4d5905fd0ee2ecb35e83684172ea625155e9c957192d88670847637a41L447-R449) **Codebase Organization and Maintainability:** * Renamed and reorganized the `Checkout` view and its test files for a clearer module structure, updated all related imports, and added an `index.ts` for streamlined exports. (`app/components/UI/Ramp/Aggregator/Views/Checkout/Checkout.tsx`, `app/components/UI/Ramp/Aggregator/Views/Checkout/Checkout.test.tsx`, `app/components/UI/Ramp/Aggregator/Views/Checkout/index.ts`) [[1]](diffhunk://#diff-49df195fce922a40b23812ba0754fea8a5669f1ad10cb9afb0d5385728c33174L2-R10) [[2]](diffhunk://#diff-49df195fce922a40b23812ba0754fea8a5669f1ad10cb9afb0d5385728c33174L19-R23) [[3]](diffhunk://#diff-49df195fce922a40b23812ba0754fea8a5669f1ad10cb9afb0d5385728c33174L37-R37) [[4]](diffhunk://#diff-49df195fce922a40b23812ba0754fea8a5669f1ad10cb9afb0d5385728c33174L51-R52) [[5]](diffhunk://#diff-49df195fce922a40b23812ba0754fea8a5669f1ad10cb9afb0d5385728c33174L67-R68) [[6]](diffhunk://#diff-e554676eb9e7b7507a4070a460d66d63be899a2b54cdafb52466c42316952fcaR1) **Theme and Styling:** * Centralized styling for the `Checkout` view, including background colors and header padding, to ensure consistent appearance across different themes. (`app/components/UI/Ramp/Aggregator/Views/Checkout/Checkout.styles.ts`, `app/components/UI/Ramp/Aggregator/Views/Checkout/Checkout.tsx`) [[1]](diffhunk://#diff-de7c448468208478f0035ffd5bc10bc769920c162064c9b3cfa3bf4cc13f0184R1-R14) [[2]](diffhunk://#diff-717c6665fd2c75624df0766e75661f4c70eccea23f94c7830cd50b570b7cf4f6L54-R71) These changes collectively modernize the user experience, improve code maintainability, and ensure more robust automated testing. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: Updates the Buy Aggregator flow Navigation Bar ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/TRAM-2824 https://consensyssoftware.atlassian.net/browse/TRAM-2826 ## **Manual testing steps** ```gherkin Feature: Buy (Aggregator) Scenario: user interacts with aggregator flow Given the initial state of the app When user navigates to the Buy flow Then the navigation bar is updated ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** See below ### **After** See below **Get Started** | **Before** | **After** | |--------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------| | <img src="https://github.com/user-attachments/assets/f3b1450d-e5d5-4c2f-ab9a-7f642e75063c" width="250px" /> | <img src="https://github.com/user-attachments/assets/a1c7ccf8-2761-46c3-9434-c6eef0c3cb1c" width="250px" /> | **Build Quote** | **Before** | **After** | |--------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------| | <img src="https://github.com/user-attachments/assets/99244a03-953f-42e6-bccd-05eb73c39f88" width="250px" /> | <img src="https://github.com/user-attachments/assets/754e54d7-3aff-46bc-b637-e7dcc48acd89" width="250px" /> | **Checkout** | **Before** | **After** | |--------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------| | <img src="https://github.com/user-attachments/assets/657bb685-7d73-4ff5-b726-646564fe00eb" width="250px" /> | <img src="https://github.com/user-attachments/assets/433d5a63-6cc6-4040-947c-8c10125cada4" width="250px" /> | https://github.com/user-attachments/assets/21c75a55-cca7-4113-938b-beb87582a1fd **Order Details** | **Before** | **After** | |--------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------| | <img src="https://github.com/user-attachments/assets/19be09b6-9778-4b31-86c5-25c62b422743" width="250px" /> | <img src="https://github.com/user-attachments/assets/3ab68b27-1fca-42a9-ae16-c7bb46ebe67c" width="250px" /> | **Send Tx** | **Before** | **After** | |--------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------| | <img src="https://github.com/user-attachments/assets/faa164fa-ca98-4d5f-9c5c-b6a121446dba" width="250px" /> | <img src="https://github.com/user-attachments/assets/6634a086-5aff-4896-a322-7ae2fc31c880" width="250px" /> | ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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 - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Unifies Ramp Aggregator navbars with Deposit and refactors Checkout into a full-screen BottomSheet with improved error handling and updated tests. > > - **UI/Navigation**: > - Replace legacy navbar with `getDepositNavbarOptions` across `BuildQuote`, `GetStarted`, `Quotes`, `OrderDetails`, and `SendTransaction`; add close button `testID`. > - Refactor `Checkout` to a full-screen BottomSheet (header close button, webview/error states), with dedicated styles and `index.ts`; update route options to modal-style (no header, no gestures). > - Minor layout tweaks (e.g., `SendTransaction` text row) and navbar shadow adjustments. > - **Behavior/Strings**: > - Improve cancel tracking and error handling (no URL / no address) with new i18n strings; remove old `getFiatOnRampAggNavbar`. > - **Tests**: > - Switch to `getByTestId('deposit-close-navbar-button')`, tighten assertions, and add comprehensive `Checkout` tests and snapshots. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 040cfda. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This PR syncs the stable branch to main for version 7.59.0. This was attempted recently in #22222, but was not merged correctly. This is a second attempt. *Synchronization Process:* - Fetches the latest changes from the remote repository - Resets the branch to match the stable branch - Attempts to merge changes from main into the branch - Handles merge conflicts if they occur *File Preservation:* Preserves specific files from the stable branch: - CHANGELOG.md - bitrise.yml - android/app/build.gradle - ios/MetaMask.xcodeproj/project.pbxproj - package.json Indicates the next version candidate of main to 7.59.0 <!-- CURSOR_SUMMARY --> --- > [!NOTE] > No file changes in this PR. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit fc8f23d. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com> Co-authored-by: Nicholas Smith <nick.smith@consensys.net> Co-authored-by: Matthew Grainger <matthew.grainger@consensys.net> Co-authored-by: Wei Sun <wei.sun@consensys.net> Co-authored-by: Bryan Fullam <bryan.fullam@consensys.net> Co-authored-by: Matthew Grainger <46547583+Matt561@users.noreply.github.com> Co-authored-by: infiniteflower <139582705+infiniteflower@users.noreply.github.com> Co-authored-by: ieow <4881057+ieow@users.noreply.github.com> Co-authored-by: Gaurav Goel <grvgoel19@gmail.com> Co-authored-by: himanshuchawla009 <himanshuchawla2014@gmail.com> Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com> Co-authored-by: abretonc7s <107169956+abretonc7s@users.noreply.github.com> Co-authored-by: Nicholas Gambino <nicholas.gambino@consensys.net> Co-authored-by: Arthur Breton <arthur.breton@consensys.net> Co-authored-by: Nick Gambino <35090461+gambinish@users.noreply.github.com> Co-authored-by: MetaMask Bot <37885440+metamaskbot@users.noreply.github.com> Co-authored-by: SteP-n-s <stylianos.panagakos@consensys.net> Co-authored-by: Nico MASSART <NicolasMassart@users.noreply.github.com> Co-authored-by: Brian August Nguyen <brianacnguyen@gmail.com> Co-authored-by: dylanbutler1 <99672693+dylanbutler1@users.noreply.github.com> Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com> Co-authored-by: Vince Howard <vincenguyenhoward@gmail.com> Co-authored-by: Juanmi <95381763+juanmigdr@users.noreply.github.com> Co-authored-by: Matthew Walsh <matthew.walsh@consensys.net> Co-authored-by: Ganesh Suresh Patra <ganesh.patra@consensys.net> Co-authored-by: Jyoti Puri <jyotipuri@gmail.com> Co-authored-by: sethkfman <Seth.Kaufman@consensys.net> Co-authored-by: OGPoyraz <omergoktugpoyraz@gmail.com> Co-authored-by: Prithpal Sooriya <prithpal.sooriya@consensys.net> Co-authored-by: Salim TOUBAL <salim.toubal@outlook.com> Co-authored-by: Cal Leung <cal.leung@consensys.net> Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com> Co-authored-by: Satyajeet Kolhapure <77279246+satyajeetkolhapure@users.noreply.github.com> Co-authored-by: Jean-Baptiste Blanc <jb.blanc@consensys.net> Co-authored-by: George Weiler <georgejweiler@gmail.com> Co-authored-by: Caainã Jeronimo <caainaje@gmail.com> Co-authored-by: Luis Taniça <matallui@gmail.com> Co-authored-by: VGR <VanGulckRik@gmail.com> Co-authored-by: George Marshall <george.marshall@consensys.net> Co-authored-by: AxelGes <34173844+AxelGes@users.noreply.github.com> Co-authored-by: Patryk Łucka <patryk.lucka@gmail.com> Co-authored-by: Gustavo Antunes <17601467+gantunesr@users.noreply.github.com> Co-authored-by: Davide Brocchetto <davide.brocchetto@consensys.net> Co-authored-by: Curtis David <Curtis.David7@gmail.com> Co-authored-by: Monte Lai <monte.lai@consensys.net> Co-authored-by: Bruno Nascimento <brunonascimentodev@gmail.com> Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> Co-authored-by: cmd-ob <ola.bale@consensys.net> Co-authored-by: João <castrofjoao@gmail.com> Co-authored-by: sophieqgu <sophieqgu@gmail.com> Co-authored-by: Alejandro Garcia Anglada <aganglada@gmail.com> Co-authored-by: Mathieu Artu <mathieu.artu@consensys.net> Co-authored-by: sophieqgu <37032128+sophieqgu@users.noreply.github.com> Co-authored-by: Charly Chevalier <charlyy.chevalier@gmail.com> Co-authored-by: Bryan Fullam <8902170+bfullam@users.noreply.github.com> Co-authored-by: António Regadas <antonio.regadas@consensys.net> Co-authored-by: Edouard Bougon <15703023+EdouardBougon@users.noreply.github.com> Co-authored-by: Alex Donesky <adonesky@gmail.com> Co-authored-by: Baptiste Marchand <75846779+baptiste-marchand@users.noreply.github.com> Co-authored-by: Fabio Bozzo <fabio.bozzo@gmail.com> Co-authored-by: Owen Craston <owen.craston@consensys.net> Co-authored-by: Pavel Dvorkin <pavel.dvorkin@consensys.net> Co-authored-by: Kevin Bluer <kevin@bluer.com> Co-authored-by: Nodonisko <suchydan@gmail.com> Co-authored-by: Tamas <soostamas.hu@gmail.com> Co-authored-by: ffmcgee <51971598+ffmcgee725@users.noreply.github.com> Co-authored-by: Alexandre Chappaz <alex@achappaz.fr> Co-authored-by: Harika <153644847+hjetpoluru@users.noreply.github.com> Co-authored-by: Erik Nilsson <eriks@mail.se> Co-authored-by: runway-github[bot] <73448015+runway-github[bot]@users.noreply.github.com> Co-authored-by: Patryk Łucka <5708018+PatrykLucka@users.noreply.github.com> Co-authored-by: Bernardo Garces Chapero <bernardo.chapero@consensys.net> Co-authored-by: Christian Montoya <christian.montoya@consensys.net> Co-authored-by: Vinicius Stevam <45455812+vinistevam@users.noreply.github.com> Co-authored-by: Gauthier Petetin <gauthierpetetin@hotmail.com> Co-authored-by: João Loureiro <175489935+joaoloureirop@users.noreply.github.com> Co-authored-by: Xiaoming Wang <7315988+dawnseeker8@users.noreply.github.com> Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com> Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com> Co-authored-by: Charly Chevalier <charly.chevalier@consensys.net> Co-authored-by: Micaela <100321200+micaelae@users.noreply.github.com> Co-authored-by: salimtb <salim.toubal@consensys.net> Co-authored-by: Micaela Estabillo <micaela.estabillo@consensys.net> Co-authored-by: George Gkasdrogkas <georgegkas@gmail.com> Co-authored-by: rarquevaux <r.arquevaux@gmail.com> Co-authored-by: Aslau Mario-Daniel <marioaslau@gmail.com> Co-authored-by: Bruno Nascimento <bruno.nascimento@consensys.net> Co-authored-by: tommasini <tommasini15@gmail.com> Co-authored-by: jake-perkins <128608287+jake-perkins@users.noreply.github.com> Co-authored-by: Matt <matt.ilagan@consensys.net> Co-authored-by: Laurel <153323700+i18nlaurel@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )