fix(activity): show pooled-staking as "Staked/Unstaked Ethereum"#32921
Conversation
Pooled-staking deposits were mapped to the generic `deposit` activity kind and rendered as the ambiguous "Deposited ETH". Add a dedicated `stake` kind so deposits read "Staked Ethereum", and relabel unstake to "Unstaked Ethereum" for symmetry. The shared `deposit` kind could not be relabeled directly: it also covers ramp fiat deposits and the API DEPOSIT category. Routing, icon and per-type detail template updated for the new kind, with unit tests.
|
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. |
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
…mcu-1000-activity-staked-ethereum-label
…constants Add 'stake' to ACTIVITY_TYPE_FILTER_KINDS[Transactions] so pooled-staking deposits (mapped to the 'stake' kind) are no longer filtered out of the default Activity view, with a regression test. Also address SonarCloud: refactor the buy/sell/claim/stake/unstake/deposit label logic from nested ternaries into a TOKEN_ACTION_LABELS lookup + an if/else for the display noun, and extract ACTIVITY_FALLBACK_TITLE_RESOLVERS + TOKEN_ACTION_LABELS into titleLabels.ts.
| @@ -0,0 +1,72 @@ | |||
| import { strings } from '../../../../locales/i18n'; | |||
There was a problem hiding this comment.
Pulling out resolvers from app/components/UI/ActivityListItemRow/useActivityListItemRowContent.ts
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag selection rationale:
No other tags are needed — this change is scoped to staking activity display and doesn't affect swaps, network management, accounts, browser, snaps, or other flows. Performance Test Selection: |
|



Description
Pooled-staking (ETH) deposits were mapped to the generic
depositactivity kind and rendered in the redesigned Activity list as the ambiguous "Deposited ETH", even though the opposite action was already correctly labeled "Unstaked ETH".This adds a dedicated
stakeactivity kind so pooled-staking deposits read "Staked Ethereum", and relabels unstake to "Unstaked Ethereum" for symmetry (both use the full asset name). The shareddepositkind could not simply be relabeled — it also backs ramp fiat deposits and the Accounts APIDEPOSITcategory, which must stay "Deposited".What changed:
stakekind in the activity-adapter types, withTransactionType.stakingDepositmapping to it.TemplateLoaderrouting, and theDepositDetailsprop type updated for the new kind.Scope note: this covers the local (typed) transaction path, which is the reported repro. A separate follow-up will address staking labels being lost when the Accounts API is the only source (e.g. after an uninstall/reinstall).
Changelog
CHANGELOG entry: Fixed ETH pooled-staking activity labels to read "Staked Ethereum" and "Unstaked Ethereum" instead of the ambiguous "Deposited ETH".
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-1000
Manual testing steps
Screenshots/Recordings
Before
"Deposited ETH" on pooled-staking deposit rows. Screenshot to be attached.
After
"Staked Ethereum" / "Unstaked Ethereum". Screenshot to be attached.
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an examplePre-merge reviewer checklist
Note
Low Risk
Display and classification changes for staking on the local transaction path only; generic
depositbehavior is preserved and tests were updated.Overview
Introduces a dedicated
stakeactivity kind so pooled ETH staking deposits are no longer classified as genericdeposit(which must stay "Deposited" for ramps and API deposits).TransactionType.stakingDepositnow maps tostakein the local transaction adapter. List rows use "Staked Ethereum" / "Unstaked Ethereum" (full asset name, not ETH), withstakeusing the outbound/send icon family. Activity details routestakethroughDepositDetailslikeunstake.Row title helpers move into
titleLabels.ts(TOKEN_ACTION_LABELS, fallback resolvers).stakeis included in the Transactions type filter and covered by updated adapter, row, details, and filter tests.Reviewed by Cursor Bugbot for commit c7801e5. Bugbot is set up for automated code reviews on this repo. Configure here.