Merged
Conversation
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
useEthenaCooldown was incorrectly triggered for all Pendle tokens on ETH mainnet. Add withdrawPathConfirmBoxes.length > 1 guard so the two-step Ethena cooldown flow and StakeProgress UI only activate when the backend returns multiple withdraw paths (Ethena tokens).
originalix
reviewed
Feb 28, 2026
…refresh cooldown - Add secondaryPrice to LightweightChart onHover for dual-line tooltip - Show Fixed APY / Base APY labels in chart hover tooltip - Display maturity date in protocol detail header - Replace token selector popover with full-screen modal (EarnTokenSelect) - Add RefreshCooldownButton with 5s cooldown after quote refresh - Remove re-quote logic during approve phase - Remove dead code: PENDLE_SUPPORTED_SYMBOLS, isPendleSupportedSymbol - Make IStakeTransactionConfirmation fields (title, rewards, receive) optional
…tatic config All Pendle tokens share identical IStakingFlowConfig. Replace per-token definitions with a single exported pendleFlowConfig constant and simplify Pendle provider entries to empty supportedSymbols/configs.
- Add showBodyTitle prop to EarnPageContainer for rendering pageTitle in page body - Only EarnProtocols (list page) enables showBodyTitle; detail pages unaffected - Align left padding with $pagePadding (20px) to match Figma spec
- Merge duplicate imports from @onekeyhq/shared/src/routes - Extract confirmOnPress useMemo to eliminate nested ternary - Extract summaryContent useMemo to eliminate nested ternary
…icates) - useQuoteRefresh: replace prefix increment with += 1 - StakeProgress: extract nested ternary to useMemo - PendleSharedComponents: extract nested ternary to IIFE, merge duplicate react imports
- LightweightChart: extract nested ternary to let+if in event callback - ApyChart: replace != null with !== undefined (type is number | undefined) - UniversalWithdraw: split summary nested ternary into two && conditions, extract footer props (confirmText/OnPress/Loading/Disabled) to useMemo
originalix
approved these changes
Mar 2, 2026
huhuanming
approved these changes
Mar 2, 2026
PatrickChoo
pushed a commit
to PatrickChoo/app-monorepo
that referenced
this pull request
Mar 10, 2026
* chore: add pendle * feat: Add Pendle category and update i18n * chore: pendle token config * chore: pendle details / manage page * chore: Add Selector * fix: cc review * chore: Edit the comment. * fix: lint * fix: resolve React best practice review issues * fix: lint error * feat: add Pendle swap-based manage page support with receive input - Add receive input section with arrow overlay to UniversalStake and UniversalWithdraw - Support forceSubduedBackground for disabled StakingAmountInput - Handle swap manage page (buy/sell) actions in useManagePage and NormalManageContent - Use API receiveButton token logoURI directly for receive input icon * feat: improve Pendle manage flow and action typing * feat: fix Pendle protocol list compatibility, redeem button, and field naming * feat: enhance Pendle UI with withdraw path selector, pixel alignment, and portfolio improvements * feat: add Pendle Ethena unstake two-step transaction flow * feat: add ethenaPath param for Pendle Ethena two-step unstake flow * fix: correct StakeProgress labels to match Figma design (Approve → Swap → Unstake) * feat: add ETH network guard for Ethena two-step unstake and render claim button in portfolio assetsStatus * fix: harden stake/unstake flows from pre-merge review - Await fresh fee estimate after approve before submitting (legacy + permit2) - Add AbortSignal guard for Ethena two-step unstake navigation safety - Add null-checks for optional fields (history title, approve target) - Add revalidateOnFocus to Pendle asset list hooks * fix: lint * feat: add useQuoteCountdown hook for Pendle quote lifecycle 15-second countdown timer with reset/refresh/expire semantics for managing Pendle quote freshness. * feat: integrate quote countdown and refresh into Pendle stake/withdraw - UniversalStake: show Refresh button when quote expires, re-quote after approve if expired, reset countdown on fresh quote - UniversalWithdraw: same countdown integration for sell early flow - HeaderRight: add countdown seconds display and refresh icon for Pendle * feat: add slippage settings for Pendle and wire to build transaction API - NormalManageContent: manage pendleSlippage state with SlippageSettingDialog, create per-tab countdowns, wire to HeaderRight/StakeSection/WithdrawSection - StakeSection/WithdrawSection: pass slippage and countdown props through - useUniversalHooks: pass slippage to buildStakeTransaction and all buildUnstakeTransaction calls * fix: lint * refactor: extract shared Pendle layout hook, unify validation, and fix inconsistencies - Extract `usePendleLayoutState` hook to deduplicate ~300 lines of Pendle layout logic between UniversalStake and UniversalWithdraw - Add `useIsPendleProvider` hook to replace inline `useMemo(() => earnUtils.isPendleProvider(...))` pattern across 5 files - Add `isInvalidAmount` util to unify inconsistent `isNaN` implementations (lodash vs local) - Add try/catch to `debouncedFetchTransactionConfirmation` in both Stake and Withdraw - Fix `useQuoteCountdown.refresh` to reset timer immediately instead of staying stuck at 0 - Fix `buildUnstakeTransaction` vault param: use `undefined` instead of empty string when not vault-based - Remove ~71 lines of commented-out dead code in UniversalStake - Extract hardcoded `' vs Best'` string as `VS_BEST_LABEL` constant * fix: remove hardcoded 'vs Best' label, let backend provide full text * feat: support redeemable button in protocol list driven by server aprInfo.button - Add button field to IEarnAvailableAssetAprInfo type to align with server DTO - Navigate to ManagePosition redeem tab when aprInfo.button.type is 'redeem' - Simplify getMaturityDisplay to trust server description instead of local calculation - Render redeemable text from server button data with i18n fallback * refactor: extract useQuoteRefresh hook with stale-request guard and per-tab loading - Extract quote refresh logic into generic useQuoteRefresh hook - Add requestId-based stale response discard to prevent race conditions - Split quoteRefreshing state per tab to avoid cross-tab loading leaks - Fix icon to RotateClockwiseOutline and gap to $3.5 per Figma spec - Remove optimistic countdown reset; let onQuoteReset handle it on success * fix: pendle sell flow button text, approve skip, and transaction detail params - Button text follows step: show "Swap" instead of "Withdraw" during Pendle sell - StakeProgress skips step 1 (Approve) when allowance is sufficient - Transaction detail shows "Sell"/"Buy" labels with token icon for Pendle - Add Sell/Buy to EEarnLabels enum and txActionUtils label mapping - Fix useRef missing initial value in UniversalWithdraw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.