feat: predict confirmation metrics #21348
Open
+373
−237
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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.
usePredictClaimConfirmationMetrics
and integrate intoPredictClaimInfo
to recordpredict_claim_value_usd
,predict_pnl
, andpredict_market_title
.selectPredictWonPositions
,selectPredictWinFiat
,selectPredictWinPnl
inUI/Predict/selectors/predictController
.PredictClaimAmount
andPredictClaimFooter
now consume new selectors; pre-format values and simplify logic; minor prop rename for avatar list; tests updated.useTransactionPayMetrics
: supportpredictDeposit
use case and step/dust logic viahasTransactionType
; tests added for predict deposit.metamask-pay
properties: treatperpsDeposit
/predictDeposit
as no-op sources and copy metrics from parent; usehasTransactionType
; tests updated.hasTransactionType
acceptsundefined
transaction meta.predictDeposit
,predictClaim
,predictWithdraw
.PredictController
claimable positions for tests.Written by Cursor Bugbot for commit c2d24f8. This will update automatically on new commits. Configure here.