Skip to content

feat(rewards): show ondo outcome toasts#29315

Merged
VGR-GIT merged 3 commits into
mainfrom
rwds-ondo-outcome-toasts
Apr 24, 2026
Merged

feat(rewards): show ondo outcome toasts#29315
VGR-GIT merged 3 commits into
mainfrom
rwds-ondo-outcome-toasts

Conversation

@VGR-GIT
Copy link
Copy Markdown
Contributor

@VGR-GIT VGR-GIT commented Apr 24, 2026

Description

Shows a toast on the rewards home page or the campaign overview page if you're a potential winner with a verification code, or if you're a participant and we know that you're not a winner.

Changelog

CHANGELOG entry: null

Screenshots/Recordings

Showing toast for participant who didn't win once we know in the same tier for sure that there are 5 winners:

image image

Showing a toast for winners with verification code but still in pending state.

image image
  • Dimissing the toast will cause it to not show up anymore in same session or cross session.
  • For non winners, it takes users to ondo details page;
  • For winners with verification code but pending, it takes them to winner sheet.

Note

Medium Risk
Adds a new focus-driven toast + navigation side effect on key Rewards screens and persists new dismissal state in Redux, which could impact user-facing UX and state rehydration if mis-keyed or triggered unexpectedly.

Overview
Adds useOndoOutcomeToast, which detects the most recently completed ONDO Holding campaign, derives an outcome variant from participant outcome data, and shows a persistent icon toast (with haptics) that deep-links to the winning or campaign details view.

Introduces Redux support for remembering dismissed outcome toasts via dismissedCampaignOutcomeToasts (new selector + dismissCampaignOutcomeToast action) and persists/rehydrates this map.

Wires the hook into RewardsDashboard and CampaignsView, updates fixtures/locales, and adds/extends unit tests covering toast behavior, dismissal, and integration.

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

@VGR-GIT VGR-GIT requested review from a team as code owners April 24, 2026 10:34
@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 team-rewards Rewards team INVALID-PR-TEMPLATE PR's body doesn't match template labels Apr 24, 2026
VGR-GIT and others added 2 commits April 24, 2026 12:46
…test fixtures

Co-authored-by: VGR-GIT <vangulckrik@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@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: 88%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes in this PR are scoped to the Rewards feature (Ondo campaign outcome toasts):

  1. New hook useOndoOutcomeToast.ts: Adds toast notification logic for Ondo campaign outcomes. This is self-contained within the Rewards module and doesn't affect shared components like navigation, confirmations, or browser.

  2. CampaignsView.tsx & RewardsDashboard.tsx: Minimal changes — just calling the new hook. No structural changes to these views.

  3. Redux reducer changes: Added dismissedCampaignOutcomeToasts state field with a new action and rehydration support. This is additive and backward-compatible.

  4. default-fixture.json (CRITICAL): Added dismissedCampaignOutcomeToasts: {} to match the new Redux state shape. This is a purely additive change — it initializes a new empty object field that existing tests don't reference. No existing E2E tests will break because of this.

  5. locales/languages/en.json: New i18n strings for toast variants — no impact on existing tests.

No E2E test tags are applicable because:

  • There are no E2E tests covering the Rewards/Campaigns feature in the available test suite
  • The default-fixture.json change is backward-compatible and won't break any existing tests
  • The changes don't touch shared components (TabBar, Browser, Confirmations, AccountSelector, etc.) that could cause regressions in other test areas
  • None of the available tags (SmokeCard, SmokePerps, SmokePredictions, SmokeWalletPlatform, etc.) cover Rewards campaign toast functionality

Performance Test Selection:
No performance-sensitive code paths are affected. The changes add a new hook with Redux selectors and toast display logic, but this is not in any critical rendering path (no list rendering, no startup code, no account/network selectors). The new state field is an empty object that won't impact any performance metrics.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

@VGR-GIT VGR-GIT enabled auto-merge April 24, 2026 13:17
@VGR-GIT VGR-GIT added this pull request to the merge queue Apr 24, 2026
Merged via the queue into main with commit 5e07380 Apr 24, 2026
68 checks passed
@VGR-GIT VGR-GIT deleted the rwds-ondo-outcome-toasts branch April 24, 2026 15:07
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 24, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.76.0 Issue or pull request that will be included in release 7.76.0 label Apr 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template release-7.76.0 Issue or pull request that will be included in release 7.76.0 size-L team-rewards Rewards team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants