-
Notifications
You must be signed in to change notification settings - Fork 198
feat: enable /yields route #11781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
feat: enable /yields route #11781
Conversation
…letes After completing a yield enter transaction and navigating away (e.g., clicking "View position"), the user could previously go back to /earn/confirm which shouldn't be accessible anymore. Fixes: 1. Reorder guards - check for success state BEFORE checking for selectedYield, ensuring the success screen renders even if Redux state becomes undefined 2. Clear tradeEarnInput Redux state on unmount when in success state, preventing re-access via browser back button or navigation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Links were navigating to /yields/${yieldId} which resulted in 404s.
The correct route is /yield/${yieldId} (singular).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Moved success buttons from YieldSuccess body content to footerContent prop in EarnConfirm, matching the pattern used by input/confirm steps. Added showButtons prop to YieldSuccess for backwards compatibility. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When fiat amount is zero, return empty string instead of '0.00' to trigger placeholder styling (greyed out) matching crypto mode behavior. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
For yields with a default validator (Cosmos ATOM, Solana SOL native staking), filter out positions from other validators in useAllYieldBalances query. This ensures only ShapeShift DAO positions show for Cosmos and only Figment positions show for Solana, hiding positions staked externally with other validators. Removed redundant validator-specific filtering from YieldsList.tsx since filtering now happens at the data layer. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Liquid staking yields (like ETH Lido) were missing the Provider row because they are classified as staking but have no validators. The condition now shows the provider when there's no validator metadata. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document that PRs opened via CLI tools should always use the PULL_REQUEST_TEMPLATE.md as the base for the PR body. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Shows a loading spinner with tooltip when legacy positions are still loading, allowing the yield table to render immediately with yield.xyz data. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds getBestActionableYield utility that filters out disabled yields (enter disabled, under maintenance, deprecated) before selecting the highest APY option. Prevents showing CTAs for opportunities users can't act on. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When DeFiEarn is rendered outside a YieldAccountProvider (like in the wallet drawer), the default accountNumber: 0 was incorrectly filtering to only Account #0's balances. Now falls through to enabledWalletAccountIds when no context is present, properly aggregating balances across all accounts. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Wrap DeFiEarn in memo to prevent unnecessary re-renders - Remove empty useEffect in YieldForm - Consolidate isStakingYieldType utility (remove redundant wrapper) - Extract CryptoAmountInput to shared component - Extract useYieldDisplayInfo hook from YieldsList - Move static searchIcon outside component - Fix highestAmountUsdValidator computed after validator filtering - Remove YIELD_IMPROVEMENTS.md dev notes file Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace History tab in mobile nav with Earn tab routing to /yields - Add History icon button to mobile header (after search and QR icons) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Enable VITE_FEATURE_YIELD_XYZ, VITE_FEATURE_YIELDS_PAGE, VITE_FEATURE_YIELD_MULTI_ACCOUNT in .env - Remove redundant overrides from .env.development and .env.production Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughEnvironment feature flags for yield functionality are enabled in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
Match the icon used in desktop Yields menu. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The history page was removed when replacing the mobile nav tab. Add it back as a hidden route so it remains accessible via URL. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Match the exact icon used in desktop Earn -> Yields menu. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.env:
- Around line 310-314: Reorder the yield-related env vars so dotenv-linter
ordering passes by moving VITE_FEATURE_YIELD_XYZ to appear after the other yield
entries; specifically update the block containing VITE_FEATURE_YIELDS_PAGE,
VITE_YIELD_XYZ_API_KEY, and VITE_FEATURE_YIELD_MULTI_ACCOUNT so that
VITE_FEATURE_YIELD_XYZ comes after them (preserve existing values and
formatting).
Description
Enable
/yieldsroute and make yield a first-class route on mobile./yields)VITE_FEATURE_YIELD_XYZ,VITE_FEATURE_YIELDS_PAGE,VITE_FEATURE_YIELD_MULTI_ACCOUNT)Issue (if applicable)
N/A
Risk
Low - UI changes only, no transaction logic affected.
None - this is purely navigation/discoverability improvements.
Testing
Engineering
/yields/historyOperations
Screenshots (if applicable)
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.