Repository navigation
feat: support dark mode - #1480
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe PR adds light/dark semantic theming through ChangesTheme migration and UI coverage
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant ContactsFragment
participant DashPayUserBottomSheet
participant ContactRequestPaneCompose
participant SendCoinsActivity
ContactsFragment->>DashPayUserBottomSheet: show user profile
DashPayUserBottomSheet->>ContactRequestPaneCompose: render relationship actions
ContactRequestPaneCompose->>DashPayUserBottomSheet: send or accept callback
DashPayUserBottomSheet->>DashPayUserBottomSheet: check credits and submit request
DashPayUserBottomSheet->>SendCoinsActivity: launch payment flow
DashPayUserBottomSheet-->>ContactsFragment: set fragment result after success
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
- Add the Figma base color palette as theme-independent primitives: MyTheme.ColorScheme companion object and palette_* color resources, and wire the light/dark schemes to reference them - Snap light/dark semantic colors to their Figma values (text, background, brand blue, error/success, dash_black family) - Fix the segmented picker non-selected track (use a 10% gray tint instead of an opaque fill) so non-selected items render correctly - Migrate common-module Compose previews to the dual @Preview(uiMode) light/dark pattern wrapped in DashWalletTheme - Make the shared dialog theme (My.Theme.Dialog) DayNight so dialogs follow dark mode Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- My.Theme.Dialog: switch to DayNight parent and use background_secondary for the dialog window background so all BaseAlertDialogBuilder dialogs follow night mode - CheckPinDialog: theme the dialog window backdrop (background_primary) and set the PIN card's cardBackgroundColor (CardView ignores android:background) - 2FA keyboard card (enter_two_fa_code_fragment): apply CardViewRaised.Radius15 so its background matches the other keyboard cards in dark mode - colors.xml: make legacy bg_bright follow the theme (background_secondary) and add a dark bg_panel override; previously fixed light values - plus assorted layout dark-mode adjustments Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- ProfilePictureZoomTransformation: reject malformed zoom rects up front instead of producing a 1px sliver - ProfileAvatarCompose: gate username/URL logging behind BuildConfig.DEBUG; drop Size.ORIGINAL so Coil downsamples to the avatar bounds - DashPayUserBottomSheet: disable the unimplemented Ignore button; notify the host only after the contact op succeeds; show wallet-net tx amount instead of the first output - DashPayUserBottomSheetViewModel: apply Sent/Received filter to contact rows using the same direction logic as the row UI - TransactionResultActivity: persist the deferred-finish flag so dismissing the restored bottom sheet still exits after rotation Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
@coderabbitai review |
✅ Action performedReview finished.
|
Fix confirmed issues from the dark mode review: - MixingStatusCard: theme-aware tint for the Dash logo instead of hardcoded near-black, which vanished on the dark card - BuyAndSellScreen: restore fixed white text on the always-dark "no connection" toast (was unreadable in light mode) - ItemDetails: use backgroundSecondary for online-merchant details card instead of forced white (white-on-white in dark mode) - ContactRequestPaneCompose, ButtonStyles.blueWithWhiteText: read LocalDashColors.current instead of the static light MyTheme.Colors - fragment_dash_spend_user_auth: fixed white spinner on the always-blue button instead of background_secondary - Migrate legacy layouts exposed by the DayNight theme switch: dash_white backgrounds to background_secondary, dash_black text to content_primary, dash_light_gray/dash_black hairlines to divider_color (invite created, payment request details, contact request view, accept invitation row, recover from seed, dashpay user, input text dialog, maya/coinbase convert views) Audited all remaining layout XMLs across modules: every other dash_white/dash_black use sits on a fixed-color surface (blue buttons, red banners, dark lock/onboarding/widget backgrounds) and is correct in both modes. Also add paired light/dark previews wrapped in DashWalletTheme to Settings, Tools, TransactionMetadataSettings, MasternodeKeys, MasternodeKeyChain, About and ItemDetails screens, and fix the WalletCreationDatePickerDialog dark preview rendering light. Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
wallet/src/de/schildbach/wallet/ui/compose_views/CreateInstantUsernameDialog.kt (1)
51-56: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winBackground stays hardcoded white while text is now theme-aware.
colors.textPrimary/colors.extraDarkGrayare now dynamic per theme, but the container background at Line 56 is stillColor.White. In dark mode this can produce a white background with light (dark-theme) text, breaking readability — the opposite of what this PR intends to fix.🎨 Proposed fix
- .background(Color.White) + .background(colors.backgroundPrimary)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@wallet/src/de/schildbach/wallet/ui/compose_views/CreateInstantUsernameDialog.kt` around lines 51 - 56, The container background in CreateInstantUsernameDialog is still hardcoded to Color.White even though the text colors now come from LocalDashColors; update the Column background to use a theme-aware color from the same palette instead of a fixed white. Keep the change in CreateInstantUsernameDialog and preserve the existing text color handling so the dialog stays readable in both light and dark themes.wallet/src/de/schildbach/wallet/ui/main/WalletTransactionsFragment.kt (1)
106-176: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winFix indentation on the new
DashPayUserBottomSheetcall.Line 110 is indented at the same level as the enclosing
if(line 109) instead of one level deeper, unlike the surrounding} else {block. This will fail ktlint formatting checks.🎨 Proposed indentation fix
if (rowView is TransactionRowView) { if (isProfileClick && rowView.contact != null) { - DashPayUserBottomSheet.newInstance(rowView.contact).show(requireActivity()) + DashPayUserBottomSheet.newInstance(rowView.contact).show(requireActivity()) } else {As per coding guidelines,
**/*.kt: "Format Kotlin code with ktlint".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@wallet/src/de/schildbach/wallet/ui/main/WalletTransactionsFragment.kt` around lines 106 - 176, The new DashPayUserBottomSheet.show call inside WalletTransactionsFragment’s clickHandler is misindented and breaks ktlint formatting. Adjust the indentation in the isProfileClick && rowView.contact != null branch so the DashPayUserBottomSheet.newInstance(...).show(requireActivity()) call is nested one level deeper under the enclosing else block, matching the surrounding Kotlin style in clickHandler.Source: Coding guidelines
wallet/src/de/schildbach/wallet/ui/more/ToolsScreen.kt (1)
188-222: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winDuplicate "ZenLedger Export" menu item rendered twice.
A new standalone
Menublock with a "ZenLedger Export"MenuItem(no subtitle) was added at Lines 190-197, but the originalMenublock containing the same "ZenLedger Export"MenuItem(with subtitle) at Lines 214-222 was left in place. Both use the sameonZenLedgerExportaction, so the item now renders twice on screen.🐛 Proposed fix: remove the stale duplicate block
Menu { // Credits (only shown when user has a username) ... } } - Menu { - // ZenLedger Export - MenuItem( - title = stringResource(R.string.zenledger_export_title), - subtitle = stringResource(R.string.zenledger_export_subtitle), - icon = R.drawable.ic_zenledger, - action = onZenLedgerExport - ) - } } } }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@wallet/src/de/schildbach/wallet/ui/more/ToolsScreen.kt` around lines 188 - 222, The ToolsScreen.kt menu is rendering ZenLedger Export twice because a new Menu block with MenuItem(onZenLedgerExport) was added while the existing ZenLedger Export Menu block was left in place. Remove the stale duplicate Menu/MenuItem so only one ZenLedger Export entry remains, and keep the intended version in the ToolsScreen content consistent with the surrounding menu items.
🧹 Nitpick comments (13)
common/src/main/java/org/dash/wallet/common/ui/components/TopNavBase.kt (1)
440-440: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueInconsistent indentation on
NavBarTitlecall.Line 440 uses less indentation than the surrounding
NavBarBackPlus/NavBarClosecalls in the sameColumnblock.As per coding guidelines,
**/*.ktshould be "Format Kotlin code with ktlint," which would normalize this indentation.🔧 Proposed fix
NavBarBackPlus(onBackClick = {}, onPlusClick = {}) - NavBarTitle(title = "Title Only") + NavBarTitle(title = "Title Only") NavBarClose(onCloseClick = {})🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@common/src/main/java/org/dash/wallet/common/ui/components/TopNavBase.kt` at line 440, The NavBarTitle call in the Column block is indented inconsistently with the surrounding NavBarBackPlus and NavBarClose calls. Update the TopNavBase composable so the NavBarTitle("Title Only") invocation matches the same ktlint-formatted indentation level as the other NavBarTitle-related calls in that block, keeping the layout consistent with the existing Kotlin style.Source: Coding guidelines
wallet/src/de/schildbach/wallet/ui/dashpay/ContactsFragment.kt (1)
443-448: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRemove the dead
onActivityResultoverride. This fragment now handlesDashPayUserBottomSheetthroughsetFragmentResultListener, and there are no active call sites that startDashPayUserActivityfor a result from here.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@wallet/src/de/schildbach/wallet/ui/dashpay/ContactsFragment.kt` around lines 443 - 448, Remove the obsolete onActivityResult override from ContactsFragment; this fragment no longer launches DashPayUserActivity for a result and now receives updates through setFragmentResultListener instead. Delete the override in ContactsFragment and rely on the fragment result handling path, keeping searchContacts() only where results are delivered from the active DashPayUserBottomSheet flow.wallet/res/drawable/ic_network_monitor.xml (1)
8-8: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueHardcoded fill color in new vector drawable.
Both paths use a hardcoded
android:fillColor="#008DE4". If this icon is intended to adapt across light/dark surfaces (rather than remain a fixed brand-blue accent), consider referencing a theme color resource or applying a tint at the call site instead of baking the color into the drawable.Also applies to: 11-11
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@wallet/res/drawable/ic_network_monitor.xml` at line 8, The new vector drawable uses a hardcoded fill color, so update ic_network_monitor.xml to avoid baking in the fixed blue in both path elements. Replace the inline android:fillColor value with a theme/resource-based color reference, or move the coloring responsibility to the caller via tinting if the icon should adapt to different surfaces. Use the drawable’s path entries as the target for the change.wallet/src/de/schildbach/wallet/ui/compose_views/CreateInstantUsernameDialog.kt (1)
73-85: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove leftover commented-out hardcoded colors.
The old
Color(0xFF...)values are left as trailing comments; safe to delete now that theming is applied.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@wallet/src/de/schildbach/wallet/ui/compose_views/CreateInstantUsernameDialog.kt` around lines 73 - 85, Remove the leftover hardcoded color comments in CreateInstantUsernameDialog’s Text styling so the Compose theming stays clean. Update the text color assignments in the dialog content to rely on the existing colors object, and delete the trailing commented-out Color(0xFF...) values near the textPrimary and extraDarkGray usage.common/src/main/java/org/dash/wallet/common/ui/components/Grabber.kt (1)
56-57: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueTypo in preview names: "Grapper" → "Grabber".
✏️ Proposed fix
-@Preview(name = "Grapper Light", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_NO) -@Preview(name = "Grapper Dark", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES) +@Preview(name = "Grabber Light", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_NO) +@Preview(name = "Grabber Dark", showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@common/src/main/java/org/dash/wallet/common/ui/components/Grabber.kt` around lines 56 - 57, The preview labels in Grabber.kt contain a typo in the two `@Preview` annotations. Update the name values on the Grabber composable previews from “Grapper Light” and “Grapper Dark” to “Grabber Light” and “Grabber Dark” so the preview titles match the component name.common/src/main/java/org/dash/wallet/common/ui/components/Menu.kt (1)
23-38: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low valueRedundant duplicate background on Box and Column.
Both the outer
Boxand innerColumnapply the samecolors.backgroundSecondarybackground with an identicalRoundedCornerShape(20.dp). The inner background fully overlaps the outer one and adds an extra draw call with no visible difference.♻️ Proposed simplification
- Box( - modifier = Modifier.fillMaxWidth() - .padding(horizontal = 20.dp) - .background(colors.backgroundSecondary, RoundedCornerShape(20.dp)), - ) { - Column( - modifier = Modifier.fillMaxWidth() - .padding(6.dp) - .background(colors.backgroundSecondary, RoundedCornerShape(20.dp)), - verticalArrangement = Arrangement.spacedBy(2.dp) - ) { - menuItems.invoke() - } - } + Column( + modifier = Modifier.fillMaxWidth() + .padding(horizontal = 20.dp) + .background(colors.backgroundSecondary, RoundedCornerShape(20.dp)) + .padding(6.dp), + verticalArrangement = Arrangement.spacedBy(2.dp) + ) { + menuItems.invoke() + }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@common/src/main/java/org/dash/wallet/common/ui/components/Menu.kt` around lines 23 - 38, The Menu composable is drawing the same background twice on both the outer Box and inner Column using colors.backgroundSecondary with the same RoundedCornerShape(20.dp). Update Menu so only one container applies the background and keep the shape/padding consistent, removing the redundant background from either Box or Column while preserving the existing layout and menuItems content.wallet/src/de/schildbach/wallet/ui/compose_views/ExtendedPublicKeyDialog.kt (1)
87-96: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueFix indentation on Line 90 to match ktlint formatting.
color = colors.textSecondary,is over-indented relative to the siblingtext =/textAlign =parameters.🎨 Proposed fix
Text( text = xpub, style = MyTheme.Body2Regular, - color = colors.textSecondary, + color = colors.textSecondary, textAlign = TextAlign.Center,As per coding guidelines, "
**/*.kt: Format Kotlin code with ktlint".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@wallet/src/de/schildbach/wallet/ui/compose_views/ExtendedPublicKeyDialog.kt` around lines 87 - 96, The Text call in ExtendedPublicKeyDialog is misindented and needs ktlint-aligned formatting. Fix the parameter alignment inside the Text composable so the color argument matches the indentation of the neighboring text, style, and textAlign parameters; keep the change localized to the xpub Text block.Source: Coding guidelines
wallet/src/de/schildbach/wallet/ui/dashpay/user/DashPayUserBottomSheet.kt (1)
148-157: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse
BundleCompat.getParcelableinstead of the deprecated API.
androidx.core.os.BundleCompat.getParcelable(bundle, key, Class)avoids the deprecation and works consistently across API levels without needing@Suppress.♻️ Proposed fix
+import androidx.core.os.BundleCompat ... private fun resolveInitialUserData(args: Bundle?): UsernameSearchResult? { if (args == null) return null - `@Suppress`("DEPRECATION") - args.getParcelable<UsernameSearchResult>(ARG_USERNAME_SEARCH_RESULT)?.let { return it } - `@Suppress`("DEPRECATION") - args.getParcelable<DashPayProfile>(ARG_DASHPAY_PROFILE)?.let { profile -> + BundleCompat.getParcelable(args, ARG_USERNAME_SEARCH_RESULT, UsernameSearchResult::class.java)?.let { return it } + BundleCompat.getParcelable(args, ARG_DASHPAY_PROFILE, DashPayProfile::class.java)?.let { profile -> return UsernameSearchResult(profile.username, profile, null, null) } return null }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@wallet/src/de/schildbach/wallet/ui/dashpay/user/DashPayUserBottomSheet.kt` around lines 148 - 157, The initial user-data resolver in DashPayUserBottomSheet is still using deprecated Bundle.getParcelable calls with suppression. Update resolveInitialUserData to read both ARG_USERNAME_SEARCH_RESULT and ARG_DASHPAY_PROFILE via androidx.core.os.BundleCompat.getParcelable with the appropriate class type, and remove the `@Suppress`("DEPRECATION") annotations so the method stays compatible across API levels without deprecated APIs.wallet/src/de/schildbach/wallet/ui/more/masternode_keys/MasternodeKeyChainScreen.kt (1)
229-253: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueStatic-analysis flag on preview sample key is a likely false positive.
Betterleaks flags line 243 (
"03eeda68f0eb482935c7ecbebf7b6497756e471b7a0fad5014bbe6ab593cb6127") as a generic API key, but this is dummy preview data forMasternodeKeyChainScreenPreview, not a real secret. Consider using an obviously fake placeholder (e.g. all zeros/"0000...", "Xxxxx...") to avoid tripping future secret scanners without needing suppression comments.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@wallet/src/de/schildbach/wallet/ui/more/masternode_keys/MasternodeKeyChainScreen.kt` around lines 229 - 253, The preview sample in MasternodeKeyChainScreenPreview is triggering secret-scanner false positives because the hardcoded KeypairEntry public-key string looks like a real credential. Replace the current dummy value in the MasternodeKeyChainUIState preview data with an obviously fake placeholder in the preview’s KeyFieldEntry list (for example a zeroed or clearly synthetic value) so the sample remains non-sensitive and won’t be flagged by static analysis.Source: Linters/SAST tools
features/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/adapters/SearchHeaderAdapter.kt (1)
133-161: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRedundant explicit style values duplicate
SegmentedPicker's own defaults.
backgroundColor/thumbColorhere exactly matchSegmentedPicker's new fallback logic (colors.gray400.copy(alpha = 0.1f)/colors.backgroundSecondary) when style fields are leftnull. Passing them explicitly duplicates the theme-resolution logic and risks silent drift if the defaults are ever tuned in one place but not the other.♻️ Proposed simplification
SegmentedPicker( options, modifier = Modifier.height(36.dp), selectedIndex = currentFilterOption, - style = SegmentedPickerStyle( - backgroundColor = colors.gray400.copy(alpha = 0.1f), - thumbColor = colors.backgroundSecondary - ) ) { option, index ->🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@features/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/adapters/SearchHeaderAdapter.kt` around lines 133 - 161, The explicit SegmentedPickerStyle colors in SearchHeaderAdapter are duplicating the picker’s own default fallback values; remove the redundant backgroundColor and thumbColor assignments so SegmentedPicker can resolve them internally. Keep the SegmentedPicker call and its style usage, but only pass overrides if this screen truly needs custom colors beyond the theme defaults.wallet/src/de/schildbach/wallet/ui/payments/PaymentsFragment.kt (1)
90-103: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueSame redundant default-matching style as
SearchHeaderAdapter.kt.
backgroundColor/thumbColoragain exactly reproduceSegmentedPicker's own null-fallback values. Consider omitting the explicitstyleoverride (or leaving those two fieldsnull) to rely on the picker's built-in theme resolution.♻️ Proposed simplification
SegmentedPicker( options, modifier = Modifier.height(32.dp), selectedIndex = selectedTab, - style = SegmentedPickerStyle( - backgroundColor = colors.gray400.copy(alpha = 0.1f), - thumbColor = colors.backgroundSecondary - ) ) { option, index ->🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@wallet/src/de/schildbach/wallet/ui/payments/PaymentsFragment.kt` around lines 90 - 103, The SegmentedPicker in PaymentsFragment is passing a style that duplicates the component’s default fallback colors via LocalDashColors.current. Update the SegmentedPicker call to stop overriding the redundant backgroundColor and thumbColor values in SegmentedPickerStyle, or remove the style override entirely so the picker can use its built-in theme resolution; keep the rest of the selectedTab and pager wiring unchanged.common/src/main/java/org/dash/wallet/common/ui/components/TopIntroSend.kt (1)
298-391: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider extracting a shared preview scaffold.
The four
*PreviewContent()functions (Visible/Hidden/NoFiat/Icon) are structurally identical — only theTopIntroSend(...)call differs. A singleTopIntroSendPreviewScaffold(content:@composable() -> Unit)wrapper (or a sharedColumnwithcolors.backgroundPrimarybackground) would remove the duplication.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@common/src/main/java/org/dash/wallet/common/ui/components/TopIntroSend.kt` around lines 298 - 391, The four TopIntroSend preview content functions are duplicating the same Column/background/padding setup, with only the TopIntroSend call changing. Extract the shared layout into a reusable preview scaffold (for example a TopIntroSendPreviewScaffold in TopIntroSend.kt) that applies LocalDashColors.current.backgroundPrimary and the padding, then pass each variant’s TopIntroSend content into it from TopIntroSendVisiblePreviewContent, TopIntroSendHiddenPreviewContent, TopIntroSendNoFiatPreviewContent, and TopIntroSendIconPreviewContent.common/src/main/java/org/dash/wallet/common/ui/components/DashButton.kt (1)
50-66: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
FilledGreenuses a hardcoded literal instead of a theme color.Every other
Stylevariant sources its background fromLocalDashColors(colors.dashBlue,colors.orange,colors.red, etc.), butFilledGreenuses a rawColor(0xFF3EB489). This breaks the theme abstraction this PR is building and bypasses any future light/dark tuning.Consider adding a semantic
green/successcolor toLocalDashColors/MyThemeand referencing it here instead of the literal.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@common/src/main/java/org/dash/wallet/common/ui/components/DashButton.kt` around lines 50 - 66, The DashButton background selection in `DashButton` uses a hardcoded literal for `Style.FilledGreen`, which bypasses the theme abstraction used by the other style variants. Add a semantic green/success color to `LocalDashColors` and wire it through `MyTheme`, then update the `when` branch for `Style.FilledGreen` to use that theme value instead of the raw `Color(0xFF3EB489)`. Keep the rest of the style mapping unchanged so all button backgrounds continue to come from the shared color palette.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@common/src/main/java/org/dash/wallet/common/ui/avatar/ProfilePictureZoomTransformation.kt`:
- Around line 36-48: The ProfilePictureZoomTransformation.transform path needs
an early guard for zero-dimension inputs before any coerceIn math, since
input.width or input.height being 0 can make the clamping bounds invalid and
crash. Update the transform method to return the original bitmap when the input
bitmap is empty, and remove or replace the unreachable cropWidth/cropHeight <= 0
check because those values are already forced to at least 1 by the existing crop
calculations. Use the transform, zoomedRect, cropWidth, and cropHeight logic
together to keep the fix localized and safe.
In
`@common/src/main/java/org/dash/wallet/common/ui/components/DashModelDialog.kt`:
- Around line 65-91: The dialog is reading LocalDashColors.current before
DashWalletTheme is applied, so it can use the wrong palette. Update
DashModelDialog to obtain colors inside the DashWalletTheme block, then use that
themed colors value for the Dialog/Card/Column styling so the dialog reflects
the active light or dark theme correctly.
In `@common/src/main/res/values/colors.xml`:
- Around line 35-41: Add a values-night override for bg_list_selected so it
adapts in dark mode. Update the color resource set by mirroring the existing
bg_panel pattern in the night colors file, and ensure the bg_list_selected
reference used by wallet/res/values/styles.xml resolves to a darker/appropriate
variant instead of the hardcoded light-mode value.
In `@wallet/src/de/schildbach/wallet/ui/more/WalletCreationDatePickerDialog.kt`:
- Around line 58-74: The year bounds in WalletCreationDatePickerDialog’s date
picker are being derived from the device’s local calendar, which can misclassify
the current year around UTC New Year. Update the max year calculation in the
WalletCreationDatePickerDialog setup to use a UTC-based calendar, while keeping
the existing instant-based earliestMillis/nowMillis date bounds and the
SelectableDates logic unchanged.
---
Outside diff comments:
In
`@wallet/src/de/schildbach/wallet/ui/compose_views/CreateInstantUsernameDialog.kt`:
- Around line 51-56: The container background in CreateInstantUsernameDialog is
still hardcoded to Color.White even though the text colors now come from
LocalDashColors; update the Column background to use a theme-aware color from
the same palette instead of a fixed white. Keep the change in
CreateInstantUsernameDialog and preserve the existing text color handling so the
dialog stays readable in both light and dark themes.
In `@wallet/src/de/schildbach/wallet/ui/main/WalletTransactionsFragment.kt`:
- Around line 106-176: The new DashPayUserBottomSheet.show call inside
WalletTransactionsFragment’s clickHandler is misindented and breaks ktlint
formatting. Adjust the indentation in the isProfileClick && rowView.contact !=
null branch so the
DashPayUserBottomSheet.newInstance(...).show(requireActivity()) call is nested
one level deeper under the enclosing else block, matching the surrounding Kotlin
style in clickHandler.
In `@wallet/src/de/schildbach/wallet/ui/more/ToolsScreen.kt`:
- Around line 188-222: The ToolsScreen.kt menu is rendering ZenLedger Export
twice because a new Menu block with MenuItem(onZenLedgerExport) was added while
the existing ZenLedger Export Menu block was left in place. Remove the stale
duplicate Menu/MenuItem so only one ZenLedger Export entry remains, and keep the
intended version in the ToolsScreen content consistent with the surrounding menu
items.
---
Nitpick comments:
In `@common/src/main/java/org/dash/wallet/common/ui/components/DashButton.kt`:
- Around line 50-66: The DashButton background selection in `DashButton` uses a
hardcoded literal for `Style.FilledGreen`, which bypasses the theme abstraction
used by the other style variants. Add a semantic green/success color to
`LocalDashColors` and wire it through `MyTheme`, then update the `when` branch
for `Style.FilledGreen` to use that theme value instead of the raw
`Color(0xFF3EB489)`. Keep the rest of the style mapping unchanged so all button
backgrounds continue to come from the shared color palette.
In `@common/src/main/java/org/dash/wallet/common/ui/components/Grabber.kt`:
- Around line 56-57: The preview labels in Grabber.kt contain a typo in the two
`@Preview` annotations. Update the name values on the Grabber composable previews
from “Grapper Light” and “Grapper Dark” to “Grabber Light” and “Grabber Dark” so
the preview titles match the component name.
In `@common/src/main/java/org/dash/wallet/common/ui/components/Menu.kt`:
- Around line 23-38: The Menu composable is drawing the same background twice on
both the outer Box and inner Column using colors.backgroundSecondary with the
same RoundedCornerShape(20.dp). Update Menu so only one container applies the
background and keep the shape/padding consistent, removing the redundant
background from either Box or Column while preserving the existing layout and
menuItems content.
In `@common/src/main/java/org/dash/wallet/common/ui/components/TopIntroSend.kt`:
- Around line 298-391: The four TopIntroSend preview content functions are
duplicating the same Column/background/padding setup, with only the TopIntroSend
call changing. Extract the shared layout into a reusable preview scaffold (for
example a TopIntroSendPreviewScaffold in TopIntroSend.kt) that applies
LocalDashColors.current.backgroundPrimary and the padding, then pass each
variant’s TopIntroSend content into it from TopIntroSendVisiblePreviewContent,
TopIntroSendHiddenPreviewContent, TopIntroSendNoFiatPreviewContent, and
TopIntroSendIconPreviewContent.
In `@common/src/main/java/org/dash/wallet/common/ui/components/TopNavBase.kt`:
- Line 440: The NavBarTitle call in the Column block is indented inconsistently
with the surrounding NavBarBackPlus and NavBarClose calls. Update the TopNavBase
composable so the NavBarTitle("Title Only") invocation matches the same
ktlint-formatted indentation level as the other NavBarTitle-related calls in
that block, keeping the layout consistent with the existing Kotlin style.
In
`@features/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/adapters/SearchHeaderAdapter.kt`:
- Around line 133-161: The explicit SegmentedPickerStyle colors in
SearchHeaderAdapter are duplicating the picker’s own default fallback values;
remove the redundant backgroundColor and thumbColor assignments so
SegmentedPicker can resolve them internally. Keep the SegmentedPicker call and
its style usage, but only pass overrides if this screen truly needs custom
colors beyond the theme defaults.
In `@wallet/res/drawable/ic_network_monitor.xml`:
- Line 8: The new vector drawable uses a hardcoded fill color, so update
ic_network_monitor.xml to avoid baking in the fixed blue in both path elements.
Replace the inline android:fillColor value with a theme/resource-based color
reference, or move the coloring responsibility to the caller via tinting if the
icon should adapt to different surfaces. Use the drawable’s path entries as the
target for the change.
In
`@wallet/src/de/schildbach/wallet/ui/compose_views/CreateInstantUsernameDialog.kt`:
- Around line 73-85: Remove the leftover hardcoded color comments in
CreateInstantUsernameDialog’s Text styling so the Compose theming stays clean.
Update the text color assignments in the dialog content to rely on the existing
colors object, and delete the trailing commented-out Color(0xFF...) values near
the textPrimary and extraDarkGray usage.
In `@wallet/src/de/schildbach/wallet/ui/compose_views/ExtendedPublicKeyDialog.kt`:
- Around line 87-96: The Text call in ExtendedPublicKeyDialog is misindented and
needs ktlint-aligned formatting. Fix the parameter alignment inside the Text
composable so the color argument matches the indentation of the neighboring
text, style, and textAlign parameters; keep the change localized to the xpub
Text block.
In `@wallet/src/de/schildbach/wallet/ui/dashpay/ContactsFragment.kt`:
- Around line 443-448: Remove the obsolete onActivityResult override from
ContactsFragment; this fragment no longer launches DashPayUserActivity for a
result and now receives updates through setFragmentResultListener instead.
Delete the override in ContactsFragment and rely on the fragment result handling
path, keeping searchContacts() only where results are delivered from the active
DashPayUserBottomSheet flow.
In `@wallet/src/de/schildbach/wallet/ui/dashpay/user/DashPayUserBottomSheet.kt`:
- Around line 148-157: The initial user-data resolver in DashPayUserBottomSheet
is still using deprecated Bundle.getParcelable calls with suppression. Update
resolveInitialUserData to read both ARG_USERNAME_SEARCH_RESULT and
ARG_DASHPAY_PROFILE via androidx.core.os.BundleCompat.getParcelable with the
appropriate class type, and remove the `@Suppress`("DEPRECATION") annotations so
the method stays compatible across API levels without deprecated APIs.
In
`@wallet/src/de/schildbach/wallet/ui/more/masternode_keys/MasternodeKeyChainScreen.kt`:
- Around line 229-253: The preview sample in MasternodeKeyChainScreenPreview is
triggering secret-scanner false positives because the hardcoded KeypairEntry
public-key string looks like a real credential. Replace the current dummy value
in the MasternodeKeyChainUIState preview data with an obviously fake placeholder
in the preview’s KeyFieldEntry list (for example a zeroed or clearly synthetic
value) so the sample remains non-sensitive and won’t be flagged by static
analysis.
In `@wallet/src/de/schildbach/wallet/ui/payments/PaymentsFragment.kt`:
- Around line 90-103: The SegmentedPicker in PaymentsFragment is passing a style
that duplicates the component’s default fallback colors via
LocalDashColors.current. Update the SegmentedPicker call to stop overriding the
redundant backgroundColor and thumbColor values in SegmentedPickerStyle, or
remove the style override entirely so the picker can use its built-in theme
resolution; keep the rest of the selectedTab and pager wiring unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: bdf45edc-eb48-4b08-a433-13ac83957b25
📒 Files selected for processing (149)
.claude/agents/DEVELOPMENT-PATTERNS.md.claude/agents/figma-to-compose.mdcommon/src/main/java/org/dash/wallet/common/ui/avatar/ProfilePictureZoomTransformation.ktcommon/src/main/java/org/dash/wallet/common/ui/components/DashButton.ktcommon/src/main/java/org/dash/wallet/common/ui/components/DashCheckBox.ktcommon/src/main/java/org/dash/wallet/common/ui/components/DashList.ktcommon/src/main/java/org/dash/wallet/common/ui/components/DashModelDialog.ktcommon/src/main/java/org/dash/wallet/common/ui/components/DashRadioButton.ktcommon/src/main/java/org/dash/wallet/common/ui/components/DashToggle.ktcommon/src/main/java/org/dash/wallet/common/ui/components/EnterAmount.ktcommon/src/main/java/org/dash/wallet/common/ui/components/FeatureList.ktcommon/src/main/java/org/dash/wallet/common/ui/components/FeatureTopText.ktcommon/src/main/java/org/dash/wallet/common/ui/components/Grabber.ktcommon/src/main/java/org/dash/wallet/common/ui/components/InfoPanel.ktcommon/src/main/java/org/dash/wallet/common/ui/components/Label.ktcommon/src/main/java/org/dash/wallet/common/ui/components/ListItem.ktcommon/src/main/java/org/dash/wallet/common/ui/components/ListItemVariants.ktcommon/src/main/java/org/dash/wallet/common/ui/components/Menu.ktcommon/src/main/java/org/dash/wallet/common/ui/components/MenuItem.ktcommon/src/main/java/org/dash/wallet/common/ui/components/MyTheme.ktcommon/src/main/java/org/dash/wallet/common/ui/components/SheetButtonGroup.ktcommon/src/main/java/org/dash/wallet/common/ui/components/Template.ktcommon/src/main/java/org/dash/wallet/common/ui/components/Toast.ktcommon/src/main/java/org/dash/wallet/common/ui/components/TopIntro.ktcommon/src/main/java/org/dash/wallet/common/ui/components/TopIntroSend.ktcommon/src/main/java/org/dash/wallet/common/ui/components/TopNavBase.ktcommon/src/main/java/org/dash/wallet/common/ui/components/TypographyPreview.ktcommon/src/main/java/org/dash/wallet/common/ui/dialogs/ComposeBottomSheet.ktcommon/src/main/java/org/dash/wallet/common/ui/enter_amount/EnterAmountCompose.ktcommon/src/main/java/org/dash/wallet/common/ui/enter_amount/EnterAmountFragment.ktcommon/src/main/java/org/dash/wallet/common/ui/segmented_picker/SegmentedPicker.ktcommon/src/main/res/color/keyboard_button.xmlcommon/src/main/res/drawable-v21/selectable_round_corners_white.xmlcommon/src/main/res/drawable/dialog_rounded_bg.xmlcommon/src/main/res/drawable/ic_dash_d_black.xmlcommon/src/main/res/drawable/round_corners_white_bg.xmlcommon/src/main/res/drawable/rounded_background.xmlcommon/src/main/res/drawable/selectable_round_corners_border.xmlcommon/src/main/res/drawable/selectable_round_corners_white.xmlcommon/src/main/res/values-night/colors.xmlcommon/src/main/res/values/colors.xmlcommon/src/main/res/values/styles.xmlfeatures/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/adapters/SearchHeaderAdapter.ktfeatures/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/dashspend/MerchantDenominations.ktfeatures/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/dashspend/PurchaseGiftCardFragment.ktfeatures/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/dashspend/PurchaseGiftCardFragmentV2.ktfeatures/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/dashspend/PurchaseGiftCardScreenV2.ktfeatures/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/dashspend/dialogs/GiftCardDetailsDialog.ktfeatures/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/dashspend/dialogs/GiftCardOrderDetailsDialog.ktfeatures/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/dashspend/dialogs/PurchaseGiftCardConfirmDialog.ktfeatures/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/explore/ItemDetails.ktfeatures/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/explore/SearchFragment.ktfeatures/exploredash/src/main/res/layout/fragment_dash_spend_user_auth.xmlfeatures/exploredash/src/main/res/layout/fragment_search.xmlintegrations/coinbase/src/main/java/org/dash/wallet/integrations/coinbase/ui/EnterAmountToTransferFragment.ktintegrations/coinbase/src/main/java/org/dash/wallet/integrations/coinbase/ui/convert_currency/ConvertViewFragment.ktintegrations/coinbase/src/main/res/layout/app_bar_with_icon.xmlintegrations/coinbase/src/main/res/layout/convert_view.xmlintegrations/coinbase/src/main/res/layout/enter_two_fa_code_fragment.xmlintegrations/coinbase/src/main/res/layout/fragment_coinbase_buy_dash.xmlintegrations/coinbase/src/main/res/layout/fragment_coinbase_conversion_preview.xmlintegrations/coinbase/src/main/res/layout/fragment_coinbase_convert_crypto.xmlintegrations/coinbase/src/main/res/layout/fragment_coinbase_order_review.xmlintegrations/coinbase/src/main/res/layout/transfer_dash_fragment.xmlintegrations/crowdnode/src/main/res/layout/fragment_portal.xmlintegrations/crowdnode/src/main/res/layout/fragment_transfer.xmlintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaPortalFragment.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaPortalScreen.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/convert_currency/ConvertViewFragment.ktintegrations/maya/src/main/res/layout/crypto_convert_item.xmlintegrations/maya/src/main/res/layout/dialog_maya_result.xmlintegrations/uphold/src/main/res/layout/activity_uphold_tranfser.xmlwallet/androidTest/de/schildbach/wallet/security/SecurityGuardMultiThreadingTest.ktwallet/build.gradlewallet/res/drawable-v21/selectable_item_background.xmlwallet/res/drawable-v21/selectable_round_corners_border.xmlwallet/res/drawable/ic_extended_public_key.xmlwallet/res/drawable/ic_masternode_keys.xmlwallet/res/drawable/ic_network_monitor.xmlwallet/res/drawable/ic_notification_contact_received.xmlwallet/res/drawable/ic_notification_contact_sent.xmlwallet/res/drawable/ic_pin_item_inactive.xmlwallet/res/layout/accept_invitation_row.xmlwallet/res/layout/activity_dashpay_user.xmlwallet/res/layout/activity_lock_screen.xmlwallet/res/layout/activity_recover_wallet_from_seed.xmlwallet/res/layout/contact_request_view.xmlwallet/res/layout/contacts_empty_result.xmlwallet/res/layout/contacts_list_layout.xmlwallet/res/layout/contacts_suggestions_header.xmlwallet/res/layout/dashpay_contact_suggestion_row.xmlwallet/res/layout/dialog_contact_support.xmlwallet/res/layout/dialog_input_text.xmlwallet/res/layout/exchange_rates_fragment.xmlwallet/res/layout/fragment_enter_pin.xmlwallet/res/layout/fragment_invite_created.xmlwallet/res/layout/view_payment_request_details.xmlwallet/res/layout/wallet_address_fragment.xmlwallet/res/values/strings-dashpay.xmlwallet/src/de/schildbach/wallet/data/NotificationItemPayment.ktwallet/src/de/schildbach/wallet/ui/CheckPinDialog.ktwallet/src/de/schildbach/wallet/ui/SearchUserFragment.ktwallet/src/de/schildbach/wallet/ui/SettingsFragment.ktwallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellIntegrationsFragment.ktwallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellScreen.ktwallet/src/de/schildbach/wallet/ui/compose_views/ComposeBottomSheet.ktwallet/src/de/schildbach/wallet/ui/compose_views/CreateInstantUsernameDialog.ktwallet/src/de/schildbach/wallet/ui/compose_views/ExportCSVDialog.ktwallet/src/de/schildbach/wallet/ui/compose_views/ExtendedPublicKeyDialog.ktwallet/src/de/schildbach/wallet/ui/compose_views/ImportPrivateKeyDialog.ktwallet/src/de/schildbach/wallet/ui/compose_views/ProfileAvatarCompose.ktwallet/src/de/schildbach/wallet/ui/compose_views/WalletCreationDateInfoDialog.ktwallet/src/de/schildbach/wallet/ui/compose_views/ZenLedgerDialog.ktwallet/src/de/schildbach/wallet/ui/dashpay/ContactsFragment.ktwallet/src/de/schildbach/wallet/ui/dashpay/NotificationsFragment.ktwallet/src/de/schildbach/wallet/ui/dashpay/user/DashPayUserBottomSheet.ktwallet/src/de/schildbach/wallet/ui/dashpay/user/DashPayUserBottomSheetViewModel.ktwallet/src/de/schildbach/wallet/ui/dashpay/widget/ContactRequestPaneCompose.ktwallet/src/de/schildbach/wallet/ui/explore/ExploreFragment.ktwallet/src/de/schildbach/wallet/ui/explore/ExploreScreen.ktwallet/src/de/schildbach/wallet/ui/invite/InviteDetailsFragment.ktwallet/src/de/schildbach/wallet/ui/main/MixingStatusCard.ktwallet/src/de/schildbach/wallet/ui/main/WalletFragment.ktwallet/src/de/schildbach/wallet/ui/main/WalletTransactionsFragment.ktwallet/src/de/schildbach/wallet/ui/main/shortcuts/Shortcut.ktwallet/src/de/schildbach/wallet/ui/main/shortcuts/ShortcutListItem.ktwallet/src/de/schildbach/wallet/ui/main/shortcuts/ShortcutsList.ktwallet/src/de/schildbach/wallet/ui/main/shortcuts/ShortcutsPane.ktwallet/src/de/schildbach/wallet/ui/more/AboutFragment.ktwallet/src/de/schildbach/wallet/ui/more/AboutScreen.ktwallet/src/de/schildbach/wallet/ui/more/RescanBlockchainDialogFragment.ktwallet/src/de/schildbach/wallet/ui/more/SettingsScreen.ktwallet/src/de/schildbach/wallet/ui/more/ToolsFragment.ktwallet/src/de/schildbach/wallet/ui/more/ToolsScreen.ktwallet/src/de/schildbach/wallet/ui/more/TransactionMetadataDialog.ktwallet/src/de/schildbach/wallet/ui/more/TransactionMetadataSettingsFragment.ktwallet/src/de/schildbach/wallet/ui/more/TransactionMetadataSettingsScreen.ktwallet/src/de/schildbach/wallet/ui/more/WalletCreationDatePickerDialog.ktwallet/src/de/schildbach/wallet/ui/more/masternode_keys/MasternodeKeyChainFragment.ktwallet/src/de/schildbach/wallet/ui/more/masternode_keys/MasternodeKeyChainScreen.ktwallet/src/de/schildbach/wallet/ui/more/masternode_keys/MasternodeKeysFragment.ktwallet/src/de/schildbach/wallet/ui/more/masternode_keys/MasternodeKeysScreen.ktwallet/src/de/schildbach/wallet/ui/payments/PaymentsFragment.ktwallet/src/de/schildbach/wallet/ui/staking/CrowdNodeWithdrawalReminderDialog.ktwallet/src/de/schildbach/wallet/ui/transactions/BlockExplorerSelectionView.ktwallet/src/de/schildbach/wallet/ui/transactions/ChangeTaxCategoryExplainerDialogFragment.ktwallet/src/de/schildbach/wallet/ui/transactions/TransactionDetailsDialogFragment.ktwallet/src/de/schildbach/wallet/ui/transactions/TransactionResultActivity.ktwallet/src/de/schildbach/wallet/ui/transactions/TransactionResultViewBinder.kt
💤 Files with no reviewable changes (1)
- wallet/src/de/schildbach/wallet/ui/compose_views/WalletCreationDateInfoDialog.kt
Correctness/behavior: - ProfilePictureZoomTransformation: guard against zero-dimension input bitmaps (invalid coerceIn bounds) and drop the unreachable crop check - DashModelDialog: read LocalDashColors inside DashWalletTheme so the dialog uses the active light/dark palette - WalletCreationDatePickerDialog: derive year bounds from a UTC calendar to match the picker's UTC date range - colors.xml (night): add bg_list_selected dark override Theming: - CreateInstantUsernameDialog: theme-aware background, remove stale color comments and unused import - DashButton: use colors.green instead of a hardcoded literal - ic_network_monitor: reference @color/dash_blue instead of raw hex - PaymentsFragment / SearchHeaderAdapter: drop redundant SegmentedPicker style overrides that only re-passed the component defaults API/cleanup: - DashPayUserBottomSheet: use BundleCompat.getParcelable - ContactsFragment: remove obsolete onActivityResult (results now arrive via setFragmentResultListener) - ToolsScreen: remove duplicate ZenLedger Export menu, fix indentation - TopIntroSend: extract shared preview scaffold - Grabber/TopNavBase/WalletTransactionsFragment/ExtendedPublicKeyDialog: ktlint formatting Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Replace hardcoded white/black colors with theme-aware color resources so the payment request confirmation screen renders correctly in night mode: - view_payment_request_details: root background dash_white -> background_secondary; header divider #c7c7c7 -> divider_color - top_separator: separator body dash_white -> background_secondary - ic_secured_by: fill #000000 -> content_primary Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
f19be85 to
153bd26
Compare
Wrap all maya ComposeView fragments in DashWalletTheme and switch every screen from the static light palette (MyTheme.Colors) to the theme-aware LocalDashColors.current, including the shared CoinSelect, AddressField, SearchField and TextField components they render. Replace hardcoded tinted-gray literals with colors.gray at 10% (DashButton's TintedGray formula) and the halted badge's black-8% pill with colors.primary8. Resource fixes: dialog_withdrawal_limit_info.xml drops the non-night-aware coinbase_blue for dash_blue, and ic_swapkit_logo fills with content_primary so the emblem stays visible on the dark Buy & Sell menu. The QR backing box intentionally stays white in both themes so codes remain scannable. Co-Authored-By: Claude Fable 5 <[email protected]>
The Join DashPay, Accept Invitation and identity-creation cards used Button.Primary.Large.White, whose dash_white background stays white in dark mode while the text inside goes white; switch them to the night-aware Button.Primary.Large.Inverted (background_secondary). PrimaryButtonTheme.Small.Grey and the progress_horizontal track both used dash_light_gray, which has no night variant; use the translucent extra_dark_gray_0.1 instead, matching Compose DashButton's TintedGray. Also drop the track shape's redundant tint, which would have multiplied against the 10%-alpha solid and made the track nearly invisible. Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (9)
common/src/main/res/values/styles.xml (1)
4-4: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winSet a DayNight base for
AlertDialogTheme.
alertDialogThemestill points toAlertDialogTheme, whose parent isTheme.AppCompat.Light.Dialog.Alert. Any standard AlertDialog that goes throughMy.Theme’s default theme path can keep the light dialog appearance in night mode; inherit it from a DayNight dialog theme or a custom DayNight wrapper.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@common/src/main/res/values/styles.xml` at line 4, Update the AlertDialogTheme definition referenced by My.Theme so its parent inherits from a DayNight dialog theme or custom DayNight wrapper instead of Theme.AppCompat.Light.Dialog.Alert. Preserve the existing alert-dialog styling while ensuring standard dialogs selected through My.Theme switch correctly in night mode..claude/agents/DEVELOPMENT-PATTERNS.md (1)
1001-1001: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winSpecify the fenced code block language.
The code fence at Line 1001 lacks a language identifier, triggering markdownlint MD040. Use an appropriate identifier such as
kotlin.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.claude/agents/DEVELOPMENT-PATTERNS.md at line 1001, Update the fenced code block at the referenced location in DEVELOPMENT-PATTERNS.md to include an appropriate language identifier, such as kotlin, immediately after the opening fence while preserving the block contents.Source: Linters/SAST tools
integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/DEXReceiveFragment.kt (1)
67-72: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winStop logging full cryptocurrency addresses. Raw deposit and destination addresses are sensitive financial identifiers and should not be retained in application logs.
integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/DEXReceiveFragment.kt#L67-L72: remove or redactargs.depositAddress.integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaAddressInputFragment.kt#L223-L223: removeinputfrom the error log; retain only non-sensitive context.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/DEXReceiveFragment.kt` around lines 67 - 72, Stop logging sensitive cryptocurrency addresses: update the DEXReceiveFragment receive-screen log to remove or redact args.depositAddress, and update MayaAddressInputFragment’s error log to remove input while retaining only non-sensitive context.common/src/main/java/org/dash/wallet/common/ui/components/SearchField.kt (1)
52-56: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winReplace hard-coded light-only search colors with semantic theme tokens.
The black-alpha placeholder becomes nearly invisible in dark mode, and the field background does not adapt. Resolve both from
LocalDashColors.currentinsideSearchField.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@common/src/main/java/org/dash/wallet/common/ui/components/SearchField.kt` around lines 52 - 56, Update SearchField to resolve both the search field background and placeholder color from LocalDashColors.current instead of the hard-coded SearchFieldBackground and SearchPlaceholderColor values, ensuring the semantic theme tokens adapt correctly in light and dark modes.integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaAddressInputFragment.kt (1)
203-209: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winPreserve the last character when extracting clipboard addresses.
IntRange.lastis inclusive, soclipboardText.substring(range.first, range.last)drops the final character before validation. UseclipboardText.substring(range)instead.Proposed fix
- ?.let { range -> clipboardText.substring(range.first, range.last) } + ?.let { range -> clipboardText.substring(range) }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaAddressInputFragment.kt` around lines 203 - 209, Update the clipboard address extraction in the address assignment around getAddressParser and findAll to pass the inclusive IntRange directly to substring, preserving the final character before validation.common/src/main/java/org/dash/wallet/common/ui/components/AddressField.kt (1)
177-192: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winHonor
enabledfor long-press and trailing actions.Only the text editor is disabled. Long-press paste and the scan/clear icon still invoke callbacks, so callers such as
DEXRefundAddressScreenremain interactive while offline or submitting.Proposed fix
- if (onLongPress != null) { + if (enabled && onLongPress != null) { Modifier.pointerInput(Unit) { detectTapGestures(onLongPress = { currentOnLongPress?.invoke() }) } @@ - .clickable(onClick = trailing.second), + .clickable(enabled = enabled, onClick = trailing.second),Also applies to: 253-292
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@common/src/main/java/org/dash/wallet/common/ui/components/AddressField.kt` around lines 177 - 192, Update the AddressField interaction logic so the enabled state gates both the onLongPress gesture and trailing scan/clear actions, not just the text editor. In the Row modifier’s pointerInput handling, invoke currentOnLongPress only when enabled, and apply the same enabled guard to the trailing action callbacks in the corresponding trailing-content block.integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaConvertCryptoFragment.kt (1)
515-519: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winParse the localized amount before enabling Get quote.
For decimal-comma locales, input such as
1,5makestoBigDecimalOrNull()return null, socontinueEnabledremains false despite a valid non-zero amount. Use the same localized conversion path used at Line 537.Proposed fix
- val isNonZero = newValue.isNotEmpty() && - (newValue.toBigDecimalOrNull() ?: BigDecimal.ZERO) > BigDecimal.ZERO + val isNonZero = newValue.isNotEmpty() && + GenericUtils.toScaledBigDecimal(newValue, isLocalized) > BigDecimal.ZERO🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaConvertCryptoFragment.kt` around lines 515 - 519, Update the amount validation near canContinue and updateContinueEnabled to use the same localized numeric conversion path as the existing logic around line 537, instead of calling newValue.toBigDecimalOrNull() directly. Preserve the non-empty and strictly-positive checks so valid comma-decimal amounts enable Get quote.integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaAddressInputScreen.kt (2)
140-140: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winGuard the IME action with the same Continue predicate.
onImeActionalways callsonContinueClick, while the button is disabled whenstate.continueEnabledis false. Pressing the keyboard action can therefore submit an empty or otherwise non-continuable address.Proposed fix
- onImeAction = onContinueClick, + onImeAction = { + if (state.continueEnabled && !state.isLoading) { + onContinueClick() + } + },Also applies to: 195-197
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaAddressInputScreen.kt` at line 140, Update the onImeAction handler in the Maya address input screen to invoke onContinueClick only when state.continueEnabled is true, matching the Continue button’s enabled predicate; apply the same guard to the additional IME action occurrence around the later input field.
146-182: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winDisable address-source actions while quote validation is loading.
isCalling = truefrom Continue bypasses the entry guard, and the source/clipboard callbacks still callsetInput()while the bootstrap quote in flight is bound to the address captured before the request started. That can produce a quote result for the previous address being applied after an in-flight address change, or an error message with stale quote state. Gate these callbacks whilestate.isLoadingis true, or cancel/restart the validation when the address changes.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaAddressInputScreen.kt` around lines 146 - 182, Disable the address-source and clipboard actions rendered by the Menu while state.isLoading is true, including onTrailingButtonClick and action callbacks around the source items and clipboard item. Preserve their existing behavior when loading is false so address changes cannot occur during in-flight quote validation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.claude/agents/DEVELOPMENT-PATTERNS.md:
- Line 1001: Update the fenced code block at the referenced location in
DEVELOPMENT-PATTERNS.md to include an appropriate language identifier, such as
kotlin, immediately after the opening fence while preserving the block contents.
In `@common/src/main/java/org/dash/wallet/common/ui/components/AddressField.kt`:
- Around line 177-192: Update the AddressField interaction logic so the enabled
state gates both the onLongPress gesture and trailing scan/clear actions, not
just the text editor. In the Row modifier’s pointerInput handling, invoke
currentOnLongPress only when enabled, and apply the same enabled guard to the
trailing action callbacks in the corresponding trailing-content block.
In `@common/src/main/java/org/dash/wallet/common/ui/components/SearchField.kt`:
- Around line 52-56: Update SearchField to resolve both the search field
background and placeholder color from LocalDashColors.current instead of the
hard-coded SearchFieldBackground and SearchPlaceholderColor values, ensuring the
semantic theme tokens adapt correctly in light and dark modes.
In `@common/src/main/res/values/styles.xml`:
- Line 4: Update the AlertDialogTheme definition referenced by My.Theme so its
parent inherits from a DayNight dialog theme or custom DayNight wrapper instead
of Theme.AppCompat.Light.Dialog.Alert. Preserve the existing alert-dialog
styling while ensuring standard dialogs selected through My.Theme switch
correctly in night mode.
In
`@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/DEXReceiveFragment.kt`:
- Around line 67-72: Stop logging sensitive cryptocurrency addresses: update the
DEXReceiveFragment receive-screen log to remove or redact args.depositAddress,
and update MayaAddressInputFragment’s error log to remove input while retaining
only non-sensitive context.
In
`@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaAddressInputFragment.kt`:
- Around line 203-209: Update the clipboard address extraction in the address
assignment around getAddressParser and findAll to pass the inclusive IntRange
directly to substring, preserving the final character before validation.
In
`@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaAddressInputScreen.kt`:
- Line 140: Update the onImeAction handler in the Maya address input screen to
invoke onContinueClick only when state.continueEnabled is true, matching the
Continue button’s enabled predicate; apply the same guard to the additional IME
action occurrence around the later input field.
- Around line 146-182: Disable the address-source and clipboard actions rendered
by the Menu while state.isLoading is true, including onTrailingButtonClick and
action callbacks around the source items and clipboard item. Preserve their
existing behavior when loading is false so address changes cannot occur during
in-flight quote validation.
In
`@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaConvertCryptoFragment.kt`:
- Around line 515-519: Update the amount validation near canContinue and
updateContinueEnabled to use the same localized numeric conversion path as the
existing logic around line 537, instead of calling newValue.toBigDecimalOrNull()
directly. Preserve the non-empty and strictly-positive checks so valid
comma-decimal amounts enable Get quote.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3e0082d2-7586-4b98-9070-16baa2dead57
📒 Files selected for processing (38)
.claude/agents/DEVELOPMENT-PATTERNS.md.claude/agents/figma-to-compose.mdcommon/src/main/java/org/dash/wallet/common/ui/components/AddressField.ktcommon/src/main/java/org/dash/wallet/common/ui/components/CoinSelect.ktcommon/src/main/java/org/dash/wallet/common/ui/components/EnterAmount.ktcommon/src/main/java/org/dash/wallet/common/ui/components/MenuItem.ktcommon/src/main/java/org/dash/wallet/common/ui/components/SearchField.ktcommon/src/main/java/org/dash/wallet/common/ui/components/TextField.ktcommon/src/main/java/org/dash/wallet/common/ui/components/TopIntroSend.ktcommon/src/main/java/org/dash/wallet/common/ui/enter_amount/EnterAmountCompose.ktcommon/src/main/java/org/dash/wallet/common/ui/segmented_picker/SegmentedPicker.ktcommon/src/main/res/drawable/progress_horizontal.xmlcommon/src/main/res/values/styles.xmlintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/DEXEnterAmountFragment.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/DEXEnterAmountScreen.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/DEXReceiveFragment.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/DEXReceiveScreen.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/DEXRefundAddressFragment.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/DEXRefundAddressScreen.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaAddressInputFragment.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaAddressInputScreen.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaConversionPreviewFragment.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaConversionPreviewScreen.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaConvertCryptoFragment.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaConvertCryptoScreen.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaConvertResultScreen.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaCryptoCurrencyPickerFragment.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaCryptoCurrencyPickerScreen.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaPortalFragment.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaPortalScreen.ktintegrations/maya/src/main/res/drawable/ic_swapkit_logo.xmlintegrations/maya/src/main/res/layout/dialog_withdrawal_limit_info.xmlwallet/res/layout/accept_invitation_row.xmlwallet/res/layout/identity_creation_state.xmlwallet/res/layout/join_dashpay_row.xmlwallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellIntegrationsFragment.ktwallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellScreen.ktwallet/src/de/schildbach/wallet/ui/main/WalletFragment.kt
🚧 Files skipped from review as they are similar to previous changes (12)
- wallet/res/layout/accept_invitation_row.xml
- integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaPortalFragment.kt
- wallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellIntegrationsFragment.kt
- wallet/src/de/schildbach/wallet/ui/main/WalletFragment.kt
- .claude/agents/figma-to-compose.md
- integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaPortalScreen.kt
- common/src/main/java/org/dash/wallet/common/ui/components/MenuItem.kt
- common/src/main/java/org/dash/wallet/common/ui/enter_amount/EnterAmountCompose.kt
- common/src/main/java/org/dash/wallet/common/ui/components/EnterAmount.kt
- wallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellScreen.kt
- common/src/main/java/org/dash/wallet/common/ui/components/TopIntroSend.kt
- common/src/main/java/org/dash/wallet/common/ui/segmented_picker/SegmentedPicker.kt
Brings in dark mode support (#1480) and the Dash DEX sell-swap fixes (#1519). Conflicts (both in Tools, where DashConnect added its menu entry): - ToolsFragment: keep our onConnectionsClick wiring inside master's new DashWalletTheme wrapper. - ToolsScreen: keep the Connections MenuItem in the first Menu block, which master now closes before the username-gated Credits Menu. Co-Authored-By: Claude Opus 4.8 <[email protected]>
After merging dark mode (#1480), MyTheme.Colors is specifically the LIGHT palette — themes are applied by providing MyTheme.DarkColors through LocalDashColors. Our screens read MyTheme.Colors directly, so they would have stayed light while the rest of the app went dark. - Read colors from LocalDashColors.current in ConnectionsScreenContent, ConnectionsEmptyState, ScanToCompleteBanner, ConnectionListItem, ApproveConnectionContent, PermissionRow and DetailRow. - Wrap ConnectionsFragment's ComposeView content in DashWalletTheme (the approve sheet already gets it from ComposeBottomSheet, which master wrapped). The DashConnect drawables need no change: they use brand colours (dash blue, green, red, mid-grey) that are identical in both themes, matching how master's own menu icons are defined. Co-Authored-By: Claude Opus 4.8 <[email protected]>
The dark mode PR (#1480) switched the lock screen title, progress tint, and subtitle to theme-aware colors, but this screen's background is a static dark photo in both themes, so content_primary rendered as black text under the light palette. Restore fixed white foreground colors; keep the theme-aware numeric keyboard panel background. Co-Authored-By: Claude Fable 5 <[email protected]>
…e login (#1510) * feat: add DashConnect UI flow (MO-945) Add the Connections feature for connecting the DashPay wallet to DApps on the Dash network (first target: yappr on testnet): - New "Connections" menu item on the Tools screen - ConnectionsScreen with empty state and state-driven connection list (approved / active / disconnected) per the DashConnect Figma designs - "Approve connection" bottom sheet with app permissions, username and identity details, and Approve/Deny actions - QR scanning via the existing ScanActivity; the ViewModel classifies scans as connection requests (approve sheet) or login requests - DashConnectRepository interface with a mock implementation as the swap point for the upcoming Dash Platform data contract integration Co-Authored-By: Claude Fable 5 <[email protected]> * feat: implement Dash Platform key-exchange login for DashConnect (MO-945) Replace the mock DashConnectRepository with a real implementation of the Yappr key-exchange login protocol against the testnet key-exchange contract (7UaqHGBJBbRLJ4fUWS45cnud8PPUugJWoGTt1SKwHJ2P): - Protocol layer (pure, unit-tested against the platform-auth fixture vectors): dash-key:/dash-st: URI parsing and validation, hash160, ECDH x-coordinate + HKDF-SHA256 (salt "dash:key-exchange:v1"), AES-256-GCM 60-byte payload, and login-key-derived auth/encryption key checks - Deterministic login-key derivation: HKDF-SHA256 over the BLOCKCHAIN_IDENTITY auth-chain key, salted by identity id and scoped by app contract id ("dash:login-key:v1"), keyIndex 0 - dash-key approval publishes (or replaces, per the unique ($ownerId, contractId) index) a loginKeyResponse document via the low-level document put/replace path (Documents.broadcast is unimplemented in dash-sdk 4.0.0-RC2) - dash-st key registration: deserializes the IdentityUpdateTransition, validates it end-to-end against the issued login key (forged-QR rejection), signs with the identity master key and broadcasts - Local connection status store via DataStore (DashConnectConfig); connection list merges platform docs with local state - Feature gated to testnet (no mainnet contract deployment); the app label from the QR is treated as an unauthenticated claim in the UI 34 unit tests pass (test_testNet3DebugUnitTest). Co-Authored-By: Claude Fable 5 <[email protected]> * fix: repair compile-blocked unit tests for gift card cache and MainViewModel Take the gift-card cache fix from fix/other-review-fixes: the tx metadata change cache now records the merged gift card values (and the merge preserves redeemUrlChallenge), with the test updated for the new order/giftCardChallenge/index parameters of insertGiftCardData. Update MainViewModelTest for the current MainViewModel signature: mock the new CrowdNodeApi dependency and stub the collaborators its init block now touches (BlockchainIdentityConfig.observe(), getWorkInfosByTagFlow, isRestoringBackup, isPlatformAvailable, TxDisplayCacheService, and the crowdnode withdrawal reminder saved-state key). Co-Authored-By: Claude Fable 5 <[email protected]> * fix: make the DashConnect flow work end-to-end against yappr testnet (MO-945) Verified live: login QR scan -> approve -> loginKeyResponse publish/replace, and first-login key registration adding the two derived keys to the identity, with yappr completing login on both paths. QR scanner (shared ScanActivity/CameraManager): - decode the full preview frame instead of the framing-rect crop (the crop forced users inside the camera's minimum focus distance and clipped the QR quiet zone) - meter and focus on the frame center; alternate decode passes with a highlight-stretched luminance source — a bright QR card on a dark-mode page gets overexposed to ~220..255 luminance, which no binarizer can threshold (captured-frame analysis) - upgrade ZXing 3.3.3 -> 3.5.3 (minSdk is now 24) and enable TRY_HARDER DashConnect URI handling: - route dash-key:/dash-st: QRs from the home, payments, and address-input scanners to the Connections screen (scannedUri nav argument) - register dash-key/dash-st schemes in the manifest so the system camera and browsers deep-link into the wallet (with cold-start nav retry) Protocol/platform fixes: - approve stores the connection as APPROVED (awaiting login); ACTIVE only after key registration completes - replace an existing loginKeyResponse by mutating the queried document — a freshly created document gets a new $id and Drive rejects the replace with DocumentNotFoundError (40101); also set the document type, which query-built Documents leave null (segfaults the native replace call) - rebuild the dash-st identity update from our own derived keys via platformMobilePutPutIdentityUpdateSdk instead of countersigning the app's transition: the SDK cannot deserialize the wasm-sdk bincode payload (its factory is CBOR-only), the embedded revision/nonce go stale, and the wallet should never sign app-supplied transition bytes UX: - tap a connection to cancel a pending login, disconnect an active session, or remove an old connection (confirmation dialogs) - log DashConnect errors with stack traces instead of toast-only Also repairs the two compile-blocked unit tests (swapOrderDao/swapProvider constructor params from the dash-dex merge). 103 unit tests pass. Co-Authored-By: Claude Fable 5 <[email protected]> * fix: select the wallet-controlled key when signing loginKeyResponse (MO-945) After a dash-st key registration the identity carries two HIGH-security authentication keys: the DashPay identity's own ECDSA_SECP256K1 key (in the wallet keychain) and the app login key (ECDSA_HASH160, derived from the login key, not in the wallet). getFirstPublicKey(SecurityLevel.HIGH) could return the login key, which WalletSignerCallback cannot sign with — the native signer callback returns 0 and the publish/replace fails. Select the ECDSA_SECP256K1 HIGH authentication key explicitly so repeat logins after a key registration succeed. Co-Authored-By: Claude Fable 5 <[email protected]> * feat: refresh DashConnect UI, validate dash-st, and resolve app identity (MO-945) Consume the updated dash-sdk (4.0.1-SNAPSHOT) and build on its new state-transition deserialization: - dash-st validation: verifyKeyRegistrationTransition() natively decodes the scanned IdentityUpdate and checks it is for our identity and adds exactly our derived login keys before we sign/broadcast our own rebuilt update (defence-in-depth against a forged QR). - approveLogin marks the connection ACTIVE immediately when the derived login keys are already on the identity (repeat login completes with no dash-st); otherwise APPROVED, awaiting the key-registration scan. - resolveAppInfo(): show a Platform-sourced name — the app contract's owner identity's DashPay profile displayName / DPNS username — falling back to the QR label. (The web domain e.g. "yappr.io" is not on-chain, so the subtitle shows the DPNS handle.) UI refresh to the revised Figma: - empty state: icon/heading/body in a white card, Scan QR button below it - approve sheet subtitle shows the app label, not the contract id - APPROVED connections show an in-card blue "scan to complete login" banner with an inline small Scan QR button - ACTIVE connections show status + date + a toggle; toggling off disconnects directly (no dialog) and returns the connection to APPROVED (Figma has no separate Disconnected state) Also includes a temporary self-verify query after publishing loginKeyResponse that logs whether the document is findable by (contractId, appEphemeralPubKeyHash) — diagnostics for the "app doesn't see the login" investigation; to be removed once confirmed. Co-Authored-By: Claude Fable 5 <[email protected]> * feat: show verified username/identity and simplify row actions (MO-945) - Approve sheet: display the wallet's DPNS label (e.g. "John.Doe") instead of the lower-cased normalizedLabel, via DashConnectRepository.resolveWalletUsername() (resolves the owner identity's DPNS domain label from Platform, falling back to the stored username). The wallet identity id is truncated in the middle (7 leading + 5 trailing chars, e.g. "5DbLwAx…zUo8"). - Connections row tap is now a no-op: connections are managed only by the QR scan and the row slider, matching the Figma design. Removed the row-tap AdaptiveDialog (cancel-login / remove) that was not part of the design. Co-Authored-By: Claude Opus 4.8 <[email protected]> * feat: parse yappr's tagless dash-st and show resolved app name/url (MO-945) dash-st fix (first login was broken for new identities): yappr's dash-st QR carries IdentityUpdateTransition::serialize bytes WITHOUT the outer StateTransition enum tag, so StateTransition deserialization read the payload version byte as the DataContractCreate variant and failed with UnexpectedVariant. Prepend IdentityUpdate's bincode variant tag (6) before deserializing, falling back to the raw bytes in case the app ever sends full StateTransition bytes. Verified end-to-end on testnet: dash-st verified and 2 login keys registered on a fresh identity. App display resolution: - DashConnectBranding: yappr-specific name ("Yappr") and website ("yap.pr") substituted for the QR's free-text "Login to Yappr" label, pending a reusable on-chain metadata path for apps. - resolveAppDisplay(contractId, qrLabel): contract owner's DashPay displayName / DPNS username from Platform, else branding, else raw label; url = DPNS handle, else branding website, else blank. - Approve sheet: title shows the resolved app name; subtitle now shows the app website (ConnectionRequest gains appUrl) instead of repeating the name. - Connections row falls back to branding for name/url when Platform resolution comes up empty. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix: avoid lock on gettting height * feat: make DashConnect screens dark-mode aware (MO-945) After merging dark mode (#1480), MyTheme.Colors is specifically the LIGHT palette — themes are applied by providing MyTheme.DarkColors through LocalDashColors. Our screens read MyTheme.Colors directly, so they would have stayed light while the rest of the app went dark. - Read colors from LocalDashColors.current in ConnectionsScreenContent, ConnectionsEmptyState, ScanToCompleteBanner, ConnectionListItem, ApproveConnectionContent, PermissionRow and DetailRow. - Wrap ConnectionsFragment's ComposeView content in DashWalletTheme (the approve sheet already gets it from ComposeBottomSheet, which master wrapped). The DashConnect drawables need no change: they use brand colours (dash blue, green, red, mid-grey) that are identical in both themes, matching how master's own menu icons are defined. Co-Authored-By: Claude Opus 4.8 <[email protected]> * chore: remove the loginKeyResponse self-verify diagnostic (MO-945) The diagnostic confirmed what it was added to check: after publishing, the document is findable by (contractId, appEphemeralPubKeyHash) — exactly how the app polls for it — and the full login now completes end-to-end on testnet. Its "stored appEphHash=null" line was misleading rather than informative: the value comes back from the SDK as a type other than ByteArray, so the `as?` cast yielded null even though the query had just matched on that same field. Leaving it in would send the next person chasing a non-problem. Co-Authored-By: Claude Opus 4.8 <[email protected]> * docs: record why dash-st framing is incidental, not contractual (MO-945) wasm-dpp2's IdentityUpdateTransition::to_bytes() serializes the bare inner transition, while the StateTransition wrapper's to_bytes() emits the enum tag. yappr uses the wrapper on its document path but not on the identity-update path, so the tagless framing we see is incidental and a future refactor could flip it. Note that this is why both framings are accepted, and that no upstream spec states which to expect. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix: address review findings on the approve path (MO-945) - ConnectionsViewModel: resolve the connection request BEFORE _uiState.update {}. update is a compare-and-set retry loop, so a retry would re-run its lambda — and that lambda now makes two Platform round trips (resolveWalletUsername and resolveAppDisplay), which could repeat and observe different results. - ApproveConnectionDialog: show why an approval failed. The Error branch reset the result to Idle immediately, so the message the ViewModel captured was discarded and the sheet simply became interactive again with no explanation (which is what made the earlier "Approve doesn't complete" issue log-only to diagnose). Keep the Error result so its message renders above the buttons, clear it when the sheet is dismissed, and let a retry supersede it. - PlatformDashConnectRepository: replace wallet!! with an explicit null check, consistent with the other guarded lookups in publishLoginKeyResponse. Co-Authored-By: Claude Opus 4.8 <[email protected]> * feat: gate DashConnect behind SUPPORTS_CONNECT (testnet only) (MO-945) Constants.SUPPORTS_CONNECT is false by default and set true for _testNet3, staging and devnet, so the prod flavour never exposes the feature. Fixes two missing semicolons in the in-progress declaration/assignment. Beyond the Tools menu entry, the three dash-key:/dash-st: QR interception sites are now gated too (WalletFragment, PaymentsPayFragment, DashAddressInputFragment). Without that, a prod build scanning a DashConnect QR would still navigate to the Connections screen just to report the feature is unavailable; now those URIs fall through to the normal unrecognised-QR error. ConnectFlagTest asserts the flag equals !IS_PROD_BUILD, so it runs per flavour and fails if prod ever ships with DashConnect enabled. Verified: prod false, _testNet3 true. All four flavours compile. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix: drop duplicate DispatchingSwapProvider import after merge (MO-945) The master merge added the same import from both sides, which Kotlin rejects as ambiguous and broke the test compile. Co-Authored-By: Claude Opus 4.8 <[email protected]> --------- Co-authored-by: Claude Fable 5 <[email protected]>
* fix: crash when locale has incomplete string arrays indexed by enum ordinal Several locales ship partially translated string arrays (e.g. usernames_type_options has 1 of 4 items in ar/bg/cs/sv/vi), and Android replaces arrays wholesale per locale. Indexing them by enum ordinal threw ArrayIndexOutOfBoundsException in UsernameRequestsFragment. Add Context.getStringArrayOrDefault which falls back to the default resources when the localized array is shorter than expected, and use it at every site that indexes an option array by ordinal (username voting filters and invite filters). Co-Authored-By: Claude Fable 5 <[email protected]> * fix: crash from uncaught SocketTimeoutException in Maya fiat rate fetch FiatExchangeRateAggregatedProvider launched rate refreshes in a bare CoroutineScope with no exception handling, so a SocketTimeoutException from the CurrencyBeacon/FreeCurrency/ExchangeRate APIs (at TLS handshake or mid-body) crashed the app. Catch and log failures in refreshRates, back the scope with a SupervisorJob, and give the Maya and SwapKit OkHttp clients explicit 20s connect/call/read timeouts to match the CTXSpend client. Co-Authored-By: Claude Fable 5 <[email protected]> * fix: crash opening single-tx CoinJoin/CrowdNode groups from tx list A row with transactionAmount == 1 could be a group whose rowId is a group id ("coinjoin_<date>", "crowdnode") rather than a 64-char txId, making Sha256Hash.wrap throw. Only treat the row as an individual transaction when the id matches a tx hash; single-tx groups now load through the group path and open the transaction details directly. Co-Authored-By: Claude Fable 5 <[email protected]> * chore: enable parallel Gradle sync, add explore test databases Also fixes the .gitignore entry for .java-version — the trailing inline comment was part of the pattern, so the file was never ignored. Co-Authored-By: Claude Fable 5 <[email protected]> * fix: review fixes for Maya rate refresh and gradle.properties Rethrow CancellationException from the fiat rate refresh catch block to preserve structured cancellation, and drop the inert org.gradle.tooling.parallel property since the wrapper is still on Gradle 8.9 (the property requires 9.4+). Co-Authored-By: Claude Fable 5 <[email protected]> * fix: surface SwapKit below-minimum quotes as an inline amount error When every provider declines a quote, SwapKit answers 200 with routes: [], a null top-level error, and the reason only in providerErrors[].errorCode (e.g. sellAssetAmountTooSmall). The aggregator forwarded just the human message, so the code was lost and both SwapKitErrors.messageResFor and isAmountTooLowError fell through -- a 0.0005 DASH -> THOR.RUNE sell popped the generic error dialog instead of the inline "amount too small" banner. Derive the error as "<errorCode>: <message>" (noRouteError), classify the …AmountTooSmall/…AmountTooLow family as below-minimum, and map it to new copy. The address screen's 1 -> 2 -> 4 DASH retry now recognises the rejection too, where the old literal "no route" defeated it. mapToSwapQuote takes the whole response and picks the route itself, so a no-route reason can only be attached when there is no route: callers read a non-null SwapQuote.error as "unusable quote", so stamping one onto a response that did return a route rejected a good route. Buy Enter Amount carries the message resource in its UI state instead of a validationFailed flag, showing the below-minimum copy for that one actionable rejection and keeping the neutral catch-all for the rest. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix: keep the sell amount's currency in step with the picker On the sell Enter Amount screen the picker could show DASH while the ViewModel still had the entered digits denominated in fiat, so a typed "4" was read as 4 USD and quoted as a fraction of a DASH -- rejected as below the route minimum. ConvertViewViewModel tracked the picker as a currency code and its init block overwrote that code from an async SELECTED_CURRENCY read. When that landed after the fragment had anchored the picker on DASH, the code said fiat while pickedCurrencyIndex -- the only thing the screen renders -- still said DASH. amount.fiatCode had the same problem from the other end: captured before the config loaded, it stayed "USD" while the picker showed the real currency, and Amount.setAnchoredType silently did nothing when no code matched. Track the picker as a CurrencyInputType instead, derived in the fragment from the displayed index, so the two cannot disagree; the index<->type mapping mirrors the same dashToCrypto condition that builds the options list. setAmount/getAmountValue key off the type -- which also drops the IllegalArgumentException getAmountValue threw when no code matched -- and setAnchoredType(String) is gone. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix: sweep the wallet for a fiat- or crypto-anchored Maya MAX swap Max enters the balance in whichever currency the picker is on, and continueSwap decided whether to sweep by comparing the entered amount with the balance. Anchored on fiat or crypto, that value round-trips back to DASH through an 8-decimal rounding (GenericUtils.toScaledBigDecimal) and a truncating BigDecimal.toCoin(), so it lands at or below the balance and never equal to it — a fiat Max silently went out as a partial swap instead of a sweep. Carry it as explicit intent instead: ConvertViewViewModel.maxAmountSelected, persisted in SavedStateHandle so it survives a configuration change along with the amount it describes. The equality test stays as a fallback for a full balance the user typed by hand. selectMaxAmount() also pins amount.dash to the exact balance and restores the anchor to the picker's currency afterwards, so the display and the analytics event are unchanged while the Maya quote and the min/max checks see the real balance. It refreshes maxForDashWalletAmount from that same balance too: the ceiling was captured at ViewModel construction from the throttled balance flow, and a stale one would read the Max back as more than the maximum. Invalidation moves into the ViewModel — only a real target-currency or direction change clears the flag, not the re-selection that happens every time the screen's view is created, which is what the fragment's blanket reset did. Also records why the SwapKit /v3/quote call deliberately omits sourceAddress: that endpoint has no disableBalanceCheck/disableBuildTx, so a source address there triggers a single-address balance check that fails for an HD wallet, and the refund destination is only bound by /v3/swap (which does report it) since that is what creates the deposit address. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix: log Imgur response body on profile picture upload failure The failure branch only logged response.message, which Imgur often leaves blank, hiding the actual error (e.g. "These actions are forbidden") needed to diagnose upload failures. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: black 'Enter PIN' text on lock screen after dark mode sweep The dark mode PR (#1480) switched the lock screen title, progress tint, and subtitle to theme-aware colors, but this screen's background is a static dark photo in both themes, so content_primary rendered as black text under the light palette. Restore fixed white foreground colors; keep the theme-aware numeric keyboard panel background. Co-Authored-By: Claude Fable 5 <[email protected]> * fix(anr): stop touching the dashj wallet on the main thread at 1 Hz during sync MainViewModel's blockchain-state collector runs on launchIn(viewModelScope) (Dispatchers.Main.immediate) and read walletData.wallet.lastBlockSeenHeight on every emission. That dashj accessor takes the wallet's fair ReentrantReadWriteLock, which during a sync can be held for seconds at a time by the autosave serializer or receiveFromBlock — stalling the main thread past the ANR threshold once per second for the whole sync window on large wallets. Move the collector body to Dispatchers.IO via flowOn, stop seeding chainHeight/headersHeight from the wallet lock (both are overwritten by the first emission before anything reads them), and move metadataReminder()'s O(transaction count) wallet scan off Main.immediate for the same reason. Co-Authored-By: Claude Sonnet 5 <[email protected]> * chore: update dashj to 22.0.5-SNAPSHOT * fix: avoid racy background-thread read of _isBlockchainSynced.value updateSyncStatus runs on the Dispatchers.IO-confined blockchain state collector but deduped against LiveData.value, which is only updated on the main thread once postValue's runnable runs. Track the last synced state in a field confined to that same sequential collector instead. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: close Imgur responses and bound the error body read The upload response was only closed implicitly on the happy path, via ResponseBody.string(). The invalid-response branch, the HTTP-error branch, and a Moshi parse failure all leaked the connection; deleteImage never closed its response at all. Wrap both in use {}. Also cap the error-body read used for logging at 8 KiB instead of pulling an arbitrarily large (or endless) body into memory with string(), and switch the deprecated RequestBody.create to the toRequestBody extension. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(exploredash): guard manage-GPS animation end action against destroyed view refreshManageGpsView() started a 300ms ViewPropertyAnimator whose withEndAction re-read the view binding. Leaving the screen mid-animation made the callback hit FragmentViewBindingDelegate after onDestroyView(), throwing IllegalStateException ("Can't access the Fragment View's LifecycleOwner ... when getView() is null"). The earlier animation/destroy fix only covered the AnimatorSet transitions, so this path was still crashing. Capture the root view in a local so the end action touches the View directly instead of the binding, track the animator, and cancel it in onDestroyView() and on re-entry. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(exploredash): scope deferred view work to viewLifecycleOwner Three deferred main-thread callbacks ran on the fragment-scoped lifecycleScope (or a raw postDelayed), so they survived onDestroyView() and could read the view binding afterwards, throwing IllegalStateException from FragmentViewBindingDelegate. Same failure shape as the manage-GPS animation crash, just via coroutines instead of an animator. - DashSpendUserAuthFragment.authUser()/verifyEmail(): the sign-in and verify network calls outlive the view when the user backs out mid-request, then touch hideLoading() and binding.inputWrapper. Cancellation now lands on the network suspension point. - DashSpendUserAuthFragment: replace binding.input.postDelayed { showKeyboard() } with a view-scoped delay, so the keyboard call is skipped if the view is gone. - SearchFragment.setupScreenTransitions(): delays before running the transitions, all of which read the binding. The app is portrait-locked in every activity, so view-scoping these cannot cancel a request on a config change; the view only dies here when the user leaves. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(exploredash): stop the sync-error timer retaining the destroyed view showError() used a bare Handler.postDelayed with a 15s delay to hide the network error banner. Nothing cancelled it, so leaving Explore while it was pending kept the Runnable - and through it the view binding and the whole view tree - alive for the rest of the 15s. Run it on viewLifecycleOwner.lifecycleScope instead, so onDestroyView() cancels it. Track the job and cancel the previous one as well: each Status.ERROR emission previously started its own timer, so an older timer could clear a freshly shown error early (error at t=0, another at t=10, banner cleared at t=15 after only 5s). Behavior change: if the view is destroyed inside the window, setObservedLastError() no longer runs. The syncStatus observer re-fires with current state on re-entry, so the banner only returns if the error is still current. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(exploredash): view-scope the remaining lifecycle-unsafe coroutines Audit of the bare lifecycleScope.launch calls in the explore UI. These are fragment-scoped, so they survive onDestroyView() and can touch requireActivity(), an ActivityResultLauncher, or show a dialog after the view is gone - IllegalStateException, the same class of bug as the earlier binding crashes. SearchFragment: - onBuyGiftCardButtonClicked: isUserSignedInService() reaches PiggyCards isUserSignedIn(), which on an expired token calls refreshToken() -> performAutoLogin() -> api.login(). That is a network call, after which showLoginDialog() needs requireActivity() and a live FragmentManager. - managePermissionsBtn and the filter-option path: requestLocationPermission() suspends on a config read before using the permission launcher. - the delay(150) window-adjust after hiding the keyboard. FiltersDialog: the territory picker awaits territoriesJob then shows a dialog against requireActivity(); both runLocationFlow call sites have the same issue. LocationFragmentExt: the nested launch that shows the permission explainer. Left fire-and-forget rather than inlined into the enclosing suspend fun, since making it sequential would delay hasLocationBeenRequested = true until after the dialog is dismissed and change the ask-once-per-session logic. Left alone as genuinely safe: the two SearchFragment adapter handlers and the logout call (pure ViewModel work, no view or context), and the FiltersDialog territories fetch that only assigns the Deferred. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(exploredash): set explicit trackColor on DashSpend auth spinner Material 1.14's Widget.Material3.CircularProgressIndicator style defaults trackColor to ?attr/colorSecondaryContainer, which the AppCompat-based activity theme doesn't define, crashing inflation with UnsupportedOperationException. A transparent track matches the pre-upgrade appearance. Co-Authored-By: Claude Fable 5 <[email protected]> * fix: guard MainActivity.onCreate against the no-wallet finish LockScreenActivity.onCreate finishes the activity when no wallet exists (fresh install or wiped wallet), and its setContentView override no-ops while finishing. MainActivity.onCreate kept running anyway, so findViewById(R.id.bottom_navigation) returned null and crashed on launch. Return early when isFinishing. Co-Authored-By: Claude Fable 5 <[email protected]> * Revert "fix: guard MainActivity.onCreate against the no-wallet finish" This reverts commit d6de86c. --------- Co-authored-by: Claude Fable 5 <[email protected]>
* fix: crash when locale has incomplete string arrays indexed by enum ordinal Several locales ship partially translated string arrays (e.g. usernames_type_options has 1 of 4 items in ar/bg/cs/sv/vi), and Android replaces arrays wholesale per locale. Indexing them by enum ordinal threw ArrayIndexOutOfBoundsException in UsernameRequestsFragment. Add Context.getStringArrayOrDefault which falls back to the default resources when the localized array is shorter than expected, and use it at every site that indexes an option array by ordinal (username voting filters and invite filters). Co-Authored-By: Claude Fable 5 <[email protected]> * fix: crash from uncaught SocketTimeoutException in Maya fiat rate fetch FiatExchangeRateAggregatedProvider launched rate refreshes in a bare CoroutineScope with no exception handling, so a SocketTimeoutException from the CurrencyBeacon/FreeCurrency/ExchangeRate APIs (at TLS handshake or mid-body) crashed the app. Catch and log failures in refreshRates, back the scope with a SupervisorJob, and give the Maya and SwapKit OkHttp clients explicit 20s connect/call/read timeouts to match the CTXSpend client. Co-Authored-By: Claude Fable 5 <[email protected]> * fix: crash opening single-tx CoinJoin/CrowdNode groups from tx list A row with transactionAmount == 1 could be a group whose rowId is a group id ("coinjoin_<date>", "crowdnode") rather than a 64-char txId, making Sha256Hash.wrap throw. Only treat the row as an individual transaction when the id matches a tx hash; single-tx groups now load through the group path and open the transaction details directly. Co-Authored-By: Claude Fable 5 <[email protected]> * chore: enable parallel Gradle sync, add explore test databases Also fixes the .gitignore entry for .java-version — the trailing inline comment was part of the pattern, so the file was never ignored. Co-Authored-By: Claude Fable 5 <[email protected]> * fix: review fixes for Maya rate refresh and gradle.properties Rethrow CancellationException from the fiat rate refresh catch block to preserve structured cancellation, and drop the inert org.gradle.tooling.parallel property since the wrapper is still on Gradle 8.9 (the property requires 9.4+). Co-Authored-By: Claude Fable 5 <[email protected]> * fix: surface SwapKit below-minimum quotes as an inline amount error When every provider declines a quote, SwapKit answers 200 with routes: [], a null top-level error, and the reason only in providerErrors[].errorCode (e.g. sellAssetAmountTooSmall). The aggregator forwarded just the human message, so the code was lost and both SwapKitErrors.messageResFor and isAmountTooLowError fell through -- a 0.0005 DASH -> THOR.RUNE sell popped the generic error dialog instead of the inline "amount too small" banner. Derive the error as "<errorCode>: <message>" (noRouteError), classify the …AmountTooSmall/…AmountTooLow family as below-minimum, and map it to new copy. The address screen's 1 -> 2 -> 4 DASH retry now recognises the rejection too, where the old literal "no route" defeated it. mapToSwapQuote takes the whole response and picks the route itself, so a no-route reason can only be attached when there is no route: callers read a non-null SwapQuote.error as "unusable quote", so stamping one onto a response that did return a route rejected a good route. Buy Enter Amount carries the message resource in its UI state instead of a validationFailed flag, showing the below-minimum copy for that one actionable rejection and keeping the neutral catch-all for the rest. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix: keep the sell amount's currency in step with the picker On the sell Enter Amount screen the picker could show DASH while the ViewModel still had the entered digits denominated in fiat, so a typed "4" was read as 4 USD and quoted as a fraction of a DASH -- rejected as below the route minimum. ConvertViewViewModel tracked the picker as a currency code and its init block overwrote that code from an async SELECTED_CURRENCY read. When that landed after the fragment had anchored the picker on DASH, the code said fiat while pickedCurrencyIndex -- the only thing the screen renders -- still said DASH. amount.fiatCode had the same problem from the other end: captured before the config loaded, it stayed "USD" while the picker showed the real currency, and Amount.setAnchoredType silently did nothing when no code matched. Track the picker as a CurrencyInputType instead, derived in the fragment from the displayed index, so the two cannot disagree; the index<->type mapping mirrors the same dashToCrypto condition that builds the options list. setAmount/getAmountValue key off the type -- which also drops the IllegalArgumentException getAmountValue threw when no code matched -- and setAnchoredType(String) is gone. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix: sweep the wallet for a fiat- or crypto-anchored Maya MAX swap Max enters the balance in whichever currency the picker is on, and continueSwap decided whether to sweep by comparing the entered amount with the balance. Anchored on fiat or crypto, that value round-trips back to DASH through an 8-decimal rounding (GenericUtils.toScaledBigDecimal) and a truncating BigDecimal.toCoin(), so it lands at or below the balance and never equal to it — a fiat Max silently went out as a partial swap instead of a sweep. Carry it as explicit intent instead: ConvertViewViewModel.maxAmountSelected, persisted in SavedStateHandle so it survives a configuration change along with the amount it describes. The equality test stays as a fallback for a full balance the user typed by hand. selectMaxAmount() also pins amount.dash to the exact balance and restores the anchor to the picker's currency afterwards, so the display and the analytics event are unchanged while the Maya quote and the min/max checks see the real balance. It refreshes maxForDashWalletAmount from that same balance too: the ceiling was captured at ViewModel construction from the throttled balance flow, and a stale one would read the Max back as more than the maximum. Invalidation moves into the ViewModel — only a real target-currency or direction change clears the flag, not the re-selection that happens every time the screen's view is created, which is what the fragment's blanket reset did. Also records why the SwapKit /v3/quote call deliberately omits sourceAddress: that endpoint has no disableBalanceCheck/disableBuildTx, so a source address there triggers a single-address balance check that fails for an HD wallet, and the refund destination is only bound by /v3/swap (which does report it) since that is what creates the deposit address. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix: log Imgur response body on profile picture upload failure The failure branch only logged response.message, which Imgur often leaves blank, hiding the actual error (e.g. "These actions are forbidden") needed to diagnose upload failures. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: black 'Enter PIN' text on lock screen after dark mode sweep The dark mode PR (#1480) switched the lock screen title, progress tint, and subtitle to theme-aware colors, but this screen's background is a static dark photo in both themes, so content_primary rendered as black text under the light palette. Restore fixed white foreground colors; keep the theme-aware numeric keyboard panel background. Co-Authored-By: Claude Fable 5 <[email protected]> * fix(anr): stop touching the dashj wallet on the main thread at 1 Hz during sync MainViewModel's blockchain-state collector runs on launchIn(viewModelScope) (Dispatchers.Main.immediate) and read walletData.wallet.lastBlockSeenHeight on every emission. That dashj accessor takes the wallet's fair ReentrantReadWriteLock, which during a sync can be held for seconds at a time by the autosave serializer or receiveFromBlock — stalling the main thread past the ANR threshold once per second for the whole sync window on large wallets. Move the collector body to Dispatchers.IO via flowOn, stop seeding chainHeight/headersHeight from the wallet lock (both are overwritten by the first emission before anything reads them), and move metadataReminder()'s O(transaction count) wallet scan off Main.immediate for the same reason. Co-Authored-By: Claude Sonnet 5 <[email protected]> * chore: update dashj to 22.0.5-SNAPSHOT * fix: avoid racy background-thread read of _isBlockchainSynced.value updateSyncStatus runs on the Dispatchers.IO-confined blockchain state collector but deduped against LiveData.value, which is only updated on the main thread once postValue's runnable runs. Track the last synced state in a field confined to that same sequential collector instead. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: close Imgur responses and bound the error body read The upload response was only closed implicitly on the happy path, via ResponseBody.string(). The invalid-response branch, the HTTP-error branch, and a Moshi parse failure all leaked the connection; deleteImage never closed its response at all. Wrap both in use {}. Also cap the error-body read used for logging at 8 KiB instead of pulling an arbitrarily large (or endless) body into memory with string(), and switch the deprecated RequestBody.create to the toRequestBody extension. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix: simplify Maya convert-crypto enter-amount screen per design feedback Nav bar title is now just "Convert" instead of "Convert DASH to <coin>", the Dash Wallet balance row drops the "Balance" label, the destination address is truncated from the center so both ends stay checkable, and the max-amount error is shortened to "Max $x.xx". Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: make address middle-ellipsis truncation font-scale safe The Maya convert-crypto screen truncated the destination address to a fixed 14/14 character budget, which overflowed (triggering a second, end-ellipsis truncation from the shared MenuItem) once the device font scale was increased. Move the truncation into MenuItem itself behind a new subtitleMiddleEllipsis flag, measuring the actual rendered width via rememberTextMeasurer so it stays correct at any font scale. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: match convert-crypto direction card to Figma layout The direction card used one white Menu with an internal divider and a 24dp circular arrow badge; the design (node 38680:47497) actually uses two separate cards with a 5dp gap and a 30dp rounded-square badge (5dp border in the screen background color) floating over the seam. Also stop tinting the arrow icon gray — its drawable already bakes in the design's blue fill. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: add Galaxy S22 @ 1.25x font-scale preview Reproduces the exact device configuration used to catch the earlier keypad/EnterAmount overlap investigation (360x780dp, measured via `adb shell wm size`/`wm density`) so it can be checked directly in the Compose preview pane. Uses plain widthDp/heightDp instead of the `device = "spec:...,dpi=..."` form, which some Studio versions fail to render; status/nav bar insets (27dp/48dp, from `dumpsys window displays`) are drawn manually instead of via showSystemUi for the same reason. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: align convert-crypto currency picker with Figma design Remove the SegmentedPicker's default pill background/shadow and shrink its corner radius for the vertical currency picker in EnterAmount, since the Figma design (node 38680:47341) shows plain stacked text labels with no background. Also fixes the rounded corners clipping into option text on the tightly-wrapped picker, and adds per-option padding so options have visible spacing between them instead of being packed flush. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: middle-ellipsis the address rows on the Maya address-input screen The exchange deposit-address and clipboard-address MenuItems only set subtitleMaxLines = 1, which end-truncates via MenuItem's default TextOverflow.Ellipsis and cuts off the back half of the address. Enable subtitleMiddleEllipsis, matching the destination-address fix already applied on MayaConvertCryptoScreen. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: use device spec for the Galaxy S22 preview's system UI frame Mixing widthDp/heightDp with showSystemUi left the rendered phone frame at Studio's default 411dp width while the composable itself stayed at 360dp, leaving blank margins on both sides. Driving both the frame and the content from the same device spec keeps them in sync. Also drops the manual status/nav-bar placeholder boxes, which are no longer needed now that showSystemUi renders correctly, and the now-unused height import. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: match DEXReceiveScreen to Figma layout, add Galaxy S22 preview Per Figma node 35042:51682: drop the subtitle under the heading, shrink the QR from 200dp to 160dp, keep the URI/memo values to one line, move the expiry warning inside the white card (restyled as a yellow system-message card) below the address, and add a new feature row below the card reusing the same copy that used to be the removed subtitle. Restructured the card so each section supplies its own padding instead of one blanket inset, matching Figma's per-section layout. Also adds a Galaxy S22 @ 1.25x-font preview alongside the existing ones, mirroring the treatment already used on MayaConvertCryptoScreen. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: address review findings in MenuItem.kt - Move android.content.res.Configuration import above androidx imports to satisfy ktlint import ordering - Add density.fontScale to the MiddleEllipsisText remember key so the middle-ellipsis is recomputed when the font scale changes Co-Authored-By: Claude Fable 5 <[email protected]> * fix: test one-character candidates in middleEllipsizeToFit The loop exited once only one retained character remained, so candidates like "a…" were never measured before falling back to the ellipsis-only string. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Fable 5 <[email protected]>
* fix: crash when locale has incomplete string arrays indexed by enum ordinal Several locales ship partially translated string arrays (e.g. usernames_type_options has 1 of 4 items in ar/bg/cs/sv/vi), and Android replaces arrays wholesale per locale. Indexing them by enum ordinal threw ArrayIndexOutOfBoundsException in UsernameRequestsFragment. Add Context.getStringArrayOrDefault which falls back to the default resources when the localized array is shorter than expected, and use it at every site that indexes an option array by ordinal (username voting filters and invite filters). Co-Authored-By: Claude Fable 5 <[email protected]> * fix: crash from uncaught SocketTimeoutException in Maya fiat rate fetch FiatExchangeRateAggregatedProvider launched rate refreshes in a bare CoroutineScope with no exception handling, so a SocketTimeoutException from the CurrencyBeacon/FreeCurrency/ExchangeRate APIs (at TLS handshake or mid-body) crashed the app. Catch and log failures in refreshRates, back the scope with a SupervisorJob, and give the Maya and SwapKit OkHttp clients explicit 20s connect/call/read timeouts to match the CTXSpend client. Co-Authored-By: Claude Fable 5 <[email protected]> * fix: crash opening single-tx CoinJoin/CrowdNode groups from tx list A row with transactionAmount == 1 could be a group whose rowId is a group id ("coinjoin_<date>", "crowdnode") rather than a 64-char txId, making Sha256Hash.wrap throw. Only treat the row as an individual transaction when the id matches a tx hash; single-tx groups now load through the group path and open the transaction details directly. Co-Authored-By: Claude Fable 5 <[email protected]> * chore: enable parallel Gradle sync, add explore test databases Also fixes the .gitignore entry for .java-version — the trailing inline comment was part of the pattern, so the file was never ignored. Co-Authored-By: Claude Fable 5 <[email protected]> * fix: review fixes for Maya rate refresh and gradle.properties Rethrow CancellationException from the fiat rate refresh catch block to preserve structured cancellation, and drop the inert org.gradle.tooling.parallel property since the wrapper is still on Gradle 8.9 (the property requires 9.4+). Co-Authored-By: Claude Fable 5 <[email protected]> * fix: surface SwapKit below-minimum quotes as an inline amount error When every provider declines a quote, SwapKit answers 200 with routes: [], a null top-level error, and the reason only in providerErrors[].errorCode (e.g. sellAssetAmountTooSmall). The aggregator forwarded just the human message, so the code was lost and both SwapKitErrors.messageResFor and isAmountTooLowError fell through -- a 0.0005 DASH -> THOR.RUNE sell popped the generic error dialog instead of the inline "amount too small" banner. Derive the error as "<errorCode>: <message>" (noRouteError), classify the …AmountTooSmall/…AmountTooLow family as below-minimum, and map it to new copy. The address screen's 1 -> 2 -> 4 DASH retry now recognises the rejection too, where the old literal "no route" defeated it. mapToSwapQuote takes the whole response and picks the route itself, so a no-route reason can only be attached when there is no route: callers read a non-null SwapQuote.error as "unusable quote", so stamping one onto a response that did return a route rejected a good route. Buy Enter Amount carries the message resource in its UI state instead of a validationFailed flag, showing the below-minimum copy for that one actionable rejection and keeping the neutral catch-all for the rest. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix: keep the sell amount's currency in step with the picker On the sell Enter Amount screen the picker could show DASH while the ViewModel still had the entered digits denominated in fiat, so a typed "4" was read as 4 USD and quoted as a fraction of a DASH -- rejected as below the route minimum. ConvertViewViewModel tracked the picker as a currency code and its init block overwrote that code from an async SELECTED_CURRENCY read. When that landed after the fragment had anchored the picker on DASH, the code said fiat while pickedCurrencyIndex -- the only thing the screen renders -- still said DASH. amount.fiatCode had the same problem from the other end: captured before the config loaded, it stayed "USD" while the picker showed the real currency, and Amount.setAnchoredType silently did nothing when no code matched. Track the picker as a CurrencyInputType instead, derived in the fragment from the displayed index, so the two cannot disagree; the index<->type mapping mirrors the same dashToCrypto condition that builds the options list. setAmount/getAmountValue key off the type -- which also drops the IllegalArgumentException getAmountValue threw when no code matched -- and setAnchoredType(String) is gone. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix: sweep the wallet for a fiat- or crypto-anchored Maya MAX swap Max enters the balance in whichever currency the picker is on, and continueSwap decided whether to sweep by comparing the entered amount with the balance. Anchored on fiat or crypto, that value round-trips back to DASH through an 8-decimal rounding (GenericUtils.toScaledBigDecimal) and a truncating BigDecimal.toCoin(), so it lands at or below the balance and never equal to it — a fiat Max silently went out as a partial swap instead of a sweep. Carry it as explicit intent instead: ConvertViewViewModel.maxAmountSelected, persisted in SavedStateHandle so it survives a configuration change along with the amount it describes. The equality test stays as a fallback for a full balance the user typed by hand. selectMaxAmount() also pins amount.dash to the exact balance and restores the anchor to the picker's currency afterwards, so the display and the analytics event are unchanged while the Maya quote and the min/max checks see the real balance. It refreshes maxForDashWalletAmount from that same balance too: the ceiling was captured at ViewModel construction from the throttled balance flow, and a stale one would read the Max back as more than the maximum. Invalidation moves into the ViewModel — only a real target-currency or direction change clears the flag, not the re-selection that happens every time the screen's view is created, which is what the fragment's blanket reset did. Also records why the SwapKit /v3/quote call deliberately omits sourceAddress: that endpoint has no disableBalanceCheck/disableBuildTx, so a source address there triggers a single-address balance check that fails for an HD wallet, and the refund destination is only bound by /v3/swap (which does report it) since that is what creates the deposit address. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix: log Imgur response body on profile picture upload failure The failure branch only logged response.message, which Imgur often leaves blank, hiding the actual error (e.g. "These actions are forbidden") needed to diagnose upload failures. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: black 'Enter PIN' text on lock screen after dark mode sweep The dark mode PR (#1480) switched the lock screen title, progress tint, and subtitle to theme-aware colors, but this screen's background is a static dark photo in both themes, so content_primary rendered as black text under the light palette. Restore fixed white foreground colors; keep the theme-aware numeric keyboard panel background. Co-Authored-By: Claude Fable 5 <[email protected]> * fix(anr): stop touching the dashj wallet on the main thread at 1 Hz during sync MainViewModel's blockchain-state collector runs on launchIn(viewModelScope) (Dispatchers.Main.immediate) and read walletData.wallet.lastBlockSeenHeight on every emission. That dashj accessor takes the wallet's fair ReentrantReadWriteLock, which during a sync can be held for seconds at a time by the autosave serializer or receiveFromBlock — stalling the main thread past the ANR threshold once per second for the whole sync window on large wallets. Move the collector body to Dispatchers.IO via flowOn, stop seeding chainHeight/headersHeight from the wallet lock (both are overwritten by the first emission before anything reads them), and move metadataReminder()'s O(transaction count) wallet scan off Main.immediate for the same reason. Co-Authored-By: Claude Sonnet 5 <[email protected]> * chore: update dashj to 22.0.5-SNAPSHOT * fix: avoid racy background-thread read of _isBlockchainSynced.value updateSyncStatus runs on the Dispatchers.IO-confined blockchain state collector but deduped against LiveData.value, which is only updated on the main thread once postValue's runnable runs. Track the last synced state in a field confined to that same sequential collector instead. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: close Imgur responses and bound the error body read The upload response was only closed implicitly on the happy path, via ResponseBody.string(). The invalid-response branch, the HTTP-error branch, and a Moshi parse failure all leaked the connection; deleteImage never closed its response at all. Wrap both in use {}. Also cap the error-body read used for logging at 8 KiB instead of pulling an arbitrarily large (or endless) body into memory with string(), and switch the deprecated RequestBody.create to the toRequestBody extension. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix: simplify Maya convert-crypto enter-amount screen per design feedback Nav bar title is now just "Convert" instead of "Convert DASH to <coin>", the Dash Wallet balance row drops the "Balance" label, the destination address is truncated from the center so both ends stay checkable, and the max-amount error is shortened to "Max $x.xx". Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: make address middle-ellipsis truncation font-scale safe The Maya convert-crypto screen truncated the destination address to a fixed 14/14 character budget, which overflowed (triggering a second, end-ellipsis truncation from the shared MenuItem) once the device font scale was increased. Move the truncation into MenuItem itself behind a new subtitleMiddleEllipsis flag, measuring the actual rendered width via rememberTextMeasurer so it stays correct at any font scale. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: match convert-crypto direction card to Figma layout The direction card used one white Menu with an internal divider and a 24dp circular arrow badge; the design (node 38680:47497) actually uses two separate cards with a 5dp gap and a 30dp rounded-square badge (5dp border in the screen background color) floating over the seam. Also stop tinting the arrow icon gray — its drawable already bakes in the design's blue fill. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: add Galaxy S22 @ 1.25x font-scale preview Reproduces the exact device configuration used to catch the earlier keypad/EnterAmount overlap investigation (360x780dp, measured via `adb shell wm size`/`wm density`) so it can be checked directly in the Compose preview pane. Uses plain widthDp/heightDp instead of the `device = "spec:...,dpi=..."` form, which some Studio versions fail to render; status/nav bar insets (27dp/48dp, from `dumpsys window displays`) are drawn manually instead of via showSystemUi for the same reason. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: align convert-crypto currency picker with Figma design Remove the SegmentedPicker's default pill background/shadow and shrink its corner radius for the vertical currency picker in EnterAmount, since the Figma design (node 38680:47341) shows plain stacked text labels with no background. Also fixes the rounded corners clipping into option text on the tightly-wrapped picker, and adds per-option padding so options have visible spacing between them instead of being packed flush. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: middle-ellipsis the address rows on the Maya address-input screen The exchange deposit-address and clipboard-address MenuItems only set subtitleMaxLines = 1, which end-truncates via MenuItem's default TextOverflow.Ellipsis and cuts off the back half of the address. Enable subtitleMiddleEllipsis, matching the destination-address fix already applied on MayaConvertCryptoScreen. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: use device spec for the Galaxy S22 preview's system UI frame Mixing widthDp/heightDp with showSystemUi left the rendered phone frame at Studio's default 411dp width while the composable itself stayed at 360dp, leaving blank margins on both sides. Driving both the frame and the content from the same device spec keeps them in sync. Also drops the manual status/nav-bar placeholder boxes, which are no longer needed now that showSystemUi renders correctly, and the now-unused height import. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: match DEXReceiveScreen to Figma layout, add Galaxy S22 preview Per Figma node 35042:51682: drop the subtitle under the heading, shrink the QR from 200dp to 160dp, keep the URI/memo values to one line, move the expiry warning inside the white card (restyled as a yellow system-message card) below the address, and add a new feature row below the card reusing the same copy that used to be the removed subtitle. Restructured the card so each section supplies its own padding instead of one blanket inset, matching Figma's per-section layout. Also adds a Galaxy S22 @ 1.25x-font preview alongside the existing ones, mirroring the treatment already used on MayaConvertCryptoScreen. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix: surface exchanges that don't support the coin on the selected network The Maya address-input screen silently dropped any connected exchange whose deposit address failed the selected asset's parser -- e.g. Coinbase hands back an ERC-20 USDC address while the asset is TRON.USDC. The row just vanished with no explanation. Per Figma 39439:35111, keep the row visible but dimmed and follow it with a yellow system-message card saying why ("Coinbase doesn't support USDC on the TRON network"). The address is nulled out so a wrong-network address can never be pasted, and neither the address nor the log-in action is offered. Also relabel the trailing action on a not-signed-in row from "Connect" to "Log in" to match the design. input_connect had exactly one usage, so it is replaced by a new input_log_in key and dropped from the English source; the translated values-*/strings.xml files are left to Transifex. Fix the warning card in dark mode: warningYellow was #FFF9ED, the already- flattened result of Figma's #FFC043 @ 10% over white, hardcoded into both palettes. Dark mode therefore painted a near-white card and put WhiteAlpha90 text on it at 1.16:1. Keeping the alpha (new YellowAlpha10 primitive) lets the token tint whatever surface is behind it: light mode is unchanged at 18.76:1, dark mode goes to #352F27 at 10.90:1. This also fixes ExpiryWarning in DEXReceiveScreen, which had the same bug; both call sites gain a dark preview. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * refactor: extract SystemMessage into common, add MenuItem disabled state The Figma SystemMessage component (design system node 8378:445) existed as two hand-rolled private copies: ExpiryWarning in DEXReceiveScreen and UnsupportedNetworkMessage in MayaAddressInputScreen. Extract it into common/ui/components with every Figma property mapped (optional title, description, swappable icon, primary/secondary small buttons) plus a SystemMessageStyle enum for the bg-blue/bg-yellow tints -- both verified against the Figma variables (#008de40d and #ffc0431a) and both translucent so the card tints the surface behind it in either theme. Both screens now use the shared component and the private copies are deleted. The component's text styles come from the "New/Text" styles it applies in Figma -- Subhead (medium) 15/20 and Footnote (regular) 13/18 -- which are absent from both MyTheme and the documented typography page (node 5856:804). Add them as proper Typography tiers (Subhead*, Footnote*) in the standard four weights; Footnote duplicates the deprecated Caption metrics, so Caption's deprecation now carries ReplaceWith. This also lets the DEX memo-row value use the real 15sp Subhead instead of the documented 14sp BodyMedium stand-in. MenuItem gains enabled (default true) and modifier parameters. A disabled row is dimmed as a whole -- necessary because the leading icons are full-colour exchange logos no content token can recolour -- and nothing in it is tappable: action, trailing button, info icon and toggle are all suppressed, and the row stops reporting itself as a button to accessibility services. All 47 existing call sites use named arguments, so both additions are behavior-preserving. MayaAddressInputScreen's alpha-wrapper workaround is replaced by enabled=false. Co-Authored-By: Claude Fable 5 <[email protected]> * refactor: migrate deprecated Caption styles to the Footnote typography tier Mechanical sweep replacing every MyTheme.Caption / MyTheme.CaptionMedium usage with MyTheme.Typography.Footnote / FootnoteMedium across common, maya, wallet and exploredash (30 usages in 14 files). The metrics are identical (13sp/18sp, same Inter weights), so nothing changes visually -- this only moves callers off the @deprecated("obsolete font") styles onto the tier introduced in the previous commit. The deprecated symbols stay in place (now with ReplaceWith) so in-flight branches keep compiling. OverlineCaptionRegular/Medium are a different deprecated family with no replacement tier yet and are left untouched. Co-Authored-By: Claude Fable 5 <[email protected]> * feat: add the design-system ActionItem row and use it on the address-input screen The design system's "Action item" (Figma node 8485:2778) is a compact slot-based row -- 50dp min height, 12dp start / 14dp end padding, a 30dp leading slot, a central variant set, and a 14dp trailing slot -- that newer designs use where the code previously reached for the heavier MenuItem (56dp, 16dp paddings). Add it to common alongside MenuItem, which stays as-is. The central part covers the variants in use: Var 1 (title only, Subhead medium 15/20 per the fetched New/Text token) and Var 3 (title plus a one-line subtitle, e.g. an exchange deposit address, with an optional width-measured middle-ellipsis so both ends of an address stay checkable at any font scale). The trailing slot takes a small DashButton, a 14dp chevron, or a custom composable, and generic leading/trailing slots leave room for variants not yet modeled. Var 2's definition was not reachable via the Figma MCP session, and the subtitle style (Footnote, text/secondary) is inferred from app usage rather than fetched -- both noted in case the design says otherwise. An enabled=false row is dimmed as a whole (full-colour exchange logos can't be recoloured by a content token) and nothing in it is tappable, with button semantics dropped for accessibility. MayaAddressInputScreen's "Paste address from" rows -- which the app design draws as Action item / Var 3 instances -- move from MenuItem to ActionItem: connected exchanges, the "Log in" state, the disabled unsupported state (its SystemMessage stays), and the clipboard row. Rows render 6dp tighter and titles go from 14sp to 15sp, matching the spec. Co-Authored-By: Claude Fable 5 <[email protected]> * fix: log and keep exchange rows on failed deposit-address lookups A support case (2026-07-22, DASH -> ETH.USDC sell swap) showed a logged-in Coinbase user with no Coinbase row at all on the Maya address-input screen. ExchangeIntegrationListProvider.processCoinbase() swallowed every failure with printStackTrace() -- logcat only, never wallet.log -- and added nothing, so whenever getUserAccount threw (no USDC wallet on the account, name without "Wallet", expired token, network error) the integration silently vanished with no trace in the captured log. Two changes, applied to Coinbase and Uphold alike: - Replace all printStackTrace() calls with an slf4j logger so future wallet.log captures say why a row was dropped (currency codes only, no addresses). - Scope the failure handling to the account/address lookup itself: when the user is authenticated but the lookup fails (no account/card for the currency, createAddress failure, network error), log it and still add the row with a null address instead of dropping the exchange from the list. Only the outer auth-state/cached-address lookup still yields no row, since there the connection state is genuinely unknown -- and that path now logs too. Known residual: a connected row with a null address renders with a "Log in" button, because the screen infers connectedness from address presence -- ExchangeIntegration.isConnected is dropped in the AddressSource mapping. Surfacing an honest state for that row is a follow-up. The getAccounts pagination gap (limit=250, has_next unparsed) and the network-blind deposit-address cache key (bare "USDC") are deliberately left for separate tickets. Co-Authored-By: Claude Fable 5 <[email protected]> * fix: stop offering "Log in" on connected exchange rows without an address Since the previous commit, an exchange whose deposit-address lookup fails is kept in the list with a null address instead of being dropped. But the address-input screen inferred "connected" from address presence -- ExchangeIntegration.isConnected was dropped at the AddressSource mapping -- so that row rendered with a "Log in" button and tapping it sent an already signed-in user through the login deep link. Thread isConnected from the provider to the UI (AddressSource -> AddressSourceUIState, appended with a default since the ViewModel constructs positionally) and key the row state off it: - connected with address: no button, tap pastes (unchanged) - connected without address: no button; tap re-runs refreshAddressSources(), retrying the exact lookup that failed -- transient token/network errors self-heal, and a genuinely missing account yields the same row again, now with a log line explaining why - not signed in: "Log in" button and login navigation (unchanged) - unsupported network: disabled row with its SystemMessage (unchanged) Previews now set isConnected explicitly; the unsupported Coinbase preview row is connected -- it always represented "signed in, wrong network". Co-Authored-By: Claude Fable 5 <[email protected]> * refactor: address CodeRabbit review feedback on #1542 - MayaAddressInputViewModel now follows the ViewModel state contract: asset, inputCurrency, address sources, the inline error, lastSeenAddress and the derived asset display values live in a single MayaAddressInputState data class exposed as an immutable StateFlow via asStateFlow(). The existing var accessors (asset, inlineErrorMessage, lastSeenAddress) delegate into the state so the fragment's call sites and behavior are unchanged; the fragment observes uiState instead of the removed addressSources Flow. - SystemMessage renders a valid secondary action independently: the action row appears when either button pair is complete, instead of a secondary-only caller silently getting no buttons. - Formatting: android.content.res.Configuration import ordered before the androidx imports in ActionItem, and trailing whitespace removed from InfoPanel. Co-Authored-By: Claude Fable 5 <[email protected]> * fix: follow the Coinbase accounts pagination cursor GET /api/v3/brokerage/accounts was fetched once with limit=250 and AccountsResponse did not even parse has_next/cursor, so pages beyond the first were unreachable by construction. Coinbase creates one account per asset the user has ever held, so a long-time profile can exceed 250 accounts -- any currency sorting onto a later page then looked identical to "no account for this currency": getUserAccount threw IllegalStateException and the exchange row lost its deposit address even though the account exists. Parse has_next and cursor, accept a cursor query parameter on getAccounts, and page through fetchAllAccounts() until the API reports no next page, bounded by MAX_ACCOUNT_PAGES (40 x 250 = 10,000 accounts) as a runaway guard against a misbehaving cursor. Both repository call sites -- the DASH lookup and the per-currency lookup that feeds the Maya address-input sources -- now see the full account list. Single-page responses behave exactly as before: has_next defaults to false, and the loop exits after one request. Co-Authored-By: Claude Fable 5 <[email protected]> * fix: reject incomplete Coinbase accounts pagination instead of returning partial data CodeRabbit follow-up on the pagination fix: fetchAllAccounts() had two paths that silently returned a partial list -- has_next=true arriving without a cursor, and the MAX_ACCOUNT_PAGES runaway guard tripping with has_next still true. A truncated list is indistinguishable from "the account doesn't exist" to the callers, which is exactly the misreport pagination was added to prevent. Both paths now throw IllegalStateException("Coinbase accounts pagination incomplete: ..."). Downstream, ExchangeIntegrationListProvider catches it, logs the reason, and keeps the exchange row with a null address -- the honest "couldn't determine" outcome instead of a false "no account found". This also holds when the target currency was already in the partial pages: the fetched map is cached for every later per-currency lookup, so completeness is the contract. Adds three CoinBaseRepositoryTest cases: cursor followed across pages, has_next-without-cursor throws, and page-limit exhaustion throws after exactly 40 requests. Co-Authored-By: Claude Fable 5 <[email protected]> * Update integrations/coinbase/src/test/java/org/dash/wallet/integrations/coinbase/CoinBaseRepositoryTest.kt Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Claude Fable 5 <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Issue being fixed or feature implemented
Related PR's and Dependencies
Screenshots / Videos
How Has This Been Tested?
Checklist:
Summary by CodeRabbit
New Features
Enhancements
Bug Fixes