Skip to content

Conversation

kevinbluer
Copy link
Member

@kevinbluer kevinbluer commented Oct 17, 2025

Description

  • Adds logic to market details to handle a closed market
  • Not full parity with the designs / flow yet, but leaning towards more incremental PRs to mitigate merge conflicts, etc

Changelog

CHANGELOG entry: null

Related issues

Fixes: PRED-189

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

image image

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

Implements closed-market UI/logic (winner detection, badge/check icon, claim action, MAX timeframe) and updates outcomes/positions rendering while adjusting tests accordingly.

  • PredictMarketDetails
    • Add closed-market handling:
      • Detect winning token, set timeframe to MAX, and render market status via renderMarketStatus.
      • Show Claim button (usePredictClaim) when status is closed; hide Yes/No buy buttons.
      • Outcomes tab renders only the winning outcome when closed; otherwise renders all outcomes.
    • Wire claimable flag into usePredictPositions when closed.
    • Minor UI tweaks: header spacing, provider description section, and icon additions.
  • PredictMarketOutcome
    • Support isClosed and outcomeToken props:
      • Title prefers outcomeToken.title when closed; show "Winner" badge and check icon.
      • Hide action buttons when closed; show percentage otherwise.
  • PredictPositions
    • Stop sorting active positions in the component (delegate to controller); keep claimable list.
  • Tests
    • Update and expand tests for closed-market states, winner display, claim flow, button visibility, and balance gating.
    • Adjust navigation/safe-area mocks; use sequential hook returns and act for refresh flows.

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

@metamaskbot metamaskbot added the team-predict Predict team label Oct 17, 2025
cursor[bot]

This comment was marked as outdated.

@matallui matallui requested review from caieu and matallui October 17, 2025 21:38
@github-actions github-actions bot added size-L and removed size-M labels Oct 20, 2025
@matallui matallui enabled auto-merge October 20, 2025 16:40
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link

@matallui matallui added this pull request to the merge queue Oct 20, 2025
Merged via the queue into main with commit 35912ed Oct 20, 2025
204 of 209 checks passed
@matallui matallui deleted the feat/predict-details-market-resolved branch October 20, 2025 23:53
@github-actions github-actions bot locked and limited conversation to collaborators Oct 20, 2025
@metamaskbot metamaskbot added the release-7.59.0 Issue or pull request that will be included in release 7.59.0 label Oct 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.59.0 Issue or pull request that will be included in release 7.59.0 size-L team-predict Predict team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants