Skip to content

Conversation

matthewwalsh0
Copy link
Member

@matthewwalsh0 matthewwalsh0 commented Oct 17, 2025

Description

Add metrics to Predict confirmations, including MetaMask Pay and claim specific properties.

Changelog

CHANGELOG entry: null

Related issues

Fixes: #5798

Manual testing steps

Screenshots/Recordings

Before

After

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

Adds Predict claim confirmation metrics and Pay metrics for predict deposits, introduces won-position selectors and refactors claim UI to use them, updates event handling/type mappings, and adds tests/mocks.

  • Predict confirmations metrics:
    • Add usePredictClaimConfirmationMetrics and integrate into PredictClaimInfo to record predict_claim_value_usd, predict_pnl, and predict_market_title.
  • Selectors:
    • Add selectPredictWonPositions, selectPredictWinFiat, selectPredictWinPnl in UI/Predict/selectors/predictController.
  • UI refactor:
    • PredictClaimAmount and PredictClaimFooter now consume new selectors; pre-format values and simplify logic; minor prop rename for avatar list; tests updated.
  • MetaMask Pay metrics:
    • useTransactionPayMetrics: support predictDeposit use case and step/dust logic via hasTransactionType; tests added for predict deposit.
    • metamask-pay properties: treat perpsDeposit/predictDeposit as no-op sources and copy metrics from parent; use hasTransactionType; tests updated.
  • Utils & types:
    • hasTransactionType accepts undefined transaction meta.
    • Map new transaction types in controller utils: predictDeposit, predictClaim, predictWithdraw.
  • Mocks:
    • Extend confirmation mocks with PredictController claimable positions for tests.

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

@matthewwalsh0 matthewwalsh0 added no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed team-confirmations Push issues to confirmations team labels Oct 17, 2025
@matthewwalsh0 matthewwalsh0 marked this pull request as ready for review October 17, 2025 12:12
@matthewwalsh0 matthewwalsh0 requested a review from a team as a code owner October 17, 2025 12:12
cursor[bot]

This comment was marked as outdated.

@matthewwalsh0 matthewwalsh0 force-pushed the feat/predict-confirmation-metrics branch from 31ddad6 to 377eede Compare October 17, 2025 20:23
Copy link

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

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed size-L team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant