[pull] main from MetaMask:main#325
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** https://consensyssoftware.atlassian.net/browse/RWDS-753 Add Monad as supported network in Rewards Ways to Earn bottom sheet <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: Add Monad as supported network in Rewards Ways to Earn ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> <img width="1179" height="2556" alt="Simulator Screenshot - E2E Test - 2025-11-13 at 12 56 42" src="https://github.com/user-attachments/assets/ff166881-0922-4e09-8d99-0e3090cb1c71" /> ## **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] > Adds `MONAD` to supported swap networks and switches list item keys to `chainId` in Rewards Ways to Earn. > > - **Rewards UI – Supported Networks (`app/components/UI/Rewards/components/Tabs/OverviewTab/WaysToEarn/SwapSupportedNetworksSection.tsx`)** > - Add `NETWORKS_CHAIN_ID.MONAD` to `SWAP_SUPPORTED_CHAIN_IDS`. > - Use stable React keys by switching list item `key` from index to `network.chainId` when rendering `supportedNetworks`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit fc81a1e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…tain timeframes (#22674) <!-- 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** - Reverts commit adcd668 which was causing the chart to incorrectly hide when selecting certain timeframes <!-- 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: NA ## **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** - [ ] 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] > Eliminates timeframe-span filtering that hid the price chart, shows empty state instead, and conditionally hides the chart when multiple open outcomes are partially resolved; updates utils and tests accordingly. > > - **PredictDetailsChart (`PredictDetailsChart.tsx`)**: > - Remove timeframe-span filtering and `getTimeframeDurationMs` usage; always process `seriesToRender`. > - Stop returning `null`; render loading/empty states with `emptyLabel`. > - Keep up to `MAX_SERIES`; compute labels via `formatPriceHistoryLabel`. > - Tooltip/interaction logic retained; bounds/padding unchanged. > - **Utils (`utils.ts`)**: > - Delete `getTimeframeDurationMs`; keep label formatting and tick value formatting. > - **PredictMarketDetails (`PredictMarketDetails.tsx`)**: > - Conditionally render `PredictDetailsChart` only when `multipleOpenOutcomesPartiallyResolved` is false. > - **Tests**: > - Update chart tests to reflect always-render behavior with loading/empty states and removed timeframe filtering. > - Remove tests for timeframe coverage and `getTimeframeDurationMs`. > - Add/adjust assertions reading `chart-data`; simplify timestamps; update market details tests to expect chart hidden for partially resolved markets. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 83ae10e. 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 fixes various problems related to navigation:
1. Geo-block sheet looks different when triggered from feed vs market
details screens
2. Same for deposit confirmation screens
3. All screen navigations were fixed so they slide right-left
## **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] -->
https://github.com/user-attachments/assets/501c603d-d9fc-428e-bdbb-7ce8f3052adc
https://github.com/user-attachments/assets/259590bc-c6fb-476b-ab91-5b15e54b7dcb
### **After**
<!-- [screenshots/recordings] -->
https://github.com/user-attachments/assets/b3e91be0-c01c-4f95-8c6a-3f25d9575aaa
https://github.com/user-attachments/assets/6bba7618-133f-40a0-8b6d-d9d90569a17a
### More testing across all actions I could think of
https://github.com/user-attachments/assets/6b403fa4-65e8-4214-a212-e8af7e1f908d
https://github.com/user-attachments/assets/82389efe-b6ad-4cb0-ba1a-4aca370b6907
https://github.com/user-attachments/assets/bb6cb48c-dc61-4e03-a7b9-1bc40f3fab86
https://github.com/user-attachments/assets/55bdc310-1b13-4ee5-8037-13fb82a9f9c4
## **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]
> Normalizes confirmation navigation params across Predict flows and
adds confirmation routes with fade transitions for Predict modals.
>
> - **Navigation/Confirmations**:
> - Standardize `navigateToConfirmation` usage:
> - `usePredictDeposit` and `usePredictWithdraw`: pass only `loader`
(remove `stack`).
> - `usePredictClaim`: ensure `headerShown` and `stack:
Routes.PREDICT.ROOT` are set.
> - Add full-screen confirmation routes
(`Routes.FULL_SCREEN_CONFIRMATIONS.*`) to both Predict modal and screen
stacks.
> - Update tests to reflect new navigation params.
> - **UI/Transitions**:
> - Add fade (`cardStyleInterpolator` opacity) transitions to
`GTM_MODAL`, `UNAVAILABLE`, and `ADD_FUNDS_SHEET` modals.
> - Tweak `MARKET_LIST` screen options: `headerShown: false`,
`animationEnabled: false`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1ea74e8. 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** - Adds fee exemption message <!-- 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: [PRED-288](https://consensyssoftware.atlassian.net/browse/PRED-288) ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> <img width="420" alt="Simulator Screenshot - iPhone 16 Pro Max - 2025-11-13 at 17 07 10" src="https://github.com/user-attachments/assets/9e3f900c-4e4e-46d6-9405-c4054a5bb300" /> <img width="420" alt="Simulator Screenshot - iPhone 16 Pro Max - 2025-11-13 at 17 07 28" src="https://github.com/user-attachments/assets/478205c3-eabe-407a-8dd2-e6b96ad1fe33" /> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. [PRED-288]: https://consensyssoftware.atlassian.net/browse/PRED-288?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Displays a fee‑exemption message on markets tagged "Middle East", with i18n support and comprehensive tests. > > - **Predict UI**: > - Adds fee‑exemption banner in `PredictMarketDetails.tsx` when `market.tags` includes `"Middle East"` and adjusts container padding (`SafeAreaView` uses `pb-6` when active). > - **i18n**: > - Adds `predict.market_details.fee_exemption` to `locales/languages/en.json`. > - **Tests**: > - Extends `PredictMarketDetails.test.tsx` with cases covering presence/absence of banner across tag states (including undefined/empty), closed/open markets, multiple tags, and live market updates; sets default `tags: []` in `createMockMarket`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 7f0b957. 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**
- Refactors the details screen so that it only passed active outcomes to
the chart (or hides it)
<!--
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: NA
## **Manual testing steps**
```gherkin
Feature: my feature name
Scenario: user [verb for user action]
Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
```
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
https://github.com/user-attachments/assets/22900f2b-988e-496a-a554-59562d2caafc
<!-- [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]
> Restricts the market details chart to open outcomes (max 3), updates
price history inputs and render conditions, and adds/updates tests to
cover these cases.
>
> - **PredictMarketDetails** (`PredictMarketDetails.tsx`)
> - Prepare chart data from only open outcomes via `chartOpenOutcomes`
(capped at 3) and derive `chartOutcomeTokenIds`.
> - Use `chartOutcomeTokenIds` for `usePredictPriceHistory` and enable
only when non-empty.
> - Build `chartData` labels/colors from `chartOpenOutcomes` and render
chart only when `chartOpenOutcomes.length > 0` (instead of checking
partial resolution state).
> - Keep real-time price updates for open outcomes; no functional
changes elsewhere.
> - **Tests** (`PredictMarketDetails.test.tsx`)
> - Add/adjust cases to verify: no chart when no open outcomes; chart
when at least one open; closed outcomes filtered; limit to first 3 open
outcomes.
> - Update mocks/fixtures to include `status` fields; add
`usePredictMeasurement` mock; minor expectations aligned with new
outcomes tab and chart behavior.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
6974586. 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 : )