Skip to content

[pull] main from MetaMask:main#150

Merged
pull[bot] merged 10 commits into
Reality2byte:mainfrom
MetaMask:main
Sep 12, 2025
Merged

[pull] main from MetaMask:main#150
pull[bot] merged 10 commits into
Reality2byte:mainfrom
MetaMask:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Sep 12, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

gambinish and others added 10 commits September 12, 2025 18:49
## **Description**

Further chart adjustments to fix several issues, including:

X-axis time formatting, which should not overlap, and change
contextually based on the time series shown.

When a candle period is selected within the "More" menu, we should show
the selected period, rather than the static text: "More"

Removes 30d candle period, as the data isn't helpful to the user.

When you close a position, the tpsl lines should update and be removed
from the chart immediately

When you change candle periods, the "current candle" (the one with live
updates) should be within bounds of the chart. This was a padding/off by
one bug.

A fix to the GestureHandler where once you executed a pinch event, you
could not execute a pan. It would think you are still pinching and zoom
in/out while panning.

## **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: Various UX improvements to chart based on beta test

## **Related issues**

Fixes:

https://consensyssoftware.atlassian.net/browse/TAT-1624
https://consensyssoftware.atlassian.net/browse/TAT-1639
https://consensyssoftware.atlassian.net/browse/TAT-1542
https://consensyssoftware.atlassian.net/browse/TAT-1625
https://consensyssoftware.atlassian.net/browse/TAT-1622

## **Manual testing steps**

```gherkin
Feature: Perps chart beta review

  Scenario: user wants to use chart
    Given they have a Perps position open, and has an Android device

    When user they navigate the chart
    Then panning should go back and forward in time smoothly
    Then pinching should zoom in and out
    Then these gestures do not override eachother
    
    X axis should not overlap and logically represent the visible candle periods
    
    When closing positions
    Price lines should be removed
    
    When selecting candle period in "More" you should see the candle period in the "More" button text
```

## **Screenshots/Recordings**


https://github.com/user-attachments/assets/dc57161f-5757-4d63-8b68-5800dc6e7333

## **Pre-merge author checklist**

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

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**
This PR updated the Fund button's icon and label to $ icon and `Buy`
label

<!--
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: Updated Fund button to Buy.

## **Related issues**

Fixes:
https://consensyssoftware.atlassian.net/jira/software/c/projects/DSYS/boards/1888?assignee=62afb43d33a882e2be47c36f&quickFilter=2109&selectedIssue=DSYS-162

## **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**
<img width="1290" height="2796" alt="Simulator Screenshot - iPhone 15
Pro Max - 2025-09-11 at 14 53 27"
src="https://github.com/user-attachments/assets/795c3782-ac2c-4aab-abd1-775d205940dc"
/>

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

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

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**


Networks were added before an address existed, preventing asset loading.
We now add networks after SRP import so new users finish onboarding with
networks configured.

<!--
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 balances issues + onboarding added networks

## **Related issues**

Fixes: #19682 

## **Manual testing steps**

- import new SRP
- check the balances and detected tokens

## **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.
## **Description**
Updating Ramps sdk to version 2.1.11. This includes a fix for more
accurate geo location detection to address bugs where users are
recommended incorrect regions.

## **Changelog**
CHANGELOG entry: Improve geolocation accuracy in the Buy and Sell flows

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/TRAM-2660

## **Manual testing steps**

```gherkin
Feature: Improve Geolocation

  Scenario: user opens the on-ramp buy flow
    When user opens the on-ramp buy flow
    Then their region is auto selected
```


## **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.
## **Description**

This PR fixes a race condition in the Perps feature that was causing
infinite skeleton loading screens when users switch accounts on Android
devices. The issue occurred when market data requests were made during
WebSocket reconnection, resulting in `CLIENT_REINITIALIZING` errors and
unhandled promise rejections.

**Root Cause:**
- During account switching, `MarketDataChannel.connect()` would
immediately attempt to fetch market data
- This happened before
`PerpsConnectionManager.reconnectWithNewContext()` completed WebSocket
reconnection
- The timing conflict caused `CLIENT_REINITIALIZING` errors, leaving
users stuck on loading screens

