[pull] main from MetaMask:main#569
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** <!-- 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? --> Since OAuthRehydration can be the first screen that social login users encounter when using the app, this change ensures that we're triggering iOS biometric prompt on unlock. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: https://consensys.slack.com/archives/C0AEQQYHP1Q/p1771601582902089?thread_ts=1771500547.444629&cid=C0AEQQYHP1Q ## **Manual testing steps** - Create a wallet via social login on Extension - Perform a fresh install of this branch on a physical iOS device - Use the same social login, which will eventually navigate you to the OAuthRehydration screen - Upon unlock, iOS biometric allow prompt should appear - Upon success, you are navigated to the wallet - Upon unlock, you should be auto prompted biometrics ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> @himanshuchawla009 @grvgoel81 May I ask for your help on testing this flow? I'm not familiar with the configuration to have social login working locally. Happy to hop on a call! ## **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] > **Medium Risk** > Changes the unlock flow for OAuth rehydration to invoke an iOS biometric permission prompt and alters the `authPreference` payload shape passed to `unlockWallet`, which could affect login behavior on iOS if the auth type mapping is wrong. > > **Overview** > OAuth rehydration login now calls `requestBiometricsAccessControlForIOS(AUTHENTICATION_TYPE.DEVICE_AUTHENTICATION)` before unlocking, ensuring iOS users see the system biometrics allow prompt during first unlock. > > The screen no longer mutates the returned auth type object; it constructs an `AuthData` (`{ currentAuthType, oauth2Login }`) and passes that as `authPreference` to `unlockWallet` for both normal rehydration and “password outdated” flows. > > Authentication logic and tests are updated so `requestBiometricsAccessControlForIOS` also handles `DEVICE_AUTHENTICATION` (in addition to `BIOMETRIC`), the hook exports the method, and OAuthRehydration tests assert the prompt call. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c8216d8. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: metamaskbot <metamaskbot@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** ### Changes: - Replaced "boost" with "bonus" - Updated copy to reflect annualized bonus that can be claimed daily <!-- 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: replaced "boost" with "bonus" and updated copy to reflect annualized bonus that can be claimed daily ## **Related issues** Fixes: - [MUSD-352: Replace "Boost" with "Bonus" Globally](https://consensyssoftware.atlassian.net/browse/MUSD-352) - [MUSD-392: Annual bonus copy](https://consensyssoftware.atlassian.net/browse/MUSD-392) - [MUSD-393: Communicate the timeframe of the bonus](https://consensyssoftware.atlassian.net/browse/MUSD-393) ## **Manual testing steps** ## **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] > **Low Risk** > Low risk: changes are limited to user-facing localization/copy updates and removal of a terms-of-use link from `MusdQuickConvertView`, with corresponding test updates. > > **Overview** > Updates mUSD conversion UI copy across education, quick convert, balance card, and asset overview CTA to consistently use **“bonus”** terminology and clarify the bonus is *annualized* and *claimable daily*. > > Removes the “Terms apply” underlined link/handler from `MusdQuickConvertView` (and its styles/tests), and aligns i18n placeholders from `apy` → `percentage`, updating translations and tests accordingly. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 1b2df17. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Matthew Grainger <Matt561@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** This PR aims to add redesigned Cancel and Speed up transaction modal. **What changed** - Replaced the previous Speed up / Cancel flows (UpdateEIP1559Tx for EIP-1559 and TransactionActionModal for legacy) with a single **CancelSpeedupModal** used for both. - New modal shows: title (“Speed up Transaction” / “Cancel Transaction”), Network fee row (with native amount, optional fiat, token icon, symbol), Speed row, short description, and a single full-width **Confirm** button. No gas editing; fee is computed as max(10% above current, market). - Added **useCancelSpeedupGas** to compute params for the controller and display values (network fee, fiat when not testnet, speed label). Supports EIP-1559 and legacy; same rules as before (legacy with existing gas price can pass `undefined` so the controller applies the rate). - Activity (Unified and classic Transactions list) and the transaction details sheet now open this modal for both Speed up and Cancel. Confirm calls `speedUpTransaction(txId, params)` or `stopTransaction(txId, params)` with the computed params. <!-- 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: Added redesigned Speed up and Cancel transaction modal ## **Related issues** Fixes: MetaMask/mobile-planning#2407 ## **Manual testing steps** ```gherkin Feature: Cancel and Speed up transaction from Activity Background: Given I am logged into MetaMask Mobile And I have a network with low gas (e.g. testnet or low activity) And I have enough balance to send a transaction and pay a replacement fee Scenario: Speed up a pending transaction from Activity Given I sent a transaction with very low gas so it is pending And I am on the Activity / Transactions list And I see my pending transaction When I tap on the pending transaction And I tap "Speed up" Then I see the "Speed up Transaction" modal And I see the "Network fee" row with amount and token And I see the "Speed" row And I see the text "This network fee will replace the original." And I see a "Confirm" button When I tap "Confirm" Then the modal closes And a replacement transaction is submitted with higher gas And the original transaction is effectively sped up (same nonce, higher fee) Scenario: Cancel a pending transaction from Activity Given I sent a transaction with very low gas so it is pending And I am on the Activity / Transactions list And I see my pending transaction When I tap on the pending transaction And I tap "Cancel" Then I see the "Cancel Transaction" modal And I see the "Network fee" row with amount and token And I see the "Speed" row And I see the text "This transaction will be canceled and this network fee will replace the original." And I see a "Confirm" button When I tap "Confirm" Then the modal closes And a cancel (send-to-self) transaction is submitted with higher gas And the original transaction is effectively canceled ``` ## **Screenshots/Recordings** [speedup.webm](https://github.com/user-attachments/assets/51881da7-d02d-4f08-91d4-285ee0793aac) [cancel.webm](https://github.com/user-attachments/assets/32ec2552-c9c3-4ab0-8f55-f0ed84257fac) <img width="430" height="895" alt="image" src="https://github.com/user-attachments/assets/8506cdf9-5181-4a7c-976b-a9ba665520c0" /> <img width="413" height="288" alt="image" src="https://github.com/user-attachments/assets/c4cb67cc-ffac-4877-9c64-cc96272e189b" /> <!-- 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] > **Medium Risk** > Touches the speed-up/cancel flow and gas-parameter selection for replacement transactions (including legacy `gasPrice === 0x0` fallback and Ledger signing params), so regressions could prevent replacements from being submitted or change fees shown/sent. > > **Overview** > Replaces the prior split cancel/speed-up flows (`TransactionActionModal` + `UpdateEIP1559Tx`) with a single bottom-sheet `CancelSpeedupModal` that shows network fee + speed and submits replacement params via one Confirm action. > > Updates both classic `Transactions` and `UnifiedTransactionsView` to open the new modal for pending/approved non-bridge/non-smart txs, simplifies `onSpeedUpAction`/`onCancelAction` to pass only the tx, and standardizes how replacement params are derived (including a market-estimate fallback for legacy `gasPrice` of `0x0`). > > Adds `useCancelSpeedupGas` (bump-by-rate + fee display) and a shared `getMediumGasPriceHex` helper, extends `GasSpeed` to accept an optional `transactionId`, and wires speed-up/cancel buttons into the transaction details sheet; tests/snapshots are updated accordingly. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit ab3d791. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
… a position in the homepage sections UI (#26860) ## **Description** The homepage redesign (behind a feature flag) uses a Sections-based UI instead of the old tab-based layout. When a user clicks an open position in the Sections UI `PerpsSection`, the Perp UI Interaction segment event was never fired — unlike the tab UI which correctly tracks this via `PerpsCard`. This PR restores the missing event in the Sections UI. Note: ignore the branch name, it is wrong ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-500 ## **Manual testing steps** ```gherkin Feature: Perps position click tracking in homepage sections UI Scenario: user clicks an open position in the homepage sections UI Given the homepage redesign feature flag is enabled And the user has an open perps position visible on the wallet home screen When user taps the position row Then the "Perp UI Interaction" segment event fires with: | interaction_type | button_clicked | | button_clicked | open_position | | button_location | wallet_home | And the user is navigated to the market details screen ``` ## **Screenshots/Recordings** https://github.com/user-attachments/assets/9d15eb47-2afb-4202-bedb-0a0157b9dfda ### **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.
<!--
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]
> **Low Risk**
> Changes are limited to test fixtures and WDIO screen-object selectors,
mainly improving cross-platform test stability; no production logic is
affected.
>
> **Overview**
> Fixes performance-suite swap/bridge test stability by updating imports
and mobile selectors.
>
> `performance-fixture.ts` now imports `PerformanceTracker` without the
`.js` extension. `BridgeScreen` updates iOS network/token selection to
use XPath/name-based selectors, taps the source amount input before
entering digits, skips an unnecessary network tap for `Ethereum`, and
increases visibility timeouts for token selection.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0170114. 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 : )