Skip to content

DRY refactor, plan form extraction & Binance USDC (v2.6.1)#76

Merged
Crynners merged 3 commits intomainfrom
feature/plan-form-refactor
Mar 12, 2026
Merged

DRY refactor, plan form extraction & Binance USDC (v2.6.1)#76
Crynners merged 3 commits intomainfrom
feature/plan-form-refactor

Conversation

@nehasvit
Copy link
Collaborator

Summary

  • CredentialFormDelegate — shared credential form state extracted from 4 ViewModels (AddPlan, Onboarding, AddExchange, ExchangeDetail), eliminating ~11 duplicate fields and 6 methods per ViewModel
  • PlanFormDelegate + PlanFormContent — shared plan form logic and UI extracted from AddPlan, Onboarding FirstPlan, and EditPlan screens
  • ApiImportResultDialog — shared composable replacing ~30-line inline AlertDialog blocks in 3 screens
  • AccBotTopAppBar migration — 11 screens migrated from raw TopAppBar to the shared component
  • KuCoin signedRequest() helper extracted, NumberFormatters.roiValues() added
  • Binance: USDT → USDC, min order size lowered to 5 EUR/USDC
  • Quick amount presets: 5, 10, 25, 50, 100 (was 25–500)
  • Default DCA plan amount set to exchange minimum on exchange selection
  • Min order size display strips trailing zeros
  • USDC icon and MarketDataService mapping added
  • Net: -321 lines (1923 insertions, 2244 deletions) across 45 files

Test plan

  • Create a new DCA plan on Binance — verify USDC appears (not USDT), default amount is 5
  • Create a new DCA plan on other exchanges — verify correct fiat/min defaults
  • Quick amount buttons show 5, 10, 25, 50, 100
  • Min order size label has no trailing zeros (e.g. "5" not "5.0000000")
  • Onboarding flow: exchange setup → credential validation → first plan creation
  • Add/edit exchange credentials on all supported exchanges
  • API import result dialog appears correctly on AddExchange, ExchangeDetail, PlanDetails
  • Top app bar with back navigation works on all screens
  • ROI calculation on Dashboard and PlanDetails matches expected values
  • What's New dialog shows v2.6.1 release notes

🤖 Generated with Claude Code

vitnehasil and others added 3 commits March 12, 2026 13:28
Extract duplicated plan configuration logic (crypto/fiat/amount/frequency/
strategy/withdrawal/target) from AddPlan, FirstPlan, and EditPlan into
shared PlanFormDelegate (ViewModel logic) and PlanFormContent (Composable).

This eliminates ~450 lines of duplicated code and gives FirstPlan features
it was missing: MonthlyCostEstimateCard, address validation, and isFormValid.

Also fix CompletionScreen to show context-aware "what's next" steps based on
whether the user created a plan during onboarding (persisted via prefs).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ar migration & Binance fixes

- Extract CredentialFormDelegate shared across 4 ViewModels (AddPlan, Onboarding, AddExchange, ExchangeDetail)
- Extract ApiImportResultDialog replacing ~30-line inline dialogs in 3 screens
- Migrate 11 screens to AccBotTopAppBar
- Extract KuCoin signedRequest() helper in OtherExchanges
- Add NumberFormatters.roiValues() used by Dashboard and PlanDetails
- Binance: switch from USDT to USDC, lower min order size to 5
- Quick amount presets: 5, 10, 25, 50, 100 (was 25–500)
- Default plan amount set to exchange min order size
- Strip trailing zeros from min order size display
- Add USDC icon and MarketDataService mapping

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Crynners Crynners merged commit d413bd1 into main Mar 12, 2026
1 check failed
@nehasvit nehasvit deleted the feature/plan-form-refactor branch March 15, 2026 19:57
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.

3 participants