chore(runway): cherry-pick fix(predict): cp-7.63.0 game picks not showing for claimable positions#25229
Conversation
…wing for claimable positions (#25220) ## **Description** Fixed an issue where positions/picks were not visible for game markets after the market was closed when users had claimable positions. **Root Cause:** The `PredictPicks` component was only checking for live positions when determining whether to render. When a market closed and positions became claimable (no longer "live"), the component would return `null` even though there were claimable positions to display. **Solution:** 1. Added a second `usePredictPositions` hook call with `claimable: true` to fetch claimable positions 2. Updated render condition to show component when either live OR claimable positions exist 3. Conditionally hide Cash Out button for claimable positions (since they can only be claimed, not cashed out) 4. Updated `PredictSportCardFooter` to also render claimable positions ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/PRED-551 ## **Manual testing steps** ```gherkin Feature: Game picks display for claimable positions Scenario: user views game picks after market closes with claimable positions Given user has an open position on a game market And the game market has ended and positions are now claimable When user navigates to the market details Then user sees their position(s) in the "Your picks" section And the Cash Out button is not displayed for claimable positions And the Claim button is available ``` ## **Screenshots/Recordings** ### **Before** Positions/picks section was hidden when market closed and positions became claimable. ### **After** Positions/picks section now displays for both live and claimable positions, with Cash Out button only shown for non-claimable positions. <img width="371" height="761" alt="Screenshot 2026-01-26 at 11 57 12 AM" src="https://github.com/user-attachments/assets/574590a4-1f62-491d-9577-a6f38f4b86d7" /> <img width="365" height="766" alt="Screenshot 2026-01-26 at 11 57 02 AM" src="https://github.com/user-attachments/assets/d0921cba-96d7-45bd-be34-13640ee021b8" /> ## **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] > Ensures claimable positions are displayed after markets close and adjusts actions accordingly. > > - PredictPicks now fetches `claimable` positions and renders when either live or claimable positions exist; iterates over both lists > - PredictPickItem conditionally hides `Cash out` button when `position.claimable` is true > - PredictSportCardFooter fetches and renders claimable positions and shows claim CTA with computed total claimable amount > - Extensive unit tests added/updated for new rendering logic, hooks usage, and guarded actions > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 13dce9d. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
|
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⏭️ Smart E2E selection skipped - base branch is not main (base: release/7.63.0) All E2E tests pre-selected. |
| showSeparator | ||
| testID={testID ? `${testID}-picks` : undefined} | ||
| /> | ||
| )} |
There was a problem hiding this comment.
Duplicate position rendering in PredictSportCardFooter
Medium Severity
When positions includes claimable positions (as shown in the test "calculates total claimable amount" where activePositions: allPositions contains both claimable and non-claimable items), the component renders claimable positions twice: once in the hasPositions block and again in the hasClaimablePositions block. The positions array isn't filtered to exclude claimable items before rendering, causing duplicate display of the same positions.
Additional Locations (1)
|
|
No release label on PR. Adding release label release-7.63.0 on PR, as PR was cherry-picked in branch 7.63.0. |



Description
Fixed an issue where positions/picks were not visible for game markets
after the market was closed when users had claimable positions.
Root Cause: The
PredictPickscomponent was only checking for livepositions when determining whether to render. When a market closed and
positions became claimable (no longer "live"), the component would
return
nulleven though there were claimable positions to display.Solution:
usePredictPositionshook call withclaimable: trueto fetch claimable positions
claimable positions exist
they can only be claimed, not cashed out)
PredictSportCardFooterto also render claimable positionsChangelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/PRED-551
Manual testing steps
Screenshots/Recordings
Before
Positions/picks section was hidden when market closed and positions
became claimable.
After
Positions/picks section now displays for both live and claimable


positions, with Cash Out button only shown for non-claimable positions.
Pre-merge author checklist
Docs and MetaMask Mobile
Coding
Standards.
if applicable
guidelines).
Not required for external contributors.
Pre-merge reviewer checklist
app, test code being changed).
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Note
Ensures users see their picks after markets close by including claimable positions alongside live ones and adjusting actions accordingly.
usePredictPositionscall withclaimable: true, renders when eitherlivePositionsorclaimablePositionsexist, and passes both toPredictPickItem;Cash outbutton is hidden forclaimablepositionsclaimablePositions, renders them viaPredictPicksForCard, and shows claim CTA with aggregatedclaimableAmountWritten by Cursor Bugbot for commit afdbf84. This will update automatically on new commits. Configure here.
c560e11