[pull] main from MetaMask:main#419
Merged
Merged
Conversation
## **Description** Adjusts the limit price preset buttons in the PerpsLimitPriceBottomSheet to include Mid/Bid/Ask prices alongside reduced percentage options. **Changes:** - Long orders now show: Mid, Bid, -1%, -2% (previously: -1%, -2%, -5%, -10%) - Short orders now show: Mid, Ask, +1%, +2% (previously: +1%, +2%, +5%, +10%) - Added MetaMetrics tracking for limit price input method (`PERPS_UI_INTERACTION` with `input_method`: preset/percentage_button/keyboard) Uses the optimized `usePerpsTopOfBook` hook for bid/ask data instead of full orderbook subscription. ## **Changelog** CHANGELOG entry: Updated limit price presets to include Mid and Bid/Ask buttons for quicker price selection ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2114 ## **Manual testing steps** ```gherkin Feature: Limit price presets Scenario: User sets limit price using Mid button for long order Given user is on the order form with direction set to Long When user taps "Limit" order type and opens limit price modal Then user sees preset buttons: Mid, Bid, -1%, -2% When user taps "Mid" button Then limit price is set to the current mid price Scenario: User sets limit price using Bid button for long order Given user is on the limit price modal with direction set to Long When user taps "Bid" button Then limit price is set to the current best bid price Scenario: User sets limit price using Ask button for short order Given user is on the order form with direction set to Short When user taps "Limit" order type and opens limit price modal Then user sees preset buttons: Mid, Ask, +1%, +2% When user taps "Ask" button Then limit price is set to the current best ask price Scenario: MetaMetrics tracks input method Given user is on the limit price modal When user taps a preset button (Mid/Bid/Ask) and confirms Then PERPS_UI_INTERACTION event is sent with input_method: "preset" When user taps a percentage button and confirms Then PERPS_UI_INTERACTION event is sent with input_method: "percentage_button" When user types via keypad and confirms Then PERPS_UI_INTERACTION event is sent with input_method: "keyboard" ``` ## **Screenshots/Recordings** ### **Before** <!-- Long: -1%, -2%, -5%, -10% | Short: +1%, +2%, +5%, +10% --> ### **After** <!-- Long: Mid, Bid, -1%, -2% | Short: Mid, Ask, +1%, +2% --> https://github.com/user-attachments/assets/43e9ebc6-5bf3-4296-83c7-b2a55bebf7d8 ## **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 Mid/Bid/Ask preset buttons with top-of-book data and input-method tracking to the perps limit price modal, while reducing percentage presets to 1% and 2%. > > - **Perps UI**: > - Add `Mid`, `Bid`, `Ask` preset buttons in `PerpsLimitPriceBottomSheet` using live mid and `usePerpsTopOfBook` bid/ask. > - Reduce percentage presets to `±1%` and `±2%`; format/validation logic unchanged. > - **Analytics**: > - Track limit-price input method via `usePerpsEventTracking` (`preset`, `percentage_button`, `keyboard`) on confirm (`PERPS_UI_INTERACTION`). > - **Config**: > - Update `LIMIT_PRICE_CONFIG` (`PRESET_PERCENTAGES: [1,2]`, `LONG_PRESETS: [-1,-2]`, `SHORT_PRESETS: [1,2]`). > - **i18n**: > - Add `perps.order.limit_price_modal.mid_price`; change labels to "Bid"/"Ask". > - **Tests**: > - Expand tests to mock `usePerpsTopOfBook` and assert Mid/Bid/Ask and percentage button behaviors. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9721347. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…ing (#23805) <!-- 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** With sourcemaps applied it will be easier to read the cpu traces! <!-- 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] > Documents converting `.cpuprofile` with sourcemaps and where to obtain them for clearer Chrome tracing. > > - **Docs** (`docs/readme/release-build-profiler.md`): > - Add instructions to convert `.cpuprofile` with sourcemaps using `--sourcemap-path` in `react-native-release-profiler`. > - Note where to obtain sourcemaps from Bitrise artifacts (`Android_Sourcemaps_prodRelease.zip`) and to unzip before use. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 582aa42. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description** Fixes incorrect decimal precision for entry price display in trade transaction history. The entry price was using `formatPositiveFiat()` which applies minimal view formatting (2 decimals max), causing small prices like `$0.028...` to display as `$0.03`. Now uses `formatPerpsFiat()` with `PRICE_RANGES_UNIVERSAL` config which follows the decimal rules from `docs/perps/perps-rules-decimals.md`: - Values < $0.01: 4 significant digits, max 6 decimals - Values $0.01-$10: 5 significant digits, min 2, max 6 decimals - Higher values: Appropriate precision based on magnitude ## **Changelog** CHANGELOG entry: Fixed entry price decimal precision in Perps trade history ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2202 ## **Manual testing steps** ```gherkin Feature: Entry price decimal display Scenario: User views trade transaction with small entry price Given user has completed a trade on a low-price token (e.g., MON at ~$0.028) When user navigates to Perps > Transactions > Trades tab And user taps on a trade transaction Then Entry price should display with proper decimal precision (e.g., "$0.02826" not "$0.03") ``` ## **Screenshots/Recordings** ### **Before** Entry price shows `$0.03` (rounded, losing precision) <img width="640" height="1385" alt="image" src="https://github.com/user-attachments/assets/c1207b64-5907-427c-87e5-97040945c8c4" /> ### **After** <img width="389" height="795" alt="image" src="https://github.com/user-attachments/assets/9acf2c42-5748-43f7-9c07-035c9d1404c5" /> Entry price shows proper precision following universal decimal rules ## **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] > Use `formatPerpsFiat` with `PRICE_RANGES_UNIVERSAL` to display entry/close price with correct precision in perps position transaction details. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9bf0cff. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description** This PR adjusts the date format on the Perps price chart x-axis from "6 Nov" style to "11/6" (MM/DD numeric format) as requested in TAT-2171. **Changes:** - Changed date format from "day month" (e.g., "6 Nov") to "MM/DD" (e.g., "11/6") for clearer and more compact display - Updated all date formatting cases in the `formatTimestamp` function: - DayOfMonth tick type (used for daily candles) - Hour/Minute tick types (used for intraday intervals) - Fallback logic for various time spans - The shorter numeric format naturally reduces label overlap on the x-axis - Crosshair tooltip retains the detailed "Nov 17 00:15" format for precision ## **Changelog** CHANGELOG entry: Fixed date format display on Perps price chart x-axis from "6 Nov" to "11/6" format ## **Related issues** Fixes: [TAT-2171](https://consensyssoftware.atlassian.net/browse/TAT-2171) ## **Manual testing steps** ```gherkin Feature: Perps chart date format Scenario: User views the price chart with 1-hour candle interval Given user is on a Perps market details page with price chart visible When user selects 1h candle interval Then x-axis labels show dates in "11/6" format (not "6 Nov") And labels for non-today dates show "11/17 00:15" format Scenario: User views the price chart with 1-day candle interval Given user is on a Perps market details page with price chart visible When user selects 1d candle interval Then x-axis labels show dates in "11/6" format And labels do not overlap Scenario: User taps on chart to view crosshair details Given user is on a Perps market details page with price chart visible When user taps and holds on a candle Then crosshair tooltip shows detailed format "Nov 17 00:15" ``` ## **Screenshots/Recordings** ### **Before** <!-- Date labels showed "6 Nov" format --> <img width="443" height="563" alt="image" src="https://github.com/user-attachments/assets/4acc4e4d-bc19-462b-846b-8e61cfcbb4a7" /> ### **After** <!-- Date labels now show "11/6" format --> <img width="455" height="579" alt="image" src="https://github.com/user-attachments/assets/d62be919-8bd6-4152-90be-b77743ea873f" /> ## **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] > Updates chart x-axis date formatting to MM/DD (and MM/DD HH:MM for intraday when not today) across tick types and fallback paths. > > - **Perps chart x-axis formatting** (`app/components/UI/Perps/components/TradingViewChart/TradingViewChartTemplate.tsx`) > - Updates `window.formatTimestamp` to use numeric `MM/DD` for `DayOfMonth` tick marks. > - For `Hour`/`Minute`, shows `MM/DD HH:MM` when not today; time-only when today. > - Aligns fallback formatting (visible-range branches and final fallback) to `MM/DD` and `MM/DD HH:MM` patterns. > - Crosshair labels remain detailed (short month, day, time) for precision. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2d04b09. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> [TAT-2171]: https://consensyssoftware.atlassian.net/browse/TAT-2171?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
## **Description** Adds "See all" button to the Recent Activity section in market details view even when there's no activity. Previously the button only appeared when trades existed, preventing users from navigating to the full activity view. ## **Changelog** CHANGELOG entry: Fixed "See all" button visibility in Perps Recent Activity section ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2222 ## **Manual testing steps** ```gherkin Feature: Recent Activity See All button Scenario: User views market details with no recent activity Given user navigates to a Perps market details page And the user has no recent trades for that market When user views the Recent Activity section Then "See all" button should be visible next to "Recent activity" header And tapping "See all" navigates to Activity > Trades tab ``` ## **Screenshots/Recordings** ### **Before** "See all" button hidden when no recent activity ### **After** "See all" button always visible, allowing navigation to full activity view ## **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] > Always render the "See all" button in the Perps market Recent activity header when not loading, and update tests to target it via testID. > > - **UI**: > - `app/components/UI/Perps/components/PerpsMarketTradesList/PerpsMarketTradesList.tsx` > - Show `see-all-button` whenever `!isLoading` (removed `trades.length > 0` condition). > - Add `testID="see-all-button"` to the header button. > - **Tests**: > - `app/components/UI/Perps/components/PerpsMarketTradesList/PerpsMarketTradesList.test.tsx` > - Update assertions to use `queryByTestId('see-all-button')`/`getByTestId('see-all-button')` instead of text queries. > - Change empty state expectation to render the See all button. > - Adjust navigation test to press the `see-all-button`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 6d1ec78. 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 multiple Appium capability settings and reduces
`bstackPageSource` sampling in the BrowserStack config.
>
> - **E2E / BrowserStack config
(`e2e/framework/services/providers/browserstack/BrowserStackConfigBuilder.ts`)**:
> - Add Appium capability settings:
`settings[actionAcknowledgmentTimeout]`,
`settings[ignoreUnimportantViews]`, `settings[waitForSelectorTimeout]`,
`waitForQuiescence`, `animationCoolOffTimeout`, `reduceMotion`,
`customSnapshotTimeout`, `waitForIdleTimeout`, `disableWindowAnimation`,
`skipDeviceInitialization`.
> - Adjust `appium:bstackPageSource`: `samplesX` 15→3, `samplesY` 15→3,
`maxDepth` 75→15.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
41eac81. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**
**Changes:**
- Remove the native SDK library (`nativesdk.aar`) and MessageService
from Android manifest
- Remove NativeSDKPackage registration from MainApplication
- Disable SDK initialization for Android platform
- Remove deeplink handler for Android SDK binding
- Delete all TypeScript code in `AndroidSDK/` directory
## **Changelog**
CHANGELOG entry: null
## **Related issues**
## **Manual testing steps**
```gherkin
Feature: Android SDK disabled
Scenario: App launches without Android SDK
Given the MetaMask app is installed on Android
When user opens the app
Then the app should launch without crash
And SDK Connect should work via deeplinks and QR codes
And no Android native SDK binding should occur
```
## **Screenshots/Recordings**
### **Before**
N/A
### **After**
N/A
## **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]
> Disables Android native SDK integration, removes related code and
deeplinks, and routes SDK Connect via deeplinks only.
>
> - **Android (native)**:
> - Remove `../libs/nativesdk.aar` dependency and `MessageService` from
`AndroidManifest.xml`.
> - Stop registering `NativeSDKPackage` in `MainApplication.kt`.
> - **SDKConnect**:
> - Android SDK support disabled: `bindAndroidSDK()` no-op,
`isAndroidSDKBound()` always false, `loadDappConnections()` returns
`{}`, `getAndroidConnections()` returns `undefined`,
`addDappConnection()` no-op.
> - Init no longer starts Android native service; `removeChannel` only
uses deeplinking service for dapp connections.
> - **Deeplinking**:
> - Remove handling/tests for `ACTIONS.ANDROID_SDK`; keep
`CONNECT`/`MMSDK` flows.
> - **Refactor/cleanup**:
> - Delete `app/core/SDKConnect/AndroidSDK/**` code and tests.
> - Move shared utilities/types: introduce `SDKConnect/dapp-sdk-types`,
relocate `getDefaultBridgeParams`, update imports across tests/services.
> - Update wait utilities to use new types and maintain Android binding
wait behavior via disabled path.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
86b884d. 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** * Reveal SRP flow ui and text updates * Jira tasks: https://consensyssoftware.atlassian.net/browse/SL-413 https://consensyssoftware.atlassian.net/browse/SL-412 https://consensyssoftware.atlassian.net/browse/SL-414 https://consensyssoftware.atlassian.net/browse/SL-415 https://consensyssoftware.atlassian.net/browse/SL-416 <!-- 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: reveal SRP flow ui and text updates. ## **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** https://github.com/user-attachments/assets/d1e89548-1169-40c8-b92c-25c49d0045b9 <!-- [screenshots/recordings] --> ### **After** https://github.com/user-attachments/assets/93696473-3fe4-4c62-93d8-f5b1872ffadc <!-- [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] > Updates SRP reveal flow UI and strings, centers `InfoModal` header with a separate close button, adjusts quiz image asset/sizing, and aligns tests/locales. > > - **UI**: > - **`InfoModal`**: Center-aligns header/title and introduces `closeButtonContainer` to position the close/action content absolutely at top-right; moves `InfoView` into this container. > - **Quiz**: Reduces intro image size in `Views/Quiz/QuizContent/styles.ts`; switches SRP quiz intro image to `images/reveal_srp.png`. > - **SRP Reveal Flow**: > - **`RevealPrivateCredential.tsx`**: Trims SRP explanation (removes non-custodial link segment); minor copy/link updates; retains warning structure; modal copy unchanged otherwise. > - **Localization**: > - **`locales/languages/en.json`**: Removes newline from SRP explanation sentence; normalizes casing for `reveal_credential.text` → "Text" and `qr_code` → "QR code". > - **Tests**: > - **`RevealPrivateCredential.test.tsx` + snapshots**: Update expectations to match shortened SRP copy and UI changes; minor comment tweak. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 93e7262. 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** Updates Tron snap version to 1.16.1 https://github.com/MetaMask/snap-tron-wallet/releases/tag/v1.16.1 ## **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** - [ ] 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] > Updates dependency @metamask/tron-wallet-snap from ^1.16.0 to ^1.16.1 and refreshes yarn.lock. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d071134. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description** Adds Learn More CTA to Perps onboarding flow. ## **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 Perps Learn More CTA to Perps onboarding flow ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2130 ## **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/fe0e2fa3-62e9-47fc-82db-c4909ac44f42 ## **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 a Learn more button to the Perps tutorial’s last screen (opens support in-app) and makes the browser back button return to Perps Home when opened from Perps; hides skip on the last screen and updates tests, types, and strings. > > - **Perps Tutorial**: > - Add secondary `Learn more` button on the last screen opening support URL in the in-app browser (`fromPerps`, `EXTERNAL_LINK_TYPE`). > - Hide `skip` on the last screen; keep primary `Let's go` CTA; adjust footer/button spacing; remove `ready_to_trade.footer_text` usage. > - Update tests to assert `Learn more` presence and `skip` hidden on the last screen. > - **Browser**: > - Plumb `fromPerps` through `Browser` → `BrowserTab`; when true, back button navigates to `Routes.PERPS.PERPS_HOME`. > - **Types/Selectors/Locales**: > - Add `fromPerps?: boolean` to `BrowserTabProps`. > - Add `PerpsTutorialSelectorsIDs.LEARN_MORE_BUTTON`. > - Add i18n string `perps.tutorial.learn_more`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit cd54ebf. 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**
In this PR, we are mocking the value from getFullVersion so the tests
won't fail if OTA version is modified.
## **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**
- [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]
> Mocks getFullVersion in tests and removes Expo Project ID/OTA URL from
AppInformation OTA details.
>
> - **Settings › AppInformation
(`app/components/Views/Settings/AppInformation/index.js`)**:
> - Remove OTA details for `Expo Project ID` and `OTA Update URL` from
environment info.
> - Drop imports of `PROJECT_ID` and `otaUpdateUrl`; retain other OTA
fields (`updateId`, `channel`, `runtimeVersion`, `checkAutomatically`,
status).
> - **Tests
(`app/components/Views/Settings/AppInformation/index.test.tsx`)**:
> - Mock `getFullVersion` to be a pass-through to avoid dependency on
`OTA_VERSION`.
> - Update assertions to reflect removal of `Expo Project ID` and `OTA
Update URL` fields; keep checks for remaining OTA info.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
cac32b6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description** Adds a new `HeaderWithTitleLeft` component to the component library (`components-temp`). This component combines `HeaderBase` with a `TitleLeft` section, providing a reusable header pattern for screens that need a back button with a left-aligned title section below. **Key features:** - Combines `HeaderBase` (with back button) on top and `TitleLeft` section below - Supports `onBack` callback or `backButtonProps` for back button customization - Supports `titleLeftProps` for TitleLeft configuration or custom `titleLeft` node for full flexibility - Extends all `HeaderBase` props (`endButtonIconProps`, `includesTopInset`, etc.) - No default testIDs stored in the component - testIDs are passed via props for testing flexibility - Includes comprehensive unit tests and Storybook stories ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/jira/software/c/projects/MDP/boards/2972?assignee=62afb43d33a882e2be47c36f&selectedIssue=MDP-642 ## **Manual testing steps** ```gherkin Feature: HeaderWithTitleLeft component Scenario: user views HeaderWithTitleLeft in Storybook Given the user has Storybook running When user navigates to Components Temp / HeaderWithTitleLeft Then user sees the component with back button and title section ``` ## **Screenshots/Recordings** ### **Before** N/A - New component ### **After** https://github.com/user-attachments/assets/5e38b9c7-b281-4da9-af3b-1f7c3f850165 ## **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 a new `HeaderWithTitleLeft` component (with stories and tests) that composes `HeaderBase` and `TitleLeft` with flexible back button and title configuration. > > - **Components**: > - New `components-temp/HeaderWithTitleLeft` component combining `HeaderBase` with a below `TitleLeft` section. > - API: supports `onBack`/`backButtonProps` (with priority), custom `startButtonIconProps`, forwards `endButtonIconProps`, accepts `titleLeft` node or `titleLeftProps`, plus `twClassName`, `testID`, `titleSectionTestID`. > - **Tests**: > - Added unit tests covering rendering, back button behavior/priority, prop forwarding, and testID passthrough in `HeaderWithTitleLeft.test.tsx`. > - **Storybook**: > - Added `HeaderWithTitleLeft.stories.tsx` and registered it in `.storybook/storybook.requires.js`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit cb362c8. 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? --> ### Reason for the change We need to add a new deeplink (`card-onboarding`) to allow marketing campaigns and external sources to direct users to the MetaMask Card onboarding flow. This deeplink intelligently routes users based on their card status. ### What's included **1. New `card-onboarding` deeplink handler** - Adds new deeplink action `CARD_ONBOARDING` supporting URLs like: - `https://link.metamask.io/card-onboarding` - `https://metamask.app.link/card-onboarding` - Smart routing based on user state: - **Authenticated or has card-linked account**: Switches to first cardholder account → navigates to CardHome → shows toast notification - **Not authenticated and no card-linked account**: Navigates to CardWelcome (onboarding screen) - Respects feature flags and geo-location restrictions before enabling - Dispatches `setAlwaysShowCardButton(true)` to ensure card button visibility - Full analytics tracking with `CARD_ONBOARDING_DEEPLINK` event **2. CardHome toast notification** - Adds route params support (`showDeeplinkToast`) to display a toast when user arrives via deeplink - Shows "You already have a MetaMask Card linked to this account" message **3. CardButton simplification** - Removes the "New" badge wrapper from the CardButton component - Simplifies the component by removing badge-related logic and state management ## **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 new card-onboarding deeplink to navigate users to the MetaMask Card feature ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: Card Onboarding Deeplink Scenario: Authenticated user with card-linked account opens deeplink Given user has the MetaMask app installed And user is authenticated with the Card feature And user has a card-linked account When user opens the card-onboarding deeplink Then app switches to the first cardholder account And user is navigated to the Card Home screen And a toast notification is displayed saying "You already have a MetaMask Card linked to this account" Scenario: Authenticated user without card-linked account opens deeplink Given user has the MetaMask app installed And user is authenticated with the Card feature And user has no card-linked account When user opens the card-onboarding deeplink Then user is navigated to the Card Home screen And a toast notification is displayed Scenario: Unauthenticated user without card opens deeplink Given user has the MetaMask app installed And user is not authenticated with the Card feature And user has no card-linked account When user opens the card-onboarding deeplink Then user is navigated to the Card Welcome screen And no toast notification is displayed Scenario: User in unsupported region opens deeplink Given user has the MetaMask app installed And user is in an unsupported region And card experimental switch is disabled When user opens the card-onboarding deeplink Then nothing happens (deeplink is ignored) Scenario: Card button is always shown after deeplink Given user has opened the card-onboarding deeplink When user navigates to the wallet home screen Then the card button is visible in the header ``` ## **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 a `card-onboarding` deeplink that conditionally enables Card, navigates to the right Card screen (and switches to a card-linked account), shows a toast on `CardHome`, and tracks analytics; updates gating logic, caching behavior, routes, and tests. > > - **Deeplink & Navigation**: > - Add `ACTIONS.CARD_ONBOARDING` and whitelist it in universal link handling. > - Implement `handleCardOnboarding` with feature-flag/geo checks, optional account switch to first cardholder, navigation to `CardHome`/`CardWelcome`, and analytics tracking. > - Extend `Routes.CARD` (e.g., `CARD_MAIN_ROUTES`). > - **CardHome**: > - Add route param support via `useRoute` and show toast (`showDeeplinkToast`) when navigated from deeplink. > - Minor test refactors for auth-error cases and rerender logic. > - **Gating & Hooks**: > - Enhance `useIsBaanxLoginEnabled` to consider `cardGeoLocation` and `cardSupportedCountries` (with pure helper). > - Update `useGetDelegationSettings` caching to include `fetchOnMount` (auth-aware). > - **Analytics & Metrics**: > - Add `MetaMetricsEvents.CARD_ONBOARDING_DEEPLINK` and `CardDeeplinkActions`. > - **Constants & i18n**: > - Update deeplink constants/prefixes; > - Add string `card.card_button_already_enabled_toast`. > - **Tests**: > - Comprehensive tests for deeplink handler, gating logic, and updated hooks/components. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit ef3a4bf. 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 : )