Skip to content

chore(runway): cherry-pick fix(predict): add extended sports market support for more leagues cp-7.79.0#30566

Merged
vpintorico merged 1 commit into
release/7.79.0from
runway-cherry-pick-7.79.0-1779422053
May 25, 2026
Merged

chore(runway): cherry-pick fix(predict): add extended sports market support for more leagues cp-7.79.0#30566
vpintorico merged 1 commit into
release/7.79.0from
runway-cherry-pick-7.79.0-1779422053

Conversation

@runway-github

@runway-github runway-github Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

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

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

Performance checks (if applicable)

  • I've tested on Android
  • N/A - no Android-specific or performance-sensitive native path
    changed.
  • I've tested with a power user scenario
  • N/A - Predict sports details rendering does not depend on imported
    wallet size.
  • 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
.

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.

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.

Reviewed by Cursor Bugbot for commit
c2a0122. Bugbot is set up for automated
code reviews on this repo. Configure
here.

[788641c](https://github.com/MetaMask/metamask-mobile/commit/788641c06785cd1f268a95963710bdb627f477fb)

…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 -->
@runway-github runway-github Bot requested a review from a team as a code owner May 22, 2026 03:54
@github-actions

Copy link
Copy Markdown
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.

@metamaskbotv2 metamaskbotv2 Bot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label May 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - PR targets a release or stable branch (release/* or stable)

All E2E tests pre-selected.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@vpintorico vpintorico left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vpintorico vpintorico merged commit ae26186 into release/7.79.0 May 25, 2026
395 of 401 checks passed
@vpintorico vpintorico deleted the runway-cherry-pick-7.79.0-1779422053 branch May 25, 2026 07:45
@github-actions github-actions Bot locked and limited conversation to collaborators May 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size-XL team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants