Skip to content

chore(rewards): fix campaign param extract#29856

Merged
VGR-GIT merged 2 commits into
mainfrom
rwds-fix-campaign-deeplink-branch-issue
May 7, 2026
Merged

chore(rewards): fix campaign param extract#29856
VGR-GIT merged 2 commits into
mainfrom
rwds-fix-campaign-deeplink-branch-issue

Conversation

@VGR-GIT

@VGR-GIT VGR-GIT commented May 7, 2026

Copy link
Copy Markdown
Contributor

Description

  • "?~campaign=ondo&__branch_flow_id=1580894552734833035&~referring_browser=Chrome" would fail to be parsed correctly, the campaign param we extract would be null, and the user would end up in the rewards dashboard instead of the ondo details campaign page.

  • Added support for upcoming perps trading comp deeplink

Changelog

CHANGELOG entry: null


Note

Low Risk
Low risk: small, localized change to rewards deeplink query parsing that may only affect navigation routing for rewards campaign links.

Overview
Rewards deeplink parsing now falls back to reading Branch-style ~campaign when campaign is missing, preventing campaign links from dropping users onto the generic rewards dashboard.

It also expands allowed campaign values to include the new perps-comp campaign so those deeplinks can route correctly.

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

@VGR-GIT VGR-GIT requested a review from a team as a code owner May 7, 2026 11:33
@github-actions

github-actions Bot commented May 7, 2026

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.

@VGR-GIT VGR-GIT enabled auto-merge May 7, 2026 11:34
@metamaskbotv2 metamaskbotv2 Bot added team-rewards Rewards team INVALID-PR-TEMPLATE PR's body doesn't match template labels May 7, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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.

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 eb916ab. Configure here.

Comment thread app/core/DeeplinkManager/handlers/legacy/handleRewardsUrl.ts
Co-authored-by: VGR-GIT <vangulckrik@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The change is limited to handleRewardsUrl.ts in the DeeplinkManager legacy handlers. Two additive changes were made:

  1. Added 'perps-comp' as a new valid campaign type in the RewardsNavigationParams interface and validation array
  2. Added ?? urlParams.get('~campaign') fallback to support branch.io-style tilde-prefixed URL parameters

This is a low-risk, additive change. No existing functionality is broken. The perps-comp campaign name directly relates to Perps functionality, so SmokePerps is selected. SmokeWalletPlatform is selected because it covers the Trending/Perps section and wallet navigation flows that could be affected by deeplink routing. No E2E tests directly test rewards deeplinks, so coverage is indirect. No performance impact is expected from this change.

Performance Test Selection:
This change only modifies URL parameter parsing logic in a deeplink handler. There is no UI rendering, state management, or data loading impact that would affect performance metrics.

View GitHub Actions results

@sonarqubecloud

sonarqubecloud Bot commented May 7, 2026

Copy link
Copy Markdown


const pageParam = urlParams.get('page');
const campaignParam = urlParams.get('campaign');
const campaignParam = urlParams.get('campaign') ?? urlParams.get('~campaign');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why the '~'?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

campaign is a reserved param and branch adds a tilde to it

@VGR-GIT VGR-GIT added this pull request to the merge queue May 7, 2026
Merged via the queue into main with commit 538ad66 May 7, 2026
298 of 302 checks passed
@VGR-GIT VGR-GIT deleted the rwds-fix-campaign-deeplink-branch-issue branch May 7, 2026 18:45
@github-actions github-actions Bot locked and limited conversation to collaborators May 7, 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 7, 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.77.0 Issue or pull request that will be included in release 7.77.0 size-XS team-rewards Rewards team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants