feat(predict): cp-7.62.0 add PredictPicks components for position display#24579
feat(predict): cp-7.62.0 add PredictPicks components for position display#24579
Conversation
|
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 detailsThe PR introduces new components and hooks specifically for the Predictions feature:
All changes are contained within the The changes don't affect any core wallet functionality, controllers, or other features. They are isolated to the Predictions feature, making |
|



Description
Adds new
PredictPickscomponents to display user positions in prediction markets.What changed:
PredictPicks- Main component showing user picks with position details (size, outcome, P&L) and "Cash Out" button on market details viewPredictPicksForCard- Compact version for displaying picks within market cards with P&L and amount displayWhy:
Users need visibility into their active positions on market detail views to track their picks and take action (cash out).
Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/PRED-479
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Adds UI to surface a user's active positions with live P&L and cash-out flow, plus underlying live-price integration.
PredictPicks(market details) andPredictPicksForCard(compact) components showinitialValue, outcome, livecashPnl, and amount (card), with a "Cash out" button navigating toRoutes.PREDICT.MODALS.SELL_PREVIEWviausePredictActionGuarduseLivePositionshook computes livecurrentValue,cashPnl, andpercentPnlfrombestBidupdates (viauseLiveMarketPrices), returns connection status andlastUpdateTime; exported inhooks/indexautoRefreshTimeout: 10000; outcomes resolved byposition.outcomeId; currency formatting viaformatPricepredict.market_details.your_picks,predict.position_pick_info, andpredict.position_pick_info_to_winWritten by Cursor Bugbot for commit 170f091. This will update automatically on new commits. Configure here.