chore(perps): use feature flag for referral code#25282
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. |
2778585 to
3917970
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The changes are well-scoped to the Perps feature with proper unit test coverage. The referral code functionality is part of the rewards system, so both SmokePerps and SmokeRewards tags are appropriate. The risk is low because:
Performance Test Selection: |
|





Description
Gate rewards referral code in Perps PnL hero card behind
rewardsReferralCodeEnabledfeature flaghttps://consensyssoftware.atlassian.net/browse/TAT-2430
https://app.launchdarkly.com/projects/metamask-client-config-api-mobile/flags/rewards-referral-code-enabled/targeting?env=flask-dev&env=flask-prod&env=production&selected-env=production
Changelog
CHANGELOG entry: Gate rewards referral code in Perps PnL hero card behind
rewardsReferralCodeEnabledfeature flagRelated issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk: behavior change is limited to hiding/showing the referral code in the Perps PnL hero card and share copy based on a remote flag, with tests covering enabled/disabled cases.
Overview
Referral code display in the Perps PnL hero card is now feature-flagged off by default.
PerpsHeroCardViewderives aneffectiveReferralCodethat is only set whenselectPerpsRewardsReferralCodeEnabledFlagis true, and uses it to control referral tag rendering, layout styling, and the share message/link.Adds
selectPerpsRewardsReferralCodeEnabledFlagto Perps feature-flag selectors, supporting both boolean and version-gated flag shapes, and expands unit tests to cover flag enabled/disabled and referral-code-present/absent scenarios.Written by Cursor Bugbot for commit c731e97. This will update automatically on new commits. Configure here.