feat(rewards): show success toast on campaign opt-in and hide CTA while loading#28033
Conversation
|
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. |
https://consensyssoftware.atlassian.net/browse/RWDS-1109 - `CampaignEntriesClosedBanner` component shown when deposit cutoff date has passed - Entries-closed toast notification via `useRewardsToast` - `CampaignJoinCTA` hides the join button when opt-in is no longer allowed past cutoff date - `useGetCampaignParticipantStatus` reflects cutoff-date awareness - `OndoCampaignDetailsView` renders the entries-closed banner and leaderboard for campaigns past cutoff <!-- Add screenshots here --> Co-authored-by: VGR-GIT <vangulckrik@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…larity The variable canOptIn was true when opt-in was NOT allowed (entries closed), making its name the exact opposite of its value. Renamed to areEntriesClosed to match the actual semantics. Also fixes a latent bug in leaderboardCampaignId: the original !canOptIn evaluated to true when entries were still open, contradicting the documented intent of enabling the leaderboard for "active campaign past cutoff date". The fix uses areEntriesClosed directly so the leaderboard fetches correctly when entries are closed. Co-authored-by: VGR-GIT <vangulckrik@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Show CampaignHowItWorks when entries are still open (!areEntriesClosed), not after they close. Fix the inverted condition in OndoCampaignDetailsView and update the two affected test cases to match the correct behaviour. Co-authored-by: VGR-GIT <vangulckrik@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…le loading - Show "You're in!" toast after successful opt-in via CampaignOptInSheet - Hide CampaignJoinCTA entirely while participant status is loading instead of rendering a disabled/loading button - Remove skeleton loader from OndoCampaignDetailsView during participant status load - Add opt_in_success_toast locale string Closes RWDS-1101 Co-authored-by: VGR-GIT <vangulckrik@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
45be09e to
b85003e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
…mpaignJoinCTA The entries closed toast describe block was testing toast behaviour that does not exist in the component. Removed the block along with all associated unused mocks (useRewardsToast, @react-navigation/native). Co-authored-by: VGR-GIT <vangulckrik@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…lock Log the error instead of silently ignoring it to satisfy SonarCloud S2486. Co-authored-by: VGR-GIT <vangulckrik@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
None of the available E2E test tags cover the Rewards/Ondo campaign feature. Searching confirmed there are no Performance Test Selection: |
|




Description
Shows a success toast ("You're in!") after a user successfully opts into a campaign via
CampaignOptInSheet. Also hides the Join Campaign CTA entirely while participant status is loading (previously it rendered a disabled/loading button), and removes the skeleton loader fromOndoCampaignDetailsViewduring that loading phase.Jira: RWDS-1101
Changelog
CHANGELOG entry: Added a success confirmation toast when users opt in to a rewards campaign.
Related issues
Fixes: RWDS-1101
Screenshots/Recordings
Note
Low Risk
Low risk UI/UX behavior changes around opt-in feedback and CTA visibility, with minor logging/empty-state tweaks; main risk is unintended hiding of the join CTA during slow participant-status fetches.
Overview
Adds a success confirmation toast ("You're in!") after a campaign opt-in completes successfully in
CampaignOptInSheet, only closing the sheet when the API reportsoptedIn: true.Updates the campaign details/join flow to hide the "Join Campaign" CTA while participant status is loading (and removes the loading/skeleton CTA handling), with tests updated to reflect the new visibility rules.
Treats an Ondo portfolio with zero positions as an empty state (showing the empty banner instead of the container) and adds error logging when portfolio fetch fails; includes the new
rewards.campaign.opt_in_success_toasti18n string.Written by Cursor Bugbot for commit ee88724. This will update automatically on new commits. Configure here.