Skip to content

fix(Rewards): Ondo campaign text issues cp-7.76.0#29815

Merged
sophieqgu merged 4 commits into
mainfrom
fix/ondo-campaign-text
May 6, 2026
Merged

fix(Rewards): Ondo campaign text issues cp-7.76.0#29815
sophieqgu merged 4 commits into
mainfrom
fix/ondo-campaign-text

Conversation

@Montoya
Copy link
Copy Markdown
Contributor

@Montoya Montoya commented May 6, 2026

Description

This cleans up some unintentional text issues when displaying Ondo assets in the Rewards tab. This makes the Rewards tab match how Ondo assets are displayed elsewhere in the app.

Changelog

CHANGELOG entry: null

Related issues

Fixes: n/a

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Simulator Screenshot - E2E Test  - 2026-05-06 at 15 10 33

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

For performance guidelines and tooling, see the Performance Guide.

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
Low risk UI/text-only changes in Rewards Ondo views plus removal of a now-unused formatting helper; primary risk is minor regressions in how token names/units are displayed and in i18n key usage.

Overview
Rewards Ondo screens now preserve backend-provided token display names (including the (Ondo Tokenized) suffix) instead of stripping/truncating branding via sanitizeOndoTokenName, and navigation to swaps passes the same unmodified name.

Ondo portfolio rows adjust layout to truncate long names and change the units subtext from a localized "{{units}} shares" string to a direct ${units} ${TOKEN_SYMBOL} format (uppercased), removing the position_units i18n key and associated tests.

Reviewed by Cursor Bugbot for commit 60550e0. Bugbot is set up for automated code reviews on this repo. Configure here.

@Montoya Montoya requested a review from a team as a code owner May 6, 2026 17:45
@Montoya Montoya added size-S team-rewards Rewards team labels May 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

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.

@github-actions github-actions Bot added size-M and removed size-S labels May 6, 2026
@Montoya Montoya changed the title fix(Rewards): Ondo campaign text issues fix(Rewards): Ondo campaign text issues cp-7.76.0 May 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are confined to the Rewards/Ondo campaign feature area:

  1. OndoCampaignRwaSelectorView.tsx: Removed sanitizeOndoTokenName import and usage - tokens now use backend-provided display names directly. Simplified handleAssetSelect to use asset.name directly instead of looking up raw token name.

  2. OndoPortfolio.tsx: Removed sanitizeOndoTokenName usage, added layout improvements (flex-1, min-w-0, truncation for long names), changed position units display from localized strings('rewards.ondo_campaign_portfolio.position_units', ...) to inline ${units} ${symbol} format.

  3. OndoPortfolio.utils.ts: Removed re-export of sanitizeOndoTokenName.

  4. formatUtils.ts: Deleted the sanitizeOndoTokenName function entirely (confirmed no remaining usages in codebase).

  5. Locale files (13 languages): Removed position_units key that was replaced with inline formatting.

Why no E2E tags are needed:

  • No E2E tests exist for the Rewards/Ondo feature (confirmed by searching for 'Rewards', 'ondo', 'rwa' in e2e files - no matches found)
  • The changes don't affect any shared components (navigation, modals, confirmations, browser, etc.)
  • The Rewards navigator is part of MainNavigator but the Ondo-specific views are feature-isolated
  • Changes are UI refinements (removing client-side name sanitization, layout improvements) with no impact on core wallet flows
  • None of the available E2E test tags cover Rewards/Ondo campaign functionality

Performance Test Selection:
The changes are UI refinements to the Rewards/Ondo campaign feature - removing a string sanitization function and adjusting layout. These changes don't affect app startup, account/network lists, critical user flows (login, swap, send), or any performance-sensitive code paths. No performance tests are warranted.

View GitHub Actions results

@sophieqgu sophieqgu enabled auto-merge May 6, 2026 19:11
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.42%. Comparing base (dba2c63) to head (60550e0).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...s/UI/Rewards/Views/OndoCampaignRwaSelectorView.tsx 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29815      +/-   ##
==========================================
- Coverage   81.97%   81.42%   -0.55%     
==========================================
  Files        5302     5300       -2     
  Lines      140763   140725      -38     
  Branches    32047    32033      -14     
==========================================
- Hits       115391   114590     -801     
- Misses      17517    18295     +778     
+ Partials     7855     7840      -15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

@sophieqgu sophieqgu added this pull request to the merge queue May 6, 2026
Merged via the queue into main with commit b04526d May 6, 2026
64 checks passed
@sophieqgu sophieqgu deleted the fix/ondo-campaign-text branch May 6, 2026 19:39
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.77.0 Issue or pull request that will be included in release 7.77.0 label May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.77.0 Issue or pull request that will be included in release 7.77.0 size-M team-rewards Rewards team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants