[pull] main from MetaMask:main#338
Merged
Merged
Conversation
## **Description** When the push notification toggle is tapped while OS-level notifications are turned off, the app now opens the system settings to allow the user to enable them. This change introduces a new `getPushPermission` function to check the current permission status and updates the `onToggle` handler in `PushNotificationToggle.hooks.tsx` to implement the new behavior. Additionally, the following unused files have been removed: - `app/util/notifications/settings/auth.ts` - `app/util/notifications/settings/firebase.ts` New unit tests have been added to cover the new functionality. ## **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: feat: Open OS settings when push notifications are disabled ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-1344 ## **Manual testing steps** 0. Disable notifications for the app at an OS level 1. Open the app 2. Turn on notifications 3. Turn on push notifications: - should open OS app settings to turn this on. 4. Once notifications are enabled at the app settings, turn on/off push notifications. - should just using the previous flow (switch should turn on). ## **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/000388a1f469425ea3d344b67bac4c29 https://www.loom.com/share/2f25a79ea61c44c0844469add9626b06 <!-- [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] > Opens system settings when push notifications are toggled but OS notifications are denied, via new permission check in NotificationService and updated toggle hook, with tests and minor cleanup. > > - **Notifications**: > - **Hook**: Update `usePushNotificationSettingsToggle` to call `getPushPermission`; if `denied`, invoke `NotificationService.openSystemSettings`, else toggle `usePushNotificationsToggle`. > - **Service**: Add `getPushPermission` and type `getAllPermissions` to return `{ permission }`; relax `hasPerimssion` to treat several statuses as `authorized`. > - **Tests**: > - Add/extend tests for `getPushPermission`, `openSystemSettings` navigation, and the toggle hook behavior. > - **Cleanup**: > - Remove unused `app/util/notifications/settings/auth.ts` and `firebase.ts`; update `settings/index.ts` exports. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 7d8ff03. 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?
-->
- Skip failing test in pipleine
- Followup PR with a fix
## **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]
> Skip the e2e test for cashing out an open Predictions position (Spurs
vs. Pelicans) by marking it with `it.skip`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0c6b5fc. 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 new networks logo
<!--
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 new networks logo
## **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**
https://github.com/user-attachments/assets/b2344853-ddfe-4c71-9130-590173e25955
<!-- [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]
> No changes detected; the diff is empty.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e690813. 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** A recent change to the settings pages broke a Snaps E2E test on main. This PR fixes that by adding additional steps to exit the settings menu. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Fix Snaps E2E by adding back-navigation support and updating tests to exit Settings before proceeding. > > - **E2E Page Objects**: > - `e2e/pages/Settings/SnapSettingsView.ts`: > - Add `backButton` getter using `CommonSelectorsIDs.BACK_ARROW_BUTTON`. > - Add `tapBackButton()` to tap the back arrow. > - **E2E Tests**: > - `e2e/specs/snaps/test-snap-management.spec.ts`: > - After toggling Snap enablement, navigate out of Settings via two `tapBackButton()` calls and `SettingsView.tapCloseButton()` before continuing. > - Ensure `SettingsView.tapSnaps()` is invoked where needed before selecting a Snap. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 00b8efc. 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 browser button
<!--
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 browser button
## **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] -->
https://github.com/user-attachments/assets/392276db-5423-45fd-b4ab-cae558e16c4b
## **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 browser button that displays the open tab count and refactors
search bar layout/padding across Trending and Explore screens, with
tests for states and navigation.
>
> - **TrendingView UI**
> - Replaces header controls with a row containing `ExploreSearchBar`
and a bordered browser button.
> - Browser button now shows `browser.tabs.length` as a `ButtonLink`
label; falls back to `Add` icon when zero.
> - Integrates theme colors for border and updates padding
(`px-4`/`pb-3`).
> - **ExploreSearchBar**
> - Removes outer padding wrapper; exposes just the row layout and
content.
> - Keeps interactive mode clear/cancel; cancel rendered alongside input
when focused.
> - **ExploreSearchScreen**
> - Wraps `ExploreSearchBar` in a padded container (`px-4 pb-3`).
> - **Tests** (`TrendingView.test.tsx`)
> - Adds cases for browser button states (0/1/many tabs) and navigation
to `TrendingBrowser`.
> - Verifies presence of search bar button and header title.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
72174b6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**
This PR migrates whitelisted feature flags from the old selector-based
pattern to the new `useFeatureFlag` hook architecture. This aligns with
the project's feature flag guidelines that require using the hook
instead of creating feature flag selectors.
**Reason for change:**
- The codebase has standardized on using the `useFeatureFlag` hook for
feature flag access
- The old pattern of using selectors (`selectPooledStakingEnabledFlag`,
`selectPerpsEnabledFlag`, `selectPredictEnabledFlag`) violates the
current feature flag guidelines
- Migrating to the hook pattern provides better consistency,
maintainability, and supports the feature flag override functionality
**Improvement/Solution:**
- Replaced all instances of feature flag selectors with the
`useFeatureFlag` hook
- Updated components to use `FeatureFlagNames` enum values instead of
selector functions
- Migrated the following feature flags:
- `earnPooledStakingEnabled` (previously
`selectPooledStakingEnabledFlag`)
- `perpsPerpTradingEnabled` (previously `selectPerpsEnabledFlag`)
- `predictTradingEnabled` (previously `selectPredictEnabledFlag`)
- Updated all related test files to mock the new hook pattern
- Fixed TypeScript compilation errors and test failures
**Components affected:**
- `WalletActions` and `TradeWalletActions` components
- Stake-related components (`StakeButton`, `StakingBalance`,
`StakingButtons`)
- Earn components (`EarnTokenList`, `WaysToEarn`)
- `DeveloperOptions` settings view
- `SampleFeature` component
- Various other views and components
## **Changelog**
CHANGELOG entry: null
*(This is an internal refactoring that does not affect end-user
functionality)*
## **Related issues**
Fixes:
## **Manual testing steps**
rkin
Feature: Feature flag migration to new architecture
Scenario: User views wallet actions with feature flags enabled
Given the app is running with feature flags enabled for pooled staking,
perps trading, and predict trading
When user navigates to the wallet screen
Then the wallet actions should display correctly with all feature-gated
options visible
Scenario: User views developer options with perps feature flag
Given the app is running with perps trading feature flag enabled
When user navigates to Settings > Developer Options
Then the Perps developer options section should be visible
Scenario: User views stake components with pooled staking feature flag
Given the app is running with pooled staking feature flag enabled
When user navigates to stake-related screens
Then all stake components should render correctly and show pooled
staking options
Scenario: User overrides feature flags in developer options
Given the app is running
When user navigates to Settings > Developer Options > Feature Flag
Override
Then user can override feature flags and see the changes reflected in
the app
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
https://github.com/user-attachments/assets/ad1def2a-cfd7-4251-a62c-ae509f8523fa
https://github.com/user-attachments/assets/47bda0ab-7c46-4e77-b468-8ca7fa41f05d
## **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]
> Replace selector-based feature flags with the useFeatureFlag hook and
FeatureFlagNames enum across key views/components; update tests and add
new flags to the enum.
>
> - **Feature Flags Migration**
> - Replace `useSelector(select*EnabledFlag)` with
`useFeatureFlag(FeatureFlagNames.*)` for `perpsPerpTradingEnabled`,
`predictTradingEnabled`, `earnPooledStakingEnabled`, and
`carouselBanners`.
> - Expand `FeatureFlagNames` enum and centralize flag access in
`app/components/hooks/useFeatureFlag.ts`.
> - **Components Updated**
> - Navigation and views: `MainNavigator`, `ActivityView`, `Wallet`,
`DeveloperOptions`.
> - Wallet actions: `WalletActions`, `TradeWalletActions`
(earn/perps/predict gating via hook).
> - Earn/Stake flows: `EarnTokenList`, `StakeButton`, `StakingBalance`,
`StakingButtons`.
> - Rewards: `WaysToEarn` (Predict gating via hook).
> - Sample feature: `SampleFeature` (counter gating via hook).
> - **Tests**
> - Update unit tests to mock `useFeatureFlag` instead of selectors
across affected files.
> - Adjust assertions and setups to reflect new flag sources.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
02c0ef8. 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** While testing the trending feature I came across two existing issues that had been happening on the Asset Details page for a long time but on a very flaky basis. Here are both issues: - Asset details showing (+infinity%) and flat line: when navigating to an EVM asset details page, there is a possibility that the price API returns an empty response. This empty response was causing the code to go into a catch block and render incorrect price data. Here is an example API call returning 204: `https://price.api.cx.metamask.io/v1/chains/56/historical-prices/0x44444e15232ff6dfed49b550d672707a283b3910?timePeriod=1d&vsCurrency=usd` - Asset details showing infinite loading and does not load any details: when navigating to an asset details page, there is a possibility that it ends up in an infinite loop. I have identified that this is because of running some code before the filter was set and fixed the isue NOTE: The trending feature has been a help for replicating this flakiness and finding a fix for both issues. <!-- 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: fixed two bugs in asset details page ## **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** ISSUE 1: <img width="394" height="830" alt="image" src="https://github.com/user-attachments/assets/32f039de-777e-4f45-8df9-5af89aef9299" /> ISSUE 2: https://github.com/user-attachments/assets/3bcf64f3-c6b3-49b7-a587-1fe51b32c2e5 <!-- [screenshots/recordings] --> ### **After** ISSUE 1: <img width="402" height="816" alt="image" src="https://github.com/user-attachments/assets/10eaf414-e6e8-4ec8-bdc2-95fdda911d7a" /> ISSUE 2: https://github.com/user-attachments/assets/50ee0b76-6e94-4cf7-8066-0b681fff93db <!-- [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] > Initializes asset transactions immediately after filter is set to avoid infinite loading, and returns empty prices on non-200 responses from historical price API. > > - **Asset Details (`app/components/Views/Asset/index.js`)**: > - Run `normalizeTransactions()` immediately after establishing `filter` and set `mounted = true` (removed `InteractionManager.runAfterInteractions` wrapper) to prevent premature/looping loads. > - Use `showLoaderAndNormalize()` on key prop changes and ensure `loading` is reset after normalization. > - **Historical Prices Hook (`app/components/hooks/useTokenHistoricalPrices.ts`)**: > - After `fetch`, if `response.status !== 200`, set `prices` to `[]` and return, avoiding error-driven incorrect price states. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 83ae804. 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** With the recent update of react-native-keychain library that prompt for biometric on android device, user could cancel it and the error was not handled. Combined with recent default biometric feature it is causing user to not able to create new SRP wallet without biometric This pr is to handle for keychain canceled and fall back to password authType. Jira link https://consensyssoftware.atlassian.net/browse/SL-296 https://consensyssoftware.atlassian.net/browse/SL-305 <!-- 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: Cancel biometric prompt during create Wallet will fallback to Password AuthType ## **Related issues** Fixes: #22934 #19642 ## **Manual testing steps** ```gherkin Feature: fallback to Password authType when user cancel biometric Scenario: user create new SRP account Given user completed choose password for new SRP account When user will be prompt for biometric Then user cancel the biometric prompt ``` ## **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/b39cf619-1ab0-45c1-b2d7-bc6d11945699 ### **After** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/70caa718-723b-4818-a3a2-48c2ece81706 ## **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] > Introduces a safe fallback to `PASSWORD` auth when storing credentials with biometrics fails (or user cancels), and updates flows/tests accordingly. > > - **Authentication**: > - Add `storePasswordWithFallback(password, authData)` to fall back to `AUTHENTICATION_TYPE.PASSWORD` if non-password storage fails. > - Use fallback in `newWalletAndKeychain`, `newWalletAndRestore`, and Reset Password flow (`app/components/Views/ResetPassword/index.js`). > - **SecureKeychain (iOS biometrics)**: > - On biometric prompt cancel, store password without biometrics and update storage/metrics; rethrow non-cancel errors. > - **Tests**: > - Add tests covering fallback behavior for wallet creation/restore and error cases; verify dispatches (`setExistingUser`, `logIn`, `logOut`). > - Update SecureKeychain tests to mock `getGenericPassword` and validate cancel vs success paths. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0b8ad0b. 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 addresses several UI problems and inconsistencies.
It updates the sign up button so it no longer uses a unique layout on
the sign in page, resolves a crash related to useOpenSwaps, corrects an
issue where the WETH balance caused the UI to break and also fixes cases
where asset symbols were shown in lowercase.
## **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 UI inconsistency for the sign up button on the sign
in page
CHANGELOG entry: Fix crash caused by useOpenSwaps
CHANGELOG entry: Fix UI break caused by WETH balance display
CHANGELOG entry: Fix asset symbols being shown in lowercase
## **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**
- [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]
> Standardizes auth/signup buttons and copy, fixes token symbol/name
casing via SDK, passes formatted balances to asset item, updates swap
chain source, and enhances asset selection behavior with navigation and
metadata.
>
> - **UI/Copy**:
> - Replace `Secondary` signup button in `CardAuthentication` with text
link; adjust styling; update copy to `"I don't have an account"`.
> - Tweak Sign Up screen “I already have an account” link styling.
> - **Balances**:
> - `CardHome` now passes `balanceFormatted` to `CardAssetItem`.
> - `CardAssetItem` supports optional `balanceFormatted` for
`secondaryBalance`.
> - **Asset Selection**:
> - Normalize token `symbol`/`name` using SDK in `mapUserToken` and when
merging tokens from delegation settings.
> - Add navigation-based selection return, wallet address display, token
merging (avoid duplicates), and priority token highlighting.
> - **Swaps Hook**:
> - `useOpenSwaps` now sources chain IDs from
`selectSelectedSourceChainIds` selector.
> - **SDK**:
> - Use SDK-provided token `symbol`/`name` (no forced uppercasing) when
mapping delegation settings tokens.
> - **Tests**:
> - Extensive updates/additions for CardHome, CardAssetItem,
AssetSelectionBottomSheet, and useOpenSwaps snapshots/behaviors.
> - **Misc**:
> - Remove extraneous log in SpendingLimit back-navigation guard.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
fb48590. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…22873) ## **Description** This PR refactors the `SnapBridge` to use `SelectedNetworkController` to create a provider proxy. It also removes a lot of unnecessary logic. This fixes an issue where the snap couldn't switch the network. ## **Changelog** CHANGELOG entry: Fix snap `wallet_switchEthereumChain` ## **Related issues** Fixes: #22419 ## **Manual testing steps** 1. Set the selected network to any other network than ethereum mainnet (like polygon, base,...) 2. Go to the send flow 3. Expect a valid ENS name to be resolved when trying to send ETH on mainnet ## **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] > Refactors SnapBridge to source provider/block tracker from SelectedNetworkController, streamlines the JSON-RPC middleware stack and stream wiring, and types snapId as SnapId in init. > > - **Snaps**: > - **`SnapBridge` refactor**: > - Use `SelectedNetworkController.getProviderAndBlockTracker(snapId)` and add `createSelectedNetworkMiddleware`. > - Rebuild JSON-RPC engine: origin middleware → selected network → filter/subscription polyfills → preinstalled snaps middleware (when applicable) → permission middleware → snaps method middleware → user RPC middleware (with `#getProviderState`) → forward via `providerAsMiddleware(proxy.provider)`. > - Replace custom multiplexing with `setupMultiplex` and `pump`; add concise logging; adopt strong typings (`SnapId`, `JsonRpcMiddleware`, `InternalAccount`); remove legacy proxy/network-version logic. > - **Engine**: > - In `controllers/snaps/execution-service-init.ts`, pass `snapId` as `SnapId` when creating `SnapBridge`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 78ef601. 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?
-->
- Adds Disable sync at the top of test
- Use retry assertions to ensure test is always in desired state
## **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**
- [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
- [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]
> Disable auto-sync and increase explicit wait timeouts in the multi-SRP
account syncing e2e test to reduce flakiness.
>
> - **E2E tests
(`e2e/specs/identity/account-syncing/multi-srp.spec.ts`)**:
> - Disable Detox auto-sync after login in both fixtures to avoid
flakiness.
> - Increase explicit wait timeouts for account visibility checks to
`30000ms`.
> - Minor test comments clarifying sync behavior.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d0993d4. 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** Fixes the Tron token logo in the tokens list, it was missing because `TokenIcon` looks up images by ticker (TRX), but image-icons only mapped the Tron icon under TRON. So we had to wire the Tron PNG to TRX (and the new tron-logo.png) so the token list can render the correct icon. <img width="380" height="442" alt="Screenshot 2025-11-18 at 11 00 11" src="https://github.com/user-attachments/assets/0ccf8c47-5cf5-4bb3-8414-63968c6f464b" /> ## **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] > Updates Tron image to tron-logo.png and maps TRX and sTRX tickers to use the Tron icon. > > - **Icons**: > - **Tron** (`app/images/image-icons.js`): > - Switch asset to `tron-logo.png`. > - Add mappings `TRX` and `sTRX` to `TRON` so they resolve to the Tron icon. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c40e334. 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?
-->
## **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]
> Refines AI analyzer prompts and logging while expanding smoke test tag
descriptions.
>
> - **E2E AI Analyzer**:
> - **Logging**: Add status indicators (✅/❌/📭) with regex-based
error/empty detection; shorten result preview to 120 chars.
> - **Finalize handling**: Process finalize tool output immediately; add
conservative fallback on parse failure.
> - **Select-Tags Prompt**:
> - Shift to risk-based testing guidance; refine wording; restrict
selection to provided tags; encourage efficient multi-tool
investigations.
> - **E2E Tags**:
> - Expand descriptions for smoke tags (`smokeAccounts`, `smokeCore`,
`smokeIdentity`, `smokeTrade`, `smokeWalletUX`, `smokeAssets`,
`smokeRamps`, `smokeMultiChainPermissions`, `smokePredictions`).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
3595fa9. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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 : )