[pull] main from MetaMask:main#514
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** Fix time left appears out of order in some languages https://consensyssoftware.atlassian.net/browse/RWDS-1006 <!-- 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: ## **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] > **Low Risk** > Small UI/i18n-only change affecting a single label; main risk is incorrect placeholder usage causing bad rendering in some locales. > > **Overview** > Fixes the **"time left" label ordering** in the rewards UI by switching `RewardItem` to render `rewards.unlocked_rewards.time_left` as a parameterized i18n string (passing `{ time: remainingTime }`) instead of concatenating `remainingTime` + label. > > Updates `time_left` translations across all supported locales to include a `{{time}}` placeholder (with language-appropriate placement), and adjusts the `RewardItem` test i18n mock to support params so the time-left assertions continue to pass. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9d097fe. 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** https://consensyssoftware.atlassian.net/browse/RWDS-1015 Use api responses to populate WaysToEarn and Activity rows <!-- 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: ## **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] > **Medium Risk** > Moderate risk because it refactors Rewards navigation/CTAs to be fully data-driven (deeplinks/routes/URLs) and removes a modal route, which could break user flows if API payloads or routing config are incorrect. > > **Overview** > Rewards UI is refactored to render **Ways to Earn** from `selectSeasonWaysToEarn` (API/Contentful-driven) instead of hardcoded entries, including dynamic bottom-sheet title/points/description, icons via `getIconName`, and CTA handling that prioritizes `deeplink` → `route` → `url`. > > The swap supported-networks block is now populated from DTO-provided `supportedNetworksTitle`/`supportedNetworks` (with blacklist filtering and optional boost badges), and referral-specific content is moved into a new `ReferralStatsSummary` component; `ReferralStatsSection` now accepts optional title strings from the referral DTO. > > The legacy `ReferralBottomSheetModal` screen/component/tests are removed from navigation, and activity/event tests are updated for the new `SeasonActivityTypeDto` shape (adds `id`, drops template `description` usage); `ActivityDetailsSheet` no longer renders payload-templated “Description” rows for unknown event types. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 72df015. 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? --> Increase test coverage by: - Adding tests for action handlers - Remove unnecessary mocks for styles - Add a test for the loading state ## **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/ASSETS-2645 ## **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** > Test-only changes; no production logic is modified, with risk limited to potential test flakiness due to additional mocking of navigation and async flows. > > **Overview** > Adds a `TokenDetails` test to assert the loading UI renders when `useTokenTransactions` reports `loading`, and refactors the hook mock so individual tests can override its return. > > Significantly expands `MoreTokenActionsMenu` tests to validate action handlers: pressing Buy/Receive triggers callbacks, View-on-explorer routes to in-app browser vs. webview depending on availability (and uses base URL for native assets), and Remove token navigates to confirmation then executes token hiding with notification + metrics, including an error-path log assertion. Also cleans up `TokenDetailsInlineHeader` tests by removing unnecessary style/safe-area mocks and tightening assertions to `not.toBeOnTheScreen()`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c6ee7c9. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
#25940) <!-- 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** > Workflow-only change that affects CI scheduling/throughput but does not touch product code or data/security logic. > > **Overview** > Updates the `run-performance-e2e.yml` workflow concurrency behavior to **stop canceling in-progress runs** (`cancel-in-progress: false`), so scheduled performance E2E executions queue instead of preempting long-running Bitrise builds. > > Adds inline documentation explaining the rationale for allowing overlapping scheduled triggers without cancellation. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 3a87c2d. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> This PR removes more logic and files related to the `SwapController`. ## **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** Related to https://consensyssoftware.atlassian.net/browse/SWAPS-3465 ## **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 - [ ] I've included tests if applicable - [ ] 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** > Primarily deletes unused code and removes `SwapsController.tokens` from transaction UI props/state; functional risk is limited to swap-related transaction decoding paths if they still implicitly expected `swapsTokens`. > > **Overview** > Removes additional SwapController-related plumbing from transaction UI components by dropping the `swapsTokens` prop/state mapping in `TransactionNotification`, `TransactionElement`, and `TransactionDetails`, and by no longer passing it into `decodeTransaction`. > > Cleans up Bridge UI internals by deleting `BridgeTokenSelectorBase` (which previously owned the token selector skeleton/loading UI) and extracting `SkeletonItem` into its own component, updating `BridgeTokenSelector` and its tests to import/mock the new module. Also deletes the `useTokens` hook and its extensive test suite from the Bridge hooks folder. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 6475457. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
#25837) <!-- 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** Implements a custom claim transaction request (bottom sheet confirmation) for `musdClaim` transactions, replacing the generic full-screen transaction request. **What changed:** - Added a new `MusdClaimInfo` component that renders a custom confirmation UI with "Claim bonus" title, network subtitle, hero row with token amount/fiat value, claiming address, network info, and gas fee details - Removed `musdClaim` from `FULL_SCREEN_CONFIRMATIONS` so it renders as a bottom sheet - The Title component now returns null for `musdClaim` since `MusdClaimInfo` renders its own title/subtitle - Extended `useTokenAmount` to compute the unclaimed amount (`total - claimed`) by fetching the already-claimed amount from the contract - Extended `useTokenAsset` to resolve the mUSD token address for `musdClaim` (since `txParams.to` is the Merkl distributor, not the token) - Refactored `decodeMerklClaimAmount` into `decodeMerklClaimParams` to extract all claim parameters (amount, user, token) with a convenience wrapper - Changed "Claim bonus" CTA in the token list to directly initiate the claim transaction instead of navigating to asset overview and scrolling - Added a Spinner (from design system) on the token list item while the claim transaction is being prepared - Hide "Claim bonus" CTA when there's a pending Merkl claim transaction in-flight - Removed the entire `scrollToMerklRewards` mechanism (hook, utils, event listeners, tests) as it's no longer needed - Added `secondaryBalanceElement` prop to `AssetElement` to support custom React nodes in the secondary balance area - Changed useMerklClaim error handling from throwing to returning undefined with error state, simplifying callers (removed try-catch in ClaimMerklRewards) **Why:** The generic transaction request didn't provide enough context for mUSD claim transactions. The custom UI gives users clear information about what they're claiming, on which network, and to which address. The direct claim flow from the token list is simpler than the previous navigate-then-scroll approach. ## **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 custom claim transaction request screen for mUSD bonus claims with improved UX flow ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/MUSD-305 ## **Manual testing steps** ```gherkin Feature: Custom mUSD claim transaction request Scenario: User claims mUSD bonus from token list Given user has claimable mUSD rewards visible in the token list And "Claim bonus" is displayed as secondary text on the mUSD token row When user taps "Claim bonus" Then a loading spinner replaces the "Claim bonus" text And a bottom sheet confirmation appears with: | Element | Expected Value | | Title | Claim bonus | | Subtitle | Bonus payout will be on Linea Mainnet Network. | | Hero amount | Unclaimed mUSD amount with fiat value | | Claiming to | User's formatted address | | Network | Linea Mainnet with network badge | | Network fee | Gas fee estimate | And the loading spinner disappears from the token list Scenario: User approves the claim transaction Given the claim confirmation bottom sheet is displayed When user taps "Confirm" Then the transaction is submitted to the network And "Claim bonus" is no longer shown on the token row while tx is pending Scenario: User rejects the claim transaction Given the claim confirmation bottom sheet is displayed When user taps "Reject" Then the bottom sheet closes And "Claim bonus" reappears on the token row Scenario: Pending claim transaction completes or fails Given user previously submitted a claim transaction And "Claim bonus" is hidden on the token row When the transaction is confirmed or dropped/failed Then "Claim bonus" reappears if there are still claimable rewards ``` ## **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/cd90961d-52c2-473a-a82e-68d9bd09b9f6 <!-- [screenshots/recordings] --> ### **After** Full flow for test token (with some values hardcoded) https://github.com/user-attachments/assets/2d2088a3-add6-4c88-b1e2-47a5b8485c33 Transaction init for Linea and mUSD https://github.com/user-attachments/assets/90474987-76d9-44fe-89b8-2f452780d62b <!-- [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** > Changes transaction confirmation rendering and mUSD claim submission flow, plus new async contract reads to compute claimable amounts; regressions could affect claim UX and transaction details but scope is limited to mUSD/Merkl paths. > > **Overview** > Adds a dedicated bottom-sheet confirmation experience for `musdClaim` transactions, including new `MusdClaimInfo` content and updated title/subtitle copy (with network name), and removes `musdClaim` from the full-screen confirmation list. > > Refactors mUSD Merkl claim handling: claim submission now always targets Linea, `useMerklClaim` returns `undefined` instead of throwing and resets `isClaiming` once the request is shown, and new decoding/utils compute the *actual* payout as `total - alreadyClaimed` via a contract read (`useMerklClaimAmount`), with `useTokenAsset` mapping `musdClaim` to the mUSD token. > > Updates the token list to show a "Claim bonus" CTA directly on eligible assets and initiate the claim on tap (showing a spinner via a new `AssetElement.secondaryBalanceElement` override and hiding the CTA when a claim is pending), and deletes the old navigate-and-scroll-to-MerklRewards mechanism (hooks, DeviceEventEmitter listener, and related tests). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit f05da70. 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 : )