feat: partial yield.xyz toggle#11704
Conversation
Remove titleOverride props so single yields show their metadata.name (e.g., "Aave v3 USDC Lending") instead of just the asset symbol. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Display warning badges on yield cards and alerts on detail pages when yields are marked as underMaintenance or deprecated in the API. Co-Authored-By: Claude Opus 4.5 <[email protected]>
…badges Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Create reusable YieldExplainers component that shows reward schedule, unbonding periods, and other yield-specific info based on mechanics type. Add it to YieldEnterModal and EarnConfirm for consistent user education across all enter flows. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Show a "Learn more" link with external icon when a yield has metadata.documentation available. Appears below the description text on the yield detail page. Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add YieldExplainers component to YieldForm.tsx (yield page enter modal) - Update ProviderDto to include website and references fields - Use provider.references[0] for documentation link (protocol website) - Fix docs link styling: inline icon next to description - Prefer provider documentation over yield metadata documentation Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add 3-tab structure: All | Available to Earn | My Positions - Auto-navigate to "Available to Earn" tab when wallet connects - Each tab has explicit URL param for proper navigation - Keep recommended strip visible in all tabs - Add YieldTab enum for type safety - Rename Earn button action to navigate to Available tab Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Fix filters not working on My Positions tab (use unfiltered data) - Fix filters affecting Recommended For You (should be independent) - Fix "Show all" button navigating to All tab when on Available tab - Show full metadata.name on yield detail page below provider pill - Hide Withdraw button when user has no balance (instead of disabled) - Add YieldProviderInfo component with provider descriptions - Add YieldRelatedMarkets component showing other yields for same token - Make Yields first tab in Earn menu when feature flag enabled - Code simplification: remove unnecessary useMemo wrappers Co-Authored-By: Claude Opus 4.5 <[email protected]>
Show fiat value as primary (large text) and crypto as secondary. This matches user expectations where fiat is the more relevant metric. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add a professional two-column layout for desktop screens with info on the left and actions on the right. Create YieldInfoCard and YieldAvailableToDeposit components. Mobile layout remains unchanged. Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Fix validator mismatch on yield detail page by passing selectedValidatorAddress from YieldDetail to YieldPositionCard (ensures Cosmos uses ShapeShift DAO) - Add "New" badge support to NavigationDropdown component - Mark Yields menu item with New badge - Apply react-best-practices cleanup to yield components Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Create getYieldDisplayName that returns curator name for Morpho/Yearn vaults (e.g., "Steakhouse High Yield") and symbol for simple yields - Integrate into YieldItem, YieldDetail, YieldInfoCard, YieldHero - Remove useless secondary row on mobile showing ugly metadata name - Fix Visit Website alignment in YieldProviderInfo - Fix Lending badge from UPPERCASE to Capitalize - Simplify components by removing unnecessary useMemo calls Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Replace cramped pill with clean icon + label pairs - Show Asset (icon + symbol), Chain (icon + name), Protocol (icon + name) - Apply same pattern to both desktop (YieldInfoCard) and mobile (YieldHero) - Remove redundant subtitle section - Clean up unused code Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
… skill - Prefer arrow functions over function keyword in memo components - Prefer useMemo over IIFE in TSX - Prefer implicit returns in useMemo/useCallback - Document avoidance of nested ternaries Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Fix dangerous fallback to 18 decimals in YieldAvailableToDeposit - Remove unnecessary Box wrapper in YieldEnterModal - Simplify nested ternary in YieldDetail using useMemo - Refactor YieldExplainers with memoized translations - Convert function keywords to arrow functions in memo components - Use implicit returns in useMemo/useCallback - Simplify enum mappings in YieldsList using array pattern - Remove NEAR_IMPROVEMENTS.md Co-Authored-By: Claude Opus 4.5 <[email protected]>
Fixes potential runtime error when allBalances[id] is undefined, which would cause .minus() to throw or produce NaN. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Check aggregatedAmount > 0 for hasClaimable, consistent with hasWithdrawable check, to avoid showing empty claimable UI. Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add separate /yield/:yieldId route requiring only YIELD_XYZ flag - Create YieldDetailPage wrapper for standalone yield detail access - Update Header nav to check YieldsPage flag for yields link visibility - Update all yield detail navigation links to use /yield/ (singular) - Enable VITE_FEATURE_YIELD_XYZ in production This allows yield functionality on asset pages and defi drawer while keeping the /yields list page, yields nav link, and earn tab disabled. Co-Authored-By: Claude Opus 4.5 <[email protected]>
📝 WalkthroughWalkthroughThis PR restructures yield routing by introducing a singular Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested labels
Suggested reviewers
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 |
- Back button uses history.back() when YieldsPage disabled, /yields when enabled - Enable VITE_FEATURE_YIELD_MULTI_ACCOUNT in production Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Resolve merge conflicts from yield improvements p2 (#11703): - Adopt useMemo pattern for computed values - Use getYieldActionLabelKeys helper - Add showAvailableOnly prop to YieldItem - Preserve YieldsPage feature flag conditional logic Co-Authored-By: Claude Opus 4.5 <[email protected]>
Resolve conflicts in Yields pages adopting develop's validator handling improvements: - Use getDefaultValidatorForYield() utility instead of highest balance logic - Add requiresValidatorSelection check before setting validators - Update URL paths from /yield/ to /yields/ Co-Authored-By: Claude Opus 4.5 <[email protected]>
premiumjibles
left a comment
There was a problem hiding this comment.
With yarn dev https://jam.dev/c/8d007969-7a0a-42f1-abd7-a70547b990c6 👍
With preview prd https://jam.dev/c/6a303e76-c6f0-4d2e-ab43-725ed0544ed9 👍
All works as expected
Description
Enables a partial subset of the yield.xyz feature in production by setting
VITE_FEATURE_YIELD_XYZ=trueandVITE_FEATURE_YIELD_MULTI_ACCOUNT=truein.env.productionwhile keeping discovery surfaces disabled.What This ENABLES in Production
/yield/:yieldId) - accessible via direct link or CTA/assets/eip155:1/slip44:60)What This KEEPS DISABLED in Production
/yieldslist page - not accessible/yields/asset/:assetIdpage - not accessibleTechnical Changes
/yield/:yieldId/*route that only requiresYIELD_XYZflag (notYIELDS_PAGE)YieldDetailPagewrapper component for standalone yield detail accessYieldsPageflag (notYieldXyz) for yields link visibility/yield/(singular) pattern/yieldswhenYieldsPageenabled,history.back()otherwiseVITE_FEATURE_YIELD_XYZ=truein.env.productionVITE_FEATURE_YIELD_MULTI_ACCOUNT=truein.env.productionIssue (if applicable)
closes #
Risk
Low risk. Feature flag change with route restructuring. No changes to transaction logic. Yield functionality was already working behind flags.
Yield.xyz integrations (staking, vaults, lending across multiple chains). No changes to actual transaction flows.
Testing
Engineering
Test with
yarn dev(all flags enabled):/yields- should show full yields list page/yield/:yieldIddetail page/yieldsTest with
yarn preview:prod(partial flags - production config):/yields- should 404 or not load (route disabled)/yield/:yieldId(e.g.,/yield/ethereum-eth-lido-staking) - should load detail page/yields)Operations
Test on release branch / preview-prod (same flags as
yarn preview:prod):/yieldspage should NOT be accessible/yieldspage/yield/ethereum-eth-lido-stakingshould load yield detail pageScreenshots (if applicable)
https://jam.dev/c/9d613bd5-848e-472a-9a08-1aba377f085f
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.