Skip to content

fix(rfox): hide WETH/FOX tab and sunset warning when no LP balance#12363

Merged
kaladinlight merged 2 commits into
developfrom
fix/rfox-hide-lp-when-no-balance
May 20, 2026
Merged

fix(rfox): hide WETH/FOX tab and sunset warning when no LP balance#12363
kaladinlight merged 2 commits into
developfrom
fix/rfox-hide-lp-when-no-balance

Conversation

@kaladinlight
Copy link
Copy Markdown
Member

@kaladinlight kaladinlight commented May 20, 2026

Description

The Arbitrum WETH/FOX rewards program has been sunset, but the rFOX dashboard still surfaced the WETH/FOX filter button and the yellow "Program Ended" warning for every user, including users who never staked LP.

This PR hides both elements unless the connected account actually has a non-zero WETH/FOX staked balance — so only users who still need to unstake/claim see the legacy program UI. Everyone else gets a cleaner FOX-only view.

Issue (if applicable)

closes #

Risk

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Low — read-only UI change in the rFOX dashboard. No on-chain transactions or contract interaction changes. The additional useStakingInfoQuery call already exists for the FOX path; we're just running it for the LP asset to decide whether to render the legacy UI.

Testing

Engineering

  1. Connect a wallet with no WETH/FOX staked balance, navigate to the FOX Token Dashboard → rFOX Staking section:
    • WETH/FOX filter pill should NOT be visible
    • Yellow "Program Ended" warning should NOT be visible
    • FOX filter pill and the rest of the dashboard should render normally
  2. Connect a wallet with a non-zero WETH/FOX staked balance:
    • WETH/FOX filter pill should be visible
    • Yellow "Program Ended" warning should be visible
    • Clicking WETH/FOX should switch the view as before
  3. Disconnect wallet:
    • WETH/FOX filter pill and warning should not be visible

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

QA: confirm the WETH/FOX filter button and "Program Ended" warning only appear for accounts with leftover LP staked balance on the rFOX dashboard.

Screenshots (if applicable)

Before: WETH/FOX pill + "Program Ended" banner shown for users with no LP stake.
After: Both hidden unless the account has a non-zero LP staked balance.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • LP staking features in the RFOX section now display conditionally based on your existing LP staking balance: the LP staking token filter and sunset warning appear only when relevant to your account.

Review Change Stack

The WETH/FOX rewards program has been sunset; only users with a leftover
staked balance need to see the filter button and the "Program Ended"
warning. Everyone else now sees a cleaner FOX-only view.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@kaladinlight kaladinlight requested a review from a team as a code owner May 20, 2026 19:48
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2074d91a-c06b-4ab1-8bfc-52011c266483

📥 Commits

Reviewing files that changed from the base of the PR and between ef2561d and c00ae66.

📒 Files selected for processing (1)
  • src/pages/Fox/components/RFOXSection.tsx

📝 Walkthrough

Walkthrough

The PR conditionally enables the LP staking token filter and sunset warning based on whether the user has an existing LP staking balance. It queries the LP staking balance via useStakingInfoQuery and gates both the asset filter and warning card visibility on that state.

Changes

LP Staking Balance Conditioning

Layer / File(s) Summary
LP staking balance state computation
src/pages/Fox/components/RFOXSection.tsx
Memoizes the staking asset account ID, queries LP staking balance using useStakingInfoQuery, computes hasLpStakingBalance, and updates the filters list to include the LP staking token option only when that balance is true.
Conditional sunset warning display
src/pages/Fox/components/RFOXSection.tsx
Wraps the yellow LP sunset warning card to render conditionally based on hasLpStakingBalance, removing it from the always-visible rendering path.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

A fox with LP staking in hand,
Now sees the sunset warning grand,
But those without the balance won't—
Conditional care, the way it's meant! 🦊✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: hiding the WETH/FOX tab (LP filter) and sunset warning for users without an LP staking balance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/rfox-hide-lp-when-no-balance

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kaladinlight kaladinlight merged commit 1101b4e into develop May 20, 2026
4 checks passed
@kaladinlight kaladinlight deleted the fix/rfox-hide-lp-when-no-balance branch May 20, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant