Skip to content

fix(rewards): remove sign for rebalance events#29802

Merged
sophieqgu merged 1 commit into
mainfrom
RWDS-1264-ondo-rebalance-should-not-have-a-dollar-value
May 6, 2026
Merged

fix(rewards): remove sign for rebalance events#29802
sophieqgu merged 1 commit into
mainfrom
RWDS-1264-ondo-rebalance-should-not-have-a-dollar-value

Conversation

@sophieqgu
Copy link
Copy Markdown
Contributor

@sophieqgu sophieqgu commented May 6, 2026

Description

https://consensyssoftware.atlassian.net/browse/RWDS-1264

Changelog

CHANGELOG entry: null

Related issues

Fixes:

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 11 15 48

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 formatting change limited to OndoActivityRow display logic, with added test coverage; no business logic, persistence, or security-sensitive code impacted.

Overview
Updates Ondo campaign activity rows so REBALANCE entries display USD amounts without the leading + sign, while deposits/withdrawals/outflows continue to use signed USD formatting.

Adds a small helper (formatActivityUsd) to special-case rebalance values (returning for null/non-numeric inputs) and extends the unit test suite to assert the new rebalance formatting behavior.

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

@sophieqgu sophieqgu requested a review from a team as a code owner May 6, 2026 15:19
@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.

@sophieqgu sophieqgu added the team-rewards Rewards team label May 6, 2026
@github-actions github-actions Bot added the size-S label 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: 95%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are limited to two files in the Rewards/Campaigns UI component area:

  1. OndoActivityRow.tsx: A small, focused bug fix that introduces a formatActivityUsd helper to handle REBALANCE activity entries differently — using formatUsd (no sign prefix) instead of formatSignedUsd (which adds '+' for positive values). The change only affects the display of USD amounts for REBALANCE-type activity entries in the Ondo campaign portfolio view.

  2. OndoActivityRow.test.tsx: Adds a unit test to verify the new REBALANCE formatting behavior.

Why no E2E tags are needed:

  • The change is purely a display/formatting fix in a narrow, isolated UI component (OndoActivityRow) within the Rewards/Campaigns feature
  • The component is only consumed by OndoCampaignPortfolioView.tsx — no shared components, navigation, or core infrastructure are affected
  • No available E2E test tags cover the Ondo/Rewards campaign portfolio activity view specifically
  • The fix is well-covered by the added unit test
  • No changes to controllers, state management, navigation, or any shared components that could cause regressions in other flows
  • Risk of regression to other features is essentially zero

Performance Test Selection:
The change is a pure display formatting fix (string formatting logic for USD amounts in activity rows). There is no impact on rendering performance, data loading, state management, or any performance-sensitive code paths. No performance tests are warranted.

View GitHub Actions results

@sophieqgu sophieqgu enabled auto-merge May 6, 2026 15:37
@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 5bfeb29 May 6, 2026
75 of 78 checks passed
@sophieqgu sophieqgu deleted the RWDS-1264-ondo-rebalance-should-not-have-a-dollar-value branch May 6, 2026 15:58
@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-S team-rewards Rewards team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants