Repository navigation
fix: maya final polish - #1468
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds Maya integration currency support and parsers (XRD, ZEC, MAYA), Compose UI migrations for Maya portal and Buy & Sell screens, new Compose previews and resources, ViewModel stateflow refactors, documentation for an update-maya-currencies agent, and minor common UI typography tweaks and ProGuard rule change. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 8
🧹 Nitpick comments (2)
wallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellIntegrationsFragment.kt (1)
55-57:launchWhenResumedis deprecated.
lifecycleScope.launchWhenResumedis deprecated. Consider usingrepeatOnLifecycle(Lifecycle.State.RESUMED)or moving the call toonResume()directly.♻️ Suggested fix using repeatOnLifecycle
+import androidx.lifecycle.Lifecycle +import androidx.lifecycle.repeatOnLifecycle- lifecycleScope.launchWhenResumed { - checkLiquidStatus() - } + lifecycleScope.launch { + viewLifecycleOwner.repeatOnLifecycle(Lifecycle.State.RESUMED) { + checkLiquidStatus() + } + }Alternatively, since
checkLiquidStatus()is a one-time check, you could simply call it inonResume().🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@wallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellIntegrationsFragment.kt` around lines 55 - 57, In BuyAndSellIntegrationsFragment replace the deprecated lifecycleScope.launchWhenResumed usage around checkLiquidStatus(): either (1) wrap the call in lifecycleScope.launch { repeatOnLifecycle(Lifecycle.State.RESUMED) { checkLiquidStatus() } } to run when RESUMED, or (2) if it’s truly a one-time per-resume check, move the call into the fragment’s onResume() override and call checkLiquidStatus() there; update imports to include repeatOnLifecycle/Lifecycle if using option (1) and remove launchWhenResumed.wallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellScreen.kt (1)
254-262: Consider aligning fiatAmount visibility with dashAmount.
dashAmountis conditionally set only whenserviceStatusisCONNECTEDorDISCONNECTED, butfiatAmount(line 262) is unconditionally derived fromlocalBalance. IflocalBalancecould be stale or non-null forIDLEstates, this might show unexpected data.♻️ Suggested fix to align visibility
- val fiatAmount = service.localBalance?.toFormattedString() + val fiatAmount = if (service.serviceStatus == ServiceStatus.CONNECTED || + service.serviceStatus == ServiceStatus.DISCONNECTED + ) { + service.localBalance?.toFormattedString() + } else { + null + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@wallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellScreen.kt` around lines 254 - 262, dashAmount is only set when service.serviceStatus is ServiceStatus.CONNECTED or DISCONNECTED but fiatAmount is computed unconditionally from service.localBalance, which can expose stale data; change fiatAmount to use the same condition as dashAmount by computing it only when service.serviceStatus == ServiceStatus.CONNECTED || service.serviceStatus == ServiceStatus.DISCONNECTED (e.g., wrap service.localBalance?.toFormattedString() in the same conditional), referencing fiatAmount, dashAmount, service.serviceStatus, ServiceStatus.CONNECTED, ServiceStatus.DISCONNECTED, and service.localBalance so both values have identical visibility.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/agents/update-maya-currencies.md:
- Around line 81-89: The "Address format guide by chain" table needs surrounding
blank lines to satisfy markdownlint MD058; update the markdown in the section
containing the table titled "Address format guide by chain" by inserting a blank
line immediately before the table header line ("| Chain | Address format |
Parser class to use |") and a blank line immediately after the table block
(after the final table row or closing separator), ensuring there is one empty
line above and below the entire table.
In `@integrations/maya/build.gradle`:
- Line 75: Replace the hardcoded Compose and lifecycle versions by importing the
shared Compose BOM and using the root version variable: add
implementation(platform("androidx.compose:compose-bom:$composeBom")) in the
dependencies block (same pattern used in wallet/common/coinbase), then change
implementation 'androidx.compose.ui:ui-tooling-preview-android:1.10.4' to either
a version-less dependency resolved by the BOM (implementation
"androidx.compose.ui:ui-tooling-preview-android") or use the shared tooling var
(implementation
"androidx.compose.ui:ui-tooling-preview-android:$composeTooling"), and remove
the hardcoded version from implementation
'androidx.lifecycle:lifecycle-runtime-compose-android:2.10.0' so it is resolved
via the BOM (implementation
"androidx.lifecycle:lifecycle-runtime-compose-android") to ensure centralized
versioning.
In
`@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/payments/MayaCryptoCurrency.kt`:
- Around line 329-336: The second USDT registration using
MayaEthereumTokenCryptoCurrency ("USDT","Tether", ... ,
EthereumPaymentIntentParser(...)) overwrites the original Ethereum parser
because getPaymentProcessors() stores parsers by currency.name and
currency.code; update the registration so keys are unique (e.g., use
chain-qualified code/name like "USDT-ARB" or "Tether (Arbitrum)") or change the
registration logic to reject duplicates before adding another network variant;
ensure the EthereumPaymentIntentParser instances remain distinguishable
(reference EthereumPaymentIntentParser and MayaEthereumTokenCryptoCurrency) so
plain "USDT" lookups don't get replaced by the ARB.USDT entry.
In
`@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/payments/parsers/XrdPaymentIntentParser.kt`:
- Around line 49-58: The catch for AddressFormatException in the branch that
calls createPaymentIntent(input) is unreachable because createPaymentIntent
doesn't throw AddressFormatException; remove the try/catch that specifically
catches AddressFormatException (the block that logs via log.info and throws
PaymentIntentParserException) or replace it with a relevant exception type if
you intended to handle a different error; specifically update the code around
addressParser.exactMatch(...) that calls createPaymentIntent to either call it
directly or catch the correct exception, and remove the dead catch referencing
AddressFormatException, PaymentIntentParserException, and the log.info call for
that exception.
In
`@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/payments/parsers/ZcashPaymentIntentParser.kt`:
- Around line 45-55: The catch for AddressFormatException in
ZcashPaymentIntentParser is dead code because createPaymentIntent(input) does
not validate or throw that exception; remove the try/catch and directly return
createPaymentIntent(input) inside the addressParser.exactMatch branch. Update
the block that references addressParser.exactMatch(input) to call
MayaPaymentIntentParser.createPaymentIntent (or createPaymentIntent) directly
and delete the unreachable AddressFormatException handling and its
PaymentIntentParserException wrapping.
- Around line 29-31: ZcashPaymentIntentParser currently instantiates
addressParser with AddressParser.getBase58AddressParser(), which only supports
transparent t-addresses; update the parser to either (A) add
Bech32/Shielded/Unified support by replacing or augmenting addressParser with a
Bech32-based parser that recognizes Sapling (zs-), Orchard, and unified (u1-)
prefixes and the associated memo handling (ensure payment parsing code in
ZcashPaymentIntentParser handles shielded memo fields), or (B) make the
limitation explicit by updating ZcashPaymentIntentParser’s constructor/logging
and documentation to state it accepts transparent t-addresses only and reject
shielded/unified addresses with a clear error message; locate and modify the
AddressParser usage and any validation logic within ZcashPaymentIntentParser to
implement the chosen approach.
In `@integrations/maya/src/main/res/navigation/nav_maya.xml`:
- Line 10: The destination in nav_maya.xml uses a hardcoded
android:label="mayaPortalFragment" which is not localized; change the
android:label to a string resource reference (e.g.
android:label="@string/maya_portal_title") and add the corresponding entry to
your strings.xml (and other locale files as needed) using a user-facing title,
ensuring the resource name (maya_portal_title) matches the reference in
nav_maya.xml.
In `@wallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellViewModel.kt`:
- Around line 84-88: Consolidate the multiple public state holders
(servicesList, isDeviceConnectedToInternet, isConnectedToInternet,
balanceFormat, isUpholdAuthenticated, isCoinbaseAuthenticated,
hasValidCredentials) into a single UIState data class and expose it from the
ViewModel via a private MutableStateFlow named _uiState and a public uiState
using asStateFlow(); populate UIState fields from existing sources (e.g., remove
the redundant .stateIn wrapper around networkState.isConnected and use its
StateFlow directly when building _uiState), compute derived values like
balanceFormat inside the UIState projection, and update all references/users of
the original properties to read from uiState instead. Ensure viewModelScope is
used only for any coroutine updates to _uiState and keep UIState as the single
source of truth.
---
Nitpick comments:
In
`@wallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellIntegrationsFragment.kt`:
- Around line 55-57: In BuyAndSellIntegrationsFragment replace the deprecated
lifecycleScope.launchWhenResumed usage around checkLiquidStatus(): either (1)
wrap the call in lifecycleScope.launch {
repeatOnLifecycle(Lifecycle.State.RESUMED) { checkLiquidStatus() } } to run when
RESUMED, or (2) if it’s truly a one-time per-resume check, move the call into
the fragment’s onResume() override and call checkLiquidStatus() there; update
imports to include repeatOnLifecycle/Lifecycle if using option (1) and remove
launchWhenResumed.
In `@wallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellScreen.kt`:
- Around line 254-262: dashAmount is only set when service.serviceStatus is
ServiceStatus.CONNECTED or DISCONNECTED but fiatAmount is computed
unconditionally from service.localBalance, which can expose stale data; change
fiatAmount to use the same condition as dashAmount by computing it only when
service.serviceStatus == ServiceStatus.CONNECTED || service.serviceStatus ==
ServiceStatus.DISCONNECTED (e.g., wrap service.localBalance?.toFormattedString()
in the same conditional), referencing fiatAmount, dashAmount,
service.serviceStatus, ServiceStatus.CONNECTED, ServiceStatus.DISCONNECTED, and
service.localBalance so both values have identical visibility.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 24b11daa-f514-4530-8b6d-fd9552ea8a88
📒 Files selected for processing (16)
.claude/agents/update-maya-currencies.mdcommon/src/main/java/org/dash/wallet/common/ui/components/MenuItem.ktcommon/src/main/java/org/dash/wallet/common/ui/components/TopIntro.ktintegrations/maya/build.gradleintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/payments/MayaCryptoCurrency.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/payments/parsers/XrdPaymentIntentParser.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/payments/parsers/ZcashPaymentIntentParser.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_maya_convert.xmlintegrations/maya/src/main/res/navigation/nav_maya.xmlintegrations/maya/src/main/res/values/strings-maya.xmlwallet/res/values/strings.xmlwallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellIntegrationsFragment.ktwallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellScreen.ktwallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellViewModel.kt
|
@coderabbitai review again please |
|
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 5
♻️ Duplicate comments (1)
integrations/maya/src/main/res/navigation/nav_maya.xml (1)
10-10:⚠️ Potential issue | 🟡 MinorStill using a hardcoded destination label.
android:label="mayaPortalFragment"is still internal, non-localized text and can leak into the app bar/title. Please switch it to a string resource.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@integrations/maya/src/main/res/navigation/nav_maya.xml` at line 10, Replace the hardcoded android:label="mayaPortalFragment" in nav_maya.xml with a string resource reference (e.g. android:label="@string/maya_portal_title") and add the corresponding entry in your strings.xml (name it maya_portal_title with the localized text), ensuring you update any other locales as needed; this prevents leaking internal identifiers into the app bar/title and enables localization.
🧹 Nitpick comments (5)
.claude/agents/figma-to-compose.md (1)
37-39: Add language specifiers to fenced code blocks for consistency.Several code blocks lack language specifiers (Lines 37, 165, 177, 260, 270, 293). While these are path/text blocks rather than executable code, adding
textorplaintextimproves documentation consistency and suppresses linter warnings.📝 Example fix for line 37
-``` +```text common/src/main/java/org/dash/wallet/common/ui/components/🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/agents/figma-to-compose.md around lines 37 - 39, In .claude/agents/figma-to-compose.md there are several fenced code blocks that contain plain path/text (for example the block with "common/src/main/java/org/dash/wallet/common/ui/components/"); update each of those fences to include a language specifier such as text or plaintext (e.g. change ``` to ```text) so the blocks are marked as non-code and satisfy the linter; ensure you update all instances referenced in the review (the blocks at the noted locations) consistently.wallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellScreen.kt (2)
121-121: Consider hoistingserviceOflookup outside the composable.The
serviceOfhelper is invoked multiple times during each recomposition. For a small list this is fine, but converting to a map once would be more efficient:val serviceMap = remember(services) { services.associateBy { it.serviceType } }Then use
serviceMap[ServiceType.UPHOLD]etc.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@wallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellScreen.kt` at line 121, The helper function serviceOf(type: ServiceType) does a linear find on services every recomposition; hoist this by creating a memoized map once (use remember(services) { services.associateBy { it.serviceType } }) and replace repeated serviceOf(...) calls with lookups like serviceMap[ServiceType.UPHOLD]; remove or stop using serviceOf where replaced. Ensure you reference the existing services collection and ServiceType enum so the new serviceMap keys match the original logic.
274-274: Consider using a theme color instead of hardcoded hex.The background color
Color(0x1AB0B6BC)appears to be a semi-transparent gray. If this is a design system color, consider adding it toMyTheme.Colorsfor consistency.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@wallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellScreen.kt` at line 274, Replace the hardcoded Color(0x1AB0B6BC) used in the BuyAndSellScreen background modifier with a themed color: add a semantic color property (e.g., overlayGray or semiTransparentSurface) to your theme object (MyTheme.Colors) and then use MyTheme.colors.overlayGray in the Modifier.background call inside BuyAndSellScreen to keep colors consistent and allow central control of opacity and palette.wallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellIntegrationsFragment.kt (1)
55-57:launchWhenResumedis deprecated — preferrepeatOnLifecycleorLifecycle.launchWhenResumed.
lifecycleScope.launchWhenResumedhas been deprecated since Lifecycle 2.4.0 in favor of safer lifecycle-aware collection patterns.♻️ Suggested refactor
- lifecycleScope.launchWhenResumed { - checkLiquidStatus() - } + viewLifecycleOwner.lifecycleScope.launch { + viewLifecycleOwner.repeatOnLifecycle(Lifecycle.State.RESUMED) { + checkLiquidStatus() + } + }Note: You'll need to import
androidx.lifecycle.repeatOnLifecycleandandroidx.lifecycle.Lifecycle.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@wallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellIntegrationsFragment.kt` around lines 55 - 57, Replace the deprecated lifecycleScope.launchWhenResumed usage in BuyAndSellIntegrationsFragment with the repeatOnLifecycle pattern: start a lifecycleScope.launch and inside call requireActivity().lifecycle.repeatOnLifecycle(Lifecycle.State.RESUMED) (or viewLifecycleOwner.lifecycle.repeatOnLifecycle if appropriate) and invoke checkLiquidStatus() within that block so the call is lifecycle-safe; ensure you import androidx.lifecycle.repeatOnLifecycle and androidx.lifecycle.Lifecycle and use the fragment's appropriate lifecycle owner to scope the coroutine.integrations/maya/src/main/java/org/dash/wallet/integrations/maya/payments/MayaCryptoCurrency.kt (1)
360-365: Deduplication silently drops duplicate currency codes — first entry wins.The deduplication logic prevents the duplicate USDT/PEPE/ETH overwrite issue by using
registeredCodes.add(currency.code.lowercase()), which returns false for duplicate codes. However, entries with duplicate codes are silently ignored. The first-registered entry wins (e.g.,ETH.USDToverARB.USDT).If users need to select between chain variants (e.g., USDT on Ethereum vs Arbitrum), consider using chain-qualified codes or a different lookup strategy.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/payments/MayaCryptoCurrency.kt` around lines 360 - 365, The current deduplication uses registeredCodes.add(currency.code.lowercase()) which silently drops later currencies with the same code (so first occurrence wins, e.g., ETH.USDT blocks ARB.USDT); change the strategy in the loop over all to preserve chain-qualified uniqueness instead of simple lowercase code — for example derive a unique key from currency.chain or currency.chainId plus currency.code (use currency.chain/currency.chainId or a function to produce chainQualifiedCode) and use that key when checking/adding to registeredCodes, then call paymentProcessors.add with the original currency.name and currency.code (or include chain info in display name) so chain variants are not lost; update any lookup logic to expect chain-qualified keys rather than plain currency.code.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/agents/update-maya-currencies.md:
- Line 40: The heading "#### EVM Tokens (ETH.* and ARB.*)" is parsed incorrectly
because the asterisks are treated as emphasis markers; update that heading to
escape the asterisks or wrap the patterns in backticks (e.g., use `ETH.*` and
`ARB.*` or escape as ETH.\* and ARB.\*) so the asterisks render literally and
MD037 no longer fails.
In
`@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/payments/parsers/ZcashAddressParser.kt`:
- Around line 29-45: The transparent-address matching currently uses
PATTERN_BITCOIN_ADDRESS via super which accepts generic Base58 BTC/DASH
addresses; add a Zcash-specific transparent regex (e.g.
PATTERN_ZCASH_TRANSPARENT matching Base58 addresses that start with "t1" or
"t3") and use that instead of the generic pattern: create a private
transparentParser = AddressParser(PATTERN_ZCASH_TRANSPARENT, null) (or replace
the superclass pattern) and then call transparentParser.exactMatch/inputText and
transparentParser.findAll(inputText) in ZcashAddressParser.exactMatch and
findAll, keeping saplingParser and unifiedParser as-is so only Zcash transparent
prefixes are accepted.
In
`@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaConvertCryptoFragment.kt`:
- Around line 136-154: The coroutine in lifecycleScope.launch should guard
against failures from mayaViewModel.refreshInboundAddresses() and
Address.fromBase58(...) so transient errors don't crash the flow; wrap the
refreshInboundAddresses call in a try/catch and show an error dialog (same
AdaptiveDialog used below) and return on failure, and when locating dashInbound
validate its address by catching exceptions from Address.fromBase58 (or validate
format first) before calling viewModel.getUpdatedPaymentIntent — if parsing
fails show an error dialog and return; update references:
mayaViewModel.refreshInboundAddresses, mayaViewModel.inboundAddresses,
Address.fromBase58, and viewModel.getUpdatedPaymentIntent to implement these
defensive checks.
In
`@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaViewModel.kt`:
- Around line 81-82: Remove the separate MutableStateFlow/List pair
(_inboundAddresses and inboundAddresses) and fold the inbound address list into
the existing MayaPortalUIState data class (add an inboundAddresses:
List<InboundAddress> property), update the ViewModel's uiState flow to carry
that list (emit updates to uiState when inbound addresses change instead of
emitting _inboundAddresses), and change hasHaltedCoins to be computed from
uiState (e.g. uiState.value.inboundAddresses) rather than from the removed
inboundAddresses flow; then replace all usages of
_inboundAddresses/inboundAddresses in the ViewModel and consumers to read/update
uiState.inboundAddresses (use uiState.update { it.copy(inboundAddresses = ...) }
in functions that mutate the list).
- Around line 162-169: The code currently sets the halted flag on whatever entry
is first in the list returned by mayaApi.getInboundAddresses(), which can
disable the wrong chain; instead update the specific inbound address entry by
matching a stable identifier (e.g., asset, chain, or symbol) rather than by list
position: fetch mayaApi.getInboundAddresses(), locate the intended entry by
comparing its asset/chain field (the property used by your app to identify
chains) and set halted = true on that matched item (or map the list transforming
only that item), then assign the resulting list back where inboundAddresses is
used; do this in the code around mayaApi.getInboundAddresses(), addresses, and
the copy(halted = true) usage so only the correct asset is modified.
---
Duplicate comments:
In `@integrations/maya/src/main/res/navigation/nav_maya.xml`:
- Line 10: Replace the hardcoded android:label="mayaPortalFragment" in
nav_maya.xml with a string resource reference (e.g.
android:label="@string/maya_portal_title") and add the corresponding entry in
your strings.xml (name it maya_portal_title with the localized text), ensuring
you update any other locales as needed; this prevents leaking internal
identifiers into the app bar/title and enables localization.
---
Nitpick comments:
In @.claude/agents/figma-to-compose.md:
- Around line 37-39: In .claude/agents/figma-to-compose.md there are several
fenced code blocks that contain plain path/text (for example the block with
"common/src/main/java/org/dash/wallet/common/ui/components/"); update each of
those fences to include a language specifier such as text or plaintext (e.g.
change ``` to ```text) so the blocks are marked as non-code and satisfy the
linter; ensure you update all instances referenced in the review (the blocks at
the noted locations) consistently.
In
`@integrations/maya/src/main/java/org/dash/wallet/integrations/maya/payments/MayaCryptoCurrency.kt`:
- Around line 360-365: The current deduplication uses
registeredCodes.add(currency.code.lowercase()) which silently drops later
currencies with the same code (so first occurrence wins, e.g., ETH.USDT blocks
ARB.USDT); change the strategy in the loop over all to preserve chain-qualified
uniqueness instead of simple lowercase code — for example derive a unique key
from currency.chain or currency.chainId plus currency.code (use
currency.chain/currency.chainId or a function to produce chainQualifiedCode) and
use that key when checking/adding to registeredCodes, then call
paymentProcessors.add with the original currency.name and currency.code (or
include chain info in display name) so chain variants are not lost; update any
lookup logic to expect chain-qualified keys rather than plain currency.code.
In
`@wallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellIntegrationsFragment.kt`:
- Around line 55-57: Replace the deprecated lifecycleScope.launchWhenResumed
usage in BuyAndSellIntegrationsFragment with the repeatOnLifecycle pattern:
start a lifecycleScope.launch and inside call
requireActivity().lifecycle.repeatOnLifecycle(Lifecycle.State.RESUMED) (or
viewLifecycleOwner.lifecycle.repeatOnLifecycle if appropriate) and invoke
checkLiquidStatus() within that block so the call is lifecycle-safe; ensure you
import androidx.lifecycle.repeatOnLifecycle and androidx.lifecycle.Lifecycle and
use the fragment's appropriate lifecycle owner to scope the coroutine.
In `@wallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellScreen.kt`:
- Line 121: The helper function serviceOf(type: ServiceType) does a linear find
on services every recomposition; hoist this by creating a memoized map once (use
remember(services) { services.associateBy { it.serviceType } }) and replace
repeated serviceOf(...) calls with lookups like serviceMap[ServiceType.UPHOLD];
remove or stop using serviceOf where replaced. Ensure you reference the existing
services collection and ServiceType enum so the new serviceMap keys match the
original logic.
- Line 274: Replace the hardcoded Color(0x1AB0B6BC) used in the BuyAndSellScreen
background modifier with a themed color: add a semantic color property (e.g.,
overlayGray or semiTransparentSurface) to your theme object (MyTheme.Colors) and
then use MyTheme.colors.overlayGray in the Modifier.background call inside
BuyAndSellScreen to keep colors consistent and allow central control of opacity
and palette.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: af4c27de-9e1c-4c1f-b156-42779eec7194
📒 Files selected for processing (23)
.claude/agents/figma-to-compose.md.claude/agents/update-maya-currencies.mdcommon/src/main/java/org/dash/wallet/common/ui/components/MenuItem.ktcommon/src/main/java/org/dash/wallet/common/ui/components/TopIntro.ktintegrations/maya/build.gradleintegrations/maya/proguard-rules.prointegrations/maya/src/main/java/org/dash/wallet/integrations/maya/payments/MayaCryptoCurrency.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/payments/parsers/XrdPaymentIntentParser.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/payments/parsers/ZcashAddressParser.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/payments/parsers/ZcashPaymentIntentParser.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaAddressInputFragment.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaConvertCryptoFragment.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaCryptoCurrencyPickerFragment.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/java/org/dash/wallet/integrations/maya/ui/MayaViewModel.ktintegrations/maya/src/main/res/drawable/ic_maya_convert.xmlintegrations/maya/src/main/res/navigation/nav_maya.xmlintegrations/maya/src/main/res/values/strings-maya.xmlwallet/res/values/strings.xmlwallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellIntegrationsFragment.ktwallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellScreen.ktwallet/src/de/schildbach/wallet/ui/buy_sell/BuyAndSellViewModel.kt
Issue being fixed or feature implemented
Related PR's and Dependencies
Screenshots / Videos
How Has This Been Tested?
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes
Documentation