[pull] main from MetaMask:main#358
Merged
Merged
Conversation
<!--
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**
Introduces a Component-view testing framework with engine-only mocks,
state-driven presets, and deterministic rendering helpers to speed up
view-level tests without full E2E.
Adds initial tests for BridgeView and Wallet views leveraging presets
and renderers.
Updates CI workflow to run component-view tests reliably across OS, and
minor ESLint/test setup adjustments.
Adds local rules and documentation for Component-view tests.
<!--
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 a component-view testing framework with presets/renderers and
initial tests for BridgeView and Wallet, plus CI and config updates to
run them.
>
> - **Testing**:
> - **Framework**: Introduces component-view test utilities in
`app/util/test/component-view/*` (engine-only mocks, state-driven
presets, deterministic render helpers).
> - **Renderers/Presets**: Adds `bridge` and `wallet` presets/renderers.
> - **Tests**: Adds view tests for `BridgeView` and `Wallet`.
> - **Configuration/Tooling**:
> - **Jest**: Adds `jest.config.view.js` and `testSetupView.js` for
component-view tests.
> - **CI**: Updates `.github/workflows/ci.yml` to run component-view
tests.
> - **Project Config**: Updates `package.json`, `.eslintrc.js`, and
`sonar-project.properties` to support new tests.
> - **Code Adjustment**:
> - Tweaks `app/components/Base/RemoteImage/index.tsx` for test
compatibility.
> - **Docs/Rules**:
> - Adds local rules and documentation under `.cursor/rules/*` and
`app/util/test/component-view/*` (README, guidelines).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e60d458. 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**
Should skip expo updates configuration when env is e2e.
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: Fixed e2e not starting locally due to expo updates
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
Feature: Fix E2E not starting locally
Scenario: user should be able run e2e locally
Given user tries to start e2e locally
When user uses command yarn test:e2e:android:debug:build
Then he/she should not see any changes locally in Expo.plist and AndroidManifest.xml files
```
## **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**
- [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]
> Also skip Expo Updates configuration for `e2e` environment in
`scripts/update-expo-channel.js`.
>
> - **Scripts**:
> - Update `scripts/update-expo-channel.js` to also skip Expo Updates
configuration when `METAMASK_ENVIRONMENT` is `e2e`, and adjust the log
message accordingly.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
c6f90f3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…23304) <!-- 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 updates the empty states for the Activity page to use TabEmptyState <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/jira/software/c/projects/MDP/boards/2972?assignee=62afb43d33a882e2be47c36f&selectedIssue=MDP-414 ## **Manual testing steps** ```gherkin Feature: Activity Empty States Scenario: user navigates to Activity page Given user does not have any transactions/activities When user navigates to Activity page Then they see the empty state consistent with the empty state on the homepage ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** https://github.com/user-attachments/assets/1b6eccce-7511-4fec-941a-b29922da7797 <!-- [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] > Replaces inline empty-state text with `TabEmptyState` across Perps, Predict, Ramp Orders, and Transactions views, updating i18n and tests/snapshots accordingly. > > - **UI/Empty States**: > - Replace inline `Text` empty states with `TabEmptyState` in: > - `PerpsTransactionsView`, `PredictTransactionsView`, `OrdersList`, `Transactions`, `MultichainTransactionsView`, and `UnifiedTransactionsView`. > - Remove obsolete styles (e.g., `emptyText`, `emptyMessage`). > - **Localization**: > - Update Perps empty-state copy to a single combined string in `en.json`. > - **Tests**: > - Update unit tests and Jest snapshots to assert/use `TabEmptyState` content. > - **Misc**: > - Minor import cleanup in `Transactions/index.js`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 5ec92b8. 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: Add trust signal middleware to scan addresses and
origins
## **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]
> Introduces `TrustSignalsMiddleware` to scan origins and addresses in
transactions/typed data via `PhishingController`, integrates it into the
provider pipeline, adds supporting utilities/tests, and bumps
`@metamask/phishing-controller`.
>
> - **Core RPC pipeline**:
> - Add `createTrustSignalsMiddleware` that scans `req.origin` URLs and
EVM addresses (tx `to`, approval spender; typed data verifying contract
and permit spender) using `PhishingController` and current `chainId`
from `NetworkController`.
> - Integrate middleware into `BackgroundBridge` engine after origin
throttling and before user-facing RPC methods.
> - **Utilities**:
> - New `app/lib/address-scanning/address-scan-util.ts` with helpers:
`parseTypedDataMessage`, `extractSpenderFromApprovalData`,
`extractSpenderFromPermitMessage`, validation helpers, method checks,
and `scanAddress`/`scanUrl` wrappers with error logging.
> - **Tests**:
> - Add unit tests for middleware (`TrustSignalsMiddleware.test.ts`) and
utilities (`address-scan-util.test.ts`).
> - **State/Config**:
> - Initialize `PhishingController.addressScanCache` in
`initial-background-state.json`.
> - Bump dependency `@metamask/phishing-controller` to `^16.1.0`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
c732c5e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…ment (#23118) <!-- 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** Allows you to merge stable -> main PRs on comment "Merge my PR" **Successful Negative tests:** Not Merging on Incorrect comment: consensys-test#55, https://github.com/consensys-test/metamask-mobile-test-workflow/actions/runs/19683528967 Not Merging from wrong source branch: consensys-test#53, https://github.com/consensys-test/metamask-mobile-test-workflow/actions/runs/19575100357/job/56058172525 Not Merging into wrong target branch: consensys-test#54, https://github.com/consensys-test/metamask-mobile-test-workflow/actions/runs/19575460777/job/56059417843 Not Merging on unapproved PR: consensys-test#55, https://github.com/consensys-test/metamask-mobile-test-workflow/actions/runs/19709760888 Not Merging on approver not in Release Team: consensys-test#55, https://github.com/consensys-test/metamask-mobile-test-workflow/actions/runs/19709971385 **Desired Successful test:** consensys-test#55, https://github.com/consensys-test/metamask-mobile-test-workflow/actions/runs/19710071272/job/56467981022 ## **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: None ## **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] > Add GitHub Actions workflow to auto-merge PRs on exact "Merge my PR" comment from MEMBER/OWNER using reusable workflow. > > - **CI/GitHub Actions**: > - **New workflow** `/.github/workflows/merge-approved-pr.yml`: > - Triggers on `issue_comment` (created) for PRs. > - Merges when comment is exactly `Merge my PR` and commenter is `MEMBER` or `OWNER`. > - Reuses `MetaMask/github-tools/.github/workflows/merge-approved-pr.yml@30baa9d...`. > - Passes `pr-number` from event and uses `METAMASK_MOBILE_BRANCH_SYNC_TOKEN` as `github-token`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit e56215b. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description** Refine styles for staking CTA in asset details and remove title ## **Changelog** CHANGELOG entry:null ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/MDP-232 ## **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** ### Non-staked UI Update | before | after | | -------- | ------- | |  |  | ### Staked UI Update | before | after | | -------- | ------- | |  |  | ### Withdraw Width Fix | before | after | | -------- | ------- | |  |  | ### **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. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Refines staking and lending balance UI spacing and theming; simplifies Staking CTA by removing the header/button and inlining a clickable “Learn more.” > > - **Stake UI**: > - **Theming/Layout**: Add themed card container in `StakingBalance.styles.ts` (`backgroundColor`, `padding`, `borderRadius`, `marginTop`); integrate `useTheme` in `StakingBalance.tsx`. > - **Buttons**: Increase button gap to `16` in `StakingButtons.styles.tsx`; apply `styles.buttonsContainer` only when no staked positions or claimables in `StakingBalance.tsx`. > - **Staking CTA**: Remove title and separate button; inline text with clickable "Learn more" in `StakingCta.tsx`; update `contentMain` styling (`borderRadius`, `marginBottom`) in `StakingCta.styles.tsx`. > - **Earn Lending**: > - Remove container `paddingHorizontal` in `EarnLendingBalance.styles.ts`. > - **Tests**: > - Update snapshots to reflect new spacing, theming, and CTA content/layout. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit bfdf4ca. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…#23282) <!-- 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 Predict feature's deposit toasts and empty state to provide clearer user feedback and better component reusability: **Deposit Toasts:** - Updated pending toast message to show specific time estimate ("Available in 1 min" vs generic "They'll be available in a moment") - Changed confirmed toast title to "Ready to trade" for clearer action-oriented messaging - Improved toast button from link to close button with "Track" label for better UX - Updated toast icons: changed success icon from `CheckBold` to `Confirmation` for consistency - Adjusted spinner size from XL to LG for better visual balance **Empty State:** - Refactored `PredictPositionEmpty` to use the new shared `TabEmptyState` component - Simplified component structure by removing duplicate styling - Improved maintainability by consolidating empty state patterns **Trade-offs:** - Hardcoded 1 minute timing estimate for now (could be made dynamic in future) <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/PRED-310 ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Refines Predict deposit toasts (copy, icons, actions, spinner) and replaces the positions empty state with shared TabEmptyState; adds supporting locale strings. > > - **Predict UI/UX**: > - **Deposit toasts** (`app/components/UI/Predict/hooks/usePredictToasts.tsx`, `usePredictDepositToasts.tsx`): > - Pending: description changed to time-based (`"Available in 1 min"`), spinner size reduced to `Lg`, uses `closeButtonOptions` with "Track"; UI container switched to `Box`. > - Confirmed: title set to `"Ready to trade"`, icon switched to `IconName.Confirmation`, transparent background, custom start accessory icon. > - **Positions empty state** (`PredictPositionEmpty.tsx`, `.styles.ts`): > - Replaces bespoke layout with shared `TabEmptyState` (icon, description, CTA) and simplifies styles (centered, reduced padding). > - **Localization** (`locales/languages/en.json`): > - Adds/updates strings: `predict.deposit.available_in_minutes`, `predict.deposit.track`, `predict.deposit.ready_to_trade`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 93eb49b. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
#23345) ## **Description** This PR increases the Node.js memory allocation for the `js-bundle-size-check` job from 8GB to 12GB to prevent out-of-memory errors during iOS bundle generation. The job was experiencing memory issues with the current 8GB limit. This change brings the memory allocation to a more appropriate level while staying below the 16-20GB range used by other memory-intensive jobs in the workflow. ## **Related issues** Fixes: flaky `js-bundle-size-check` job failures due to OOM errors ## **Manual testing steps** 1. CI job `js-bundle-size-check` should run successfully without OOM errors 2. Bundle generation should complete within normal time limits 3. All other CI jobs should continue to pass ## **Screenshots/Recordings** N/A - CI/CD infrastructure change only ## **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. ## **Changelog** CHANGELOG entry: null <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Bump `NODE_OPTIONS --max_old_space_size` in `js-bundle-size-check` iOS bundle step from 8GB to 12GB in `.github/workflows/ci.yml`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 5b349da. 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: add trust signals alerts on addresses and urls
## **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] -->
<img width="568" height="1084" alt="Screenshot 2025-11-25 at 12 36
01 PM"
src="https://github.com/user-attachments/assets/c0021ffb-ea92-43e2-ac67-ba556b8da8df"
/>
<img width="568" height="1084" alt="Screenshot 2025-11-25 at 12 36
20 PM"
src="https://github.com/user-attachments/assets/709c6e6b-0743-47ec-a298-02cfd9e5aa33"
/>
<img width="568" height="1084" alt="Screenshot 2025-11-25 at 12 36
40 PM"
src="https://github.com/user-attachments/assets/0cfa813b-78b6-4103-b9a6-f0e894fcea02"
/>
<img width="568" height="1084" alt="Screenshot 2025-11-25 at 12 37
28 PM"
src="https://github.com/user-attachments/assets/09211462-ad10-4437-b500-db3c2b7256dc"
/>
## **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]
> Introduces address and URL trust-signal alerts across confirmations
with new hooks/selectors, UI wiring, metrics, i18n, and tests.
>
> - **Alerts & Hooks**:
> - Add `useAddressTrustSignalAlerts` and `useOriginTrustSignalAlerts`
to surface trust-signal alerts for addresses (spender/`to`) and origins.
> - New trust-signal types and helpers: `useAddressTrustSignals`,
`useOriginTrustSignals`, `TrustSignalDisplayState`,
`AddressScanResultType`.
> - **Selectors**:
> - Implement `selectMultipleAddressScanResults` and
`selectUrlScanResult`; refactor token scan selector to use
`generateAddressCacheKey`.
> - **UI**:
> - Add `RowAlertKey.InteractingWith`; wire `AlertRow` into
`advanced-details-row` for "Interacting with" and collapsed header;
introduce `disableAlertInteraction` to `AlertRow`/`InlineAlert`.
> - **Metrics & Constants**:
> - Extend `AlertKeys` and metrics mapping to include address/origin
trust-signal keys.
> - **Localization**:
> - Add `alert_system.address_trust_signal.*` and
`alert_system.url_trust_signal.*` strings.
> - **Tests**:
> - Comprehensive unit tests for new hooks, selectors, and components;
update existing tests for disabled inline alert behavior.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8732a88. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description** This PR adds a share button to the Prediction Market details screen, allowing users to share markets with others via the native share sheet. **What is the reason for the change?** Users want to share interesting prediction markets with friends and on social media. Currently there's no way to share a market link directly from the app. **What is the improvement/solution?** - Added a new `PredictShareButton` component in the market details header (next to the title) - Tapping the button opens the native share sheet with a deep link to the market (`https://link.metamask.io/predict?market={marketId}&utm_source=user_shared`) - When the user copies the link to clipboard (iOS), a toast notification confirms the action - Includes proper accessibility support (role, label) for screen readers ## **Changelog** CHANGELOG entry: Added share button to prediction market details screen ## **Related issues** Fixes: [PRED-251](https://consensyssoftware.atlassian.net/browse/PRED-251) ## **Manual testing steps** ```gherkin Feature: Share Prediction Market Scenario: User shares a prediction market Given user is on a prediction market details screen When user taps the share icon in the header Then the native share sheet opens with the market link Scenario: User copies market link to clipboard (iOS) Given user is on a prediction market details screen And user has tapped the share icon When user selects "Copy" from the share sheet Then a toast notification displays "Copied to clipboard" Scenario: User dismisses share sheet Given user is on a prediction market details screen And user has tapped the share icon When user dismisses the share sheet Then no toast is shown and user remains on market details ``` ## **Screenshots/Recordings** ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/5a6354d5-cb1d-4de1-876d-c36119d04a02 https://github.com/user-attachments/assets/6f1ca9d1-9bbe-4530-8033-4b9d5b781383 ## **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. [PRED-251]: https://consensyssoftware.atlassian.net/browse/PRED-251?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Introduces `PredictShareButton` in market details header to share deep links via native sheet (with clipboard toast), updates selectors/i18n, and adds comprehensive tests. > > - **Predict UI**: > - **New `PredictShareButton`** (`app/components/UI/Predict/components/PredictShareButton/PredictShareButton.tsx`): opens native share sheet with deep link, shows toast on clipboard copy, accessible, testID `predict-market-details-share-button`. > - Integrated into `PredictMarketDetails` header, passing `market.id`; updated back button accessibility label to `strings('predict.buttons.back')`. > - **Tests**: > - Added unit tests for `PredictShareButton` covering rendering, share flows, clipboard toast, errors, and edge cases. > - Updated `PredictMarketDetails` tests to verify share button presence/props and skeleton behavior. > - **E2E Selectors**: > - Added `PredictMarketDetailsSelectorsIDs.SHARE_BUTTON` in `e2e/selectors/Predict/Predict.selectors.ts`. > - **Localization**: > - Added `predict.buttons.back`, `predict.buttons.share`, and `predict.toasts.copied_to_clipboard` to `locales/languages/en.json`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 689f061. 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 : )