Skip to content

Conversation

@Matt561
Copy link
Contributor

@Matt561 Matt561 commented Nov 6, 2025

Description

Updated currency switch clicked event for deposit and withdrawal screens

Changes:

  • Removed code fence blocking EARN_INPUT_CURRENCY_SWITCH_CLICKED event for pooled-staking
  • Added token_symbol and chain_id_hex properties to EARN_INPUT_CURRENCY_SWITCH_CLICKED, EARN_INPUT_CURRENCY_SWITCH_CLICKED, and UNSTAKE_INPUT_CURRENCY_SWITCH_CLICKED events

Changelog

CHANGELOG entry: updated earn input view deposit and withdrawal currency switch events

Related issues

Fixes: TAT-1909: Add "Stake Input Currency Switch Clicked" to MP Segment events

Manual testing steps

Feature: Event tracking for Earn input view currency switch button

  Scenario: user wants to enter fiat amount
    Given user is on EarnInputView (e.g. ETH staking or stablecoin lending)

    When user clicks currency switch
    Then currency switch event is tracked with new `token_symbol` and `chain_id_hex` properties for both ETH staking and stablecoin lending tokens.

Screenshots/Recordings

Before

Pooled-Staking currency switch events weren't firing

After

Screen.Recording.2025-11-07.at.5.07.57.PM.mov

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

Always log currency-switch on deposit and add token_symbol and chain_id (hex) to deposit and withdrawal currency-switch events.

  • Analytics:
    • Deposit (EarnInputView.tsx):
      • Always log EARN_INPUT_CURRENCY_SWITCH_CLICKED on currency toggle (removes prior gating).
      • Add token_symbol and chain_id (hex) to event properties.
    • Withdrawal (EarnWithdrawInputView.tsx):
      • Add token_symbol and chain_id (hex) to EARN_INPUT_CURRENCY_SWITCH_CLICKED and UNSTAKE_INPUT_CURRENCY_SWITCH_CLICKED.
      • Import toHex for chain ID formatting.

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

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.

@Matt561 Matt561 marked this pull request as ready for review November 7, 2025 22:10
@Matt561 Matt561 requested a review from a team as a code owner November 7, 2025 22:10
nickewansmith
nickewansmith previously approved these changes Nov 7, 2025
@sonarqubecloud
Copy link

@Matt561 Matt561 enabled auto-merge November 10, 2025 16:58
@Matt561 Matt561 added this pull request to the merge queue Nov 10, 2025
Merged via the queue into main with commit 54d0bf9 Nov 10, 2025
85 of 86 checks passed
@Matt561 Matt561 deleted the feat/tat-1909-add-stake-input-currency-switch-clicked-event branch November 10, 2025 17:18
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2025
@metamaskbot metamaskbot added the release-7.60.0 Issue or pull request that will be included in release 7.60.0 label Nov 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.60.0 Issue or pull request that will be included in release 7.60.0 size-S team-earn

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants