Skip to content

[pull] main from MetaMask:main#788

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

[pull] main from MetaMask:main#788
pull[bot] merged 5 commits into
Reality2byte:mainfrom
MetaMask:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 27, 2026

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

samir-acle and others added 5 commits May 26, 2026 23:53
<!--
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**



This PR adds a Notifications section to Developer Options with a control
to reset the push notification pre-prompt state.

The change gives developers and QA a quick way to re-trigger the push
pre-prompt on the next eligible launch without reinstalling the app or
manually clearing persisted storage. It reuses the existing
`resetPushPrePromptShown` storage helper, wires the new section into the
Developer Options screen, adds localized copy, and includes a focused
unit test for the reset action.

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

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

- [ ] 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]
> **Low Risk**
> Low risk: adds a developer-only UI control that clears a local
notification flag and includes a unit test, with no production logic
changes beyond wiring the section into the Developer Options screen.
> 
> **Overview**
> Adds a new **Notifications** section to *Developer Options* with a
button that calls `resetPushPrePromptShown()` to clear the stored push
pre-prompt flag, allowing the pre-prompt to reappear on the next
eligible launch.
> 
> Includes new localized strings under
`app_settings.developer_options.notifications` and a focused test
ensuring the reset action is invoked when the button is pressed.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
0522615. 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: Christian Montoya <christian.montoya@consensys.net>
…40) (#30628)

## **Description**

When the user backed out of the deposit confirmation screen, the
transaction status transitioned to `TransactionStatus.rejected`, which
the Money Account toast handler treated as a failure. This produced a
misleading "Deposit failed" toast for an action the user knowingly
cancelled.

This change routes `rejected` through a dedicated branch that silently
clears the pending in-progress timer (no toast). `failed`, `dropped`,
and `cancelled` continue to surface the failed toast as before.

A regression test covers the subtle case where rejection arrives after
`approved` but before the in-progress delay elapses — without the
explicit handler, the orphaned `setTimeout` would have fired a stale
"Deposit in progress" toast ~1500 ms after the user backed out.

## **Changelog**

CHANGELOG entry: Fixed a misleading "Deposit failed" toast that appeared
when users backed out of the deposit confirmation screen.

## **Related issues**

Fixes:
[MUSD-840](https://consensyssoftware.atlassian.net/browse/MUSD-840)

## **Manual testing steps**

```gherkin
Feature: Deposit confirmation rejection

  Scenario: user backs out of deposit confirmation
    Given the user is on the deposit confirmation screen
    When the user taps Back or Reject without confirming
    Then no toast should appear

  Scenario: user rejects mid-flight after approval
    Given the user has approved the deposit
    When the user rejects within the in-progress delay (1500 ms)
    Then no "Deposit in progress" or "Deposit failed" toast should appear

  Scenario: real failure still surfaces
    Given the deposit was approved and submitted
    When the on-chain transaction reverts or is dropped
    Then the "Deposit failed" toast should appear
```

## **Screenshots/Recordings**

### **Before**

### **After**

## **Pre-merge author checklist**

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

#### Performance checks (if applicable)

- [ ] I've tested on Android
- [ ] I've tested with a power user scenario
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics

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


[MUSD-840]:
https://consensyssoftware.atlassian.net/browse/MUSD-840?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Narrow UX change in Money transaction toast handling with targeted
tests; real failures still surface failed toasts.
> 
> **Overview**
> **Money Account deposit toasts** no longer treat
`TransactionStatus.rejected` as a failure. When the user backs out of
confirmation, the status handler only clears any deferred “in progress”
timer via `cancelPendingInProgress`—no failed or in-progress toast.
**`failed`**, **`dropped`**, and **`cancelled`** still show the
deposit/withdraw failed toast.
> 
> Tests drop `rejected` from the parameterized “failed toast” cases and
add coverage for rejection with no toasts, including **approved →
rejected** before the ~1500ms in-progress delay so a stale in-progress
toast cannot fire later.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
057d83a. 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**
Patch react-native-ble-plx to guard against null reject codes in
SafePromise.java. When BLE operations fail with a null error code, React
Native's @nonnull promise reject path throws a native
NullPointerException, crashing the app during Ledger connect or Select
Account pagination on Android.
Substitutes a stable fallback code (BleError) while preserving the
existing error message payload.
Fixes #30491

The proper fix will require update the react-native-ble-plx library in
accounts repo.

<!--
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: Patch react-native-ble-plx to prevent
nullPointerException throw from native code to crash the app.

## **Related issues**

Fixes: #30491 

## **Manual testing steps**
Test plan
On Android (e.g. Samsung Galaxy S22, Android 16), add a hardware wallet
account via Ledger
 Verify the app does not crash when connecting Ledger
Verify pagination in the Select Account interface works without crashing
 Verify selecting an account completes successfully
 Smoke test other BLE flows (if applicable) to confirm no regressions


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

- [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
- [x] 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
- [x] 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]
> **Low Risk**
> Small, localized native guard in a vendored BLE dependency; low blast
radius beyond BLE error handling on Android.
> 
> **Overview**
> Adds a **Yarn patch** for `react-native-ble-plx@3.4.0` so Android no
longer hard-crashes when BLE promise rejections use a **null** error
code.
> 
> The patch updates `SafePromise.java` to route all `reject` overloads
through `safeCode()`, substituting **`BleError`** when the code is null
while keeping the original message (and throwable) intact.
**`package.json`** resolutions/dependencies and **`yarn.lock`** now
resolve the dependency to the patched artifact instead of plain `3.4.0`.
> 
> This targets Ledger connect / Select Account pagination failures on
Android where React Native’s `@NonNull` reject path would otherwise
throw a native `NullPointerException`.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
c20f067. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

Fix limit order price formatting on Perps home order card, order detail
screen, and wallet home. These screens used `PRICE_RANGES_MINIMAL_VIEW`
(threshold-based, max 2 decimals) instead of `PRICE_RANGES_UNIVERSAL`
(adaptive significant digits), causing low-price assets like PUMP to
display `<$0.01` instead of the actual price `$0.001`.

## **Changelog**

CHANGELOG entry: Fixed limit order price displaying `<$0.01` instead of
actual price on order cards and detail screens

## **Related issues**

Fixes:
[TAT-3178](https://consensyssoftware.atlassian.net/browse/TAT-3178)

## **Manual testing steps**

```gherkin
Feature: Limit order price formatting

  Scenario: user views limit order price on low-price asset
    Given wallet is unlocked and Perps is ready to trade

    When user places a limit order on PUMP at $0.001
    Then Perps home order card shows $0.001 (not <$0.01)
    And order detail screen shows Price: $0.001
    And wallet home shows $0.001 for the order
```

## **Screenshots/Recordings**

Limit order price now shows adaptive sig-dig ($0.001) instead of
threshold (<$0.01) on all 3 screens.

<table>
<tr><td colspan="2"><strong>AC1: Perps home order card price (&lt;$0.01
→ $0.001)</strong></td></tr>
<tr>
<td align="center" width="50%"><em>Before</em><br/><img
src="https://raw.githubusercontent.com/abretonc7s/mm-mobile-farm-artifacts/main/fixes/30615/before-evidence-ac1-perps-home-order-card.png?sha=3ffbf4d"
alt="before" width="400" /></td>
<td align="center" width="50%"><em>After</em><br/><img
src="https://raw.githubusercontent.com/abretonc7s/mm-mobile-farm-artifacts/main/fixes/30615/after-ac1-perps-home-order-card.png?sha=3ffbf4d"
alt="after" width="400" /></td>
</tr>
<tr><td colspan="2"><strong>AC2: Order detail screen price (&lt;$0.01 →
$0.001)</strong></td></tr>
<tr>
<td align="center" width="50%"><em>Before</em><br/><img
src="https://raw.githubusercontent.com/abretonc7s/mm-mobile-farm-artifacts/main/fixes/30615/before-evidence-ac2-order-details-price.png?sha=3ffbf4d"
alt="before" width="400" /></td>
<td align="center" width="50%"><em>After</em><br/><img
src="https://raw.githubusercontent.com/abretonc7s/mm-mobile-farm-artifacts/main/fixes/30615/after-ac2-order-details-price.png?sha=3ffbf4d"
alt="after" width="400" /></td>
</tr>
<tr><td colspan="2"><strong>AC3: Wallet home order price (&lt;$0.01 →
$0.001)</strong></td></tr>
<tr>
<td align="center" width="50%"><em>Before</em><br/><img
src="https://raw.githubusercontent.com/abretonc7s/mm-mobile-farm-artifacts/main/fixes/30615/before-evidence-ac3-wallet-home-order-price.png?sha=3ffbf4d"
alt="before" width="400" /></td>
<td align="center" width="50%"><em>After</em><br/><img
src="https://raw.githubusercontent.com/abretonc7s/mm-mobile-farm-artifacts/main/fixes/30615/after-ac3-wallet-home-order-price.png?sha=3ffbf4d"
alt="after" width="400" /></td>
</tr>
</table>


**Video evidence** — drag-and-drop into PR if needed:
- Before: `.task/fix/tat-3178-0526-095542/artifacts/before.mp4`
- After: `.task/fix/tat-3178-0526-095542/artifacts/after.mp4`
## **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.

#### Performance checks (if applicable)

- [x] I've tested on Android
  - Ideally on a mid-range device; emulator is acceptable
- [x] 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
- [x] 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.

## **Validation Recipe**

<details>
<summary>recipe.json</summary>

```json
{
  "title": "Verify limit order price uses adaptive sig-dig on all screens",
  "jira": "TAT-3178",
  "acceptance_criteria": [
    "AC1: Perps home order card displays limit price with adaptive sig-dig (not <$0.01)",
    "AC2: Order detail screen displays limit price with adaptive sig-dig",
    "AC3: Wallet home displays limit order price with adaptive sig-dig"
  ],
  "initial_conditions": { "testnet": false },
  "validate": {
    "workflow": {
      "pre_conditions": ["wallet.unlocked", "perps.ready_to_trade"],
      "entry": "setup-place-order",
      "nodes": {
        "setup-place-order": {
          "action": "call",
          "ref": "perps/order-limit-place",
          "params": { "symbol": "PUMP", "side": "long", "usdAmount": "11", "limitPrice": "0.001" },
          "next": "setup-wait"
        },
        "setup-wait": { "action": "wait", "ms": 4000, "next": "ac1-nav-perps-home" },
        "ac1-nav-perps-home": { "action": "navigate", "target": "PerpsMarketListView", "next": "ac1-wait-orders-loaded" },
        "ac1-wait-orders-loaded": { "action": "wait_for", "expression": "...wait for '11000' in fiber tree...", "timeout_ms": 20000, "next": "ac1-scroll-to-orders" },
        "ac1-scroll-to-orders": { "action": "eval_sync", "expression": "...scrollTo({y:350})...", "next": "ac1-scroll-settle" },
        "ac1-scroll-settle": { "action": "wait", "ms": 500, "next": "ac1-eval-no-bug" },
        "ac1-eval-no-bug": { "action": "eval_sync", "expression": "...assert <$0.01 absent...", "assert": { "operator": "eq", "field": "buggy", "value": false }, "next": "ac1-screenshot" },
        "ac1-screenshot": { "action": "screenshot", "filename": "evidence-ac1-perps-home-order-card.png", "next": "ac2-nav-market" },
        "ac2-nav-market": { "action": "navigate", "target": "PerpsMarketDetails", "next": "ac2-wait-market" },
        "ac2-wait-market": { "action": "wait_for", "test_id": "perps-compact-order-row-first", "next": "ac2-press-order" },
        "ac2-press-order": { "action": "press", "test_id": "perps-compact-order-row-first", "next": "ac2-wait-details" },
        "ac2-wait-details": { "action": "wait_for", "route": "PerpsOrderDetailsView", "next": "ac2-eval-no-bug" },
        "ac2-eval-no-bug": { "action": "eval_sync", "expression": "...assert <$0.01 absent...", "assert": { "operator": "eq", "field": "buggy", "value": false }, "next": "ac2-screenshot" },
        "ac2-screenshot": { "action": "screenshot", "filename": "evidence-ac2-order-details-price.png", "next": "ac3-nav-wallet" },
        "ac3-nav-wallet": { "action": "navigate", "target": "WalletView", "next": "ac3-wait-orders-loaded" },
        "ac3-wait-orders-loaded": { "action": "wait_for", "expression": "...wait for '11000' in fiber tree...", "timeout_ms": 20000, "next": "ac3-scroll-to-orders" },
        "ac3-scroll-to-orders": { "action": "eval_sync", "expression": "...scrollTo({y:600})...", "next": "ac3-scroll-settle" },
        "ac3-scroll-settle": { "action": "wait", "ms": 500, "next": "ac3-eval-no-bug" },
        "ac3-eval-no-bug": { "action": "eval_sync", "expression": "...assert <$0.01 absent...", "assert": { "operator": "eq", "field": "buggy", "value": false }, "next": "ac3-screenshot" },
        "ac3-screenshot": { "action": "screenshot", "filename": "evidence-ac3-wallet-home-order-price.png", "next": "teardown-cancel-order" },
        "teardown-cancel-order": { "action": "call", "ref": "perps/order-limit-cancel", "params": { "symbol": "PUMP" }, "next": "teardown-done" },
        "teardown-done": { "action": "end", "status": "pass" }
      }
    }
  }
}
```

</details>

## **Recipe Workflow**

<details>
<summary>workflow.mmd</summary>

```mermaid
flowchart TD
  %% Verify limit order price uses adaptive sig-dig on all screens
  __entry__(["ENTRY"]) --> node_setup_place_order
  node_setup_place_order[["setup-place-order<br/>perps/order-limit-place"]]
  node_setup_wait["setup-wait<br/>wait"]
  node_ac1_nav_perps_home["ac1-nav-perps-home<br/>navigate"]
  node_ac1_wait_orders_loaded["ac1-wait-orders-loaded<br/>wait_for"]
  node_ac1_eval_no_bug["ac1-eval-no-bug<br/>eval_sync"]
  node_ac1_screenshot["ac1-screenshot<br/>screenshot"]
  node_ac2_nav_market["ac2-nav-market<br/>navigate"]
  node_ac2_wait_market["ac2-wait-market<br/>wait_for"]
  node_ac2_press_order["ac2-press-order<br/>press"]
  node_ac2_wait_details["ac2-wait-details<br/>wait_for"]
  node_ac2_eval_no_bug["ac2-eval-no-bug<br/>eval_sync"]
  node_ac2_screenshot["ac2-screenshot<br/>screenshot"]
  node_ac3_nav_wallet["ac3-nav-wallet<br/>navigate"]
  node_ac3_wait_orders_loaded["ac3-wait-orders-loaded<br/>wait_for"]
  node_ac3_eval_no_bug["ac3-eval-no-bug<br/>eval_sync"]
  node_ac3_screenshot["ac3-screenshot<br/>screenshot"]
  node_teardown_cancel_order[["teardown-cancel-order<br/>perps/order-limit-cancel"]]
  node_teardown_done(["teardown-done<br/>PASS"])
  node_setup_place_order --> node_setup_wait
  node_setup_wait --> node_ac1_nav_perps_home
  node_ac1_nav_perps_home --> node_ac1_wait_orders_loaded
  node_ac1_wait_orders_loaded --> node_ac1_eval_no_bug
  node_ac1_eval_no_bug --> node_ac1_screenshot
  node_ac1_screenshot --> node_ac2_nav_market
  node_ac2_nav_market --> node_ac2_wait_market
  node_ac2_wait_market --> node_ac2_press_order
  node_ac2_press_order --> node_ac2_wait_details
  node_ac2_wait_details --> node_ac2_eval_no_bug
  node_ac2_eval_no_bug --> node_ac2_screenshot
  node_ac2_screenshot --> node_ac3_nav_wallet
  node_ac3_nav_wallet --> node_ac3_wait_orders_loaded
  node_ac3_wait_orders_loaded --> node_ac3_eval_no_bug
  node_ac3_eval_no_bug --> node_ac3_screenshot
  node_ac3_screenshot --> node_teardown_cancel_order
  node_teardown_cancel_order --> node_teardown_done
```

</details>


[TAT-3178]:
https://consensyssoftware.atlassian.net/browse/TAT-3178?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Display-only formatting change in Perps UI with targeted tests; no
trading, auth, or data-path changes.
> 
> **Overview**
> **Limit order prices** on Perps order cards and the order details
screen now use **`PRICE_RANGES_UNIVERSAL`** (adaptive significant
digits) instead of **`PRICE_RANGES_MINIMAL_VIEW`**, so low-priced assets
(e.g. PUMP at `$0.001`) show the real price instead of a threshold like
`<$0.01`.
> 
> **`PerpsOrderDetailsView`** passes universal ranges to
**`formatPerpsFiat`** for limit price, trigger price, take profit, and
stop loss. **`PerpsCard`** does the same for the order card’s displayed
price. Tests assert the new formatting behavior.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
b32f0bb. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…ken for deposit using money account (#30614)

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

Update correct transactiondata.paymentOverride value and pay token for
deposit using money account.

## **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: https://consensyssoftware.atlassian.net/browse/CONF-1427

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


https://github.com/user-attachments/assets/be07e081-c776-4dfb-acff-b4e8257d8761

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

- [ ] 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**
> Touches confirmation payment selection, balance validation, and
TransactionPayController config across deposits; mistakes could block
confirms or show wrong funding source, but changes are scoped with broad
tests and controller bump.
> 
> **Overview**
> This PR wires **Money account** as a first-class pay source for
Transaction Pay deposits by persisting `transactionData.paymentOverride`
(`PaymentOverride.MoneyAccount`) and keeping UI, token selection,
balances, and alerts aligned with that choice.
> 
> **Confirmation UI:** `PayWithRow` branches on the override to a
dedicated money-account row (label + optional fiat balance). The
pay-with bottom sheet sets the override when the money-account row is
tapped and clears it via a shared `useClearPaymentOverride` hook when
the user picks crypto, fiat, or Perps—crypto section logic also hides
misleading MUSD/MONAD rows and checkmarks while money account owns the
selection.
> 
> **Pay token & amounts:** Automatic selection forces **MUSD on MONAD**
when the override is active (not in post-quote flows), re-applies on
toggle, and `useTransactionCustomAmount` / insufficient-balance alerts
use **money account fiat** (`totalFiatRaw`) instead of on-chain
pay-token balance, skipping fee/native-gas checks for that source.
> 
> **Infrastructure:** Adds `selectPaymentOverrideByTransactionId`, bumps
`@metamask/transaction-pay-controller` to **^22.7.0**, and extends tests
across row, sections, alerts, and auto-token hooks.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
e65de07. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@pull pull Bot locked and limited conversation to collaborators May 27, 2026
@pull pull Bot added the ⤵️ pull label May 27, 2026
@pull pull Bot merged commit 326dc71 into Reality2byte:main May 27, 2026
1 check failed
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.

5 participants