**Solution:**
- Market data fetching now waits for any ongoing connection operations
to complete
- Added proper error handling with `Logger.error()` for Sentry reporting
- Reused existing `isConnecting` state instead of adding redundant flags
- Minimal 4-line change that eliminates the race condition at its source

## **Changelog**

CHANGELOG entry: Fixed infinite loading screen issue on Perps market
view when switching accounts by resolving WebSocket reconnection race
condition.

## **Related issues**

Fixes:
- Infinite skeleton loading screens when switching accounts in Perps
- Unhandled promise rejections causing `CLIENT_REINITIALIZING` errors
- Poor user experience on Android devices during account transitions

## **Manual testing steps**

```gherkin
Feature: Perps account switching reliability

  Scenario: user switches accounts normally
    Given the user is on Perps market view with account A
    
    When user switches to account B
    Then market data should load successfully within 2 seconds
    And user should see market list without infinite skeleton loading
    And no CLIENT_REINITIALIZING errors should appear in logs

  Scenario: user switches accounts rapidly (stress test)
    Given the user is on Perps market view
    
    When user rapidly switches between multiple accounts
    Then each account switch should complete successfully
    And market data should load for each account
    And no unhandled promise rejections should occur

  Scenario: user switches accounts on slow Android device
    Given the user is on a low-end Android device
    And user is viewing Perps market list
    
    When user switches accounts
    Then WebSocket reconnection should complete before market data fetch
    And user should see loading resolve within 3 seconds
    And market data should display correctly for new account
```

## **Screenshots/Recordings**

### **Before**
- Users could get stuck indefinitely on skeleton loading screens
- `CLIENT_REINITIALIZING` errors appeared in logs during account
switching
- Poor experience especially on Android devices
- Required app restart to recover

### **After**  
- Smooth account switching with no infinite loading
- Market data loads reliably after account changes
- All errors properly logged to Sentry
- No app restart required

## **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.
…19670)

## **Description**

Improved the visual styling and alignment of the PerpsLoadingSkeleton
component, specifically fixing the timeout button display and overall
vertical alignment of both loading and timeout states.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Fixes: N/A

## **Manual testing steps**

```gherkin
Feature: Perps Loading Skeleton Display

  Scenario: user views loading state
    Given user navigates to Perps section
    When Perps connection is initializing
    Then loading spinner and text should be properly centered with consistent spacing

  Scenario: user views timeout state
    Given user is on Perps loading screen
    When connection times out after 10 seconds
    Then timeout message and retry button should be properly aligned with consistent spacing
```

## **Screenshots/Recordings**

### **Before**

- Inconsistent vertical alignment between loading and timeout states
- Retry button not properly aligned with timeout message
- Mixed styling approaches (component-library vs design-system)

### **After**

- Consistent vertical alignment using Box containers
- Proper spacing with gap-6 between elements
- Unified design system Button component usage
- Better visual balance with top padding

## **Pre-merge author checklist**

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

## **Pre-merge reviewer checklist**

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

---------

Co-authored-by: Nick Gambino <35090461+gambinish@users.noreply.github.com>
## **Description**

The perps deeplink management had two separate entry points
(`handlePerpsUrl` and `handlePerpsAssetUrl`) which created maintenance
overhead and inconsistent URL patterns. The perps team needed ownership
of their deeplink logic while maintaining a clean, extensible API.

This PR unifies all perps deeplinks into a single `handlePerpsUrl` entry
point with clean parameter-based URL structure using `screen` parameter,
adds extensible `PerpsNavigationParams` interface, and transfers
CODEOWNERS responsibility from mobile team to perps team while
preserving all existing functionality.

## **Changelog**

CHANGELOG entry: Unified perps deeplink management with clean
parameter-based URL structure and improved extensibility

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/TAT-1520

## **Manual testing steps**

```gherkin
Feature: Unified perps deeplink management

  Scenario: First-time user visits perps deeplink
    Given user has never used perps before
    When user clicks any perps deeplink (perps, perps?screen=markets, perps?screen=asset&symbol=BTC)
    Then user should always navigate to perps tutorial

  Scenario: Returning user visits general perps deeplink
    Given user has used perps before
    When user clicks https://link.metamask.io/perps
    Then user should navigate to wallet home with perps tab selected

  Scenario: Returning user visits markets deeplink
    Given user has used perps before
    When user clicks https://link.metamask.io/perps?screen=markets
    Then user should navigate directly to perps markets list

  Scenario: Returning user visits asset deeplink
    Given user has used perps before
    When user clicks https://link.metamask.io/perps?screen=asset&symbol=BTC
    Then user should navigate directly to Bitcoin market details

  Scenario: Error handling for invalid symbols
    Given user has used perps before
    When user clicks perps?screen=asset&symbol=INVALID
    Then user should fallback to markets list
```

## **Screenshots/Recordings**

*Not applicable - internal deeplink refactor with no UI changes.*

### **Before**

- Two separate handlers: `handlePerpsUrl` and `handlePerpsAssetUrl`
- Separate URL paths: `/perps` and `/perps-asset`
- Mobile team ownership in CODEOWNERS

### **After**

- Single unified handler: `handlePerpsUrl`
- Clean parameter-based URLs: `perps?screen=asset&symbol=BTC`
- Perps team ownership in CODEOWNERS
- Extensible interface design


https://github.com/user-attachments/assets/32663c88-44aa-4417-8824-f6968b96d251

### **Testing Deeplinks**

#### **Easy Testing via Web Interface**
🌐 **Testing Website**: https://metamask-deeplinks-perps.vercel.app/

This website provides:
- ✅ One-click deeplink testing for all scenarios
- ✅ Complete command-line instructions for iOS and Android
- ✅ Real-time validation of deeplink behavior
- ✅ Support for both development and production builds

## **Pre-merge author checklist**

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

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**
1. What is the reason for the change? 
On the close position page when making a limit order, the information on
the page considerrs price as the market price isntead of the limit price
causing incorrect values.
2. What is the improvement/solution?
Use limit price when closing with a limit order and ensure other
calculations consider limit price if limit close is selected.
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/TAT-1630

## **Manual testing steps**

```gherkin
Feature: fix close position limit info

  Scenario: user wants to close a position
    Given user enters the limit close bottomsheet

    When user enters a limit price and sets it
    Then the information in the close position view is based on the limit price and not the market price
```

## **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/743c68fa-cf5a-41ee-a8d8-aefab2586d8b

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

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

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**
`PerpsClosePositionView` Changes:
- Removed order type button
- Added tooltip to "you'll receive" row
- Updated tooltip icon sizes to match designs
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: removed order type button from PerpsClosePositionView
CHANGELOG entry: added tooltip to "you'll receive" row on
PerpsClosePositionView

## **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/5e4f2586-f268-4f0d-9d68-b1864212ff34

<!-- [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).
- [ ] 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.
)

<!--
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**

Problem:
LockScreen component only triggered biometrics when AppState changed
During rapid background/foreground cycles during login, the component
could mount when the app was already in 'active' state
Since no AppState change occurs (app is already active), the listener
never fires
User sees FoxLoader indefinitely without biometrics being triggered

Solution:
Simplified the LockScreen component by replacing laggy Lottie animations
with a static FoxLoader component to improve performance and user
experience.


**Changes Made**
* Replaced laggy Lottie animations (wordmarkLight, wordmarkDark) with
static FoxLoader component
* Removed animation-related styling and positioning code that's no
longer needed
* Cleaned up unused state (ready state, animation refs, opacity
Animated.Value)
* Removed unnecessary Redux connection and theme imports
* Simplified component structure while preserving authentication
functionality
* Handled race condition when the app state already changed before the
listener got defined.


**Impact**
* Improved performance by eliminating laggy animations
* Better user experience with consistent, responsive loading indicator
* Reduced bundle size by removing animation assets (to do)
* Authentication functionality remains unchanged
* No more freezing screen at the diamong due to race condition 

<!--
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**


https://github.com/user-attachments/assets/21d2045f-ebe2-4769-bf41-2d95cd012196


<!-- [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.
@pull pull Bot locked and limited conversation to collaborators Sep 12, 2025
@pull pull Bot added the ⤵️ pull label Sep 12, 2025
@pull pull Bot merged commit 70ef4d6 into Reality2byte:main Sep 12, 2025
0 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants