Skip to content

[pull] main from MetaMask:main#794

Merged
pull[bot] merged 4 commits into
Reality2byte:mainfrom
MetaMask:main
May 29, 2026
Merged

[pull] main from MetaMask:main#794
pull[bot] merged 4 commits into
Reality2byte:mainfrom
MetaMask:main

Conversation

@pull

@pull pull Bot commented May 29, 2026

Copy link
Copy Markdown

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 : )

zone-live and others added 4 commits May 29, 2026 08:28
<!--
Please submit this PR as a draft initially.

Do not mark it as "Ready for review" until this PR meets the canonical
Definition of Ready For Review in `docs/readme/ready-for-review.md`.

In short: the template must be materially complete (not just section
titles
present), all status checks must be currently passing, and the only
expected
follow-up commits must be reviewer-driven.
-->

## **Description**

Adds the QuickBuy quote details and select-quote screens, keeps
alignment with Bridge/Swaps features and Figma spec.


<img height="790" alt="Simulator Screenshot - iPhone 17 Pro - 2026-05-27
at 17 55 15"
src="https://github.com/user-attachments/assets/69f0bef9-9196-4ec4-bdfb-f15c19f09c0a"
/>
<img height="790" alt="Simulator Screenshot - iPhone 17 Pro - 2026-05-27
at 17 55 28"
src="https://github.com/user-attachments/assets/743e9869-f014-427e-a9bb-198ea7ffc86c"
/>
<img height="790" alt="Simulator Screenshot - iPhone 17 Pro - 2026-05-27
at 17 55 34"
src="https://github.com/user-attachments/assets/e97067d8-b8ca-4497-9327-f0b7e8e9267a"
/>
<img height="790" alt="Simulator Screenshot - iPhone 17 Pro - 2026-05-27
at 17 55 41"
src="https://github.com/user-attachments/assets/4d562963-cb20-48fb-8217-8730e4330b3e"
/>
<img height="790" alt="Simulator Screenshot - iPhone 17 Pro - 2026-05-27
at 17 55 46"
src="https://github.com/user-attachments/assets/3a0e4127-cec5-492e-ab8f-49cf8c65cb1a"
/>


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

<!--
Every checklist item must be consciously assessed before marking this PR
as
"Ready for review". A checked box means you deliberately considered that
responsibility, not that you literally performed every action listed.

Unchecked boxes are ambiguous: they are not an implicit "N/A" and they
are not
a silent "skip". See `docs/readme/ready-for-review.md` for the full
checklist
semantics.
-->

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

#### Performance checks (if applicable)

- [ ] I've tested on Android
  - Ideally on a mid-range device; emulator is acceptable
- [ ] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example

For performance guidelines and tooling, see the [Performance
Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).

## **Pre-merge reviewer checklist**

<!--
Reviewer checklist items follow the same semantics as the author
checklist: an
unchecked box is ambiguous, a checked box means the reviewer consciously
assessed that responsibility. See `docs/readme/ready-for-review.md`.
-->

- [ ] 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]
> **Medium Risk**
> Changes quote selection, refresh timing, and displayed swap terms that
drive the Buy action, but reuses Bridge quote UI/hooks and is covered by
extensive tests.
> 
> **Overview**
> Adds **Quote details** and **Select quote** sub-screens to Social
Leaderboard Quick Buy, wired through new `quoteDetails` / `selectQuote`
routes in `QuickBuyRoot`. Tapping the toolbar rate tag (now showing
**quote-derived** `formattedRate` when available) opens quote details;
from there users can open provider selection, edit slippage via the
existing Bridge modal, or return to the amount screen.
> 
> Quote details reuse Bridge-style key/value rows with tooltips, show
network fee / slippage / minimum received (including optional fiat on
min received), and display a **live quote refresh countdown** next to
the rate—without a manual “Get new quote” CTA (quotes refresh on a timer
instead).
> 
> `useQuickBuyQuotes` now returns **all sorted quotes**, tracks **last
fetch time** and **refresh interval** from feature flags,
**auto-refreshes** on that schedule (with a test fix so failed refreshes
don’t retry immediately), and honors **`selectedQuoteRequestId`** for
the active quote. The controller resets manual selection when amount,
tokens, or slippage change and drops stale request IDs after refresh.
> 
> Select quote builds rows from Bridge’s `QuoteRow` (cost, receive
amount from Quick Buy `destToken`, default/lowest-cost selection). New
shared pieces include sub-screen header, countdown formatter, and detail
row helpers, plus locale strings and broad unit tests.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
bf39582. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.

Do not mark it as "Ready for review" until this PR meets the canonical
Definition of Ready For Review in `docs/readme/ready-for-review.md`.

In short: the template must be materially complete (not just section
titles
present), all status checks must be currently passing, and the only
expected
follow-up commits must be reviewer-driven.
-->

## **Description**
Migrates the Card feature's route navigators
(`app/components/UI/Card/routes/index.tsx`) from
`@react-navigation/stack` (JS stack) to
`@react-navigation/native-stack`.

Both the main Card stack and the Card modals stack now use
`createNativeStackNavigator`, bringing the Card feature in line with the
native-stack pattern already used across the app (Perps, Earn, Money,
Bridge, Predict, etc.) and improving navigation performance/feel by
using the platform-native navigation primitives.

Key changes:
- Swap `createStackNavigator` → `createNativeStackNavigator` for both
`Stack` and `ModalsStack`.
- Replace `StackNavigationOptions` types with
`NativeStackNavigationOptions`.
- Replace the JS-stack modal options (`clearStackNavigatorOptions` +
`presentation: 'modal'` + `detachPreviousScreen: false`) with the
native-stack equivalents: `clearNativeStackNavigatorOptions` +
`transparentModalScreenOptions`.
- Preserve existing behavior:
- Main screens keep `headerShown: false` (screens render their own
`HeaderStandard`).
- SpendingLimit's onboarding flow keeps its non-swipe-dismissable
gesture handling (`gestureEnabled: route.params?.flow !==
'onboarding'`).
- Update `routes/index.test.tsx` to mock
`@react-navigation/native-stack` / `createNativeStackNavigator` instead
of the JS stack.
No routes, screen names, or params were added or removed.

## **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: Card native-stack navigation
  
Scenario: Main Card screens navigate correctly
    Given I am in the Card feature
    When I navigate between Home, Welcome, ChooseYourCard, ReviewOrder, OrderCompleted, Cashback, Authentication, 
SpendingLimit, and Onboarding
    Then each screen renders with its own header and the correct transitions
  
Scenario: Card modals present correctly
    Given I am on a Card screen
    When I open each modal (AddFunds, AssetSelection, RegionSelection, Confirm, Password, RecurringFee, DaimoPay, ViewPin, SpendingLimitOptions, WaitlistForm)
    Then the modal presents as a transparent modal over the underlying screen
    And dismissing the modal returns to the previous screen
  
Scenario: SpendingLimit onboarding gesture
    Given I open SpendingLimit with flow "onboarding"
    Then the screen cannot be swipe-dismissed
    And other SpendingLimit flows (manage/enable) keep default gesture behavior
```

## **Screenshots/Recordings**

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

|before|after|
|---|---|
|<img width="370" height="768" alt="Card routes before"
src="https://github.com/user-attachments/assets/4b91b870-66f1-44c0-9b72-ecbe6eee5dc9"
/>|<img width="370" height="768" alt="Card routes after"
src="https://github.com/user-attachments/assets/08dc83ab-1c0f-4df8-b01d-0228c97a3e9a"
/>|

### **Before**
iOS

https://github.com/user-attachments/assets/8167ef3d-5a04-45fb-8d62-dddc4e217e9a
Android

https://github.com/user-attachments/assets/b4e5be48-3de3-4d58-8b30-42d5bfbd291e

### **After**
iOS

https://github.com/user-attachments/assets/e672a50d-a383-4049-a9f8-1038923de3a8
Android

https://github.com/user-attachments/assets/ae584d78-cfb4-4b08-bc61-26c9a66df6b3

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

## **Pre-merge author checklist**

<!--
Every checklist item must be consciously assessed before marking this PR
as
"Ready for review". A checked box means you deliberately considered that
responsibility, not that you literally performed every action listed.

Unchecked boxes are ambiguous: they are not an implicit "N/A" and they
are not
a silent "skip". See `docs/readme/ready-for-review.md` for the full
checklist
semantics.
-->

- [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.

#### Performance checks (if applicable)

- [x] I've tested on Android
  - Ideally on a mid-range device; emulator is acceptable
- [ ] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example

For performance guidelines and tooling, see the [Performance
Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).

## **Pre-merge reviewer checklist**

<!--
Reviewer checklist items follow the same semantics as the author
checklist: an
unchecked box is ambiguous, a checked box means the reviewer consciously
assessed that responsibility. See `docs/readme/ready-for-review.md`.
-->

- [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]
> **Medium Risk**
> Navigation stack and modal presentation behavior change at the
framework level; regressions could affect all Card screens and
bottom-sheet modals even though routes are unchanged.
> 
> **Overview**
> Card navigation is switched from the JavaScript
`@react-navigation/stack` implementation to
`@react-navigation/native-stack` for both the main Card stack and the
nested modals stack, matching other app areas and using platform-native
transitions.
> 
> Modal presentation no longer uses `clearStackNavigatorOptions` with
`presentation: 'modal'` and `detachPreviousScreen: false`. It now uses
**`clearNativeStackNavigatorOptions`** plus
**`transparentModalScreenOptions`** (`presentation:
'transparentModal'`). Main screens still hide the default header, and
**SpendingLimit** still disables swipe-back when `flow` is `onboarding`.
> 
> Tests mock **`createNativeStackNavigator`** instead of the JS stack.
Route names and screens are unchanged.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
0c15689. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.

Do not mark it as "Ready for review" until this PR meets the canonical
Definition of Ready For Review in `docs/readme/ready-for-review.md`.

In short: the template must be materially complete (not just section
titles
present), all status checks must be currently passing, and the only
expected
follow-up commits must be reviewer-driven.
-->

## **Description**

Integrate `@metamask/wallet` into mobile, replacing the initialization
for `KeyringController` as the first step towards a migration. This lets
us remove most of the initialization logic for `KeyringController` as
that has been consolidated in `core`. Additionally some changes were
required to `SnapKeyring`, `Engine` and the current initialization
framework. The goal following this PR is a gradual migration of as much
initialization code as possible to `core`.

There should be no functional changes.

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

https://consensyssoftware.atlassian.net/browse/WPC-999

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Touches vault/keyring initialization, Snap account removal, and
messenger resolution order; intended as behavior-preserving but errors
here affect unlock, signing, and hardware/QR flows.
> 
> **Overview**
> This PR wires **`@metamask/wallet`** into mobile **`Engine`** so
**`KeyringController`** is created by the shared wallet layer instead of
the modular `keyringControllerInit` / `snapKeyringBuilderInit` path.
> 
> **Engine** now calls **`initializeWallet`** early (merged persisted +
optional keyring state), keeps a private **`Wallet`** instance, and
resolves **`KeyringController`** via **`wallet.getInstance`**.
**`initMessengerClients`** / **`getMessengerClientOrThrow`** prefer
wallet instances, then fall back to other messenger clients.
**`Engine.init`** drops the separate `null` keyring argument in tests;
optional keyring state remains the third parameter.
> 
> Keyring setup moves to **`wallet-init/`**: encryptor +
**`getKeyringBuilders`** (QR/Ledger/HD/Money/Snap), a global
**`qrKeyringBridge`** for UI scan flows, and **`getQrKeyringScanner`**
pointing at that bridge. Removed: keyring/snap-keyring init modules,
their messenger factories, and related tests.
> 
> **SnapKeyring** no longer takes injectable persist/remove helpers; it
uses messenger actions **`KeyringController:persistAllKeyrings`** and
**`KeyringController:removeAccount`** (with a note that permission
cleanup on remove is still incomplete).
> 
> Dependency: **`@metamask/wallet@^1.0.0`** in **`package.json`** /
lockfile.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
f9f60e4. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/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 is a CI/internal tooling change — re-enabling the AI PR risk
analysis workflow that was temporarily disabled. Not user-facing.
  CHANGELOG entry: null  

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

#### Performance checks (if applicable)

- [ ] I've tested on Android
  - Ideally on a mid-range device; emulator is acceptable
- [ ] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example

For performance guidelines and tooling, see the [Performance
Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).

## **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]
> **Low Risk**
> CI-only workflow and internal analyzer config; no changes to app,
auth, or user-facing code.
> 
> **Overview**
> Re-enables the **AI PR risk analysis** GitHub Action by removing the
temporary `if: false` guard and restoring the original run conditions
(non-fork PRs, non-draft, base `main` or `release/*`). The job now sets
**`continue-on-error: true`** so a failed analysis does not block
merges.
> 
> Updates **`.ai-pr-analyzer/config.yaml`** model routing: default moves
from `azure/grok-4-fast-reasoning` to **`grok-4-20-reasoning`**,
escalation from `anthropic/claude-sonnet-4-6` to **`claude-sonnet-4.6`**
(provider-prefixed IDs dropped).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
799c6f6. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Alexey Kureev <a.g.kureev@gmail.com>
Co-authored-by: Tadej Vengust <vengust.tadej@gmail.com>
Co-authored-by: jvbriones <1674192+jvbriones@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators May 29, 2026
@pull pull Bot added the ⤵️ pull label May 29, 2026
@pull pull Bot merged commit 7309afc into Reality2byte:main May 29, 2026
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.

4 participants