Commit 6902301
authored
chore(predict): enable world cup games for live sports (#29740)
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until this PR meets the canonical
Definition of Ready For Review in `docs/readme/ready-for-review.md`.
In short: the template must be materially complete (not just section
titles
present), all status checks must be currently passing, and the only
expected
follow-up commits must be reviewer-driven.
-->
## **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**
```gherkin
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**
- [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)
- [ ] 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](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example
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.
<!-- Generated with the help of the pr-description AI skill -->
<!-- CURSOR_SUMMARY -->
---
> [!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.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
4db00e5. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent fe91d51 commit 6902301
3 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| 102 | + | |
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
| 187 | + | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
210 | 215 | | |
211 | 216 | | |
212 | 217 | | |
| |||
0 commit comments