Skip to content

feat(earn): gate Tron unstaked claim button behind remote flag#27908

Open
ulissesferreira wants to merge 1 commit intomainfrom
NEB-838-feature-flag-claim-unstaked-trx-button
Open

feat(earn): gate Tron unstaked claim button behind remote flag#27908
ulissesferreira wants to merge 1 commit intomainfrom
NEB-838-feature-flag-claim-unstaked-trx-button

Conversation

@ulissesferreira
Copy link
Contributor

@ulissesferreira ulissesferreira commented Mar 25, 2026

Description

Adds the remote boolean flag tronShowClaimUnstakedTrxButton so we can hide the claim action on the Tron unstaked banner if something goes wrong in production, without removing the banner copy.

Why: We need a safe kill switch for the claim CTA only.

How:

  • Register the flag in FeatureFlagNames with default false (missing/undefined → button hidden; opt-in).
  • selectTronShowClaimUnstakedTrxButton reads merged remote flags (same pattern as other boolean flags).
  • TronUnstakedBanner uses useSelector and renders the primary claim button only when the flag is true; title and description stay visible when the button is hidden.

Ops: Create and enable tronShowClaimUnstakedTrxButton in LaunchDarkly (true where the claim button should appear).

Changelog

CHANGELOG entry: Added a remote feature flag to control visibility of the Tron unstaked TRX claim button on the token details banner.

Related issues

Fixes: NEB-838

Manual testing steps

Feature: Tron unstaked banner claim button behind remote flag

  Scenario: user views TRX token details with claimable unstaked balance and flag enabled
    Given a Tron account with TRX ready for withdrawal and remote flag `tronShowClaimUnstakedTrxButton` is true (or overridden in dev tools)

    When user opens native TRX token details and the unstaked banner is shown
    Then the banner shows title, description, and the claim button, and tapping claim still triggers the existing flow

  Scenario: user views TRX token details when flag is off or unset
    Given the same balance state but `tronShowClaimUnstakedTrxButton` is false, missing, or undefined in remote flags

    When user opens native TRX token details and the unstaked banner is shown
    Then the banner shows title and description but does not show the claim button

Screenshots/Recordings

Before

n/a

After

Feature flag disabled
Screenshot 2026-03-25 at 14 27 32

Feature flag enabled

Pre-merge author checklist

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

Low Risk
Low risk: UI-only change that conditionally hides the Tron unstaked claim CTA behind a remote boolean flag, plus accompanying selector/registry/test updates.

Overview
Adds a new remote feature flag, tronShowClaimUnstakedTrxButton (default false), to act as a kill switch for the Tron unstaked TRX claim CTA.

TronUnstakedBanner now reads this flag via a new selector (selectTronShowClaimUnstakedTrxButton) and only renders the primary claim button when enabled, while keeping the banner copy visible; tests are updated/added to cover both flag states and the flag is registered in the feature-flag registry and defaults.

Written by Cursor Bugbot for commit 36797d2. This will update automatically on new commits. Configure here.

@github-actions
Copy link
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.

@metamaskbot metamaskbot added the team-networks Networks team label Mar 25, 2026
@ulissesferreira ulissesferreira force-pushed the NEB-838-feature-flag-claim-unstaked-trx-button branch from 86a4ab8 to b1077c4 Compare March 25, 2026 12:41
Add tronShowClaimUnstakedTrxButton (default false) and selectTronShowClaimUnstakedTrxButton. Hide claim CTA unless LaunchDarkly serves true.

Register the flag in tests/feature-flags/feature-flag-registry.ts (inProd true, productionDefault false per production client-config API).

NEB-838
@ulissesferreira ulissesferreira force-pushed the NEB-838-feature-flag-claim-unstaked-trx-button branch from b1077c4 to 36797d2 Compare March 25, 2026 13:17
@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - draft PR

All E2E tests pre-selected.

View GitHub Actions results

@ulissesferreira ulissesferreira marked this pull request as ready for review March 25, 2026 13:26
@ulissesferreira ulissesferreira requested review from a team as code owners March 25, 2026 13:26
@sonarqubecloud
Copy link

@github-actions
Copy link
Contributor

E2E Fixture Validation — Schema is up to date
16 value mismatches detected (expected — fixture represents an existing user).
View details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants