Repository navigation
chore(predict): consume predictionSettled from @metamask/client-utils 3.1.1 - #39071
Conversation
… 3.1.1 Bump @metamask/client-utils from 3.0.2 to 3.1.1. 3.1.0 adds `predictionSettled` to `ActivityKind` with the same item shape as `predictionClaimWinnings`, which is what the local declaration from PRED-1405 reproduced. Delete the local-kind plumbing (LocalActivityKind, ShapeKindOf) and re-export `ActivityKind` from client-utils again. PredictSettlementExtras, KALSHI_VENUE_CHAIN_ID and the row and details rendering stay mobile-only. Lockfile: client-utils now shares the app's core-backend 14.0.0 (the private 11.0.0 copy is dropped), eth-chainlist moves 0.0.795 -> 0.0.873, and transaction-controller stays at 73.0.0 via the root resolution. Refs: PRED-1420
|
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. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Smart E2E Test SelectionSelected E2E tagsSmokePredictions AI Confidence: 82 E2E reasoningExpand to readChanges analyzed:
Impact assessment:
|
…ent-utils-bump * origin/main: (35 commits) fix(social): open profile and position sheet from token feed posts (#39017) feat(predict): open market rules from a dotted-underlined card title (PRED-1469) (#39007) feat(predict): add a Politics feed screen with Trump, Congress and Iran tabs (PRED-1454) (#39010) fix: Revert `TransactionController` version back to `72.3` (#39024) fix(predict-next): stop the Order background observation firing before the grace ends (#39074) revert: add New badge to Limit Order tab cp-8.20.0 (#39030) feat: allow metamask.com WebView origins (#39089) chore(streams): remove unused JSON stream transforms (#38953) chore(browser): remove unused browser constants and scripts (#38954) chore(settings): remove unused settings action creators (#38952) chore(delegation): remove unused hex helpers (#38955) fix(neobank): show one Money home card from the routing table cp-8.20.0 (#39006) perf(perps): mount the Lighter signer WebView only when needed (#38837) chore(perps): bump perps-controller to 22.1.2 cp-8.20.0 (#38834) perf(perps): cache filterAndSortMarkets per market snapshot (#38817) chore(carousel): remove unused predefined slides (#38956) chore(homepage): remove unused SectionCard component (#39049) fix: translate settings menu Lock label to match extension in French (#39079) feat(predict): new Game header with helmets, abbreviations and live status (PRED-1461) (#38917) feat(predict): show threshold ladders as a generic line picker card (PRED-1468) (#39002) ... # Conflicts: # yarn.lock
|



Description
C6 (PRED-1405, #38411) declared the
predictionSettledactivity kind locally in mobile so E5 was not blocked on a@metamask/client-utilsrelease. MetaMask/core#11169 shipped it upstream in@metamask/client-utils@3.1.0, so mobile now consumes the upstream kind and deletes its local copy. client-utils is again the only source of activity kinds.Bump.
@metamask/client-utils3.0.2→3.1.1. The manifest floor moves from^3.0.2to^3.1.1as well: the code now depends onpredictionSettledexisting upstream, so3.0.2no longer type-checks.3.1.1rather than3.1.0because it asks for@metamask/core-backend@^14, which the app already uses, so the lockfile ends up with one fewer copy.Lockfile effect, all transitive through client-utils:
@metamask/client-utils@metamask/core-backend@metamask/transaction-controller^73.1.1, but the rootresolutionspins 72.3.0 (#39024 reverted 73 because it breaks simulations). This PR does not bring 73 back.eth-chainlistCode.
LocalActivityKindShapes,LocalActivityKindandShapeKindOfare deleted fromapp/util/activity-adapters/types.ts, andActivityKindis re-exported straight from client-utils.ActivityItemForKindreturns to its pre-C6 condition. Upstream putspredictionSettledin the sameActivityDatagroup aspredictionClaimWinnings, which is the shape the local mapping borrowed, soActivityListItemis unchanged for every kind.PredictSettlementExtras,KALSHI_VENUE_CHAIN_IDand the row and details rendering stay mobile-only. The catalog contract doc is updated.What the client-utils CHANGELOG (3.0.3 → 3.1.1) changes for mobile. I diffed the published
distof 3.0.2 against 3.1.1. Only three runtime files changed, plus theActivityKindtype:mapApiTransaction'scontractInteractionfallback addsfees: getFees(transaction), the same helper API swap rows already use. Mobile renders this inContractInteractionDetails→ActivityDetailsFeesAndTotal, so the details screen of a contract interaction that exists only in the accounts API (no local TransactionController record) now shows a network fee where it showed none. This is user-visible but outside Predict. It is an upstream fix and no mobile test depended on the old value.getLocalTransactionFees(core#9630). This does not reach mobile. BothmapLocalTransactioncall sites runprepareLocalTransactionGroupfirst, which fillstransactionGroup.feesfrom mobile's owngetLocalActivityFees, and client-utils only falls back to its helper when that is absent. Mobile's helper has no L1 fee today. That gap predates this PR and is unchanged.eth-chainlistadds 189 chains and changes the native symbol or slip44 of 15 obscure chains (for example Rome, c8ntinuum, Data Network). None of them is a network mobile ships by default.No test was changed.
Changelog
CHANGELOG entry: null
Related issues
Refs: PRED-1420
Manual testing steps
N/A. The
predictionSettledchange is type-only and emits identical JavaScript, and Predict rows are built by mobile'smapActivityEntry, not by client-utils. Coverage comes from the unchanged C6 unit and component-view tests:yarn lint:tsc: passyarn jestover ActivityListItemRow, PredictNext activity, ActivityScreen, ActivityDetails, ActivityList, activity-adapters,selectors/activity, Transactions, MultichainTransactionsView,useFormattersandutil/bridge: 100 suites, 1244 tests pass (rerun after merging main)yarn jest -c jest.config.view.jsover ActivityDetails (includingActivityDetails.predict.view.test.tsx), ActivityScreen, ActivityList, PredictNext, SwapsLimitOrderActivityPage and confirmations activity: 22 suites, 568 tests pass (rerun after merging main)yarn lint:shard1–4 of 4: 0 errorsyarn install --immutable: passTo see the one visible change from the bump:
Screenshots/Recordings
N/A. No Predict rendering changes, and the contract-interaction fee row reuses the existing fees component.
Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an examplePerformance checks are not applicable: this is a type-only change plus a dependency bump, with no new rendering, polling or lists.
For performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Touches shared activity types and a client-utils bump with lockfile drift; minor user-visible change possible for API-only contract interaction details (fees row) per upstream.
Overview
Dependency and types
Bumps
@metamask/client-utilsto^3.1.1and refreshes yarn.lock (transitive updates such aseth-chainlist,contract-metadata, alignment with app’score-backend).Activity adapters
Removes the temporary mobile union for
predictionSettled(LocalActivityKindShapes,LocalActivityKind,ShapeKindOf).ActivityKindis re-exported from client-utils only;ActivityItemForKindnarrows on upstream kinds directly. Upstream now shipspredictionSettled; mobile-onlyPredictSettlementExtras/KALSHI_VENUE_CHAIN_IDstay intypes.ts.Docs
Updates the canonical portfolio activity catalog to state that
predictionSettledcomes from client-utils (3.1.0+) and the local stub was dropped after the bump.Note: client-utils 3.1.x also adds network fees on API-only contract-interaction rows; Predict rendering is unchanged per PR description.
Reviewed by Cursor Bugbot for commit 2bb918a. Bugbot is set up for automated code reviews on this repo. Configure here.