Skip to content

Binance UX: fiat precision, lot size info & network error handling#78

Open
nehasvit wants to merge 2 commits intomainfrom
feature/android-binance-ux
Open

Binance UX: fiat precision, lot size info & network error handling#78
nehasvit wants to merge 2 commits intomainfrom
feature/android-binance-ux

Conversation

@nehasvit
Copy link
Copy Markdown
Collaborator

Summary

  • Fiat display precision: amounts now show 2 decimal places (e.g. 4.36 instead of 4), with a separate fiatWhole() formatter for chart axes
  • Binance LOT_SIZE info: parameterized note per crypto (BTC, ETH, BNB, SOL, ADA, DOT) shown in plan form (Add/Edit/FirstPlan) and as an info dialog in Plan Details
  • Network error handling: new NetworkError sealed variant in credential validation with localized message (error_no_internet) in both EN and CS

Changed files (16)

  • NumberFormatters.ktfiat() → 2 decimals, new fiatWhole() for charts
  • Models.ktExchange.binanceLotStepSize map with real Binance step sizes
  • ValidateAndSaveCredentialsUseCase.ktNetworkError sealed variant
  • CredentialFormDelegate.kt@StringRes error support, resolvedCredentialsError composable extension
  • PlanFormContent.kt — lot size info row for Binance
  • PlanDetailsScreen.kt — info icon + AlertDialog for lot size
  • EditPlanViewModel.kt / EditPlanScreen.kt — pass exchange to form
  • AddPlanScreen.kt / FirstPlanScreen.kt — pass exchange to form
  • AddPlanViewModel.kt — handle NetworkError
  • AddExchangeScreen.kt / ExchangeDetailScreen.kt / ExchangeSetupScreen.kt — use resolvedCredentialsError
  • strings.xml (EN + CS) — binance_lot_size_note, error_no_internet

Test plan

  • Verify fiat amounts display with 2 decimal places in plan details and dashboard
  • Verify chart Y-axis labels still show whole numbers
  • Create/edit a Binance plan → lot size note appears under amount for each crypto
  • View Binance plan details → info icon next to amount, tap opens dialog with correct crypto/step size
  • Non-Binance plans show no lot size info
  • Disconnect network → try adding exchange credentials → localized "no internet" error in both EN and CS
  • Release build: confirm strings render correctly (no R8 issues)

🤖 Generated with Claude Code

vitnehasil and others added 2 commits March 14, 2026 15:45
…r handling

- Fix fiat amount display: show 2 decimal places (4.36 instead of 4)
- Add Binance lot size info note per crypto in plan form and plan details
- Add localized network error message for credential validation (CS/EN)
- Add fiatWhole() formatter for chart axis labels (no decimals)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Show push notification + dashboard banner when purchase fails due to
  no internet (instead of silent retry). Banner shows retry count,
  next retry time, and "Run Now" button.
- Track retry state on DcaPlanEntity (networkRetryCount, nextNetworkRetryAt,
  originalScheduledAt) so banner survives notification deletion.
- Purchase notification shows scheduled vs actual time when delay >5 min.
- Worker runs without NetworkType.CONNECTED constraint on alarm trigger
  so offline state is detected immediately.
- Auto-mark all notifications as read after 2s on notifications tab.
- DB migrations v15→v16→v17.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants