[pull] main from MetaMask:main#399
Merged
Merged
Conversation
## **Description** Ensure Relay deposit transactions created by Perps and Predict deposits have sufficient and consistent gas limits. ## **Changelog** CHANGELOG entry: Prevent insufficient native balance errors in Perps and Predict deposits ## **Related issues** Fixes: #23563 #23699 ## **Manual testing steps** ## **Screenshots/Recordings** ### **Before** ### **After** ## **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] > Enhances MetaMask Pay metrics with fallback chain/token properties, maps `relayDeposit` to analytics type, enables gas estimate actions in pay messenger, adds tests, and bumps controller dependencies. > > - **Metrics (MetaMask Pay)** > - Add fallback properties from `transactionMeta.metamaskPay` (sets `mm_pay`, `mm_pay_chain_selected`, `mm_pay_token_selected` via `TokensController`). > - Set `polymarket_account_created` for `predictDeposit` based on nested tx data. > - New helpers: `addFallbackProperties`, `getTokenSymbol`. > - **Analytics Mapping** > - Map `TransactionType.relayDeposit` to `transaction_type` value `relay_deposit` in `utils.ts`. > - **Messaging** > - Allow `TransactionPayController` messenger to call `TransactionController:estimateGas` and `:estimateGasBatch`. > - **PredictController** > - Type fix: cast gas estimate `gas` as `Hex` in `beforeSign`. > - **Tests** > - Add unit tests covering fallback properties (with/without token symbol). > - **Dependencies** > - Bump `@metamask/transaction-controller` to `62.6.0`, `@metamask/transaction-pay-controller` to `10.5.0`, and bridge-related packages to `64.1.0`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2057fc5. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…t working (#23877) <!-- 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? --> On the Card Home screen, once the user is logged in, selecting Change Asset and choosing an asset that isn’t enabled should redirect them to the SpendingLimit or Delegation screen so they can delegate that asset. There was a bug where, inside the asset selector, changing the currently selected token caused it to briefly update and then revert back to the previous one. This PR fixes that issue and ensures the selected asset updates correctly. ## **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 changing the selected asset on the Card Home screen caused the token to revert instead of updating properly ## **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] --> https://github.com/user-attachments/assets/b0a8d01e-271d-4dbf-8620-f15b9de6b51d ### **After** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/7caaa035-6b08-457a-a5fb-2cf9a3110393 ## **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] > Prevents the selected token in `SpendingLimit` from being overwritten when returning from asset selection; adds "Select token" i18n and updates tests accordingly. > > - **Card Spending Limit (logic/UI)**: > - Preserve user-selected token on return from asset selector by clearing `route.params.returnedSelectedToken` and `route.params.selectedToken` in `useFocusEffect`. > - Exclude `selectedToken` from `callerParams` when navigating to asset selection to avoid re-applying old selection. > - Localize placeholder with `strings('card.card_spending_limit.select_token')`. > - **i18n**: > - Add `card.card_spending_limit.select_token` to `locales/languages/en.json`. > - **Tests**: > - Update `SpendingLimit.test.tsx` to mock the new i18n key and assert navigation excludes `selectedToken`; expect localized "Select token" placeholder. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 3e9b673. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
See [slack thread](https://consensys.slack.com/archives/C02U025CVU4/p1765308999002049?thread_ts=1764805350.992209&cid=C02U025CVU4) for test builds of this PR ## **Description** This PR implements `expo-font` to improve font rendering and maintainability of fonts in MetaMask Mobile. The change provides several benefits: [(from docs)](https://docs.expo.dev/develop/user-interface/fonts/#with-expo-font-config-plugin) 1. Fonts are available immediately when the app starts on a device. 2. No additional code required to load fonts in a project asynchronously when the app starts. 3. Fonts are consistently available across all devices where the app is installed because they're bundled within the app. ### Key Changes - Added expo-font plugin configuration in app.config.js with all app fonts - Updated font family naming convention from space-separated (e.g., "Geist Regular") to hyphenated (e.g., "Geist-Regular") for better compatibility - Updated snapshots to reflect font family name changes ### Review and Merge Strategy **Snapshot Management Approach:** This PR updates font file names and font family definitions, which will trigger a large number of snapshot updates. To reduce the risk of the PR becoming outdated, I've adopted the following strategy: 1. **Separated Concerns** All fixes owned by teams outside of `@metamask-design-system-team` and `@mobile-platform` have been moved to a separate PR: #23650 2. **Combined Build for Testing** A build that includes changes from both PRs is available in [this Slack thread](https://consensys.slack.com/archives/C02U025CVU4/p1764805350992209) for end-to-end testing. 3. **Phased Review Process** * **Phase 1 (Current):** Seeking approvals from QA, Mobile Platform, and Design System teams on core logic changes *without* snapshot updates * **Phase 2 (After Approval):** Once approvals are received, snapshot updates will be pushed * **Phase 3 (Final Review):** Re-review focused only on snapshot changes **Benefits of This Approach:** * Limits review scope to Mobile Platform and Design System teams * Minimizes risk of merge conflicts and PR churn * PR #23650 remains low-risk, with only minor brand and marketing font changes **Remaining Work:** * [x] Obtain approvals from QA, Mobile Platform, and Design System teams * [x] Push snapshot updates (pending approvals) * [x] Final review and merge ## **Changelog** CHANGELOG entry: Fixes intermittent font rendering issues on first load of the app or import of SRP ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/MDP-603 ## **Manual testing steps** ```gherkin Feature: Font rendering with expo-font Scenario: user views app with new font system Given the app is running with expo-font enabled When user navigates through various screens Then all fonts should render correctly without font family, font weight or text cut off issues And font weights and styles should be consistent across the app ``` ## **Screenshots/Recordings** ### **Before** No before recordings, I can't seem to reproduce the font loading issues but they exist see [slack thread](https://consensys.slack.com/archives/C02U025CVU4/p1764805763176469?thread_ts=1764805350.992209&cid=C02U025CVU4) ### **After** All fonts rendering as expected. No incorrect font weights, system fonts (incorrect font family), or cut-off text **iOS** https://github.com/user-attachments/assets/d73b1049-b5d4-43e9-9aea-2273e216e549 Key screens: - MM Sans & MM Poly working - Tabs built with `@metamask/design-system-react-native` working <img width="398" height="259" alt="Screenshot 2025-12-10 at 8 41 08 AM" src="https://github.com/user-attachments/assets/d5a11151-19b9-455c-86b7-c69531239054" /> <img width="427" height="291" alt="Screenshot 2025-12-10 at 8 41 14 AM" src="https://github.com/user-attachments/assets/54d64ffe-5410-4c86-b2a7-30ed19b898df" /> <img width="412" height="120" alt="Screenshot 2025-12-10 at 8 41 23 AM" src="https://github.com/user-attachments/assets/56734145-114a-443c-a4de-ed1274cfb2e5" /> **Android** https://github.com/user-attachments/assets/1d14744b-0d2c-4aaa-b18b-9eb5175a6af6 Key screens: - MM Sans & MM Poly working - Tabs built with `@metamask/design-system-react-native` working <img width="442" height="362" alt="Screenshot 2025-12-10 at 8 31 02 AM" src="https://github.com/user-attachments/assets/3ef52f3c-0ae9-46ed-aca8-cab75d3b1666" /> <img width="413" height="183" alt="Screenshot 2025-12-10 at 8 31 06 AM" src="https://github.com/user-attachments/assets/e1e69c06-e3cd-4e27-96f9-f9e0a607e798" /> <img width="318" height="127" alt="Screenshot 2025-12-10 at 8 30 33 AM" src="https://github.com/user-attachments/assets/8b683b25-f87c-4bab-b395-f6555cc05467" /> ## **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] > Integrates Expo Font and standardizes font family names, updating snapshots across the app. > > - **Fonts**: > - Add `expo-font` configuration in `app.config.js` to bundle/load fonts at startup. > - Rename font families from space-separated to hyphenated (e.g., `Geist Regular` → `Geist-Regular`). > - **Tests**: > - Refresh widespread snapshots to reflect new `fontFamily` values; no functional UI changes. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit fc68231. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude <noreply@anthropic.com>
<!--
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**
- Adds the tron snap call for the compute fee for staking and unstaking.
- Small UI improvement.
- Adds Tron APR value to a few places using the `useTronStakeApy` hook.
- Adds the `Staking Withdrawal` and `Staking Deposit` mapping
## **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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds TRON staking fee computation and displays TRX APR across Earn
views, with minor UI tweaks and new staking transaction titles.
>
> - **Tron Staking (Stake/Unstake)**:
> - Integrate Snap `computeStakeFee` for TRX stake/unstake; include
returned fee in preview (`useTronStake`, `useTronUnstake`).
> - Add resource-type aware fee requests and error logging.
> - Wire up TRX APR via `useTronStakeApy` in `EarnInputView`,
`EarnWithdrawInputView`, `EarnBalance`, and `StakeButton`.
> - TRON flows: replace last quick amount with highlighted “Done” and
show preview panel before confirming.
> - **Navbar**:
> - `getStakingNavbar` accepts APR override and displays APR with `%`
handled upstream.
> - **UI/UX**:
> - Quick amounts support `isHighlighted`; styling updates to emphasize
highlighted action.
> - Earn button text can include TRX APR.
> - **Types/Hooks**:
> - Add `QuickAmount` type; extend Tron staking types with
`ComputeStakeFeeParams/Result`.
> - Expose `computeStakeFee` in `tron-staking-snap`.
> - **Transactions**:
> - Add titles for `StakeDeposit` and `StakeWithdraw` in multichain
transaction display.
> - **Tests**:
> - Update/expand tests for new fee preview, APR wiring, navbar params,
and TRON quick-amount behavior.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
20421a0. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
## **Description** updated checkbox border to correct color ## **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: https://consensyssoftware.atlassian.net/browse/MDP-248 ## **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** `~` ### **Before** <img width="500" alt="Simulator Screenshot - iPhone 17 - 2025-12-10 at 10 44 33" src="https://github.com/user-attachments/assets/654932f7-f22d-4505-afaf-72b8328cf58d" /> ### **After** <img width="500" alt="Simulator Screenshot - iPhone 17 - 2025-12-10 at 10 28 21" src="https://github.com/user-attachments/assets/c9f193f6-f379-400c-8e36-550742491a9d" /> ## **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] > Sets unchecked checkbox border to `theme.colors.border.default`, updating snapshots across affected components. > > - **Component styles**: > - Update `borderColor` for unchecked `Checkbox` in `app/component-library/components/Checkbox/Checkbox.styles.ts` from `theme.colors.icon.default` to `theme.colors.border.default`. > - **Tests/Snapshots**: > - Refresh snapshots to reflect `borderColor` change (`#121314` → `#b7bbc8`) across `Cells/Cell`, `CellMultiSelect`, `ListItemMultiSelectWithMenuButton`, `BasicFunctionalityModal`, `NetworkSelectorList`, `OptinMetrics`, `NetworksFilterSelector`, `SearchTokenAutocomplete`, `SkipAccountSecurityModal`, `AccountConnectMultiSelector`, `ChoosePassword`, and `NetworkConnectMultiSelector`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 17d99c1. 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** <!-- 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? --> The "Report a detection problem" button in the phishing modal was linking to the wrong GitHub repository. It was pointing to `https://github.com/phishfort/phishfort-lists/issues/new` and conditionally to the MetaMask eth-phishing-detect repo based on which blocklist detected the site. Additionally, since users are unlikely to be signed into GitHub from the MetaMask browser, linking to the new issue page would require authentication. Thus, I've updated the URL to point to the correct MetaMask repository: `https://github.com/MetaMask/eth-phishing-detect/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` 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 "Report a detection problem" button to link to the correct GitHub repository for reporting phishing detection issues ## **Manual testing steps** ```gherkin Feature: Report phishing detection problem Scenario: user reports a phishing detection problem from blocked site Given the user navigates to a site that is blocked by the phishing detector When the phishing modal appears And user taps the "Report a detection problem" button Then the browser navigates to https://github.com/MetaMask/eth-phishing-detect/issues And the GitHub issues page for eth-phishing-detect is displayed ``` ## **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] > Updates phishing report link to `https://github.com/metamask/eth-phishing-detect/issues` and removes blocklist-type handling across BrowserTab and PhishingModal. > > - **Phishing Modal** > - Always opens `MM_BLOCKLIST_ISSUE_URL` when reporting; removes conditional routing based on blocklist type in `components/PhishingModal/index.tsx`. > - Drops `blockListType` prop and related logic; updates usage in `Views/BrowserTab/BrowserTab.tsx`. > - **Constants** > - Changes `MM_BLOCKLIST_ISSUE_URL` to `https://github.com/metamask/eth-phishing-detect/issues` and removes `PHISHFORT_BLOCKLIST_ISSUE_URL` in `constants/urls.ts`. > - **BrowserTab** > - Removes `blockListType` ref and assignment in phishing checks; stops passing it to `PhishingModal`. > - **Tests** > - Updates `PhishingModal` tests to remove `blockListType` prop in `components/PhishingModal/index.test.tsx`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit e3c2969. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description** Follows on from the original PNA25 (Privacy Notice Announcement) toast implementation here: #23316 This PR changes the toast to be a BottomSheet instead, with updated strings, buttons and metrics. ## **Changelog** CHANGELOG entry: add PNA25 bottomsheet ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/CEUX-787 ## **Manual testing steps** ```gherkin Update from previous versions (existing users) Scenario: MetaMetrics opt in = true Step 1: Download & install 7.60.0 or earlier Step 2: Complete onboarding with MetaMetrics opt in = true Step 3: Update to 7.61 Step 4: Open home screen Expected Result Bottomsheet appears Scenario: MetaMetrics opt in = false Step 1: Download & install 7.60.0 or earlier Step 2: Complete onboarding with MetaMetrics opt in = false Step 3: Update to 7.61 Step 4: Open home screen Expected Result No bottomsheet appears Scenario: Feature flag disabled Step 1: Download & install 7.60.0 or earlier Step 2: Complete onboarding with MetaMetrics opt in = false Step 3: Update to 7.61 Step 4: Feature flag is disabled (disable main-dev for flag extension-ux-pna25 (same on Mobile and Extension) Step 5: Open home screen Expected Result No bottomsheet appears New install (new users) Scenario: MetaMetrics opt-in = true Step 1: Download RC Step 2: Complete onboarding with MetaMetrics opt in = true Step 5: Open home screen Expected Result No bottomsheet appears Scenario: MetaMetrics opt-in = false Step 1: Download RC Step 2: Complete onboarding with MetaMetrics opt in = false Step 5: Open home screen Expected Result No bottomsheet appears Scenario: Social login onboarding Step 1: Download RC Step 2: Complete onboarding with Social login Step 5: Open home screen Expected Result No bottomsheet appears MetaMetrics opt out / opt in Scenario: Enable MetaMetrics post onboarding Step 1: Download RC OR follow the steps for existing user Step 2: Complete onboarding with MetaMetrics opt out Step 3: Enable MetaMetrics in Settings Expected Result No bottomsheet appears ``` ## **Screenshots/Recordings** This recording was done by hardcoding the bottomsheet to always show, meaning I can demo all the various 'close' actions. In reality the bottomsheet would not appear again after closing. https://github.com/user-attachments/assets/077040de-e351-42ab-a97e-f5537a4629ae ### **Before** <img width="372" height="767" alt="image" src="https://github.com/user-attachments/assets/93b56571-5ea5-43c4-a4d1-276f1cd53d4e" /> ### **After** <img width="366" height="795" alt="image" src="https://github.com/user-attachments/assets/56900525-d694-4f49-939b-ce11c68bda66" /> ## **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] > Replaces the PNA25 toast with a bottom-sheet notice, adds navigation and show logic, updates analytics and selectors, and includes new strings and tests. > > - **Privacy Notice (PNA25)**: > - **New UI**: Add `Pna25BottomSheet` with actions (open settings, accept/close) and blog link; i18n strings added. > - **Navigation**: Register `Routes.MODAL.PNA25_NOTICE_BOTTOM_SHEET` and screen in `Nav/App`. > - **Hook**: Introduce `usePna25BottomSheet` to navigate to the sheet when `selectShouldShowPna25Notice` is true (skips in E2E). > - **Wallet Integration**: Remove prior PNA25 toast logic; call `usePna25BottomSheet()`. > - **Analytics**: > - Replace `TOAST_DISPLAYED` with `NOTICE_UPDATE_DISPLAYED`; track sheet view/actions accordingly. > - **Selectors**: > - Rename/refactor `selectShouldShowPna25Toast` -> `selectShouldShowPna25Notice`; keep `selectIsPna25Acknowledged`. > - **Settings**: > - When enabling MetaMetrics in Security Settings, acknowledge PNA25 to suppress showing the notice. > - **Localization**: > - Add PNA25 copy (`privacy_policy.pna25_*`) and minor punctuation tweak to `toast_message`. > - **Tests**: > - Add tests for `Pna25BottomSheet`, `usePna25BottomSheet`, and update `Wallet`/selector tests for new logic. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 59f0634. 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** Add `skipScrollOnClick` prop to prevent automatic scrolling when expanding transaction details in the Asset view. The automatic scrolling when a user clicked on a transaction to expand its details in the Asset view was disorienting. This change introduces a prop to conditionally disable this scroll behavior specifically for the Asset screen, improving user experience. Fixes #22863 Fixes https://consensyssoftware.atlassian.net/browse/ASSETS-2061 Fixes https://consensyssoftware.atlassian.net/browse/ASSETS-1966 Fixes https://consensyssoftware.atlassian.net/browse/ASSETS-2109 ## **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: remove scroll on click when clicking a tx in the asset details modal ## **Related issues** Fixes: #22863 ## **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** https://www.loom.com/share/cf4e25f1729a4b63a5b8fb64e872c886 <!-- [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. --- <a href="https://cursor.com/background-agent?bcId=bc-3d2ecce2-010b-4b08-854b-9e619a914564"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-cursor-light.svg"><img alt="Open in Cursor" src="https://cursor.com/open-in-cursor.svg"></picture></a> <a href="https://cursor.com/agents?id=bc-3d2ecce2-010b-4b08-854b-9e619a914564"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-web-light.svg"><img alt="Open in Web" src="https://cursor.com/open-in-web.svg"></picture></a> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds an optional `skipScrollOnClick` prop to `Transactions` and uses it in the Asset screen to stop auto-scrolling when expanding a transaction. > > - **UI**: > - **Transactions (`app/components/UI/Transactions/index.js`)**: > - Add optional `skipScrollOnClick` prop (PropTypes + docs). > - Gate `scrollToIndex` on expand with `!skipScrollOnClick` to disable auto-scroll when set. > - **Asset View (`app/components/Views/Asset/index.js`)**: > - Pass `skipScrollOnClick` to embedded `Transactions` to prevent auto-scroll when expanding tx details in the Asset screen. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit eb28abd. 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**
This PR addresses:
- Fixes for some flow flakiness
- Appwright patch to reduce the time that Appwright takes to
locate/interact with elements
- Added README file with how to use the framework and run tests
<!--
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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Optimizes Appwright tests with faster locator/cap settings and waits,
adds timer utilities and README, adjusts onboarding tests (sync/waits),
and skips flaky perps test.
>
> - **Appwright Patch (`.yarn/patches/...`)**:
> - **Config**: Reduce `retries` (CI 1) and `workers` (1).
> - **Locator/Device**: Stop passing `textToMatch`; optimize
`getElement()` to early-return deepest match when no text match; add
logs.
> - **BrowserStack**: Add env flag to disable video download; extend
`bstack:options` (e.g., `networkProfile`, `selfHeal`, `appProfiling`);
allow `BROWSERSTACK_BUILD_NAME`; empty `buildIdentifier` on CI; add
Appium settings to avoid idle/animations and cap snapshot
depth/timeouts.
> - **Tests (onboarding)**:
> - `import-wallet.spec.js`: Correct timer start points; assert and
dismiss predictions modal.
> - `launch-times/cold-start-after-wallet-import.spec.js`: Use
`WalletMainScreen.isMenuButtonVisible()` to create/rename timer.
> - `new-wallet-account-creation.spec.js`: Wait for syncing to finish;
increase account visibility timeout.
> - `perps-onboarding.spec.js`: Mark test as skipped.
> - **Utils**:
> - `Timers.js/TimersHelper.js`: Support renaming timers via
`renameTimer`/`changeName`.
> - `AppwrightSelectors.ts`: Add `waitForElementToDisappear`.
> - `Flows.js`: Add 5s post-unlock wait; predictions modal helpers;
tweak dismissal timeouts.
> - **Screen Objects**:
> - `AccountListComponent`: Add `waitForSyncingToComplete()`; parametric
timeout for `isAccountDisplayed`.
> - `WalletMainScreen`: New `isMenuButtonVisible()` returning a timed
visibility check.
> - **Docs**:
> - Add `appwright/README.md` detailing structure, config, running, and
metrics.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a3872ce. 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** <!-- 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 reverts a [previous feature flag migration](#22675) that attempted to consolidate feature flag access through the `useFeatureFlag` hook. The migration was not necessary and after coming to conclusion on the [ADR](MetaMask/decisions#111) for adding the additional feature flag functionality in the controller level. This necessitated reverting back to the original pattern of using `useSelector` with specific feature flag selectors. **Reason for the change:** The previous migration to `useFeatureFlag` hook caused compatibility issues and required additional overhead work for migration. The hook's implementation was also not suitable for all feature flag use cases, particularly for flags that require more complex selector logic (such as Perps, Predict, and Carousel banners). **Improvement/Solution:** Reverted all components back to using `useSelector` with their respective feature flag selectors: - `selectPerpsEnabledFlag` for Perps trading feature - `selectPredictEnabledFlag` for Predict trading feature - `selectCarouselBannersFlag` for Carousel banners feature This restores the previous working behavior and ensures feature flags function correctly across all affected components. Additionally, fixed dependency arrays in `useEffect` hooks to include all dependencies properly. ## **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: Feature flag functionality Scenario: user views developer options with Perps enabled Given the app is running with Perps feature flag enabled When user navigates to Settings > Developer Options Then the Perps Developer Options section should be visible Scenario: user views wallet tabs with Perps enabled Given the app is running with Perps feature flag enabled When user navigates to the Wallet screen Then the Perps tab should be visible in the wallet tabs Scenario: user views wallet tabs with Predict enabled Given the app is running with Predict feature flag enabled When user navigates to the Wallet screen Then the Predict tab should be visible in the wallet tabs Scenario: user views wallet with carousel banners enabled Given the app is running with carousel banners feature flag enabled When user navigates to the Wallet screen Then carousel banners should be displayed correctly ``` ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Reverts the feature flag hook migration, restoring Redux selectors for Perps/Predict/Earn/Carousel and updating affected components and tests. > > - **Feature Flags**: > - Replace `useFeatureFlag` usage with `useSelector` + selectors (e.g., `selectPerpsEnabledFlag`, `selectPredictEnabledFlag`, `selectPooledStakingEnabledFlag`, `selectStablecoinLendingEnabledFlag`, `selectCarouselBannersFlag`). > - Trim `FeatureFlagNames` and keep only needed entries (e.g., `rewardsEnabled`, `rewardsEnableMusdHolding`). > - **UI/Navigation**: > - Main navigation (`MainNavigator`) and views (`Wallet`, `ActivityView`, `DeveloperOptions`) now gate Perps/Predict screens via selectors; minor refactor to render transactions view. > - Earn: `EarnTokenList`, `StakeButton`, `StakingBalance`, and `StakingButtons` now read pooled-staking/lending flags via selectors and preserve ETH/TRX handling. > - Rewards: `WaysToEarn` reads Predict/Card/mUSD flags via selectors (holding still via `useFeatureFlag`). > - Actions: `TradeWalletActions` and `WalletActions` use selectors for Perps/Predict/Earn availability. > - **Tests**: > - Update mocks to selector-based flags across suites; add extensive `WaysToEarn` coverage and adjust snapshots accordingly. > - Clean up and stabilize tests (e.g., tab rendering, GTM modals, FlatList keys, back button). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 4df9b16. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
) Dependencies to merge first #23517 (merged) ## **Description** This PR removes the custom font preloading system (FontLoadingGate, useFontPreloader, FontPreloader) in preparation for the expo-font integration in #23517. **What is the reason for the change?** The expo-font implementation makes fonts available immediately when the app starts by bundling them with the app binary, eliminating the need for our custom asynchronous font preloading system. **What is the improvement/solution?** - Removes FontLoadingGate component that was blocking app rendering until fonts loaded - Removes useFontPreloader hook and FontPreloader class - Simplifies the Root component by removing the loading gate wrapper - Prepares the codebase for expo-font which will handle font loading synchronously This is a preparatory PR to keep changes manageable - the expo-font implementation will be merged separately. ## **Changelog** CHANGELOG entry: null ## **Related issues** Related to #23517 (expo-font integration) ## **Manual testing steps** ```gherkin Feature: Font loading removal preparation Scenario: user launches the app Given the custom font preloader has been removed When user opens the app Then app should launch without the FontLoadingGate component And fonts will be handled by expo-font in the subsequent PR ``` ## **Screenshots/Recordings** N/A - This is a code cleanup PR removing unused code. Visual behavior will be restored when expo-font PR #23517 is merged. ### **Before** App showed FoxLoader while fonts were being preloaded asynchronously via FontLoadingGate. ### **After** FontLoadingGate removed - app will rely on expo-font (from #23517) which bundles fonts synchronously. ## **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] > Removes custom font preloading system (service, hook, loading gate) and simplifies Root to render without font preload gating. > > - **Removals**: > - Delete `app/core/FontPreloader/FontPreloader.ts`, its tests `app/core/FontPreloader/__tests__/FontPreloader.test.ts`, and docs `app/core/FontPreloader/README.md`. > - Remove hooks: `app/hooks/useFontPreloader.ts`. > - Remove loading gate component: `app/components/Views/Root/FontLoadingGate.tsx`. > - **Root**: > - Simplify `app/components/Views/Root/index.tsx` to render app without font-loading gate; rely on theme/external font handling. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2c5ee0e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description** The selected state of list items for account selection and dapp connection management are being changed across the app to background color `muted` and the selection indicator (the blue bar) is being removed. See ticket comments as well for full context **Problem:** The selected account styles are incorrect **Fix:** Change the styles to the following: - Change `backgroundColor` from `colors.info.muted` to `colors.background.muted` - Remove `selectedIndicator` styles Related PRs #23894 ## **Changelog** CHANGELOG entry: Change selected account styles ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/MDP-278 https://consensyssoftware.atlassian.net/browse/MDP-632 ## **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** ### Account Selection | before | after | | -------- | ------- | |  |  | ### Dapp Connection - Account Selection | before | after | | -------- | ------- | |  |  | ### Dapp Connection - Permissions | before | after | | -------- | ------- | |  |  | ### **Before** `~` ### **After** `~` ## **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] > Remove the selected indicator bar and switch selected row background to `colors.background.muted` in the multichain account selector. > > - **UI — Multichain Account Selector**: > - Remove left-side selected indicator from `AccountListCell` and its rendering. > - Change selected row `backgroundColor` to `colors.background.muted` in `MultichainAccountSelectorList.styles.ts`. > - Update snapshots reflecting new background and no indicator. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit bf1cd48. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…1.0 (#23889) <!-- 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 an issue where some bridge/swap quotes did not yield the best quote result with the lowest price impact, by sanitizing the token addresses. <!-- 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 an issue where some bridge/swap quotes did not yield the best quote result with the lowest price impact. ## **Related issues** Fixes: #23891 ## **Manual testing steps** ```gherkin Swap/bridge quotes should yield small price impacts and not extraordinary values like 25% for most cases. ``` ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Format token addresses to CAIP references in bridge quote requests to ensure sanitized inputs. > > - **Bridge**: > - In `useBridgeQuoteRequest`, format `srcTokenAddress` and `destTokenAddress` with `formatAddressToCaipReference` before sending `GenericQuoteRequest`. > - Add corresponding import from `@metamask/bridge-controller`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a11b593. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: SteP-n-s <stylianos.panagakos@consensys.net>
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 : )