Repository navigation
chore: v11.8 - #1488
chore: v11.8#1488
Conversation
…he view for no username
…gets the tx before the app sends it
|
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:
📝 WalkthroughWalkthroughUpdates build versions and BuildConfig flags; adds ChangesBuild & configuration
Runtime & services
Data & storage
ExploreDash behavior & strings
Localization & integrations
Estimated code review effort Possibly related PRs
Suggested reviewers
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Actionable comments posted: 1
Note
Due to the large number of review comments, Critical severity comments were prioritized as inline comments.
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/service/platform/TopUpRepository.kt (1)
643-663:⚠️ Potential issue | 🟠 Major | ⚡ Quick winRemove invitation/deeplink payloads and AppsFlyer userParams from logs
createAppsFlyerLink()’sonResponselogs the generated AppsFlyer link, raw invite deep link (invitationLinkData.link), andlinkGenerator.userParams. These values can contain the full invitation/attribution payload and shouldn’t be written to persistent logs—keep only a success/failure message or redact.Suggested fix
linkGenerator.generateLink(walletApplication, object : ResponseListener { override fun onResponse(link: String?) { - log.info("AppsFlyer link generated successfully: {}", link) - log.info("AppsFlyer link generator : {}", linkGenerator.generateLink()) - log.info("AppsFlyer af_dp : {}", invitationLinkData.link.toString()) - log.info("AppsFlyer user parameters {}", linkGenerator.userParams) + log.info("AppsFlyer link generated successfully") continuation.resume( DynamicLink(🤖 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/service/platform/TopUpRepository.kt` around lines 643 - 663, The onResponse block in createAppsFlyerLink() currently logs the full generated AppsFlyer link, invitationLinkData.link, and linkGenerator.userParams which may include sensitive invitation/deeplink payloads; remove those detailed log statements and replace them with a single non-sensitive success message (e.g., "AppsFlyer link generated successfully" or include only a boolean/length/truncated token if absolutely necessary). Specifically, remove or redact references to link, invitationLinkData.link, and linkGenerator.userParams in the onResponse implementation of the ResponseListener used with linkGenerator.generateLink(), and ensure only minimal, non-persistent diagnostic info is logged.features/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/dashspend/dialogs/GiftCardDetailsViewModel.kt (1)
437-477:⚠️ Potential issue | 🟠 Major | ⚡ Quick winDon't mark the order fulfilled when there are no local rows to map.
If
uiState.value.giftCardsis empty here, we only log and continue. The position-mapping loop then skips every server card,cancelTicker()stops polling, and the UI ends in a fulfilled state without persisting any cards. Return an error/retry state here, or rebuild the missing local rows before continuing.🤖 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/dashspend/dialogs/GiftCardDetailsViewModel.kt` around lines 437 - 477, Summary: avoid marking the order fulfilled when no local rows exist to map; either rebuild missing local rows or set an error/retry state and do not stop polling. In GiftCardDetailsViewModel, inside the block handling server giftCards (the forEachIndexed mapping over giftCards using localCards = uiState.value.giftCards.sortedBy { it.index }), detect the case where uiState.value.giftCards is empty or missing rows for all positions and do not proceed to the code path that cancels polling/marks fulfilled; instead either (A) create the dummy local rows before mapping using the existing pattern (use uiState.value.giftCards.maxByOrNull { it.index } or create fresh rows with contiguous indices and insert via giftCardDao.insertGiftCard and update _uiState) and then continue mapping, or (B) update _uiState to an error/retry state and return early so cancelTicker() / fulfillment logic is not executed; reference GiftCardDetailsViewModel, uiState.value.giftCards, giftCardDao.insertGiftCard, the forEachIndexed mapping, and cancelTicker when applying the change.features/exploredash/src/main/res/values-fa/strings-explore-dash.xml (1)
183-183:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winMissing
gift_card_buy_titlestring resource.All other locale files in this layer add the
gift_card_buy_titlestring resource between lines 182-184, but the Farsi file is missing this addition. This will cause a runtime error when the app attempts to reference this string in Farsi locale.🔧 Proposed fix
Insert the missing string resource after line 182:
<string name="purchase_gift_card_max">حداکثر: %s</string> +<string name="gift_card_buy_title">خرید کارت هدیه</string> <string name="purchase_gift_card_discount_hint">شما در حال خرید یک کارت هدیه %s به قیمت %s (با %s تخفیف) هستند. </string>Note: The proposed Farsi translation "خرید کارت هدیه" (Buy gift card) should be verified by a native Farsi speaker for accuracy.
🤖 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/res/values-fa/strings-explore-dash.xml` at line 183, Add the missing string resource named gift_card_buy_title to the Farsi strings file so the app can reference it at runtime; insert it adjacent to the existing purchase_gift_card_discount_hint entry (i.e., the same block where other locales added gift_card_buy_title) and use the Farsi translation "خرید کارت هدیه" (or confirm an alternative with a native speaker) as the value.
🟠 Major comments (21)
wallet/res/values-fr/strings.xml-286-286 (1)
286-286:⚠️ Potential issue | 🟠 Major | ⚡ Quick winUpdate the adjacent summary to match the renamed key type.
This title now correctly says
clé publique étendue, butpreferences_extended_public_key_summaryon Line 284 still saysclé privée étendue. Leaving both together in the same screen confuses a public key with a private key in a security-sensitive flow.🤖 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/values-fr/strings.xml` at line 286, The summary string preferences_extended_public_key_summary still refers to a private key while the title extended_public_key_fragment_title was renamed to "Clé publique étendue (BIP44)"; update the value of preferences_extended_public_key_summary to refer to the extended public key (e.g., use "Clé publique étendue" or a matching localized sentence) so the summary and the title consistently mention the public key rather than the private key.wallet/res/values-es/strings.xml-317-318 (1)
317-318:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAlign this tax copy with the existing summary text.
report_transaction_history_messageon Line 316 says outgoing payments are treated as "una venta", while the newreport_transaction_history_body_1says they are "un gasto". Showing both in the same export flow creates contradictory tax guidance.🤖 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/values-es/strings.xml` around lines 317 - 318, The two Spanish strings conflict with the existing summary: update report_transaction_history_body_1 so its wording matches report_transaction_history_message (both should refer to outgoing payments consistently as either "una venta" or "un gasto"); locate report_transaction_history_message, report_transaction_history_body_1 and report_transaction_history_body_2 and change report_transaction_history_body_1 to use the same tax treatment term used in report_transaction_history_message, preserving the explanatory note in report_transaction_history_body_2 about owner responsibility for base cost adjustments.wallet/build.gradle-418-418 (1)
418-418:⚠️ Potential issue | 🟠 Major | ⚡ Quick winUse the test AppsFlyer template for
devnetas well.Line 418 points
devnetatdashpaytest.onelink.me, but this flavor still inheritsAPPSFLYER_TEMPLATE_IDfromproductFlavors.allinstead of overriding it like_testNet3andstaging. That leavesWalletApplicationandTopUpRepositorycomposing a test-domain link with the wrong OneLink template ondevnet, which can break invite routing there.Suggested fix
devnet { applicationId = "org.dash.dashpay.devnet" def imgurClientId = props.getProperty("UPHOLD_CLIENT_ID_SANDBOX") def imgurClientSecret = props.getProperty("UPHOLD_CLIENT_SECRET_SANDBOX") if (imgurClientId == null) { imgurClientId = "\"UPHOLD_CLIENT_ID\"" } if (imgurClientSecret == null) { imgurClientSecret = "\"UPHOLD_CLIENT_SECRET\"" } buildConfigField("String", "UPHOLD_CLIENT_ID", "\"UPHOLD_CLIENT_ID\"") buildConfigField("String", "UPHOLD_CLIENT_SECRET", "\"UPHOLD_CLIENT_SECRET\"") def topperKeyId = props.getProperty("TOPPER_KEY_ID_SANDBOX", "\"TOPPER_KEY_ID\"") def topperWidgetId = props.getProperty("TOPPER_WIDGET_ID_SANDBOX", "\"TOPPER_WIDGET_ID\"") def topperPrivateKey = props.getProperty("TOPPER_PRIVATE_KEY_SANDBOX", "\"TOPPER_PRIVATE_KEY\"") buildConfigField("String", "TOPPER_KEY_ID", topperKeyId) buildConfigField("String", "TOPPER_WIDGET_ID", topperWidgetId) buildConfigField("String", "TOPPER_PRIVATE_KEY", topperPrivateKey) buildConfigField("String", "ZENLEDGER_CLIENT_ID", "\"\"") buildConfigField("String", "ZENLEDGER_CLIENT_SECRET", "\"\"") + def appsFlyerTemplateId = props.getProperty("APPSFLYER_TEMPLATE_ID_TESTNET", "\"\"") + buildConfigField("String", "APPSFLYER_TEMPLATE_ID", appsFlyerTemplateId) buildConfigField("String", "APPSFLYER_BRAND_DOMAIN", "\"dashpaytest.onelink.me\"") }🤖 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/build.gradle` at line 418, The devnet flavor sets APPSFLYER_BRAND_DOMAIN to "dashpaytest.onelink.me" but does not override APPSFLYER_TEMPLATE_ID (it still inherits from productFlavors.all), causing WalletApplication and TopUpRepository to compose invite links with a mismatched OneLink template; update the devnet product flavor in build.gradle to explicitly set buildConfigField("String", "APPSFLYER_TEMPLATE_ID", "<test_template_id>") to the test AppsFlyer template (same pattern as _testNet3 and staging) so APPSFLYER_TEMPLATE_ID and APPSFLYER_BRAND_DOMAIN are consistent for devnet.wallet/src/de/schildbach/wallet/WalletApplication.java-307-316 (1)
307-316:⚠️ Potential issue | 🟠 Major | ⚡ Quick winRegister the AppsFlyer conversion listener before calling
start().
InWalletApplication.initializeAppsFlyer(), the listener is registered only afterappsFlyerLib.start(this)(init passesnull), which can miss cold-start attribution callbacks—pass theAppsFlyerConversionListenerintoinit(...)or otherwise register it beforestart().🤖 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/WalletApplication.java` around lines 307 - 316, In WalletApplication.initializeAppsFlyer(), register the AppsFlyer conversion listener before calling appsFlyerLib.start(): either pass the new com.appsflyer.AppsFlyerConversionListener instance into appsFlyerLib.init(...) instead of null, or call appsFlyerLib.registerConversionListener(this, new AppsFlyerConversionListener(...) ) immediately after init and before appsFlyerLib.start(this); update references to appsFlyerLib.init, registerConversionListener and start in that method so cold-start attribution callbacks are not missed.wallet/src/de/schildbach/wallet/WalletApplication.java-309-369 (1)
309-369:⚠️ Potential issue | 🟠 Major | ⚡ Quick winStop logging sensitive AppsFlyer payloads/deep-link values (and avoid VERBOSE logging)
WalletApplication.initializeAppsFlyer()currently enables AppsFlyersetLogLevel(VERBOSE)and logs full conversion/attribution maps plus the resolved deep-link string at INFO. Redact or gate these logs behind debug-only paths.Suggested fix
appsFlyerLib.setAppInviteOneLink(BuildConfig.APPSFLYER_TEMPLATE_ID); appsFlyerLib.setDebugLog(BuildConfig.DEBUG); - appsFlyerLib.setLogLevel(com.appsflyer.AFLogger.LogLevel.VERBOSE); String customerId = config.getUniqueId(); appsFlyerLib.setCustomerUserId(customerId); appsFlyerLib.start(this); @@ `@Override` public void onConversionDataSuccess(Map<String, Object> data) { - log.info("AppsFlyer conversion received: {}", data); if (data != null) { - log.info("Available keys: {}", data.keySet()); + log.debug("AppsFlyer conversion keys: {}", data.keySet()); handleDeepLinkData(data); } } @@ public void onAppOpenAttribution(Map<String, String> data) { - log.info("AppsFlyer app open attribution: {}", data); if (data != null) { - log.info("Available attribution keys: {}", data.keySet()); + log.debug("AppsFlyer attribution keys: {}", data.keySet()); Map<String, Object> objectData = new HashMap<>(data); handleDeepLinkData(objectData); } } @@ private void handleDeepLinkData(Map<String, Object> data) { String deepLinkValue = extractDeepLink(data); if (deepLinkValue != null) { - log.info("Processing deep link: {}", deepLinkValue); + log.debug("Processing AppsFlyer deep link"); new android.os.Handler(android.os.Looper.getMainLooper()).post(() -> { Intent intent = new Intent(getApplicationContext(), de.schildbach.wallet.ui.InviteHandlerActivity.class); intent.setData(Uri.parse(deepLinkValue)); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); }); } else { log.warn("No deep link found in AppsFlyer data"); } } @@ if (!stringValue.trim().isEmpty()) { - log.info("Found deep link in key '{}': {}", key, stringValue); + log.debug("Found deep link in AppsFlyer key '{}'", key); return stringValue; }🤖 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/WalletApplication.java` around lines 309 - 369, The code in WalletApplication.initializeAppsFlyer enables VERBOSE AppsFlyer logging and records full conversion/attribution maps and the resolved deep-link string (in onConversionDataSuccess, onAppOpenAttribution, and extractDeepLink), which exposes sensitive data; change appsFlyerLib.setLogLevel(com.appsflyer.AFLogger.LogLevel.VERBOSE) to a non-verbose level (e.g., WARN or ERROR), remove or redact full payload logs in onConversionDataSuccess/onConversionDataFail/onAppOpenAttribution (log only existence/keys or a masked summary), and stop logging the raw deepLinkValue in extractDeepLink/handleDeepLinkData—instead log only that a deep link was found or, when BuildConfig.DEBUG is true, log the full value; apply these changes inside WalletApplication.initializeAppsFlyer and its inner AppsFlyerConversionListener to avoid exposing sensitive data.wallet/src/de/schildbach/wallet/service/WalletTransactionMetadataProvider.kt-347-380 (1)
347-380:⚠️ Potential issue | 🟠 Major | ⚡ Quick winUnify the gift-card merge path or
notewill still be lost in platform syncs.This method now preserves
note, butsyncPlatformMetadata()still updates gift cards throughinsertOrUpdateGiftCard(), and that helper's merge at Lines 706-714 still omitsnote. Existing rows updated from the platform path can therefore still silently drop note changes. Please move the merge into one shared helper and includenotethere so both update paths behave the same way.💡 Suggested direction
override suspend fun updateGiftCardMetadata(giftCard: GiftCard) { - val existing = giftCardDao.getCardForTransaction(giftCard.txId).find { it.index == giftCard.index } - val merged = if (existing == null) { - giftCard - } else { - existing.copy( - merchantName = giftCard.merchantName.ifEmpty { existing.merchantName }, - price = giftCard.price.takeIf { it != 0.0 } ?: existing.price, - number = giftCard.number ?: existing.number, - pin = giftCard.pin ?: existing.pin, - barcodeValue = giftCard.barcodeValue ?: existing.barcodeValue, - barcodeFormat = giftCard.barcodeFormat ?: existing.barcodeFormat, - merchantUrl = giftCard.merchantUrl ?: existing.merchantUrl, - note = giftCard.note ?: existing.note - ) - } - - if (existing == null) { - giftCardDao.insertGiftCard(merged) - } else { - giftCardDao.updateGiftCard(merged) - } + val merged = insertOrUpdateGiftCard(giftCard) // for now, only save the first card if (merged.index == 0) { transactionMetadataChangeCacheDao.insertGiftCardData( merged.txId,And update the shared helper to return the merged row and preserve
noteas well:private suspend fun insertOrUpdateGiftCard(giftCard: GiftCard): GiftCard { ... val updatedGiftCard = existingGiftCard.copy( merchantName = giftCard.merchantName.ifEmpty { existingGiftCard.merchantName }, price = giftCard.price.takeIf { it != 0.0 } ?: existingGiftCard.price, number = giftCard.number ?: existingGiftCard.number, pin = giftCard.pin ?: existingGiftCard.pin, barcodeValue = giftCard.barcodeValue ?: existingGiftCard.barcodeValue, barcodeFormat = giftCard.barcodeFormat ?: existingGiftCard.barcodeFormat, merchantUrl = giftCard.merchantUrl ?: existingGiftCard.merchantUrl, note = giftCard.note ?: existingGiftCard.note ) ... }🤖 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/service/WalletTransactionMetadataProvider.kt` around lines 347 - 380, The platform-sync path still uses its own merge in insertOrUpdateGiftCard(), so notes can be lost; consolidate the merge logic into a single helper (e.g., move the existing merge used here into insertOrUpdateGiftCard or create a shared mergeGiftCard(existing, incoming): GiftCard) and ensure the merge copies note = incoming.note ?: existing.note; have insertOrUpdateGiftCard return the merged GiftCard and update callers (syncPlatformMetadata() and the local update path that currently builds merged) to call the shared helper so both paths preserve note consistently.integrations/maya/src/main/res/values-ja/strings-maya.xml-104-104 (1)
104-104:⚠️ Potential issue | 🟠 Major | ⚡ Quick winThis destination label is translated in the opposite direction.
Line 104 is
to_dash_wallet_on_this_device, but the Japanese text saysこのデバイスのDashウォレットから("from the Dash wallet on this device"). That reverses the transfer direction in the UI.🤖 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/res/values-ja/strings-maya.xml` at line 104, The translation for the string resource named to_dash_wallet_on_this_device is reversed: replace the current Japanese text "このデバイスのDashウォレットから" (which means "from the Dash wallet on this device") with a correct "to" phrasing such as "このデバイスのDashウォレットへ" (meaning "to the Dash wallet on this device") so the UI reflects the intended transfer direction.integrations/maya/src/main/res/values-fa/strings-maya.xml-52-52 (1)
52-52:⚠️ Potential issue | 🟠 Major | ⚡ Quick winThe LLD network label points to the wrong chain.
Line 52 is
cryptocurrency_lld_ethereum_network, but the value saysLLD (Arbitrum). Showing the wrong network here is misleading in a conversion flow where the chain matters.🤖 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/res/values-fa/strings-maya.xml` at line 52, The string resource cryptocurrency_lld_ethereum_network has a mismatched value ("LLD (Arbitrum)"); update the value to match the key (e.g., change the value to "الالدی (اتریوم)" or the correct localized text for LLD (Ethereum)) or, if the label should be Arbitrum, rename the resource key to cryptocurrency_lld_arbitrum_network to keep key and value consistent; ensure the XML string name cryptocurrency_lld_ethereum_network and its displayed text refer to the same chain.integrations/maya/src/main/res/values-nl/strings-maya.xml-28-28 (1)
28-28:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix Android string placeholders and ETA wording in
values-nl/strings-maya.xml.
cryptocurrency_any_network(line 28) must include a%splaceholder: it currently is% Netwerk, butMayaCurrencyMapper.ktcallsgetString(R.string.cryptocurrency_any_network, networkName).<string name="cryptocurrency_any_network">% Netwerk</string>maya_it_could_take_up_to_5_minutes(line 81) shows “tot 2 minuten” while the key is_5_minutes, and it omits the “from Dash Wallet … to …” phrasing from the source sentence.🤖 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/res/values-nl/strings-maya.xml` at line 28, Update the Dutch strings: modify the string resource named cryptocurrency_any_network to include a %s placeholder (e.g., "%s Netwerk") so calls in MayaCurrencyMapper.kt that pass networkName via getString(R.string.cryptocurrency_any_network, networkName) receive the value correctly, and correct the maya_it_could_take_up_to_5_minutes string to reference five minutes and include the full “from Dash Wallet … to …” phrasing consistent with the source sentence (keep the %s/%1$s placeholders and word order matching how the code supplies the two wallet names).integrations/maya/src/main/res/values-fil/strings-maya.xml-28-28 (1)
28-28:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix Android string formatting placeholders in Maya Filipino resources
integrations/maya/src/main/res/values-fil/strings-maya.xmlline 28:cryptocurrency_any_networkis% Network, butMayaCurrencyMapper.getCurrencyNetwork()callsgetString(R.string.cryptocurrency_any_network, networkName); change it to%s Network(or%% Networkonly if you want a literal%).- line 81:
maya_it_could_take_up_to_5_minutessays “hanggang 2 minuto” (name implies 5) and concatenates placeholders asng%s/hanggang%s; update to consistent timing and add spacing (ng %s/hanggang %s).🤖 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/res/values-fil/strings-maya.xml` at line 28, Update the Filipino strings to use correct formatting placeholders and consistent timing: change the value for resource name cryptocurrency_any_network to use a string placeholder (e.g., "%s Network") so MayaCurrencyMapper.getCurrencyNetwork() can call getString(R.string.cryptocurrency_any_network, networkName) without crashing; also fix maya_it_could_take_up_to_5_minutes to reflect the intended 5-minute wording and ensure placeholders include a space (e.g., "ng %s" and "hanggang %s") so any code that formats that string receives properly spaced substitutions.integrations/maya/src/main/res/values-it/strings-maya.xml-28-28 (1)
28-28:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix Android string formatting for
cryptocurrency_any_network
MayaCurrencyMapper.ktformatsR.string.cryptocurrency_any_networkwithnetworkName, but the Italian resource is:<string name="cryptocurrency_any_network">% Network</string>It’s missing a format placeholder (e.g.
%s/%1$s), so the selected network name can’t be rendered safely. Add the placeholder to the Italian string.Also check
maya_it_could_take_up_to_5_minutes: the key implies “5 minutes”, but the Italian text appears to say “2 minutes”.🤖 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/res/values-it/strings-maya.xml` at line 28, Update the Italian resources so formatted strings match their usage: change the value of R.string.cryptocurrency_any_network in strings-maya.xml to include a string placeholder (e.g. "%1$s" or "%s") so MayaCurrencyMapper.kt can safely format it with networkName, and verify/fix the text for maya_it_could_take_up_to_5_minutes so the Italian string correctly reflects "5 minutes" (or change the key if it should be "2 minutes") to keep the key and translated content consistent.integrations/maya/src/main/res/values-es/strings-maya.xml-28-28 (1)
28-28:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix Maya Spanish string-format issues (network label + conversion ETA).
The current
cryptocurrency_any_networkvalue is invalid for Android formatting:<string name="cryptocurrency_any_network">%Red</string>
- Line 28:
cryptocurrency_any_networkmust include a%splaceholder (it’s currently%R..., which will be treated as a format specifier).MayaCurrencyMapper.getCurrencyNetwork()callsgetString(R.string.cryptocurrency_any_network, networkName), so this can fail at runtime.- Line 81:
maya_it_could_take_up_to_5_minutesis misleading/malformed: it says “hasta 2 minutos” (vs “5 minutes” in the name) and the second placeholder is glued asa %sy(should bea %s y).🤖 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/res/values-es/strings-maya.xml` at line 28, cryptocurrency_any_network contains an invalid format token and must be changed to include a single %s placeholder so MayaCurrencyMapper.getCurrencyNetwork() can pass networkName (update the string resource cryptocurrency_any_network to something like a text with "%s" where the network name goes); also fix maya_it_could_take_up_to_5_minutes to reflect "5 minutos" (not "2 minutos") and correct the placeholder spacing so the second placeholder is separated as "a %s y %s" (ensure two %s placeholders in the proper order and spacing).integrations/maya/src/main/res/values-el/strings-maya.xml-28-28 (1)
28-28:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix
cryptocurrency_any_networkformatting placeholder (and correct the 5-minute ETA copy)
integrations/maya/src/main/res/values-el/strings-maya.xml:28:cryptocurrency_any_networkis% Δίκτυο, butMayaCurrencyMapper.getCurrencyNetwork()callscontext.getString(R.string.cryptocurrency_any_network, networkName), so it needs a proper string-format placeholder (e.g.,%s Δίκτυο) instead of a bare%.integrations/maya/src/main/res/values-el/strings-maya.xml:81:maya_it_could_take_up_to_5_minutessays “έως και 2λεπτα”, but it should match “up to 5 minutes”.🤖 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/res/values-el/strings-maya.xml` at line 28, Update the Greek string resources used by MayaCurrencyMapper.getCurrencyNetwork(): change the value for string name "cryptocurrency_any_network" from "% Δίκτυο" to include a string placeholder (e.g., "%s Δίκτυο") so context.getString(R.string.cryptocurrency_any_network, networkName) formats correctly, and correct the copy for "maya_it_could_take_up_to_5_minutes" to reference "5 λεπτά" (matching “up to 5 minutes”) instead of the incorrect "2λεπτα".integrations/maya/src/main/res/values-ja/strings-maya.xml-28-28 (1)
28-28:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix Android string formatting placeholder for
cryptocurrency_any_network.
MayaCurrencyMappercallscontext.getString(R.string.cryptocurrency_any_network, networkName), but the Japanese value inintegrations/maya/src/main/res/values-ja/strings-maya.xmlis"%のネットワーク"(no%s), sonetworkNamecan’t be injected reliably. Update the string to include a%splaceholder (e.g.,"%sのネットワーク").🤖 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/res/values-ja/strings-maya.xml` at line 28, The Japanese resource for R.string.cryptocurrency_any_network is missing the %s placeholder so MayaCurrencyMapper's call to context.getString(R.string.cryptocurrency_any_network, networkName) cannot inject networkName; update the string value to include a %s (e.g., "%sのネットワーク") so context.getString(...) supplies networkName correctly.integrations/maya/src/main/res/values-fa/strings-maya.xml-28-28 (1)
28-28:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix missing
%splaceholder and incorrect LLD network label in Farsi Maya strings
cryptocurrency_any_networkinintegrations/maya/src/main/res/values-fa/strings-maya.xmlhas no%splaceholder (defaultintegrations/maya/src/main/res/values/strings-maya.xmlis% Network), butMayaCurrencyMapper.getCurrencyNetwork()callscontext.getString(R.string.cryptocurrency_any_network, networkName), so the dynamic network name can’t be inserted.cryptocurrency_lld_ethereum_networkis localized as(آربیتروم)invalues-fa, whileMayaCryptoCurrency.ktuses it for LLD on Ethereum, so the UI destination chain label can be wrong.🤖 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/res/values-fa/strings-maya.xml` at line 28, cryptocurrency_any_network lacks the required %s placeholder and will break MayaCurrencyMapper.getCurrencyNetwork(context.getString(R.string.cryptocurrency_any_network, networkName)); update the Farsi string for R.string.cryptocurrency_any_network to include the %s where the networkName should appear (matching the default "%s Network" ordering for Farsi). Also fix the incorrect LLD network label by correcting the translation for R.string.cryptocurrency_lld_ethereum_network in values-fa to the proper Ethereum LLD label (used by MayaCryptoCurrency and related UI) so the destination chain displays correctly.integrations/maya/src/main/res/values-zh/strings-maya.xml-28-28 (1)
28-28:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix the malformed format placeholder.
A single
%is not a valid formatted-string placeholder. This should be%sso the network value can be substituted correctly.Suggested fix
- <string name="cryptocurrency_any_network">% 网络</string> + <string name="cryptocurrency_any_network">%s 网络</string>🤖 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/res/values-zh/strings-maya.xml` at line 28, The string resource with name "cryptocurrency_any_network" uses a malformed format placeholder ("% 网络"); replace the single "%" with a proper string placeholder "%s" so the network value can be substituted (update the value for the resource "cryptocurrency_any_network" to use "%s 网络" and ensure any consumers calling getString(R.string.cryptocurrency_any_network, network) pass the network argument).integrations/maya/src/main/res/values-zh-rTW/strings-maya.xml-28-28 (1)
28-28:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix the malformed format placeholder.
This string uses a bare
%, which is not a valid Android formatting token. It should be%sif the network name is inserted at runtime.Suggested fix
- <string name="cryptocurrency_any_network">% 網路</string> + <string name="cryptocurrency_any_network">%s 網路</string>🤖 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/res/values-zh-rTW/strings-maya.xml` at line 28, The string resource "cryptocurrency_any_network" uses a bare '%' which is an invalid Android format placeholder; change the value to use a proper string placeholder (e.g., "%s 網路") so that the runtime-inserted network name is formatted correctly with String.format or resource formatting when referenced by getString(R.string.cryptocurrency_any_network, networkName).integrations/maya/src/main/res/values-ru/strings-maya.xml-28-28 (1)
28-28:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix the malformed format placeholder.
A lone
%is invalid in an Android formatted string. This needs%sso the network label can be rendered instead of failing formatting.Suggested fix
- <string name="cryptocurrency_any_network">% Сеть</string> + <string name="cryptocurrency_any_network">%s Сеть</string>🤖 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/res/values-ru/strings-maya.xml` at line 28, The string resource "cryptocurrency_any_network" contains a lone '%' which breaks Android formatting; update the value to use a proper format placeholder (use "%s") so the network label can be injected (e.g., replace the current "% Сеть" with a string using "%s" in place of the lone percent for the "cryptocurrency_any_network" resource).integrations/maya/src/main/res/values-sk/strings-maya.xml-28-28 (1)
28-28:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix the malformed format placeholder.
%should be%shere. As written, this resource is not a valid formatted string for injecting the network name.Suggested fix
- <string name="cryptocurrency_any_network">% sieť</string> + <string name="cryptocurrency_any_network">%s sieť</string>🤖 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/res/values-sk/strings-maya.xml` at line 28, The string resource "cryptocurrency_any_network" contains a malformed format placeholder ("%") which should be the string format "%s"; update the value for cryptocurrency_any_network from "% sieť" to "%s sieť" so the Android formatted string can accept the injected network name (and ensure callers pass a String arg when using getString or String.format).integrations/maya/src/main/res/values-pt/strings-maya.xml-28-28 (1)
28-28:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix the malformed format placeholder.
%is not a valid Android format token here. This should be%sso the selected network name can be injected safely.Suggested fix
- <string name="cryptocurrency_any_network">% Rede</string> + <string name="cryptocurrency_any_network">%s Rede</string>🤖 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/res/values-pt/strings-maya.xml` at line 28, The string resource "cryptocurrency_any_network" contains an invalid format token ("% Rede"); replace the bare "%" with a proper Android format placeholder "%s" so the selected network name can be injected safely (i.e., change the value to use "%s" where the network name should appear) and ensure the string remains a valid XML resource in strings-maya.xml.integrations/maya/src/main/res/values-pl/strings-maya.xml-28-28 (1)
28-28:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix the malformed format placeholder.
%is not a valid Android format token here. If this resource is formatted with a network name, it will not substitute correctly. Use%s(or%%if you intended a literal percent).Suggested fix
- <string name="cryptocurrency_any_network">% Sieć</string> + <string name="cryptocurrency_any_network">%s Sieć</string>🤖 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/res/values-pl/strings-maya.xml` at line 28, The string resource cryptocurrency_any_network contains a malformed format token "%" — update its value to use a proper Android format placeholder when substituting a network name by replacing "%" with "%s" (i.e., "%s Sieć"); if the intent was a literal percent sign instead, replace with "%%" instead. Locate the <string name="cryptocurrency_any_network"> entry and update the placeholder accordingly so formatting/substitution works correctly.
🧹 Nitpick comments (1)
integrations/coinbase/src/main/res/values-it/strings.xml (1)
24-24: 💤 Low valueConsider adding a period for consistency with other locales.
Most other locale versions of this error message end with a period. Adding one would improve consistency across the localization set.
✨ Suggested improvement
- <string name="coinbase_usd_wallet_error_message">Il tuo conto Coinbase non supporta i dollari USD</string> + <string name="coinbase_usd_wallet_error_message">Il tuo conto Coinbase non supporta i dollari USD.</string>🤖 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/coinbase/src/main/res/values-it/strings.xml` at line 24, The Italian localization string coinbase_usd_wallet_error_message is missing a terminal period; update its value to end with a period so it matches punctuation consistency with other locales (i.e., change "Il tuo conto Coinbase non supporta i dollari USD" to include a trailing "." in the string resource).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c6c2896f-e5d3-4dc2-93b8-6dcd4d7e3db9
⛔ Files ignored due to path filters (1)
Gemfile.lockis excluded by!**/*.lock
📒 Files selected for processing (147)
Gemfilebuild.gradlecommon/build.gradlecommon/src/main/res/values-ar/strings.xmlcommon/src/main/res/values-cs/strings.xmlcommon/src/main/res/values-de/strings.xmlcommon/src/main/res/values-el/strings.xmlcommon/src/main/res/values-es/strings.xmlcommon/src/main/res/values-fa/strings.xmlcommon/src/main/res/values-fil/strings.xmlcommon/src/main/res/values-fr/strings.xmlcommon/src/main/res/values-id/strings.xmlcommon/src/main/res/values-it/strings.xmlcommon/src/main/res/values-ja/strings.xmlcommon/src/main/res/values-ko/strings.xmlcommon/src/main/res/values-nl/strings.xmlcommon/src/main/res/values-pl/strings.xmlcommon/src/main/res/values-pt/strings.xmlcommon/src/main/res/values-ru/strings.xmlcommon/src/main/res/values-sk/strings.xmlcommon/src/main/res/values-th/strings.xmlcommon/src/main/res/values-tr/strings.xmlcommon/src/main/res/values-uk/strings.xmlcommon/src/main/res/values-zh-rTW/strings.xmlcommon/src/main/res/values-zh/strings.xmlfeatures/exploredash/build.gradlefeatures/exploredash/src/main/java/org/dash/wallet/features/exploredash/repository/PiggyCardsRepository.ktfeatures/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/dashspend/dialogs/GiftCardDetailsViewModel.ktfeatures/exploredash/src/main/java/org/dash/wallet/features/exploredash/utils/SavingsFormatting.ktfeatures/exploredash/src/main/res/values-ar/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-de/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-el/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-es/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-fa/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-fil/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-fr/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-id/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-it/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-ja/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-ko/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-nl/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-pl/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-pt/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-ru/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-sk/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-th/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-tr/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-uk/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-zh-rTW/strings-explore-dash.xmlfeatures/exploredash/src/main/res/values-zh/strings-explore-dash.xmlgradle.propertiesintegrations/coinbase/src/main/res/values-de/strings.xmlintegrations/coinbase/src/main/res/values-el/strings.xmlintegrations/coinbase/src/main/res/values-es/strings.xmlintegrations/coinbase/src/main/res/values-fa/strings.xmlintegrations/coinbase/src/main/res/values-fil/strings.xmlintegrations/coinbase/src/main/res/values-fr/strings.xmlintegrations/coinbase/src/main/res/values-it/strings.xmlintegrations/coinbase/src/main/res/values-ja/strings.xmlintegrations/coinbase/src/main/res/values-nl/strings.xmlintegrations/coinbase/src/main/res/values-pl/strings.xmlintegrations/coinbase/src/main/res/values-pt/strings.xmlintegrations/coinbase/src/main/res/values-ru/strings.xmlintegrations/coinbase/src/main/res/values-sk/strings.xmlintegrations/coinbase/src/main/res/values-zh-rTW/strings.xmlintegrations/coinbase/src/main/res/values-zh/strings.xmlintegrations/maya/src/main/res/values-de/strings-maya.xmlintegrations/maya/src/main/res/values-el/strings-maya.xmlintegrations/maya/src/main/res/values-es/strings-maya.xmlintegrations/maya/src/main/res/values-fa/strings-maya.xmlintegrations/maya/src/main/res/values-fil/strings-maya.xmlintegrations/maya/src/main/res/values-fr/strings-maya.xmlintegrations/maya/src/main/res/values-it/strings-maya.xmlintegrations/maya/src/main/res/values-ja/strings-maya.xmlintegrations/maya/src/main/res/values-nl/strings-maya.xmlintegrations/maya/src/main/res/values-pl/strings-maya.xmlintegrations/maya/src/main/res/values-pt/strings-maya.xmlintegrations/maya/src/main/res/values-ru/strings-maya.xmlintegrations/maya/src/main/res/values-sk/strings-maya.xmlintegrations/maya/src/main/res/values-zh-rTW/strings-maya.xmlintegrations/maya/src/main/res/values-zh/strings-maya.xmlwallet/build.gradlewallet/res/values-ar/strings-extra.xmlwallet/res/values-ar/strings.xmlwallet/res/values-bg/strings-extra.xmlwallet/res/values-bg/strings.xmlwallet/res/values-ca/strings.xmlwallet/res/values-cs/strings-extra.xmlwallet/res/values-cs/strings.xmlwallet/res/values-da/strings.xmlwallet/res/values-de/strings-dashpay.xmlwallet/res/values-de/strings-extra.xmlwallet/res/values-de/strings.xmlwallet/res/values-el/strings-extra.xmlwallet/res/values-el/strings.xmlwallet/res/values-es/strings-extra.xmlwallet/res/values-es/strings.xmlwallet/res/values-fa/strings-extra.xmlwallet/res/values-fa/strings.xmlwallet/res/values-fi/strings.xmlwallet/res/values-fil/strings-extra.xmlwallet/res/values-fil/strings.xmlwallet/res/values-fr/strings-extra.xmlwallet/res/values-fr/strings.xmlwallet/res/values-hu/strings.xmlwallet/res/values-id/strings-extra.xmlwallet/res/values-id/strings.xmlwallet/res/values-it/strings-extra.xmlwallet/res/values-it/strings.xmlwallet/res/values-ja/strings-extra.xmlwallet/res/values-ja/strings.xmlwallet/res/values-ko/strings-extra.xmlwallet/res/values-ko/strings.xmlwallet/res/values-nb/strings.xmlwallet/res/values-nl/strings-extra.xmlwallet/res/values-nl/strings.xmlwallet/res/values-pl/strings-extra.xmlwallet/res/values-pl/strings.xmlwallet/res/values-pt/strings-extra.xmlwallet/res/values-pt/strings.xmlwallet/res/values-ro/strings.xmlwallet/res/values-ru/strings-extra.xmlwallet/res/values-ru/strings.xmlwallet/res/values-sk/strings-extra.xmlwallet/res/values-sk/strings.xmlwallet/res/values-sl/strings.xmlwallet/res/values-sq/strings.xmlwallet/res/values-sr/strings.xmlwallet/res/values-sv/strings.xmlwallet/res/values-th/strings-extra.xmlwallet/res/values-th/strings.xmlwallet/res/values-tr/strings-extra.xmlwallet/res/values-tr/strings.xmlwallet/res/values-uk/strings-extra.xmlwallet/res/values-uk/strings.xmlwallet/res/values-vi/strings-extra.xmlwallet/res/values-vi/strings.xmlwallet/res/values-zh-rTW/strings-extra.xmlwallet/res/values-zh-rTW/strings.xmlwallet/res/values-zh/strings-extra.xmlwallet/res/values-zh/strings.xmlwallet/src/de/schildbach/wallet/WalletApplication.javawallet/src/de/schildbach/wallet/payments/SendCoinsTaskRunner.ktwallet/src/de/schildbach/wallet/service/WalletTransactionMetadataProvider.ktwallet/src/de/schildbach/wallet/service/platform/TopUpRepository.ktwallet/src/de/schildbach/wallet/ui/compose_views/ComposeBottomSheet.ktwallet/src/de/schildbach/wallet/ui/dashpay/ContactsFragment.kt
💤 Files with no reviewable changes (20)
- wallet/res/values-da/strings.xml
- gradle.properties
- wallet/res/values-ca/strings.xml
- wallet/res/values-sq/strings.xml
- wallet/res/values-vi/strings-extra.xml
- wallet/res/values-vi/strings.xml
- wallet/res/values-ro/strings.xml
- wallet/res/values-sl/strings.xml
- features/exploredash/src/main/java/org/dash/wallet/features/exploredash/utils/SavingsFormatting.kt
- wallet/res/values-bg/strings.xml
- wallet/res/values-tr/strings.xml
- wallet/res/values-cs/strings.xml
- wallet/res/values-th/strings.xml
- wallet/res/values-sv/strings.xml
- wallet/res/values-hu/strings.xml
- wallet/res/values-sr/strings.xml
- wallet/res/values-nb/strings.xml
- wallet/res/values-ar/strings.xml
- wallet/res/values-th/strings-extra.xml
- wallet/res/values-fi/strings.xml
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
wallet/src/de/schildbach/wallet/service/BlockchainServiceImpl.kt (1)
1958-1961:⚠️ Potential issue | 🟠 Major | ⚡ Quick winOnly unlock
checkMutexwhen this coroutine actually acquired it.If lock acquisition times out at Line 1958, this coroutine can still call
unlock()at Line 2099 just because the mutex is locked by someone else. That breakscheckService()vs cleanup serialization and can reintroduce concurrent lifecycle races.Suggested fix
+ var checkMutexHeld = false try { ... val mutexAcquired = withTimeoutOrNull(5_000) { checkMutex.lock() + checkMutexHeld = true true } != null ... } finally { ... - if (checkMutex.isLocked) { + if (checkMutexHeld) { checkMutex.unlock() } ... }Also applies to: 2099-2101
🤖 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/service/BlockchainServiceImpl.kt` around lines 1958 - 1961, The coroutine uses withTimeoutOrNull { checkMutex.lock(); true } to attempt acquiring checkMutex but unconditionally calls checkMutex.unlock() later, which may unlock someone else's lock; modify the code around the withTimeoutOrNull lock attempt to record acquisition (e.g., a boolean mutexAcquired) and only call checkMutex.unlock() if that flag is true, and wrap the work that requires the lock in a try/finally so unlock happens in finally only when mutexAcquired is true; reference symbols: checkMutex, withTimeoutOrNull, lock(), unlock(), and the checkService()/cleanup paths that assume mutual exclusion.
🤖 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 `@wallet/test/de/schildbach/wallet/payments/SendCoinsTaskRunnerBIP70Test.kt`:
- Around line 92-93: The test setup fails because the lateinit property
identityRepo is never initialized before being passed into SendCoinsTaskRunner
in setUp(); initialize identityRepo (and similarly platformRepo if needed) in
the setUp() method prior to constructing SendCoinsTaskRunner so the
UninitializedPropertyAccessException is avoided, e.g., assign a mock or test
instance to identityRepo inside setUp() before calling the constructor that uses
identityRepo (look for identityRepo and SendCoinsTaskRunner initialization in
setUp()).
---
Outside diff comments:
In `@wallet/src/de/schildbach/wallet/service/BlockchainServiceImpl.kt`:
- Around line 1958-1961: The coroutine uses withTimeoutOrNull {
checkMutex.lock(); true } to attempt acquiring checkMutex but unconditionally
calls checkMutex.unlock() later, which may unlock someone else's lock; modify
the code around the withTimeoutOrNull lock attempt to record acquisition (e.g.,
a boolean mutexAcquired) and only call checkMutex.unlock() if that flag is true,
and wrap the work that requires the lock in a try/finally so unlock happens in
finally only when mutexAcquired is true; reference symbols: checkMutex,
withTimeoutOrNull, lock(), unlock(), and the checkService()/cleanup paths that
assume mutual exclusion.
🪄 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: 573ffdea-6db3-4d5f-b21c-66d20766bab6
📒 Files selected for processing (6)
build.gradleintegrations/maya/src/main/res/values-id/strings-maya.xmlwallet/src/de/schildbach/wallet/service/BlockchainServiceImpl.ktwallet/test/de/schildbach/wallet/payments/SendCoinsTaskRunnerBIP70Test.ktwallet/test/de/schildbach/wallet/util/services/SendCoinsTaskRunnerTest.ktwallet/test/de/schildbach/wallet/util/viewModels/MainViewModelTest.kt
✅ Files skipped from review due to trivial changes (1)
- integrations/maya/src/main/res/values-id/strings-maya.xml
🚧 Files skipped from review as they are similar to previous changes (1)
- build.gradle
…eImpl. * previous changes were causing problems for some devices.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@wallet/src/de/schildbach/wallet/service/BlockchainServiceImpl.kt`:
- Around line 1883-1886: The duplicate onDestroy path incorrectly lets the
coroutine's finally block run and clear isCleaningUp / complete cleanupDeferred
even when this coroutine wasn't the owner; fix by ensuring only the coroutine
that successfully set isCleaningUp to true performs cleanup and clears the
flag/completes cleanupDeferred — for example, capture the result of
isCleaningUp.compareAndSet(false, true) into a local (e.g., isOwner) and either
place the try/finally inside the successful-compare branch or guard the finally
with if (isOwner) so only the owner coroutine calls isCleaningUp.set(false) and
cleanupDeferred.complete(...); refer to isCleaningUp, onDestroy, and
cleanupDeferred to locate and update the logic.
🪄 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: 33753099-723e-4729-8509-e7972ef5daaf
📒 Files selected for processing (2)
wallet/build.gradlewallet/src/de/schildbach/wallet/service/BlockchainServiceImpl.kt
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 1
🤖 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 `@wallet/src/de/schildbach/wallet/service/BlockchainServiceImpl.kt`:
- Around line 1883-1886: The duplicate onDestroy path incorrectly lets the
coroutine's finally block run and clear isCleaningUp / complete cleanupDeferred
even when this coroutine wasn't the owner; fix by ensuring only the coroutine
that successfully set isCleaningUp to true performs cleanup and clears the
flag/completes cleanupDeferred — for example, capture the result of
isCleaningUp.compareAndSet(false, true) into a local (e.g., isOwner) and either
place the try/finally inside the successful-compare branch or guard the finally
with if (isOwner) so only the owner coroutine calls isCleaningUp.set(false) and
cleanupDeferred.complete(...); refer to isCleaningUp, onDestroy, and
cleanupDeferred to locate and update the logic.
🪄 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: 33753099-723e-4729-8509-e7972ef5daaf
📒 Files selected for processing (2)
wallet/build.gradlewallet/src/de/schildbach/wallet/service/BlockchainServiceImpl.kt
🛑 Comments failed to post (1)
wallet/src/de/schildbach/wallet/service/BlockchainServiceImpl.kt (1)
1883-1886:
⚠️ Potential issue | 🔴 Critical | ⚡ Quick winDuplicate
onDestroy()path incorrectly signals cleanup completionLine 1886 returns from the coroutine, but
finallystill runs and unconditionally clearsisCleaningUpand completescleanupDeferred(Line 2010-2011). That lets a newonCreate()continue before the active cleanup finishes.Proposed fix
serviceScope.launch { + var ownsCleanup = false try { log.info("The onCreateCompleted is active: {}", onCreateCompleted.isActive) onCreateCompleted.await() // wait until onCreate is finished log.info("The check() mutex is locked: {}", checkMutex.isLocked) - // Prevent multiple cleanup operations using atomic flag - if (!isCleaningUp.compareAndSet(false, true)) { + // Prevent multiple cleanup operations using atomic flag + ownsCleanup = isCleaningUp.compareAndSet(false, true) + if (!ownsCleanup) { log.info("Another onDestroy() is already running cleanup, skipping duplicate cleanup") return@launch } @@ } finally { log.info("serviceJob cancelled after " + (System.currentTimeMillis() - serviceCreatedAt) / 1000 / 60 + " minutes") serviceJob.cancel() if (checkMutex.isLocked) { checkMutex.unlock() } - isCleaningUp.set(false) - cleanupDeferred?.complete(Unit) + if (ownsCleanup) { + isCleaningUp.set(false) + cleanupDeferred?.complete(Unit) + } // Cancel the cleanup monitor since cleanup is done cleanupMonitorJob.cancel() } }Also applies to: 2010-2011
🤖 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/service/BlockchainServiceImpl.kt` around lines 1883 - 1886, The duplicate onDestroy path incorrectly lets the coroutine's finally block run and clear isCleaningUp / complete cleanupDeferred even when this coroutine wasn't the owner; fix by ensuring only the coroutine that successfully set isCleaningUp to true performs cleanup and clears the flag/completes cleanupDeferred — for example, capture the result of isCleaningUp.compareAndSet(false, true) into a local (e.g., isOwner) and either place the try/finally inside the successful-compare branch or guard the finally with if (isOwner) so only the owner coroutine calls isCleaningUp.set(false) and cleanupDeferred.complete(...); refer to isCleaningUp, onDestroy, and cleanupDeferred to locate and update the logic.
- initialize the identityRepo mock in setUp() (was left uninitialized, causing UninitializedPropertyAccessException) - construct a dashj Context before reading the test wallet, fixing "You must construct a Context object before using dashj!" - unmock SecurityGuard static in tearDown and raise the unit-test heap to 2g to avoid OutOfMemoryError from per-test accumulation Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
wallet/test/de/schildbach/wallet/payments/SendCoinsTaskRunnerBIP70Test.kt (1)
118-118: 💤 Low valueConsider removing commented-out code.
These commented lines are remnants from when
walletwas mocked. Since the wallet is now read from a real test file (lines 123–125), these comments are obsolete and can be removed for cleaner code.♻️ Proposed cleanup
Remove line 118:
- // wallet = mockk(relaxed = true)Remove line 129:
- // every { wallet.params } returns networkParamsAlso applies to: 129-129
🤖 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/test/de/schildbach/wallet/payments/SendCoinsTaskRunnerBIP70Test.kt` at line 118, Remove the obsolete commented-out mock setup for wallet in SendCoinsTaskRunnerBIP70Test (e.g., the "// wallet = mockk(relaxed = true)" line and the other commented line around the same area), since the test now loads a real wallet from the test file (references to wallet initialization at lines where the real wallet is read); simply delete these commented lines to clean up the test class and avoid stale code.
🤖 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.
Nitpick comments:
In `@wallet/test/de/schildbach/wallet/payments/SendCoinsTaskRunnerBIP70Test.kt`:
- Line 118: Remove the obsolete commented-out mock setup for wallet in
SendCoinsTaskRunnerBIP70Test (e.g., the "// wallet = mockk(relaxed = true)" line
and the other commented line around the same area), since the test now loads a
real wallet from the test file (references to wallet initialization at lines
where the real wallet is read); simply delete these commented lines to clean up
the test class and avoid stale code.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 77c24c8d-719a-412a-af33-5f3d355bfaeb
📒 Files selected for processing (2)
wallet/build.gradlewallet/test/de/schildbach/wallet/payments/SendCoinsTaskRunnerBIP70Test.kt
🚧 Files skipped from review as they are similar to previous changes (1)
- wallet/build.gradle
| appsFlyerLib.init(BuildConfig.APPSFLYER_ID, null, this); | ||
| appsFlyerLib.setAppInviteOneLink(BuildConfig.APPSFLYER_TEMPLATE_ID); | ||
| appsFlyerLib.setDebugLog(BuildConfig.DEBUG); | ||
| appsFlyerLib.setLogLevel(com.appsflyer.AFLogger.LogLevel.VERBOSE); |
There was a problem hiding this comment.
Too wide logging com.appsflyer.AFLogger.LogLevel.VERBOSE ...
Issue being fixed or feature implemented
Related PR's and Dependencies
Screenshots / Videos
How Has This Been Tested?
Checklist:
Summary by CodeRabbit
New Features
Improvements
Bug Fixes