refactor: remove SubscriptionSection component and related API for cl…#165
refactor: remove SubscriptionSection component and related API for cl…#165
Conversation
…eaner landing page
WalkthroughRemoved the landing page subscription feature (API and UI) and updated debt-related calculations: split currency rates for core/extra debt and changed getMaxDebt’s price usage from division to multiplication. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI as BorrowIncreaseModal UI
participant Calc as Debt Calculations (getMaxDebt)
participant Validator as Input Validator
Note over UI,Calc: User opens modal (existing flow)
User ->> UI: enter coreDebt, extraDebt
UI ->> Calc: request max debt (coreCurrencyRate / extraCurrencyRate used)
Calc -->> UI: computed max values
UI ->> Validator: validate against minimums (coreMinimum / extraMinimum)
alt valid
Validator -->> UI: success -> enable submit
else invalid
Validator -->> UI: error -> show messages
end
(Highlight: core/extra rate usage and changed getMaxDebt calculation are the primary modifications in this flow.) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ 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 |
…imum required calculations
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/app/src/features/liquidity-flow/components/borrow-increase-modal/borrow-increase-modal.tsx (1)
138-143: Fix copy-paste error: useextraValueinstead ofvaluefor extra debt.Line 141 incorrectly uses
BigNumber(value)for the extra debt token, but it should useBigNumber(extraValue). This bug causes the user's extra debt input to be ignored, setting both core and extra debt to the same core value.Apply this diff:
if (showExtraInput && extraDebtTokenName) { return { ...core, - [extraDebtTokenName]: BigNumber(value), + [extraDebtTokenName]: BigNumber(extraValue), }; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/app/src/features/liquidity-flow/components/borrow-increase-modal/borrow-increase-modal.tsx(1 hunks)packages/app/src/features/liquidity-flow/utils/get-max-debt.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: test-build-image (landing)
- GitHub Check: test-build-image (app)
- GitHub Check: test-build-image (landing)
- GitHub Check: test-build-image (app)
…eaner landing page
Summary by CodeRabbit
Removed Features
Behavior Changes