[pull] main from MetaMask:main#423
Merged
Merged
Conversation
## **Description** This PR fixes sentence case violations in lines 5001-6000 of the `locales/languages/en.json` file as part of ongoing content papercut improvements. The changes convert Title Case strings to sentence case following standard capitalization conventions. **What is the reason for the change?** Content consistency and adherence to proper sentence case formatting across the app. **What is the improvement/solution?** Updated ~50 locale keys from Title Case to sentence case, and will update all affected test files to match the new casing. ## **Changelog** CHANGELOG entry: Fixed sentence case violations in English locale strings lines 5001-6000 ## **Related issues** Fixes: Part of content papercut improvements batch 6 Follows: #23499 (lines 1-1000), #23516 (lines 1001-2000), #23957 (lines 2001-3000), #23994 (lines 3001-4000), #23996 (lines 4001-5000) Related: #23272 (original comprehensive PR) ## **Manual testing steps** ```gherkin Feature: Locale string display Scenario: user views UI elements with updated locale strings Given the app is running with the updated locale file When user views swap notifications Then "Pending swap" should display in sentence case When user views network switcher Then "Switch network" should display in sentence case When user views gas fee options Then "Use market" and "Use low" should display in sentence case And "Max priority fee" and "Max fee" messages should display in sentence case When user views transaction confirmations Then "Transaction submitted" should display in sentence case When user views lending/staking screens Then "Your health factor", "Pool liquidity", "Existing borrow positions" should display in sentence case And "Allowance reset", "Insufficient pool liquidity" should display in sentence case When user views wallet setup Then "Your wallet is ready" and "Default settings" should display in sentence case When user views simulation details Then "Not available" should display in sentence case When user views consent screens Then "Risk disclosure" and "Switching to" should display in sentence case ``` ## **Screenshots/Recordings** N/A - This is a content-only change with no visual differences beyond text casing. Snapshot updates in progress. ## **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 (test updates in progress) - [x] 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)). ## **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. --- ## **Technical Details** ### Changes Made: - **Locale file**: Updated ~50 keys in `locales/languages/en.json` (lines 5001-6000) - **Test files**: Test snapshot updates in progress - **Snapshots**: Snapshot regeneration in progress ### Affected Areas: - Swap notifications and confirmations - Network switcher dialogs - Gas fee estimation UI (Market, Low priority options) - Transaction submission messages - Lending/Staking screens (Health factor, Pool liquidity, Borrow positions) - Wallet setup and default settings screens - Simulation details - Risk disclosure and consent screens - Predict feature labels ### Validation: - Changes are purely cosmetic (text casing only) - No functional changes to app behavior - Test updates will ensure all assertions match new casing 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Normalize sentence casing for English locale strings (~5001–6000) and update related tests/snapshots accordingly. > > - **Locales (en.json)**: > - Standardize to sentence case across keys in the 5001–6000 range: > - Swaps: `notification_label.swap_pending` → "Pending swap". > - Gas fee UI: guidance text uses "Use low/market"; validation messages use "Max priority fee/Max fee" in sentence case. > - Confirm views: labels like `switching_to` → "Switching to"; titles like `predict_deposit` → "Add predict funds". > - Consent/links: "Risk disclosure" (sentence case). > - Earn/Lending: "Transaction submitted", "Pool liquidity", "Existing borrow positions", health factor copy in sentence case. > - Default settings: "Your wallet is ready", "Default settings". > - Simulation details: "Not available". > - **Tests/Snapshots**: > - Update expectations/text in snapshots and unit tests to match new casing: > - Confirmation footers/links use "Risk disclosure". > - Gas fee modal info uses "Use low/market". > - Fiat display shows "Not available". > - Switch account type sections use "Switching to". > - Lending withdrawal modal bullets use "Pool liquidity" / "Existing borrow positions". > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit f97e9f8. 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]
> Adds new default mocks (ACL execution, rewards OIS, on-ramp countries,
TRON staking witnesses) and broadens price spot-prices mock while
removing ACL URLs from the live allowlist.
>
> - **E2E Mocking**:
> - **New defaults**:
> - `acl.execution.metamask.io` GET mocks for `latest/registry.json` and
`latest/signature.json` (`defaults/acl-execution.ts`), included in
`defaults/index.ts`.
> - Rewards OIS GET mock (`/public/rewards/ois`) added to
`defaults/rewards.ts` and included in default GET mocks.
> - On-ramp content GET mock for `/regions/countries` added to
`defaults/onramp-apis.ts`.
> - Staking GET mock for TRON witnesses
(`/v1/tron-staking/:chainId/witnesses`) added to `defaults/staking.ts`.
> - **Price API**:
> - Broaden `v3/spot-prices` endpoint matching and include additional
`usd`/`eth` mappings for ETH, DAI, and USDC (`defaults/price-apis.ts`).
> - **Allowlist**:
> - Remove `https://acl.execution.metamask.io/latest/registry.json` and
`.../signature.json` from `e2e/api-mocking/mock-e2e-allowlist.ts`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
2940cd7. 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 introduces a new deeplink handler for the `card-home` route (`https://link.metamask.io/card-home`) that navigates users to the appropriate Card entry point based on their authentication state and card-linked account status. ### Changes included: 1. **New `handleCardHome` deeplink handler** (`app/core/DeeplinkManager/handlers/legacy/handleCardHome.ts`) - Navigates authenticated users or users with card-linked accounts directly to Card Home - Automatically switches to the first card-linked account when available - Falls back to Card Welcome screen for users without card-linked accounts - Includes comprehensive error handling with fallback navigation 2. **Consolidated `CARD_DEEPLINK` analytics event** - Replaced separate `CARD_ONBOARDING_DEEPLINK` and `CARD_HOME_DEEPLINK` events with a unified `CARD_DEEPLINK` event - Uses `deeplink_type` property to differentiate between `CARD_HOME` and `CARD_ONBOARDING` - Tracks: `deeplink_type`, `authenticated`, `has_card_linked_account`, `final_destination` 3. **Updated `handleUniversalLink.ts`** - Added `CARD_HOME` to supported actions - Whitelisted the action to bypass interstitial modal 4. **Comprehensive test coverage** (`handleCardHome.test.ts`) - Feature flag edge cases - Navigation behavior for all user states - Error handling scenarios - Logging verification ## **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: Added card-home deeplink handler to navigate users to MetaMask Card based on authentication and card-linked account status ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: Card Home Deeplink Handler Scenario: Authenticated user opens card-home deeplink Given user is authenticated with MetaMask Card And card feature is enabled for their region When user opens https://link.metamask.io/card-home Then user is navigated to Card Home screen And user remains on their currently selected account Scenario: Unauthenticated user with card-linked account opens card-home deeplink Given user is not authenticated with MetaMask Card And user has at least one account linked to a MetaMask Card And card feature is enabled for their region When user opens https://link.metamask.io/card-home Then app switches to the first card-linked account And user is navigated to Card Home screen Scenario: Unauthenticated user without card-linked account opens card-home deeplink Given user is not authenticated with MetaMask Card And user has no accounts linked to a MetaMask Card And card feature is enabled for their region When user opens https://link.metamask.io/card-home Then user remains on their currently selected account And user is navigated to Card Welcome screen Scenario: User opens card-home deeplink in unsupported region Given card feature is not enabled for user's region And cardExperimentalSwitch is disabled When user opens https://link.metamask.io/card-home Then deeplink is ignored And no navigation occurs ``` ## **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] > Adds `card-home` deeplink handling with navigation, feature-flag/geo gating, unified analytics, universal link support, and comprehensive tests. > > - **Deeplinks & Routing**: > - Add `ACTIONS.CARD_HOME` and prefix in `app/constants/deeplinks.ts`. > - Implement `handleCardHome` in `app/core/DeeplinkManager/handlers/legacy/handleCardHome.ts` to navigate to Card Home/Welcome, optionally switch to first card-linked account, and enable the card button. > - Update `handleUniversalLink.ts` to support and whitelist `card-home` (calls `handleCardHome`). > - **Analytics**: > - Replace `CARD_ONBOARDING_DEEPLINK` with unified `CARD_DEEPLINK_HANDLED` in `MetaMetrics.events.ts` and use it in both `handleCardHome` and `handleCardOnboarding` via `deeplink_type`. > - **Tests**: > - Add comprehensive tests for `handleCardHome` covering feature flags, navigation, errors, and logging. > - Update `handleCardOnboarding` tests to expect `CARD_DEEPLINK_HANDLED`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 541ba68. 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]
> Skips the flaky E2E test
`e2e/specs/confirmations-redesigned/transactions/gas-fee-tokens-eip-7702.spec.ts`
by changing `describe` to `describe.skip` to avoid CI crashes.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
05df3ff. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description** This PR fixes sentence case violations in lines 4001-5000 of the `locales/languages/en.json` file as part of ongoing content papercut improvements. The changes convert Title Case strings to sentence case following standard capitalization conventions. **What is the reason for the change?** Content consistency and adherence to proper sentence case formatting across the app. **What is the improvement/solution?** Updated ~34 locale keys from Title Case to sentence case, and updated all affected test files to match the new casing. ## **Changelog** CHANGELOG entry: Fixed sentence case violations in English locale strings lines 4001-5000 ## **Related issues** Fixes: Part of content papercut improvements batch 5 Follows: #23499 (lines 1-1000), #23516 (lines 1001-2000), #23957 (lines 2001-3000), #23994 (lines 3001-4000) Related: #23272 (original comprehensive PR) ## **Manual testing steps** ```gherkin Feature: Locale string display Scenario: user views UI elements with updated locale strings Given the app is running with the updated locale file When user imports a wallet Then "Import account" title should display in sentence case And "Paste your Secret Recovery Phrase" should display in sentence case When user creates a new wallet Then "Create password" should display in sentence case And "Learn more" should display in sentence case When user backs up their wallet Then "Cancel backup" should display in sentence case And "Security tips" should display in sentence case When user views receive request Then all strings should display in proper sentence case When user views ramp/checkout flows Then all UI text should display in proper sentence case ``` ## **Screenshots/Recordings** N/A - This is a content-only change with no visual differences beyond text casing ## **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)). ## **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. --- ## **Technical Details** ### Changes Made: - **Locale file**: Updated ~34 keys in `locales/languages/en.json` (lines 4001-5000) - **Test files**: No direct test file changes (only snapshots) - **Snapshots**: Regenerated 8 snapshot files to match new casing ### Affected Areas: - Import Private Key flow - Import SRP (Secret Recovery Phrase) flow - Onboarding vault creation - Account backup flows (steps 1-7) - Manual backup process - Ramp/Checkout flows - Order details - Fiat selector modal - Eligibility failed modal - Receive request screens ### Validation: - All affected unit tests pass - No old Title Case strings remain in updated snapshot files - Changes are purely cosmetic (text casing only) 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Converts Title Case to sentence case in the English locale (lines 4001–5000) and updates all affected tests and snapshots to match. > > - **Locales**: > - Update `locales/languages/en.json` (~34 keys) to sentence case (e.g., import private key, secure wallet, on-ramp/order details, region/fiat labels, notifications, prompts). > - **Tests & Snapshots**: > - Align text expectations with sentence case across ramp views (`BuildQuote`, `Quotes`, `Checkout`, `OrderDetails`), modals (`FiatSelectorModal`, `IncompatibleAccountTokenModal`, `UnsupportedRegionModal`, `EligibilityFailedModal`, `RampUnsupportedModal`), `ReceiveRequest`, `ImportPrivateKey`, and `ManualBackupStep1`. > - Regenerate snapshots and update queries/buttons (e.g., `"Return to home screen"`, `"Contact support"`, `"Got it"`, `"Create password"`). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 1632f86. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This PR refactors the HyperLiquid subscription service to drop subscription fallbacks. This refactor was raised during the offsite, as it is needed as a result of the hotfix we had to deploy to address Perps loading issue during the weekend. The initial PR #23753 introduced a fallback mechanism that would create new subscriptions when the properties in the data coming from the old subscriptions were missing. Given that these properties will be always missing, this PR uses the new subscriptions as a default. ## **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** No visible change ### **After** No visible change ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Replaces HIP‑3 webData3 fallback with per‑DEX clearinghouseState/openOrders subscriptions, adds `triggerPrice` to orders, and hardens TP/SL extraction with price-based fallback and cache re-use; tests updated accordingly. > > - **Perps Subscription Service (HIP‑3)**: > - Switch to individual subscriptions: `clearinghouseState` (positions/account) and `openOrders` (orders); use `webData3` only for OI caps. > - Remove fallback caches/handlers; centralize aggregation and cache updates; update cleanup/restore logic to handle new subs. > - Re-extract TP/SL from cached orders on `clearinghouseState` updates to prevent flicker. > - Update hashing/change-detection and notify paths; broaden reconnection restoration across subtypes. > - **TP/SL Processing**: > - New shared helper to extract TP/SL from orders; adds price-based fallback for ambiguous `Trigger` types (long/short aware) and counts TP/SL. > - **Order Model & Adapter**: > - Extend `Order` with `triggerPrice`. > - `adaptOrderFromSDK` sets `triggerPrice` (uses `triggerPx`) and prioritizes `limitPx` for price; child TP/SL preserved. > - **Tests**: > - Overhaul to reflect new HIP‑3 flow: assert `clearinghouseState`/`openOrders` usage; OI caps via `webData3`. > - Replace timeouts with `jest.runAllTimersAsync()`; add coverage for TP/SL classification, cache re-use, short/long logic, L2 book handling, and feature-flag updates. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit cd9bbb0. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: abretonc7s <107169956+abretonc7s@users.noreply.github.com>
) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Updated the `accountsApiChainIds` function in both `account-tracker-controller-init.ts` and `token-balances-controller-init.ts` to utilize `getState()` directly instead of passing a persisted state object. This change simplifies the state retrieval process and enhances code clarity. <!-- 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 balance updates using the new feature flags for balance fetching ## **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://www.loom.com/share/307c4911eb264f45938c79e85113eae3 ## **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] > <sup>[Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) is generating a summary for commit 77a2cf6. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
#24101) ## **Description** Before: Headers used HeaderBase without a background color. During transitions, both screens' headers were transparent and stacked on top of each other, creating a visual "jumble." After: Each screen renders its own header with an opaque background (bg-default). Since headers are part of each screen's content, they animate separately and never overlap. This PR also fixes a delay issue: Before: React Navigation managed a shared floating header. During back transitions: The old screen's header stayed visible (floating on top) New screen content appeared underneath Header only switched after animation completed After: No shared header. Each screen owns its header inline: Asset screen has its own header (renders with its content) AssetDetails has its own header (renders with its content) During transitions, each header moves with its screen No delay, no jumble ## **Changelog** CHANGELOG entry: Fixes header text in token details page ## **Related issues** Fixes: #23875 ## **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** (See issue) <!-- [screenshots/recordings] --> Uploading Screen Recording 2025-12-17 at 15.20.20.mov… ### **After** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/4e49a1d7-a91c-439a-bc30-27c3be51370e https://github.com/user-attachments/assets/bd7de3fe-96e1-4b59-86af-32871831743f ## **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] > Replaces floating headers with inline, opaque headers on `Asset` and `AssetDetails`, updates navigation to hide stack headers, and refreshes tests/snapshots—fixing title rendering and back-navigation delay/overlap. > > - **Navigation**: > - Set `AssetStackFlow` `screenOptions` to `headerShown: false` so screens render their own headers. > - **Asset screen (`Views/Asset`)**: > - Add inline header using design-system `ButtonIcon`/`Text` with safe-area insets; show back, title, optional options. > - Remove `navigation.setOptions`/navbar logic and scroll-linked header updates. > - Pass network name into `AssetOverview`; keep transactions rendering logic intact. > - **Asset Details (`Views/AssetDetails`)**: > - Add inline header (back + "Token Details" + network name); remove navbar option setup. > - Minor refactors to use `RNText` where needed and show network name in both header and content. > - **Tests**: > - Update/expand unit tests to assert inline header/back behavior and token details interactions. > - Regenerate snapshots to reflect new headers and layouts. > - **Behavior**: > - Prevents header overlap during transitions and removes back-navigation header delay; fixes token details title display. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d90a0b5. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This bumps Snaps packages to the latest version. Notable changes include: - Allow external images - Add `isReady` state property - Skip updating registry if signature has not changed This PR also rewrites the image tests to use the `renderInterface` pattern. ## **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 ## **Screenshots/Recordings** <img width="300" height="800" alt="Simulator Screenshot - iPhone 16 Pro - 2025-12-18 at 13 02 11" src="https://github.com/user-attachments/assets/30e0ffde-2f07-4ce0-92ee-444bb2f25f5b" /> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Bumps Snaps packages and adds external image URL support (with width/height) in Snap UI, plus messenger and state fixture updates. > > - **Snaps UI**: > - Enable external image rendering in `SnapUIImage` using `expo-image` when `value` is a valid URL; maintain SVG rendering via `SvgXml`. > - Extend `SnapUIImage` `style` typing to include `ImageStyle` and pass `width`/`height` from `image` component (`app/components/Snaps/SnapUIRenderer/components/image.ts`). > - **Tests**: > - Add snapshot tests for SVG and external image rendering in `image.test.ts` with updated snapshots. > - **Engine/Messenger**: > - Delegate `PermissionController:hasPermission` in `snap-interface-controller-messenger`. > - **State/Fixtures**: > - Add `SnapController.isReady` and `SnapsRegistry.signature` fields to initial state and logs snapshots. > - **Dependencies**: > - Bump `@metamask/snaps-sdk` to `^10.3.0`, `@metamask/snaps-controllers` to `^17.2.0`, and `@metamask/snaps-utils` to `^11.7.0` (lockfile updated). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9ba54e6. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…ion (#24166) ## **Description** The package `@metamask/network-controller` has been updated from v27.0 to v27.1, which is the latest version. The primary motivation for the update is this bug fix: MetaMask/core#7532 (included in v27.1.0). ## **Changelog** CHANGELOG entry: Fix bug where EIP-1559 compatibility check was skipped in some circumstances ## **Related issues** Related core issue: MetaMask/core#7533 ## **Manual testing steps** - do a fresh install of 7.61.0 - submit a transaction (see that it was a type 0.. no gas fee properties included) - try to submit a type 4 transaction (upgrade/downgrade doesn't matter.. see that the transaction fails locally) - update to the build from your PR - re-do the previous actions and they all should succeed - type 2 transaction submitted - type 4 transaction submitted ## **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). - [ ] 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] > Update `@metamask/network-controller` to `^27.1.0` and refresh lockfile with related dependency bumps. > > - **Dependencies**: > - Bump `@metamask/network-controller` from `^27.0.0` to `^27.1.0` in `package.json` and `yarn.lock`. > - Lockfile updates for transitive deps: > - `@metamask/controller-utils` → `11.17.0`. > - `@metamask/eth-json-rpc-middleware` → `22.0.1`. > - Corresponding `yarn.lock` resolutions and checksums updated. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit aea2716. 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 : )