feat(predict): Add World Cup tab data hooks and content#30162
Conversation
|
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
SmokePredictions: Directly applicable - these changes add new World Cup prediction market functionality within the Predictions (Polymarket) feature. The new PredictWorldCup screen, hooks, queries, and services all extend the Predictions feature area. SmokeWalletPlatform: Per SmokePredictions tag description, "Predictions is also a section inside the Trending tab (SmokeWalletPlatform); changes to Predictions views (headers, lists, full views) affect Trending." The new PredictWorldCup view is a Predictions view accessible from the Trending tab. SmokeConfirmations: Per SmokePredictions tag description, "opening/closing positions are on-chain transactions - when selecting SmokePredictions, also select SmokeConfirmations." The World Cup screen leads to market position flows that involve transaction confirmations. All changes are self-contained new additions with no modifications to shared infrastructure (Engine, navigation, controllers). No existing E2E tests appear to cover the World Cup feature specifically, but the existing SmokePredictions tests validate the broader Predictions flow that this feature integrates with. Performance Test Selection: |
|
|
Skipping Sonar Cloud due to the nature of these changes, since most of this code is temporary for the world cup event. |


Description
Adds the World Cup Predict data layer and wires it into the dedicated World Cup screen so the tab row and tab content are driven by Polymarket data instead of placeholders.
This includes:
usePredictWorldCupMarketshook using React Query for tab content.Changelog
CHANGELOG entry: null
Related issues
Fixes: PRED-879
Manual testing steps
Screenshots/Recordings
N/A — data/query wiring and existing UI composition. Manually validated in simulator during development.
Before
N/A
After
Screen.Recording.2026-05-14.at.8.36.08.AM.mov
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Medium risk because it adds new React Query data-fetching/prefetching paths and changes the World Cup screen to render paginated market lists and conditional tabs based on API-driven availability.
Overview
World Cup Predict is now data-driven instead of placeholder-driven. The PR introduces a World Cup-specific data layer (query keys/options, services, and hooks) to fetch Polymarket markets for
All,Live,Props, and configured stage tabs, including pagination where appropriate and deterministic start-time sorting for stage/game markets.Tabs are now conditionally shown/hidden based on lightweight availability checks, and
resolvePredictWorldCupInitialTab/getPredictWorldCupAvailableTabKeystake this availability into account. The World Cup screen is rewired to useusePredictWorldCupAvailableTabs+usePredictWorldCupMarkets, rendering aFlashListofPredictMarketcards with skeleton/loading, pull-to-refresh, error state, and prefetching of visible tabs to reduce reloads on tab switches.Adds/updates unit tests covering query shapes, tab availability + initial-tab fallback, market hook caching/pagination behavior, stage edge cases (no event IDs), and World Cup game parsing in Polymarket utils.
Reviewed by Cursor Bugbot for commit 240a4a1. Bugbot is set up for automated code reviews on this repo. Configure here.