Skip to content

chore(runway): cherry-pick fix(predict): cp-7.63.0 game picks not showing for claimable positions#25229

Merged
joaoloureirop merged 1 commit intorelease/7.63.0from
runway-cherry-pick-7.63.0-1769461013
Jan 26, 2026
Merged

chore(runway): cherry-pick fix(predict): cp-7.63.0 game picks not showing for claimable positions#25229
joaoloureirop merged 1 commit intorelease/7.63.0from
runway-cherry-pick-7.63.0-1769461013

Conversation

@runway-github
Copy link
Contributor

@runway-github runway-github bot commented Jan 26, 2026

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

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.
Screenshot 2026-01-26 at 11 57 12 AM
Screenshot 2026-01-26 at 11 57 02 AM

Pre-merge author checklist

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.

Note

Ensures users see their picks after markets close by including claimable positions alongside live ones and adjusting actions accordingly.

  • PredictPicks: adds a second usePredictPositions call with claimable: true, renders when either livePositions or claimablePositions exist, and passes both to PredictPickItem; Cash out button is hidden for claimable positions
  • PredictSportCardFooter: also fetches claimablePositions, renders them via PredictPicksForCard, and shows claim CTA with aggregated claimableAmount
  • Tests: comprehensive unit tests added/updated for live vs claimable flows, hook parameters, optimistic states, navigation, and action guards

Written by Cursor Bugbot for commit afdbf84. This will update automatically on new commits. Configure here.

c560e11

…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 -->
@runway-github runway-github bot requested a review from a team as a code owner January 26, 2026 20:56
@github-actions
Copy link
Contributor

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.

@metamaskbot metamaskbot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Jan 26, 2026
@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - base branch is not main (base: release/7.63.0)

All E2E tests pre-selected.

View GitHub Actions results

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

showSeparator
testID={testID ? `${testID}-picks` : undefined}
/>
)}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Fix in Cursor Fix in Web

@sonarqubecloud
Copy link

@joaoloureirop joaoloureirop merged commit 6187643 into release/7.63.0 Jan 26, 2026
97 of 98 checks passed
@joaoloureirop joaoloureirop deleted the runway-cherry-pick-7.63.0-1769461013 branch January 26, 2026 22:14
@github-actions github-actions bot locked and limited conversation to collaborators Jan 26, 2026
@metamaskbot metamaskbot added the release-7.63.0 Issue or pull request that will be included in release 7.63.0 label Jan 30, 2026
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-7.63.0 on PR, as PR was cherry-picked in branch 7.63.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.63.0 Issue or pull request that will be included in release 7.63.0 size-L team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants