fix: football prediction markets not loading cp-7.78.0#30466
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a882672. Configure here.
|
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:
These changes improve robustness of the Polymarket data parsing layer. SmokePredictions is the primary tag as it directly tests Polymarket prediction market flows (open positions, cash out, claim winnings, geo-restriction). Per the SmokePredictions tag description, SmokeWalletPlatform is required because Predictions is a section inside the Trending tab, and SmokeConfirmations is required because opening/closing positions are on-chain transactions. Performance Test Selection: |
|




Description
Root cause: The Polymarket API returns
nullfor theorderPriceMinTickSizefield on some sports markets. Our code was calling.toString()on that value without a null check, which threw a runtime error. Since the entire batch of events was parsed in a single.map(), one bad event crashed the whole thing and returned an empty list.Fix:
market.orderPriceMinTickSize.toString()tomarket.orderPriceMinTickSize?.toString() ?? '0.01'to safely handle the null.number | nullto correctly reflect what the API actually returns..map()to.flatMap()with a per-eventtry/catch, so a single malformed event is skipped and logged instead of taking down the whole batch.Changelog
CHANGELOG entry: football prediction markets not loading
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-3259
Manual testing steps
Screenshots/Recordings
Before
Screen.Recording.2026-05-20.at.18.52.11.mov
After
Screen.Recording.2026-05-20.at.18.53.10.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
Changes market parsing defaults and error handling for Polymarket events; while localized, it can affect tick-size-dependent pricing behavior and which events appear if parsing failures occur.
Overview
Fixes Polymarket sports markets failing to load when the API returns a
nullorderPriceMinTickSize.Updates the Polymarket market type to allow
orderPriceMinTickSize: number | null, safely derivestickSizewith a fallback default, and makesparsePolymarketEventsresilient by parsing each event in atry/catch(logging and skipping only the bad event instead of failing the whole batch).Reviewed by Cursor Bugbot for commit 1f8de4a. Bugbot is set up for automated code reviews on this repo. Configure here.