Skip to content

chore(predict): enable world cup games for live sports#29740

Merged
caieu merged 3 commits into
mainfrom
predict/add-wold-cup
May 6, 2026
Merged

chore(predict): enable world cup games for live sports#29740
caieu merged 3 commits into
mainfrom
predict/add-wold-cup

Conversation

@caieu

@caieu caieu commented May 5, 2026

Copy link
Copy Markdown
Contributor

Description

Adds FIFA World Cup (fifwc) as a supported sports league in the Predict feature, enabling users to browse and bet on World Cup match markets with live game data.

Changes:

  • Added fifwc to the PredictSportsLeague union type
  • Registered fifwc in SUPPORTED_SPORTS_LEAGUES so World Cup markets appear in the sports feed
  • Added fifwc to DRAW_CAPABLE_LEAGUES since soccer matches can end in draws
  • Added slug config in gameParser.ts with:
    • Pattern: fifwc-{team1}-{team2}-{date}
    • Team order: home-away
    • Tag slug: fifa-world-cup

This follows the existing pattern for adding new leagues as documented in sports.ts.

Changelog

CHANGELOG entry: Added FIFA World Cup support to live sports predictions

Related issues

Fixes: N/A — feature enablement for FIFA World Cup 2026

Manual testing steps

Feature: FIFA World Cup prediction markets

  Scenario: user views World Cup markets in the sports feed
    Given the user has the Predict feature enabled
    And FIFA World Cup markets are available from the provider

    When user navigates to the Predict tab
    And user browses sports markets
    Then World Cup match markets appear in the list
    And each market displays home and away teams with logos and scores

  Scenario: user places a prediction on a World Cup match
    Given the user is viewing a FIFA World Cup match market
    And the market status is "open"

    When user selects an outcome (home win, draw, or away win)
    And user enters a bet amount
    And user confirms the prediction
    Then the order is placed successfully
    And the position appears in the user's positions list

Screenshots/Recordings

Before

N/A

After

N/A

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

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

Low Risk
Low risk: this only extends existing league allowlists and slug parsing to recognize a new fifwc league, with minimal impact on existing leagues unless upstream data unexpectedly matches the new pattern/tag.

Overview
Enables FIFA World Cup games in the Predict live sports flow by adding the fifwc league across the sports league type, the supported/draw-capable league allowlists, and the game slug parsing configuration.

This allows events tagged as fifa-world-cup with slugs matching fifwc-{team1}-{team2}-{date} to be recognized and parsed like other soccer leagues.

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

@github-actions

github-actions Bot commented May 5, 2026

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.

@github-actions github-actions Bot added pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. size-XS labels May 5, 2026
@caieu caieu marked this pull request as ready for review May 5, 2026 15:27
@caieu caieu requested a review from a team as a code owner May 5, 2026 15:27
@caieu caieu enabled auto-merge May 6, 2026 17:53
@caieu caieu added the team-predict Predict team label May 6, 2026
@caieu caieu disabled auto-merge May 6, 2026 18:25
@caieu caieu enabled auto-merge May 6, 2026 18:25
@caieu caieu removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 6, 2026
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePredictions, SmokeWalletPlatform, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 92%
click to see 🤖 AI reasoning details

E2E Test Selection:
The PR adds support for a new FIFA World Cup sports league ('fifwc') to the Predict (Polymarket) feature. Changes are purely additive and isolated to three files:

  1. types/index.ts: Adds 'fifwc' to the PredictSportsLeague union type
  2. constants/sports.ts: Adds 'fifwc' to SUPPORTED_SPORTS_LEAGUES and DRAW_CAPABLE_LEAGUES
  3. utils/gameParser.ts: Adds the fifwc league slug config with regex pattern and tag slug

These changes are low-risk, purely additive, and don't touch any shared infrastructure (Engine, controllers, navigation, modals, or other feature areas).

Tags selected:

  • SmokePredictions: Directly affected — the Predict feature now supports a new sports league. Tests should validate the new league is properly supported, filtered, and parsed.
  • SmokeWalletPlatform: Required per SmokePredictions tag description — Predictions is a section inside the Trending tab, so changes to Predictions views affect Trending.
  • SmokeConfirmations: Required per SmokePredictions tag description — opening/closing positions are on-chain transactions, so SmokeConfirmations must be included when selecting SmokePredictions.

No other tags are warranted as the changes are isolated to the Predict feature's data layer.

Performance Test Selection:
No performance impact expected. The changes are purely additive data/type definitions (new league constant, type union member, and slug config entry). No rendering, list loading, animation, or state management changes were made.

View GitHub Actions results

@sonarqubecloud

sonarqubecloud Bot commented May 6, 2026

Copy link
Copy Markdown

@caieu caieu added this pull request to the merge queue May 6, 2026
Merged via the queue into main with commit 6902301 May 6, 2026
184 of 187 checks passed
@caieu caieu deleted the predict/add-wold-cup branch May 6, 2026 19:28
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.77.0 Issue or pull request that will be included in release 7.77.0 label May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.77.0 Issue or pull request that will be included in release 7.77.0 size-XS team-predict Predict team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants