Skip to content

chore(rewards): Adjust leaderboard#28932

Merged
sophieqgu merged 4 commits into
mainfrom
Leaderboard-fixes
Apr 16, 2026
Merged

chore(rewards): Adjust leaderboard#28932
sophieqgu merged 4 commits into
mainfrom
Leaderboard-fixes

Conversation

@sophieqgu
Copy link
Copy Markdown
Contributor

@sophieqgu sophieqgu commented Apr 16, 2026

Description

Unused asset cleanup

  • Deleted 8 unused image files from app/images/rewards/ (~5.3 MB total):

Leaderboard crown icons for top 5

  • Added a crown icon (crown.svg) next to the referral code for the top 5 entries in OndoLeaderboard
  • Crown is only shown in full leaderboard view (hidden in preview mode when maxEntries is specified)

StatCell suffix placement

  • Moved the suffix prop (Pending tag, Ineligible tag, check icon) from next to the value to next to the label in StatCell

New reusable LeaderboardPositionHeader component

  • Extracted the rank/tier header section (previously duplicated in both views) into a shared component at components/Campaigns/LeaderboardPositionHeader.tsx
  • Props: rank, tier, isLoading, isPending, isQualified, isIneligible, showReturn, returnValue, returnColor, showPrizePool, prizePoolValue, prizePoolLoading

Audit en.json

  • Removed unused keys
  • Checked 'deposit' --> 'inflow', 'withdraw' --> 'outflow'

Audit usage of hooks

  • Removed unused useLeaderboard in OndoCampaignStatsView

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-04-16 at 11 44 22 Simulator Screenshot - E2E Test  - 2026-04-16 at 11 44 35

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

Medium Risk
Mostly UI refactors, but it changes Ondo leaderboard/stats rendering and adds additional data-fetching (portfolio/deposits) that could affect loading/error states and displayed values.

Overview
Refactors the Ondo campaign rank/tier header UI into a reusable LeaderboardPositionHeader and adopts it in both OndoCampaignStatsView and OndoLeaderboardView, changing how pending/ineligible/qualified indicators are rendered.

Enhances OndoLeaderboard rows by adding a crown icon for the top 5 entries (disabled in preview mode) and tweaks the tier selector icon.

Updates data wiring/tests: OndoLeaderboardView now fetches portfolio + campaign deposits to display return and computed prize pool (via new exported getCurrentPrize/BREAKPOINTS from OndoPrizePool), adjusts StatCell suffix placement, adds component/unit tests, and removes several unused rewards SVG assets and some unused i18n strings.

Reviewed by Cursor Bugbot for commit 825897c. 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 April 16, 2026 15:53
@github-actions
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.

@metamaskbotv2 metamaskbotv2 Bot added the team-rewards Rewards team label Apr 16, 2026
@github-actions github-actions Bot added size-L risk-low Low testing needed · Low bug introduction risk labels Apr 16, 2026
Comment thread app/components/UI/Rewards/Views/OndoLeaderboardView.tsx Outdated
@github-actions github-actions Bot added risk-low Low testing needed · Low bug introduction risk and removed risk-low Low testing needed · Low bug introduction risk labels Apr 16, 2026
@github-actions github-actions Bot added risk-low Low testing needed · Low bug introduction risk and removed risk-low Low testing needed · Low bug introduction risk labels Apr 16, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a87cbdc. Configure here.

Comment thread app/components/UI/Rewards/Views/OndoLeaderboardView.test.tsx
@github-actions github-actions Bot added risk-low Low testing needed · Low bug introduction risk and removed risk-low Low testing needed · Low bug introduction risk labels Apr 16, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 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 in this PR are entirely contained within the Rewards feature area (app/components/UI/Rewards/). Specifically:

  1. New/modified Rewards UI components: OndoCampaignStatsView, OndoLeaderboardView, OndoLeaderboard, CampaignStatsSummary, LeaderboardPositionHeader, OndoPrizePool - these are all self-contained within the Rewards navigator and don't affect any shared components (TabBar, navigation, modals, confirmations, etc.)

  2. Unit test files: OnboardingStep.test.tsx - unit tests only, no E2E impact

  3. Image assets: New reward-related images (crown.svg, onboarding images) - static assets with no functional impact

  4. Localization cleanup: en.json removes deprecated/unused string keys from the rewards section only - these are cleanup changes for strings that are no longer referenced

No E2E tests exist for the Rewards feature: After thorough investigation of tests/smoke/, there is no rewards, ondo, or campaign test directory. The Rewards feature is not covered by any of the available E2E test tags.

No shared components affected: The changes don't touch TabBar, navigation infrastructure, modals, confirmations, or any other shared components that could break existing E2E tests.

No performance impact: No changes to list rendering, state management, startup code, or other performance-sensitive paths.

Since there are no E2E tests that cover the Rewards feature and the changes are isolated to that feature area without affecting any shared infrastructure, no E2E test tags need to be run.

Performance Test Selection:
The changes are limited to Rewards UI components (leaderboard views, campaign stats, prize pool), image assets, and localization string cleanup. None of these changes affect performance-sensitive code paths such as app startup, account/network list rendering, login flows, swap flows, or asset loading. No performance tests are warranted.

View GitHub Actions results

@sophieqgu sophieqgu enabled auto-merge April 16, 2026 16:50
@sonarqubecloud
Copy link
Copy Markdown

@sophieqgu sophieqgu added this pull request to the merge queue Apr 16, 2026
Merged via the queue into main with commit 37b1dcf Apr 16, 2026
71 checks passed
@sophieqgu sophieqgu deleted the Leaderboard-fixes branch April 16, 2026 17:05
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 16, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.74.0 Issue or pull request that will be included in release 7.74.0 label Apr 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.74.0 Issue or pull request that will be included in release 7.74.0 risk-low Low testing needed · Low bug introduction risk size-L team-rewards Rewards team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants