chore(runway): cherry-pick fix(predict): add extended sports market support for more leagues cp-7.79.0#30566
Merged
Conversation
…upport for more leagues cp-7.79.0 (#30559) ## **Description** Adds Predict live sports and extended-market support for additional basketball, baseball, hockey, soccer, and tennis leagues. This expands league parsing and supported flag filtering so newly enabled Polymarket game events can render as game detail experiences instead of generic markets. This also fixes several extended sports details issues found while validating the new leagues: - Parses WNBA, MLB, NHL, ATP, WTA, and ITF game slugs and tennis provider metadata. - Uses tennis `series` and team metadata when ATP/WTA/ITF events only include generic tennis tags. - Keeps extended game charts on the primary moneyline outcome so World Cup and other draw-capable markets load correctly. - Opens extended market cards through the bottom-sheet buy flow instead of the legacy full-screen buy preview. - Adds loading-only chart height reservation to avoid the game details footer jumping while the chart loads. - Adds tennis market labels and separates tennis cards into `Game Lines` and `1st Set` groups. - Aligns footer and card outcome labels, order, and team colors for tennis moneyline and first-set winner markets. ## **Changelog** CHANGELOG entry: Added support for additional Predict sports leagues and extended sports market details. ## **Related issues** Fixes: PRED-925 https://consensyssoftware.atlassian.net/browse/PRED-925 ## **Manual testing steps** ```gherkin Feature: Predict extended sports markets for newly supported leagues Scenario: user opens supported game detail markets Given Predict live sports is enabled for WNBA, MLB, NHL, ATP, WTA, and ITF And Predict extended sports markets is enabled for NBA, WNBA, MLB, NHL, World Cup, UCL, EPL, La Liga, Serie A, Bundesliga, MLS, FIFA Friendlies, ATP, WTA, and ITF When the user opens a supported game market Then the market renders as a game details view And the chart loads from the primary moneyline market And the footer prices match the primary moneyline outcomes Scenario: user opens an ATP, WTA, or ITF tennis game Given the event has generic Tennis and Games tags And the event has ATP, WTA, or ITF league metadata in series or teams When the user opens the game details view Then the event is parsed into the correct tennis league And the tabs show Game Lines and 1st Set And tennis market cards show translated labels And the 1st Set Winner buttons use the same team colors as the footer Scenario: user selects an extended sports market card Given the extended sports market cards are visible When the user taps a card outcome Then the bottom-sheet buy flow opens for that outcome And the app does not navigate to the legacy full-screen buy preview ``` ## **Automated testing** - `node .yarn/releases/yarn-4.14.1.cjs jest app/components/UI/Predict/utils/gameParser.test.ts app/components/UI/Predict/constants/sports.test.ts app/components/UI/Predict/providers/polymarket/utils.test.ts app/components/UI/Predict/components/PredictActionButtons/PredictActionButtons.test.tsx app/components/UI/Predict/components/PredictGameChart/PredictGameChart.test.tsx app/components/UI/Predict/components/PredictGameChart/PredictGameChart.wrapper.test.tsx app/components/UI/Predict/components/PredictGameDetailsContent/PredictGameDetailsTabsContent.test.tsx app/components/UI/Predict/components/PredictGameDetailsContent/PredictGameOutcomesTab.test.tsx app/components/UI/Predict/components/PredictMarketSportCard/PredictMarketSportCard.test.tsx` - 9 test suites passed - 288 tests passed - `node .yarn/releases/yarn-4.14.1.cjs lint:tsc` ## **Screenshots/Recordings** ### **Before** N/A - no recordings attached in this local PR draft. ### **After** N/A - no recordings attached in this local PR draft. ## **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. #### Performance checks (if applicable) - [x] I've tested on Android - N/A - no Android-specific or performance-sensitive native path changed. - [x] I've tested with a power user scenario - N/A - Predict sports details rendering does not depend on imported wallet size. - [x] I've instrumented key operations with Sentry traces for production performance metrics - N/A - no new production performance operation was added. For performance guidelines and tooling, see the [Performance Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers). ## **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** > Medium risk because it changes how sports leagues are detected/whitelisted and how UI components select outcome tokens (primary moneyline vs extended markets), which can affect navigation, pricing subscriptions, and displayed teams across multiple sport experiences. > > **Overview** > Extends Predict live/extended sports support to additional leagues (WNBA/MLB/NHL and tennis `atp`/`wta`/`itf`), including updated league whitelisting/types and more robust league detection from event `series`/team metadata when tags are missing. > > Standardizes **"primary" moneyline selection** via `getPrimaryMoneylineOutcomes`, and updates the footer buttons, market sport cards, and game charts to ignore non-moneyline extended outcomes (especially for draw-capable leagues) and to map tennis/home-away tokens to the correct team labels/colors. > > Improves game details UX by routing outcomes-tab buys through the shared `onBetPress` bottom-sheet flow (instead of navigation) and reserving chart height only while loading to avoid layout jump; adds tennis group ordering/labels (e.g., `first_set`) and corresponding i18n strings. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit c2a0122. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Contributor
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - PR targets a release or stable branch (release/* or stable) All E2E tests pre-selected. |
|
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.



Description
Adds Predict live sports and extended-market support for additional
basketball, baseball, hockey, soccer, and tennis leagues. This expands
league parsing and supported flag filtering so newly enabled Polymarket
game events can render as game detail experiences instead of generic
markets.
This also fixes several extended sports details issues found while
validating the new leagues:
provider metadata.
seriesand team metadata when ATP/WTA/ITF events onlyinclude generic tennis tags.
Cup and other draw-capable markets load correctly.
of the legacy full-screen buy preview.
footer jumping while the chart loads.
Game Linesand
1st Setgroups.tennis moneyline and first-set winner markets.
Changelog
CHANGELOG entry: Added support for additional Predict sports leagues and
extended sports market details.
Related issues
Fixes: PRED-925 https://consensyssoftware.atlassian.net/browse/PRED-925
Manual testing steps
Automated testing
node .yarn/releases/yarn-4.14.1.cjs jest app/components/UI/Predict/utils/gameParser.test.ts app/components/UI/Predict/constants/sports.test.ts app/components/UI/Predict/providers/polymarket/utils.test.ts app/components/UI/Predict/components/PredictActionButtons/PredictActionButtons.test.tsx app/components/UI/Predict/components/PredictGameChart/PredictGameChart.test.tsx app/components/UI/Predict/components/PredictGameChart/PredictGameChart.wrapper.test.tsx app/components/UI/Predict/components/PredictGameDetailsContent/PredictGameDetailsTabsContent.test.tsx app/components/UI/Predict/components/PredictGameDetailsContent/PredictGameOutcomesTab.test.tsx app/components/UI/Predict/components/PredictMarketSportCard/PredictMarketSportCard.test.tsxnode .yarn/releases/yarn-4.14.1.cjs lint:tscScreenshots/Recordings
Before
N/A - no recordings attached in this local PR draft.
After
N/A - no recordings attached in this local PR draft.
Pre-merge author checklist
Docs and MetaMask Mobile
Coding
Standards.
if applicable
guidelines).
Not required for external contributors.
Performance checks (if applicable)
changed.
wallet size.
performance metrics
For performance guidelines and tooling, see the Performance
Guide.
Pre-merge reviewer checklist
app, test code being changed).
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Note
Medium Risk
Medium risk because it changes how sports leagues are
detected/whitelisted and how UI components select outcome tokens
(primary moneyline vs extended markets), which can affect navigation,
pricing subscriptions, and displayed teams across multiple sport
experiences.
Overview
Extends Predict live/extended sports support to additional leagues
(WNBA/MLB/NHL and tennis
atp/wta/itf), including updated leaguewhitelisting/types and more robust league detection from event
series/team metadata when tags are missing.Standardizes "primary" moneyline selection via
getPrimaryMoneylineOutcomes, and updates the footer buttons, marketsport cards, and game charts to ignore non-moneyline extended outcomes
(especially for draw-capable leagues) and to map tennis/home-away tokens
to the correct team labels/colors.
Improves game details UX by routing outcomes-tab buys through the
shared
onBetPressbottom-sheet flow (instead of navigation) andreserving chart height only while loading to avoid layout jump; adds
tennis group ordering/labels (e.g.,
first_set) and corresponding i18nstrings.
Reviewed by Cursor Bugbot for commit
c2a0122. Bugbot is set up for automated
code reviews on this repo. Configure
here.