-
Notifications
You must be signed in to change notification settings - Fork 170
Prepare 11.2.2 #1393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Prepare 11.2.2 #1393
Conversation
WalkthroughThis update revises dependency versions by removing snapshot suffixes, updates database file references to version 3, refines fiat amount formatting for gift card purchases, converts a repository method to a suspend function with flow-based balance retrieval, and adjusts coroutine usage in activity initialization. It also enhances localization by adding new strings, translating "Discount" in multiple languages, and cleaning up whitespace in resource files. New CoinJoin and copyright strings are added in several locales. Changes
Sequence Diagram(s)sequenceDiagram
participant UI as StakingActivity
participant VM as StakingViewModel
participant Nav as NavController
UI->>UI: onCreate()
UI->>UI: lifecycleScope.launch
activate UI
UI->>Nav: setNavigationGraph()
UI->>VM: observeOnlineAccountStatus()
VM-->>UI: handleOnlineAccountStatus()
deactivate UI
sequenceDiagram
participant TopUpRepo as TopUpRepositoryImpl
participant WalletData as WalletDataProvider
TopUpRepo->>WalletData: observeSpendableBalance().first()
WalletData-->>TopUpRepo: Balance
TopUpRepo->>TopUpRepo: Calculate emptyWallet using MIN_DUST_FACTOR
TopUpRepo->>TopUpRepo: Create Asset Lock Transaction
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🔇 Additional comments (3)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
fiatAmount = amountValue.toBigDecimal().toDouble().toString(), | ||
fiatAmount = MonetaryFormat.FIAT.noCode().format(amountValue).toString(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we had a fiat value of 0.00999981 that should be 0.01
amountValue.toBigDecimal().toDouble().toString()
would give "0.00999981". CTX would truncate that to 0.00
MonetaryFormat.FIAT.noCode().format(amountValue).toString()
will give 0.01
@@ -124,7 +123,6 @@ | |||
<string-array name="sort_by_options_names"> | |||
<item>اسم</item> | |||
<item>مسافة</item> | |||
<item>Discount</item> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops, tx
overwrote the these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (6)
wallet/res/values-es/strings-extra.xml (1)
297-297
: Trim trailing whitespace in Spanish copyright string
There’s an extra space before the closing</string>
tag. Removing it ensures consistency and prevents unintended rendering artifacts.- <string name="about_copyright">Copyright © 2025 Grupo Dash Core </string> + <string name="about_copyright">Copyright © 2025 Grupo Dash Core</string>wallet/res/values-es/strings.xml (1)
181-181
: Trim trailing whitespace in Spanish CoinJoin dust string
There’s an extra space before the closing</string>
tag. Removing it prevents unintended UI gaps.- <string name="transaction_row_status_coinjoin_combine_dust">Polvo combinado CoinJoin </string> + <string name="transaction_row_status_coinjoin_combine_dust">Polvo combinado CoinJoin</string>wallet/src/de/schildbach/wallet/Constants.java (1)
96-96
: Extract common logic for DB file path
The three calls settingEXPLORE_GC_FILE_PATH
repeat the same pattern. Consider introducing a single version constant and composing the path usingFILENAME_NETWORK_SUFFIX
to reduce duplication:static { + // DRY: single version for all flavors + final String exploreGcVersion = "explore-v3"; switch (BuildConfig.FLAVOR) { case "prod": { - org.dash.wallet.common.util.Constants.INSTANCE.setEXPLORE_GC_FILE_PATH("explore/explore-v3.db"); + org.dash.wallet.common.util.Constants.INSTANCE.setEXPLORE_GC_FILE_PATH( + "explore/" + exploreGcVersion + FILENAME_NETWORK_SUFFIX + ".db"); break; } case "staging": case "_testNet3": { - org.dash.wallet.common.util.Constants.INSTANCE.setEXPLORE_GC_FILE_PATH("explore/explore-v3-testnet.db"); + org.dash.wallet.common.util.Constants.INSTANCE.setEXPLORE_GC_FILE_PATH( + "explore/" + exploreGcVersion + FILENAME_NETWORK_SUFFIX + ".db"); break; } case "devnet": { - org.dash.wallet.common.util.Constants.INSTANCE.setEXPLORE_GC_FILE_PATH("explore/explore-v3-devnet.db"); + org.dash.wallet.common.util.Constants.INSTANCE.setEXPLORE_GC_FILE_PATH( + "explore/" + exploreGcVersion + FILENAME_NETWORK_SUFFIX + ".db"); break; }Also applies to: 124-124, 144-144
features/exploredash/src/main/res/values-es/strings-explore-dash.xml (1)
66-66
: Review Spanish for savings string
The choice “Salvar %.2f%%” may not clearly convey “you save X%” in Spanish. Consider a more idiomatic phrase such as:- <string name="explore_pay_with_dash_save">Salvar %.2f%%</string> + <string name="explore_pay_with_dash_save">Ahorra %.2f%%</string>features/exploredash/src/main/res/values-zh/strings-explore-dash.xml (2)
2-15
: Verify license header placement and update year
The GPL header has been added directly after the XML declaration. Please confirm that resource XML files in this project should include the full license block. Additionally, consider updating the copyright year to the current release.
221-226
: Use full-width punctuation in Chinese translations
In the new strings—particularly “一旦生成代码, 它将显示在此处.”—please replace ASCII commas and periods with their Chinese counterparts (,
and。
) to adhere to typographic conventions:- 一旦生成代码, 它将显示在此处. + 一旦生成代码,它将显示在此处。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (43)
build.gradle
(1 hunks)fastlane/Fastfile
(1 hunks)features/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/ctxspend/CTXSpendViewModel.kt
(1 hunks)features/exploredash/src/main/res/values-ar/strings-explore-dash.xml
(0 hunks)features/exploredash/src/main/res/values-cs/strings-explore-dash.xml
(0 hunks)features/exploredash/src/main/res/values-de/strings-explore-dash.xml
(1 hunks)features/exploredash/src/main/res/values-el/strings-explore-dash.xml
(1 hunks)features/exploredash/src/main/res/values-es/strings-explore-dash.xml
(4 hunks)features/exploredash/src/main/res/values-fa/strings-explore-dash.xml
(1 hunks)features/exploredash/src/main/res/values-fil/strings-explore-dash.xml
(1 hunks)features/exploredash/src/main/res/values-fr/strings-explore-dash.xml
(1 hunks)features/exploredash/src/main/res/values-id/strings-explore-dash.xml
(1 hunks)features/exploredash/src/main/res/values-it/strings-explore-dash.xml
(4 hunks)features/exploredash/src/main/res/values-ja/strings-explore-dash.xml
(1 hunks)features/exploredash/src/main/res/values-ko/strings-explore-dash.xml
(1 hunks)features/exploredash/src/main/res/values-nl/strings-explore-dash.xml
(1 hunks)features/exploredash/src/main/res/values-pl/strings-explore-dash.xml
(1 hunks)features/exploredash/src/main/res/values-pt/strings-explore-dash.xml
(1 hunks)features/exploredash/src/main/res/values-ru/strings-explore-dash.xml
(4 hunks)features/exploredash/src/main/res/values-sk/strings-explore-dash.xml
(1 hunks)features/exploredash/src/main/res/values-th/strings-explore-dash.xml
(0 hunks)features/exploredash/src/main/res/values-tr/strings-explore-dash.xml
(1 hunks)features/exploredash/src/main/res/values-uk/strings-explore-dash.xml
(4 hunks)features/exploredash/src/main/res/values-zh-rTW/strings-explore-dash.xml
(1 hunks)features/exploredash/src/main/res/values-zh/strings-explore-dash.xml
(4 hunks)wallet/res/values-es/strings-dashpay.xml
(1 hunks)wallet/res/values-es/strings-extra.xml
(1 hunks)wallet/res/values-es/strings.xml
(2 hunks)wallet/res/values-pl/strings-dashpay.xml
(1 hunks)wallet/res/values-pl/strings-extra.xml
(1 hunks)wallet/res/values-pl/strings.xml
(2 hunks)wallet/res/values-pt/strings-dashpay.xml
(1 hunks)wallet/res/values-pt/strings-extra.xml
(1 hunks)wallet/res/values-pt/strings.xml
(2 hunks)wallet/res/values-uk/strings-dashpay.xml
(1 hunks)wallet/res/values-uk/strings-extra.xml
(1 hunks)wallet/res/values-uk/strings.xml
(2 hunks)wallet/res/values-zh/strings-dashpay.xml
(1 hunks)wallet/res/values-zh/strings-extra.xml
(1 hunks)wallet/res/values-zh/strings.xml
(2 hunks)wallet/src/de/schildbach/wallet/Constants.java
(3 hunks)wallet/src/de/schildbach/wallet/service/platform/TopUpRepository.kt
(3 hunks)wallet/src/de/schildbach/wallet/ui/staking/StakingActivity.kt
(1 hunks)
💤 Files with no reviewable changes (3)
- features/exploredash/src/main/res/values-th/strings-explore-dash.xml
- features/exploredash/src/main/res/values-ar/strings-explore-dash.xml
- features/exploredash/src/main/res/values-cs/strings-explore-dash.xml
🔇 Additional comments (62)
features/exploredash/src/main/res/values-zh-rTW/strings-explore-dash.xml (2)
2-16
: Add GPL license header for this resource file
The inclusion of the GNU GPL header before the<resources>
tag brings this file in line with the project’s licensing standards and matches other locale files. The comment block is well-formed and correctly placed.
116-116
: Translate “Discount” into Taiwanese Chinese
Thesort_by_options_names
array now uses “折扣” for the “Discount” entry, which is consistent with the terminology in other locales.wallet/res/values-uk/strings-extra.xml (1)
300-300
: Add Ukrainian copyright notice for 2025
This new<string name="about_copyright">
entry correctly updates the year to 2025 and matches the pattern used in other locales.wallet/res/values-zh/strings-dashpay.xml (1)
416-416
: Add Chinese CoinJoin finishing status string
The new<string name="coinjoin_mixing_finishing">混币收尾</string>
aligns with the introduced status in other locales and completes the CoinJoin UI messages.wallet/res/values-zh/strings-extra.xml (1)
291-291
: Add Chinese copyright notice for 2025
This mirrors other resource updates and consistently reflects the © 2025 Dash Core Group attribution.wallet/res/values-uk/strings-dashpay.xml (1)
415-415
: Add Ukrainian CoinJoin finishing status string
The string<string name="coinjoin_mixing_finishing">Змішування та фінішна обробка</string>
correctly extends the CoinJoin status set in Ukrainian.wallet/res/values-pl/strings-dashpay.xml (1)
415-415
: Add Polish localization for CoinJoin finishing state
The new<string name="coinjoin_mixing_finishing">Kończenie Mieszania</string>
aligns with other CoinJoin phase messages and follows naming and formatting conventions.wallet/res/values-pt/strings-extra.xml (1)
297-297
: Update Portuguese 'about' copyright notice
The addition of<string name="about_copyright">Copyright © 2025 Dash Core Group</string>
correctly synchronizes the copyright year across languages.wallet/res/values-es/strings-dashpay.xml (1)
416-416
: Add Spanish localization for CoinJoin finishing state
The new<string name="coinjoin_mixing_finishing">Terminando mezclado</string>
extends the CoinJoin UI status and matches the pattern in other languages.wallet/res/values-pt/strings-dashpay.xml (1)
416-416
: Add Portuguese localization for CoinJoin finishing state
The new<string name="coinjoin_mixing_finishing">Finalizando Mistura</string>
correctly introduces the finishing phase label and is consistent with existing entries.wallet/res/values-pl/strings-extra.xml (1)
300-300
: Add 2025 copyright notice to Polish extra strings
This new<string>
is consistent with other locales and correctly placed between the fork disclaimer and license entries.wallet/res/values-pt/strings.xml (2)
181-181
: Add CoinJoin “combine dust” status in Portuguese
The newtransaction_row_status_coinjoin_combine_dust
entry matches the key and is consistent with other locales.
419-420
: Add block explorer selection title in Portuguese
Theblock_explorer_selection_title
entry is correctly localized and aligns with updates in other languages.wallet/res/values-pl/strings.xml (2)
181-181
: Add CoinJoin “combine dust” status in Polish
The newtransaction_row_status_coinjoin_combine_dust
entry fits the existing transaction status section and follows localization conventions.
419-420
: Add block explorer selection title in Polish
Theblock_explorer_selection_title
key is correctly translated and placed with other preference entries.wallet/res/values-es/strings.xml (1)
419-420
: Add block explorer selection title in Spanish
The newblock_explorer_selection_title
entry is properly localized and consistent with other locale files.wallet/res/values-uk/strings.xml (2)
185-185
: Addition of CoinJoin dust-combine status string
The newtransaction_row_status_coinjoin_combine_dust
entry correctly provides the Ukrainian translation for the dust-combining status. It matches the key and format used in other locales.
423-423
: Addition of block explorer selection title string
Theblock_explorer_selection_title
string has been properly added with a clear Ukrainian translation. Ensure this key is referenced in the corresponding UI implementation.wallet/res/values-zh/strings.xml (2)
181-181
: Addition of CoinJoin dust-combine status string
Thetransaction_row_status_coinjoin_combine_dust
key is correctly introduced with an accurate Chinese translation, consistent with other locales.
419-419
: Addition of block explorer selection title string
The newblock_explorer_selection_title
entry is correctly added in Chinese. Verify that the UI layer references this string resource.features/exploredash/src/main/res/values-tr/strings-explore-dash.xml (2)
2-7
: Skip license header cleanup
Non-functional whitespace and comment adjustments in the license header; no impact on application behavior.
118-118
: Approve Turkish translation of 'Discount'
Replaced the English term "Discount" with the correct Turkish translation "İndirim" to ensure localization consistency.features/exploredash/src/main/res/values-pl/strings-explore-dash.xml (2)
2-7
: Skip license header cleanup
Non-functional whitespace and comment adjustments in the license header; no impact on application behavior.
123-123
: Approve Polish translation of 'Discount'
Replaced the English term "Discount" with the correct Polish translation "Zniżka" for consistency with other locales.features/exploredash/src/main/res/values-fr/strings-explore-dash.xml (2)
2-7
: Skip license header cleanup
Non-functional comment and whitespace adjustments; no behavioral changes.
121-121
: Approve French translation of 'Discount'
Updated the sorting option to "Réduction," aligning with proper French localization.build.gradle (1)
6-7
:❓ Verification inconclusive
Confirm dependency version stability
Removed the-SNAPSHOT
suffix fromdashjVersion
anddppVersion
, targeting stable releases (21.1.8
and1.7.5
). Ensure these versions are published and available on Maven Central before release.
🏁 Script executed:
#!/bin/bash # Verify that dashj v21.1.8 and dpp v1.7.5 exist on Maven Central for artifact in "org/dashj/dashj/21.1.8" "org/dashj/dpp/1.7.5"; do url="https://repo1.maven.org/maven2/$artifact/maven-metadata.xml" echo "Checking $url..." if ! curl -s --fail "$url" > /dev/null; then echo "Artifact $artifact not found on Maven Central" >&2 exit 1 fi done echo "All artifacts verified."Length of output: 548
I’ll verify how
dashjVersion
anddppVersion
are referenced in your Gradle files to determine the correct Maven coordinates.
🏁 Script executed:
#!/bin/bash # Search for usage of dashjVersion and dppVersion to identify group and artifact IDs rg -n "dashjVersion" -C 5 --glob "*.gradle" rg -n "dppVersion" -C 5 --glob "*.gradle"Length of output: 9203
Confirm Maven Central availability of stable DashJ & DPP artifacts
We’ve removed the
-SNAPSHOT
suffix and bumped todashjVersion = '21.1.8'
anddppVersion = '1.7.5'
. Before shipping, please verify that these exact artifacts are published on Maven Central:• org.dashj:dashj-core:21.1.8
• org.dashj.platform:dash-sdk-java:1.7.5
• org.dashj.platform:dash-sdk-kotlin:1.7.5
• org.dashj.platform:dash-sdk-android:1.7.5You can run:
#!/bin/bash for artifact in \ "org/dashj/dashj-core/21.1.8" \ "org/dashj/platform/dash-sdk-java/1.7.5" \ "org/dashj/platform/dash-sdk-kotlin/1.7.5" \ "org/dashj/platform/dash-sdk-android/1.7.5"; do url="https://repo1.maven.org/maven2/$artifact/maven-metadata.xml" echo "Checking $url..." if ! curl -s --fail "$url" > /dev/null; then echo "ERROR: Artifact $artifact not found on Maven Central" >&2 exit 1 fi done echo "✔ All artifacts verified on Maven Central."features/exploredash/src/main/res/values-de/strings-explore-dash.xml (2)
2-7
: Skip license header cleanup
Header formatting changes only; no functional impact.
119-119
: Approve German translation of 'Discount'
Replaced the English term with "Rabatt" to ensure accurate localization.features/exploredash/src/main/res/values-fa/strings-explore-dash.xml (1)
118-118
: Approve localized 'Discount' translation.The Persian string
<item>تخفیف</item>
correctly replaces the English term and aligns with other locale files.features/exploredash/src/main/res/values-pt/strings-explore-dash.xml (1)
121-121
: Approve localized 'Discount' translation.The Portuguese string
<item>Desconto</item>
accurately translates “Discount” and matches the pattern used across other locales.features/exploredash/src/main/res/values-id/strings-explore-dash.xml (1)
118-118
: Approve localized 'Discount' translation.The Indonesian string
<item>Diskon</item>
correctly localizes “Discount” and is consistent with the other resource files.features/exploredash/src/main/res/values-el/strings-explore-dash.xml (1)
118-118
: Approve localized 'Discount' translation.The Greek string
<item>Έκπτωση</item>
properly replaces the English label and aligns with the translations in other languages.features/exploredash/src/main/res/values-nl/strings-explore-dash.xml (1)
118-118
: Approve localized 'Discount' translation.The Dutch string
<item>Korting</item>
correctly translates “Discount” and follows the established localization updates.features/exploredash/src/main/res/values-ja/strings-explore-dash.xml (1)
116-116
: Localization improvement for "Discount" in Japanese sorting options.The English word "Discount" has been properly translated to its Japanese equivalent "割引" in the sort_by_options_names string array.
features/exploredash/src/main/res/values-ko/strings-explore-dash.xml (1)
116-116
: Localization improvement for "Discount" in Korean sorting options.The English word "Discount" has been properly translated to its Korean equivalent "할인" in the sort_by_options_names string array.
features/exploredash/src/main/res/values-sk/strings-explore-dash.xml (1)
122-122
: Localization improvement for "Discount" in Slovak sorting options.The English word "Discount" has been properly translated to its Slovak equivalent "Zľava" in the sort_by_options_names string array.
wallet/src/de/schildbach/wallet/service/platform/TopUpRepository.kt (2)
48-48
: Modernizing code with Flow API and coroutines.The code has been updated to leverage Kotlin coroutines by making the createAssetLockTransaction method a suspend function and adding the necessary import for Flow.first().
Also applies to: 56-57, 95-95
101-115
: Improved balance retrieval and dust threshold handling.The changes include:
- Using Flow-based balance observation instead of direct wallet access
- Introducing MIN_DUST_FACTOR (10L) to increase the dust threshold
- Making the function suspend to support coroutine usage
These changes improve transaction safety by preventing the creation of outputs that might be considered dust by the network.
wallet/src/de/schildbach/wallet/ui/staking/StakingActivity.kt (1)
63-66
: Good architectural improvementMoving the observation of online account status into the coroutine scope is a good practice, as it consolidates initialization logic and better respects the activity's lifecycle. This change aligns with modern Android development patterns for asynchronous operations.
features/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/ctxspend/CTXSpendViewModel.kt (1)
129-129
: Better string formatting approachThe change to use
MonetaryFormat.FIAT.noCode().format(amountValue).toString()
is an improvement over the previous approach. This provides more consistent formatting and avoids potential precision issues that could occur when converting between different numeric types.fastlane/Fastfile (1)
176-176
:✅ Verification successful
Database version update
Updating to
explore-v3.db
aligns with corresponding database version updates in other parts of the codebase. Make sure all related code that interacts with this database is compatible with the new version.
🏁 Script executed:
#!/bin/bash # Check for references to database versions in other files echo "Checking database version references:" rg -i "explore-v[0-9]" --type java --type kotlin --type xmlLength of output: 641
Database Version Aligned Across Codebase
All references toexplore-v3
have been updated inwallet/src/de/schildbach/wallet/Constants.java
(main, testnet, devnet). No further compatibility changes are needed.features/exploredash/src/main/res/values-fil/strings-explore-dash.xml (1)
118-118
: Localization improvementUpdating "Discount" to "Diskwento" improves the Filipino localization, making the UI more consistent for Filipino-speaking users.
wallet/src/de/schildbach/wallet/Constants.java (2)
124-124
: Updated Explore GC DB path for testnet
The testnet Explore GC path now points toexplore/explore-v3-testnet.db
, matching the prod change with the network suffix.
144-144
: Updated Explore GC DB path for devnet
The devnet Explore GC path has been updated toexplore/explore-v3-devnet.db
.features/exploredash/src/main/res/values-ru/strings-explore-dash.xml (4)
93-95
: New gift card filter labels
Addedgift_card_types
,flexible_amount_option
, andfixed_denom_option
to support the gift-card filter UI. Names match other locales.
127-127
: Translated “Discount” into Russian
Replaced the English label insort_by_options_names
with the Russian equivalentСкидка
.
216-217
: New gift-card selection prompts
Addedselect_amount
andselect_fixed_amount
strings for the purchase flow.
253-253
: Temporarily unavailable label
Appendedtemporarily_unavailable
for when CTX Spend is down.features/exploredash/src/main/res/values-es/strings-explore-dash.xml (2)
121-121
: Translated “Discount” into Spanish
Replaced the English label insort_by_options_names
with the Spanish equivalentDescuento
.
237-239
: Added DashSpend login and T&C localization
Introduceddashspend_create_account
,login
,dashspend_terms_conditions
,view_terms_conditions
, andbarcode_placeholder
for the DashSpend account flow.Also applies to: 254-259
features/exploredash/src/main/res/values-uk/strings-explore-dash.xml (4)
68-68
: New savings prompt
Addedexplore_pay_with_dash_save
(Зберегти %.2f%%
) to match other locales.
123-123
: Translated “Discount” into Ukrainian
Replaced the English sort label withЗнижка
insort_by_options_names
.
233-238
: DashSpend T&C & barcode placeholder
Addeddashspend_terms_conditions
,accept_terms_conditions
,tap_link_to_proceed
,accept_to_proceed
,view_terms_conditions
, andbarcode_placeholder
for DashSpend flows.
241-242
: CTXSpend login localization
Addedcreate_ctx_spend_account
andlog_in_to_ctxspend_account
for the CTX Spend login flow.features/exploredash/src/main/res/values-it/strings-explore-dash.xml (4)
91-93
: New gift-card filter labels for Italian
Addedgift_card_types
,flexible_amount_option
, andfixed_denom_option
translations (Tipologie di gift card
,Importi flessibili
,Importi denominati in maniera fissa
).
125-125
: Translated “Discount” into Italian
Replaced English sort label withSconto
insort_by_options_names
.
212-213
: Gift-card amount selection prompts
Addedselect_amount
andselect_fixed_amount
keys for the purchase UI.
249-249
: Temporarily unavailable message
Appendedtemporarily_unavailable
(Temporaneamente non disponibile
).features/exploredash/src/main/res/values-zh/strings-explore-dash.xml (3)
62-62
: New localized savings string is correct
The placeholder%.2f%%
correctly escapes the percent sign. For consistency across translations—especially if more placeholders are added in the future—you may opt to use explicit positional indexing such as%1$.2f%%
, though this is optional for single-argument strings.
115-118
: Ensure sort-by dropdown consistency
You’ve introduced “折扣” as the third entry in thesort_by_options_names
array. Verify that the corresponding index mapping and UI logic handle this new option, and ensure all other language versions of this array have been updated in parallel.
228-230
: CTXSpend login string additions
The keyscreate_ctx_spend_account
andlog_in_to_ctxspend_account
align with the CTXSpend feature. Please verify that the ViewModel and UI components reference these exact keys and that the translations match those in other locale files.
@@ -93,7 +93,7 @@ public final class Constants { | |||
FILENAME_NETWORK_SUFFIX = ""; | |||
FEE_NETWORK_SUFFIX = FILENAME_NETWORK_SUFFIX; | |||
WALLET_NAME_CURRENCY_CODE = "dash"; | |||
org.dash.wallet.common.util.Constants.INSTANCE.setEXPLORE_GC_FILE_PATH("explore/explore-v2.db"); | |||
org.dash.wallet.common.util.Constants.INSTANCE.setEXPLORE_GC_FILE_PATH("explore/explore-v3.db"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
❓ Verification inconclusive
Updated Explore GC DB path for production
The database filename has been bumped from v2 to v3 for the prod flavor. Ensure that the new explore/explore-v3.db
asset is packaged in the build and available at runtime.
🏁 Script executed:
#!/bin/bash
# Verify the new explore-v3 DB files are present in the repository
fd --extension db "explore-v3"
Length of output: 30
🏁 Script executed:
#!/bin/bash
# Locate existing explore DB assets (v2)
fd explore-v2.db
# Verify presence of the new explore-v3 DB file
fd explore-v3.db
Length of output: 37
Missing explore-v3.db asset
We couldn’t locate the new explore/explore-v3.db
file in the repo. Please add the explore-v3.db
asset under your assets directory so it’s packaged into the build and available at runtime.
• Expected path (adjust if different):
wallet/src/main/assets/explore/explore-v3.db
• Confirm Gradle’s asset packaging includes this file
🤖 Prompt for AI Agents
In wallet/src/de/schildbach/wallet/Constants.java at line 96, the Explore GC DB
path was updated to "explore/explore-v3.db" but the corresponding explore-v3.db
asset file is missing from the repository. Add the explore-v3.db file under
wallet/src/main/assets/explore/ to ensure it is included in the build. Also
verify that the Gradle build configuration includes this asset directory so the
file is packaged and available at runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file "explore/explore-v3.db" should not be in the assets folder, but is downloaded from Google Cloud
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
@HashEngineering I understand now - the file isn't supposed to be in the repository. Let me check how the downloading mechanism works to provide better context.
🏁 Script executed:
#!/bin/bash
# Check the Fastfile to see how the explore database is downloaded
if [ -f fastlane/Fastfile ]; then
grep -A 10 "explore_db" fastlane/Fastfile
fi
Length of output: 672
🏁 Script executed:
#!/bin/bash
# Get a more complete view of the explore_db lane in the Fastfile
if [ -f fastlane/Fastfile ]; then
cat fastlane/Fastfile | grep -A 40 "lane :explore_db"
fi
Length of output: 1342
@HashEngineering I see now - you're absolutely right. Looking at the Fastfile, I can confirm that explore-v3.db
is downloaded from Google Cloud Storage during the build process via the explore_db
lane. The file is pulled from the dash-wallet-firebase.appspot.com
bucket and not stored in the repository.
The PR correctly updates both the filename reference in Constants.java
and the filename to be downloaded in the Fastfile. Thanks for the clarification!
🧬 Code Graph Analysis Results
Relevant snippet from wallet/src/de/schildbach/wallet/Constants.java
(lines 70-110 approx.)
static {
// ...
switch (BuildConfig.FLAVOR) {
case "prod": {
// ...
org.dash.wallet.common.util.Constants.INSTANCE.setEXPLORE_GC_FILE_PATH("explore/explore-v3.db");
// ...
break;
}
case "staging":
case "_testNet3": {
// ...
org.dash.wallet.common.util.Constants.INSTANCE.setEXPLORE_GC_FILE_PATH("explore/explore-v3-testnet.db");
break;
}
case "devnet": {
// ...
org.dash.wallet.common.util.Constants.INSTANCE.setEXPLORE_GC_FILE_PATH("explore/explore-v3-devnet.db");
break;
}
default: {
throw new IllegalStateException("Unsupported flavor " + BuildConfig.FLAVOR);
}
}
// ...
}
This snippet shows that the file path "explore/explore-v3.db"
(and variants for testnet and devnet) is set programmatically via a call to org.dash.wallet.common.util.Constants.INSTANCE.setEXPLORE_GC_FILE_PATH(...)
depending on the build flavor. This indicates that the database file is configured dynamically rather than being statically placed in the assets folder.
Relevant snippet summary from org.dash.wallet.common.util.Constants
(implied from usage)
- The class
org.dash.wallet.common.util.Constants
has a singleton instanceINSTANCE
. - It has a method
setEXPLORE_GC_FILE_PATH(String path)
which sets the path for the explore database file. - The path is set to
"explore/explore-v3.db"
for production flavor, and to other variants for testnet and devnet. - This suggests the explore database file is expected to be located or downloaded at the specified path, not bundled as an asset.
No other snippets explicitly mention the explore database file or its handling.
[End of relevant snippets.]
<string name="dashspend_create_account">创建账户或登录现有账户</string> | ||
<string name="create_new_account">创建新账户</string> | ||
<string name="login">登录</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Review generic login
string key
You’ve added dashspend_create_account
and a generic login
key. To avoid collisions with other modules, consider renaming login
to a more specific identifier (e.g., dashspend_login
) for clarity and to prevent inadvertent overrides.
🤖 Prompt for AI Agents
In features/exploredash/src/main/res/values-zh/strings-explore-dash.xml around
lines 204 to 206, rename the generic string key "login" to a more specific
identifier like "dashspend_login" to avoid key collisions with other modules.
Update the key in both the XML file and any code references to maintain
consistency and prevent inadvertent overrides.
lifecycleScope.launch { navController = setNavigationGraph() } | ||
lifecycleScope.launch { | ||
navController = setNavigationGraph() | ||
viewModel.observeOnlineAccountStatus().observe(this@StakingActivity, ::handleOnlineAccountStatus) | ||
} | ||
|
||
viewModel.navigationCallback.observe(this, ::handleNavigationRequest) | ||
viewModel.observeOnlineAccountStatus().observe(this, ::handleOnlineAccountStatus) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there was a race condition. if the observer ran before the navController
was initialized, then it would crash. This was a rare crash.
val balance = walletDataProvider.wallet!!.getBalance(Wallet.BalanceType.ESTIMATED_SPENDABLE) | ||
val emptyWallet = balance == fee && balance <= (fee + Transaction.MIN_NONDUST_OUTPUT) | ||
val balance = walletDataProvider.observeSpendableBalance().first() | ||
val emptyWallet = balance == fee && balance <= (fee + Transaction.MIN_NONDUST_OUTPUT.multiply(MIN_DUST_FACTOR)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking at the wrong balance, which could cause username creation to stall and get stuck with Insufficent funds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (2)
wallet/src/de/schildbach/wallet/service/CoinJoinService.kt
(1 hunks)wallet/src/de/schildbach/wallet/service/platform/TopUpRepository.kt
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- wallet/src/de/schildbach/wallet/service/platform/TopUpRepository.kt
🧰 Additional context used
🧬 Code Graph Analysis (1)
wallet/src/de/schildbach/wallet/service/CoinJoinService.kt (1)
wallet/src/de/schildbach/wallet/util/TimeUtils.kt (1)
getTimeSkew
(50-103)
🪛 detekt (1.23.7)
wallet/src/de/schildbach/wallet/service/CoinJoinService.kt
[warning] 201-201: The caught exception is swallowed. The original exception could be lost.
(detekt.exceptions.SwallowedException)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
try { | ||
updateTimeSkewInternal(getTimeSkew(force = true)) | ||
} catch (e: Exception) { | ||
log.info("There was a problem obtaining the timeskew") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Improve exception logging by including exception details
While adding exception handling around time skew updates is a good improvement for stability, the current implementation swallows the exception details, making troubleshooting difficult.
Enhance the logging by including the exception details:
try {
updateTimeSkewInternal(getTimeSkew(force = true))
} catch (e: Exception) {
- log.info("There was a problem obtaining the timeskew")
+ log.info("There was a problem obtaining the timeskew", e)
}
This will provide more context for debugging time skew issues while still preventing crashes.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
try { | |
updateTimeSkewInternal(getTimeSkew(force = true)) | |
} catch (e: Exception) { | |
log.info("There was a problem obtaining the timeskew") | |
} | |
try { | |
updateTimeSkewInternal(getTimeSkew(force = true)) | |
} catch (e: Exception) { | |
log.info("There was a problem obtaining the timeskew", e) | |
} |
🧰 Tools
🪛 detekt (1.23.7)
[warning] 201-201: The caught exception is swallowed. The original exception could be lost.
(detekt.exceptions.SwallowedException)
🤖 Prompt for AI Agents
In wallet/src/de/schildbach/wallet/service/CoinJoinService.kt around lines 199
to 203, the catch block logs a generic message without including exception
details, which hinders debugging. Modify the log statement to include the caught
exception object so that the log captures the stack trace and message, providing
better context for troubleshooting time skew update failures.
enterAmountViewModel.setMaxAmount(Coin.ZERO) | ||
enterAmountViewModel.setMinAmount(Coin.ZERO) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the user goes to the Gift Card purchase flow, these limits will be set to match min/max of the card and the wallet balance and will limit what can be entered in the Receive screen. Therefore we need to reset the limits to zero which allows any number to be entered.
Not sure if there is a different way to clear the values with enterAmountViewModel by attaching it to a particular navigation graph. It needs to have a scope larger than a single fragment. With activityViewModels it stays alive while MainActivity is alive.
lifecycleScope.launch { | ||
viewLifecycleOwner.lifecycleScope.launch { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a crash when executing the lamba inside this launch.
val balance = walletDataProvider.wallet!!.getBalance(Wallet.BalanceType.ESTIMATED_SPENDABLE) | ||
val emptyWallet = balance == fee && balance <= (fee + Transaction.MIN_NONDUST_OUTPUT) | ||
val balance = walletDataProvider.observeSpendableBalance().first() | ||
val emptyWallet = balance == fee || | ||
(balance >= fee && balance <= (fee + Transaction.MIN_NONDUST_OUTPUT.multiply(MIN_DUST_FACTOR))) | ||
Context.propagate(walletDataProvider.wallet!!.context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a user has about 0.032 DASH and then mixes them to get just above 0.03 DASH, this code wouldn't set emptyWallet to true
, then the username creation process would get stuck and report an insufficient funds exception in the logs. the only way to recover was to deposit more DASH and mix a bit more so that the fee could be covered.
Our goal is to empty the wallet if the username creation fee is just a bit higher than the requirement (0.03 in this case) to avoid such errors.
In this case, we were looking at the wrong balance (total) instead of spendable.
There still might be a way for this to fail.
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
Chores
Refactor