Commit 6932d5a
chore(runway): cherry-pick fix(predict): cp-7.62.0 NFL bug fixes for game periods, search highlights, and gameId parsing (#24893)
- fix(predict): cp-7.62.0 NFL bug fixes for game periods, search
highlights, and gameId parsing (#24859)
## **Description**
This PR addresses multiple bugs in the Predict feature related to NFL
game handling:
1. **End Q4 period support**: Added "End Q4" as a valid game period,
which was missing and causing display issues when games reached the end
of the 4th quarter before overtime or final
2. **No highlights when searching**: Fixed an issue where highlighted
markets were still being fetched when a search query was active, which
was unnecessary and could cause UI inconsistencies
3. **gameId type consistency**: Ensured `gameId` is converted to string
when parsing API data to prevent type mismatches in downstream
components
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Fixes: N/A
## **Manual testing steps**
```gherkin
Feature: Predict NFL game period display
Scenario: End Q4 period displays correctly
Given user is viewing an NFL game that has reached end of Q4
When the game period updates to "End Q4"
Then the scoreboard should display the end of quarter state correctly
Feature: Predict search without highlights
Scenario: Search results don't show highlights
Given user is on the Predict markets page
When user enters a search query
Then highlighted markets should not be fetched or displayed
Feature: Predict game ID parsing
Scenario: Game IDs are consistently strings
Given API returns game data with numeric gameId
When the data is parsed
Then the gameId should be converted to a string type
```
## **Screenshots/Recordings**
### **Before**
N/A - Bug fixes only
### **After**
N/A - Bug fixes only
## **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.
## **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]
> - **End Q4 period support**: Adds `"End Q4"` to `PredictGamePeriod`
and treats it as end-of-quarter in `PredictSportScoreboard`, affecting
in-progress/status display.
> - **Search highlights fix**: Updates `PredictController.getMarkets` to
not fetch highlighted markets when `params.q` (search query) is present.
> - **gameId parsing consistency**: Converts `event.gameId` to string in
`gameParser.buildGameData` for consistent IDs.
> - *Minor*: Small unsubscribe cleanup in Polymarket `WebSocketManager`
(variable name to avoid shadowing).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8b0f01d. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
[ef97628](ef97628)
Co-authored-by: Luis Taniça <matallui@gmail.com>1 parent eb63549 commit 6932d5a
5 files changed
Lines changed: 12 additions & 7 deletions
File tree
- app/components/UI/Predict
- components/PredictSportScoreboard
- controllers
- providers/polymarket
- types
- utils
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
504 | | - | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
505 | 508 | | |
506 | 509 | | |
507 | 510 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
0 commit comments