Skip to content

fix(activity): show pooled-staking as "Staked/Unstaked Ethereum"#32921

Merged
vinnyhoward merged 3 commits into
mainfrom
fix-tmcu-1000-activity-staked-ethereum-label
Jul 8, 2026
Merged

fix(activity): show pooled-staking as "Staked/Unstaked Ethereum"#32921
vinnyhoward merged 3 commits into
mainfrom
fix-tmcu-1000-activity-staked-ethereum-label

Conversation

@vinnyhoward

@vinnyhoward vinnyhoward commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Description

Pooled-staking (ETH) deposits were mapped to the generic deposit activity 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 stake activity kind so pooled-staking deposits read "Staked Ethereum", and relabels unstake to "Unstaked Ethereum" for symmetry (both use the full asset name). The shared deposit kind could not simply be relabeled — it also backs ramp fiat deposits and the Accounts API DEPOSIT category, which must stay "Deposited".

What changed:

  • New stake kind in the activity-adapter types, with TransactionType.stakingDeposit mapping to it.
  • Row title logic emits "Staked Ethereum" / "Unstaked Ethereum".
  • Icon resolver, transaction-details TemplateLoader routing, and the DepositDetails prop type updated for the new kind.
  • Unit tests updated/added (adapter mapping, row titles, details routing).

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

Feature: Pooled-staking activity labels

  Scenario: Staking deposit is labeled by intent
    Given I have ETH available to stake
    When I complete a pooled-staking deposit via the Earn CTA next to Ethereum
    And I open the Activity list
    Then the activity row reads "Staked Ethereum" (not "Deposited ETH")

  Scenario: Unstake label uses the full asset name
    Given I have a pooled-staking position
    When I unstake and open the Activity list
    Then the activity row reads "Unstaked Ethereum"

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)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

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

Low Risk
Display and classification changes for staking on the local transaction path only; generic deposit behavior is preserved and tests were updated.

Overview
Introduces a dedicated stake activity kind so pooled ETH staking deposits are no longer classified as generic deposit (which must stay "Deposited" for ramps and API deposits).

TransactionType.stakingDeposit now maps to stake in the local transaction adapter. List rows use "Staked Ethereum" / "Unstaked Ethereum" (full asset name, not ETH), with stake using the outbound/send icon family. Activity details route stake through DepositDetails like unstake.

Row title helpers move into titleLabels.ts (TOKEN_ACTION_LABELS, fallback resolvers). stake is 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.

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.
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

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.

@mm-token-exchange-service mm-token-exchange-service Bot added the team-mobile-ux Mobile UX team label Jul 7, 2026
@mm-token-exchange-service

Copy link
Copy Markdown
Contributor

PR template — items to address before "Ready for review"

Warnings — informational, address before merging:

  • Pre-merge author checklist has unchecked items (e.g. "I've applied the right labels on the PR (see labeling guidelines). Not required for external contributors."). Every box must be consciously checked — see docs/readme/ready-for-review.md.

See docs/readme/ready-for-review.md for the full Definition of Ready for Review.

@github-actions github-actions Bot added the size-S label Jul 7, 2026
@vinnyhoward vinnyhoward marked this pull request as ready for review July 8, 2026 16:14
@github-actions github-actions Bot added the risk:high AI analysis: high risk label Jul 8, 2026
…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.
@github-actions github-actions Bot added size-M and removed size-S labels Jul 8, 2026
@@ -0,0 +1,72 @@
import { strings } from '../../../../locales/i18n';

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pulling out resolvers from app/components/UI/ActivityListItemRow/useActivityListItemRowContent.ts

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeStake, SmokeWalletPlatform, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 88%
click to see 🤖 AI reasoning details

E2E Test Selection:
The PR introduces a new stake ActivityKind to distinguish staking deposits from generic deposits in the activity/transaction history system. Key changes:

  1. local-transaction.ts: TransactionType.stakingDeposit now maps to type: 'stake' instead of type: 'deposit' — this is a behavioral change affecting how staking transactions appear in the activity list.

  2. types.ts (activity-adapters): Added 'stake' to the ActivityKind union and the ActivityData type union.

  3. resolveIconType.ts: Added 'stake' case so staking transactions get the correct icon.

  4. titleLabels.ts (new file): Extracted title/label constants from useActivityListItemRowContent.ts, adding stake/unstake labels ("Staked", "Staking", "Stake failed").

  5. useActivityListItemRowContent.ts: Added 'stake' case with special "Staked Ethereum" display noun (since pooled staking is ETH-only).

  6. TemplateLoader.tsx + DepositDetails.tsx: Added 'stake' routing to the DepositDetails template for the activity detail view.

  7. ActivityScreen/types.ts: Added 'stake' to ACTIVITY_TYPE_FILTER_KINDS under Transactions filter.

Tag selection rationale:

  • SmokeStake: Directly tests staking flows — the staking deposit transaction type now maps to a new stake kind, affecting how staking activity appears in the activity list and detail views.
  • SmokeWalletPlatform: Tests transaction history display, which is directly affected by the new stake kind changing how staking transactions are labeled and displayed.
  • SmokeConfirmations: Required per SmokeStake tag description ("when selecting SmokeStake, also select SmokeConfirmations").

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:
The changes are purely about activity list item rendering logic and type mappings for staking transactions. There are no changes to performance-sensitive paths like app launch, login, onboarding, asset loading, or swap flows. The refactoring of title labels into a separate file and adding a new 'stake' kind are not expected to have any measurable performance impact.

View GitHub Actions results

@github-actions github-actions Bot added risk:medium AI analysis: medium risk and removed risk:high AI analysis: high risk labels Jul 8, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jul 8, 2026

Copy link
Copy Markdown

@vinnyhoward vinnyhoward added this pull request to the merge queue Jul 8, 2026
Merged via the queue into main with commit e678a8b Jul 8, 2026
111 checks passed
@vinnyhoward vinnyhoward deleted the fix-tmcu-1000-activity-staked-ethereum-label branch July 8, 2026 20:02
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 8, 2026
@mm-token-exchange-service mm-token-exchange-service Bot added the release-8.3.0 Issue or pull request that will be included in release 8.3.0 label Jul 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-8.3.0 Issue or pull request that will be included in release 8.3.0 risk:medium AI analysis: medium risk size-M team-mobile-ux Mobile UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants