Repository navigation
Build 11.9 - #1514
Build 11.9#1514
Conversation
The Compose result screen supported an explorer link but the fragment
never set explorerLinkText, so no link rendered at all. Now:
- Successful conversions link to the settlement network explorer:
mayascan.org/tx/{TXID} for Maya routes, near-intents.org by deposit
address for NEAR routes (route classified from routeName)
- Error states show the same link when a transaction was actually
generated (txid or deposit address present), so the user can follow
funds that already left the wallet; errors before broadcast show none
- Drop the unused ExplorerSpec.descriptionRes and its strings
Co-Authored-By: Claude Fable 5 <[email protected]>
…remember keys Three fixes from the second agent review round: - SwapKitWebApi.safeCall rethrows CancellationException instead of swallowing it and reporting phantom errors to analytics (same pattern as the H3 fix in MayaBlockchainApi) - SwapKitApiAggregator.preferredRouteResolvedAt is a ConcurrentHashMap: it is written on responseScope but cleared from the caller thread (same pattern as the H4 usdPriceCache fix) - DEXReceiveScreen QR remember block keys on isLoading too, so the bitmap recomputes when loading finishes after the address arrived instead of staying cached as null (permanent spinner) Co-Authored-By: Claude Fable 5 <[email protected]>
Orders older than MAX_TRACKING_AGE_MS were silently dropped from the poll set but left in an active status, so the home-screen row showed a "Processing" chip forever. Now the tracking loop marks them FAILED; since FAILED is terminal, the write also removes them from the observed active-orders query and the loop restarts with only the remaining live orders. Co-Authored-By: Claude Fable 5 <[email protected]>
…on changes The convert and address-input screens held their inline error and the "no DASH to convert" Get-quote gate in fragment fields (mutableStateOf / plain vars), so a rotation recreated them empty: - ConvertViewViewModel now exposes a persistent userDashAccountEmpty flag alongside the one-shot toast event, and the fragment derives its Get-quote gate from it. - MayaConvertCryptoViewModel and MayaAddressInputViewModel hold the currently shown inline error; the fragments mirror every show/clear through a setInlineError helper and re-seed it on creation. - The address-input observer compares against a ViewModel-held lastSeenAddress instead of the recreated uiState, so the replay of the persisted address after rotation is no longer mistaken for an edit that invalidates the error. Co-Authored-By: Claude Fable 5 <[email protected]>
- Preview quote countdown: stamp quoteCreatedAt in the ViewModel when the refreshed quote arrives and resume the remaining window in the observer, so the sticky LiveData re-delivery after rotation no longer restarts a full countdown - explorerFor: new emptyRouteIsMaya param; transaction details passes service == Maya, so a provider-less SwapKit order gets no explorer link instead of a guessed Maya one (with tests) - Document that the NEAR Intents /transactions/ route accepts deposit addresses (verified against the explorer) in strings-maya.xml - @volatile on poolListLastUpdated and classificationLastUpdated, both reset from the caller thread but written on responseScope - DEXEnterAmountViewModel: snapshot-then-update so MutableStateFlow.update lambdas stay side-effect free - Localize the DEX enter-amount display and the keypad decimal-separator key label (display-only param on NumericKeyboardCompose); the Maya convert keypad label now matches the separator its fragment inserts - CardanoAddressParser: bounds-check the Byron CRC argument bytes so truncated input is rejected by require instead of the outer catch - AddressField: route the long-press handler through rememberUpdatedState so pointerInput(Unit) doesn't pin the first-composition lambda Co-Authored-By: Claude Fable 5 <[email protected]>
DEXEnterAmountFragment.onDestroy() forced the nav-graph-scoped viewModel
lazy to resolve, which re-runs getBackStackEntry(nav_maya). When the whole
flow is popped to Home ("Back home" on the receive screen), that graph is
already off the back stack, so resolution threw IllegalArgumentException.
Capture the ViewModel in onCreateView (graph guaranteed alive) and clear
the entered amount via that captured instance in onDestroy, never touching
the lazy after teardown.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…into feat/dash-dex-buy-swap-two
…ay/dash-wallet into feat/dash-dex-improvements # Conflicts: # wallet/build.gradle # wallet/schemas/de.schildbach.wallet.database.AppDatabase/19.json # wallet/schemas/de.schildbach.wallet.database.AppDatabase/20.json # wallet/src/de/schildbach/wallet/database/AppDatabaseMigrations.kt
…out a logo DashSpend gift card transactions whose merchant has no logo were falling back to the static gift card icon in the tx_display_cache. Generate a full-name merchant icon (matching the merchant list) instead, both on the home tx list (TxDisplayCacheService) and in the transaction details view (TransactionResultViewBinder). Adds MerchantNameIcon to the shared MerchantInitialIcon component and caches generated bitmaps by merchant name. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- UserLocationState: rethrow CancellationException so coroutine cancellation isn't swallowed by the generic catch - MerchantsAtmsResultAdapter: capture logoLocation in a local val to avoid dereferencing a nullable merchant - TxDisplayCacheService: try iconBitmapForEntry first on cold start so logo-less gift cards still get a generated icon when customIconId is null - WalletTransactionMetadataProvider: persist merged gift-card values (not raw input) and carry redeemUrlChallenge to avoid null overwrites - MainActivityExt: fix time-skew dialog to report minutes (abs/60) - SecurityGuard/DualFallbackEncryptionProvider/EncryptWalletLiveData: remove stale fallbacks on PIN change before recreating them - bump versionName to 11.8.2, dashj 22.0.4, dpp 4.0.0 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Check hasDecryptionKey() alongside the transfer and encryption key checks so identities missing only the DECRYPTION key are flagged for upgrade and have it added on next sync. The dpp library now includes a DECRYPTION key in its default key list and reuses the ENCRYPTION key material when adding it. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…rade" This reverts commit 77e3df97f55f550e5213d230ce5b2e8f6f1ee388.
…tacts Port the dpp-4.0.1 CBOR crash fixes from the kotlin migration branch (51f3ec9, dff670f) instead of bumping the dpp dependency. Accepting/receiving a contact request from an identity carrying a contract-bound key (iOS/Rust-SDK identities) crashed inside the legacy dashj-platform in-memory identity cache: storeIdentity CBOR-encodes the fetched identity and throws "No converter for SingleContractDocumentType" after a successful fetch, aborting the whole accept/receive flow. - Add IdentityCacheTolerance.kt: pure, unit-tested helper that runs the cached get and, only on that specific CBOR cache failure, recovers via a cache-bypassing refetch. Any other error propagates unchanged. - Add PlatformService.getContactIdentity(), wired into the send, accept, and receive/reconcile call sites (PlatformBroadcastService, PlatformSyncService). - Never string-interpolate a legacy dashj Identity in logs: toString() routes through hashCode() -> CBOR toBuffer() and throws the same "No converter for ..." on contract-bound identities. Log the id only. Scoped to the CBOR fix only; the migration branch's accept-vs-send error wording UX (which depends on refactoring not present on this branch) is intentionally excluded. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The test had drifted from MainViewModel's constructor and init block: - Pass the missing crowdNodeApi constructor arg (mock with signUpStatus and balance stubbed, needed by the CrowdNode withdrawal-reminder flow) - Stub BlockchainIdentityConfig.observe() (BaseProfileViewModel init) - Stub WorkManager.getWorkInfosByTagFlow (allOperationsStatus moved from LiveData to Flow) - Relax TxDisplayCacheService mock (init now calls setFilter) - Stub Configuration.isRestoringBackup and the crowdnode reminder saved-state key Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- GetUsernameVotingResultOperationTest assumed a 2-minute buffer after the voting period, but production (DELAY_AFTER_VOTING_PERIOD) has always been 1 minute — all 9 assertions were off by exactly 60s. Align the expected values and comments with the shipped formula. - TransactionExportTest never called initMetadataMap() before exportString(), crashing on the lateinit metadataMap. Production callers (ToolsViewModel) initialize it first; do the same. Full :wallet:test_testNet3DebugUnitTest suite now passes. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…OT_STARTED A completed DASH->USDC sell swap stayed un-"Converted" in the field: - a /track response of NOT_STARTED (tracker hadn't indexed the deposit yet) overwrote PENDING and stored the all-zero placeholder outbound hash; both are now ignored as "no information" - the tracking collection ran once per process, so an escaped exception (e.g. a Room/SQLite failure under connection-pool pressure) silently ended tracking for the process lifetime; the loop now restarts itself after a poll period Co-Authored-By: Claude Fable 5 <[email protected]>
A DEX buy of 5.70167264 USDC (8 decimals for a 6-decimal token) was registered with the NEAR Intents quote as 5.701673 (rounded up) while the EIP-681 deposit URI truncated to 5.701672 - one base unit short of the quote, so the whole deposit was refunded. - MayaCryptoCurrency: authoritative per-asset `decimals` across the hierarchy (XRP/TRX/ADA/KUJI 6, SOL/TON/SUI 9, NEAR 24, CACAO 10, MAYA 4, EVM 18, UTXO 8); the stablecoin/WBTC mapping formerly local to MayaEthereumTokenCryptoCurrency is shared with the non-EVM token wrappers via tokenDecimals(). formatSwapAmount() rounds a sell amount DOWN to min(decimals, 8) so quote, deposit URI and actual transfer are always the same exact on-chain value - buy order creation and the pre-validation quote use formatSwapAmount; the amount keyboard caps crypto entry at the asset's decimals and crypto display values round DOWN to match what gets ordered - regression test covering the refunded field amount, URI round-trip and per-currency representability Co-Authored-By: Claude Fable 5 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PR adds asset-specific Maya swap precision and downward rounding, hardens swap polling and transaction-hash handling, updates address-field input wiring, and records the v11.9.0 release metadata. ChangesMaya swap amount precision
Swap tracking resilience
Address field interaction wiring
Release metadata
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant SwapTrackingService
participant trackActiveOrders
participant checkOrder
participant MayaTrackingAPI
SwapTrackingService->>trackActiveOrders: poll active orders
trackActiveOrders->>MayaTrackingAPI: observe order status
MayaTrackingAPI-->>trackActiveOrders: tracked order data
trackActiveOrders->>checkOrder: process eligible order
checkOrder-->>trackActiveOrders: status and outbound hash update
trackActiveOrders-->>SwapTrackingService: complete or raise polling error
SwapTrackingService->>trackActiveOrders: retry after poll delay
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
# Conflicts: # common/src/main/java/org/dash/wallet/common/ui/components/AddressField.kt # integrations/maya/src/main/java/org/dash/wallet/integrations/maya/api/SwapTrackingService.kt # integrations/maya/src/main/java/org/dash/wallet/integrations/maya/payments/MayaCryptoCurrency.kt # integrations/maya/src/main/java/org/dash/wallet/integrations/maya/swapkit/SwapKitWebApi.kt # integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/DEXEnterAmountViewModel.kt # integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/DEXRefundAddressFragment.kt # integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaAddressInputScreen.kt # integrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaConvertCryptoScreen.kt # wallet/build.gradle
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@common/src/main/java/org/dash/wallet/common/ui/components/AddressField.kt`:
- Around line 221-225: Update AddressFieldContent’s custom
KeyboardActions.onDone handling to retrieve LocalSoftwareKeyboardController and
explicitly hide the keyboard after invoking onImeAction. Preserve
KeyboardActions.Default when no custom IME action is provided.
- Around line 276-291: Update the trailing action structure used by AddressField
to carry a localized string resource ID for its accessibility label, such as by
extending the existing pair data. Propagate the labels for the Clear and Scan QR
actions to the clickable trailing icon and pass the resolved string as Icon’s
contentDescription instead of null.
🪄 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: d4657775-8f25-482d-91c5-81d7bd9101a2
📒 Files selected for processing (9)
common/src/main/java/org/dash/wallet/common/ui/components/AddressField.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/api/SwapTrackingService.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/payments/MayaCryptoCurrency.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/DEXEnterAmountViewModel.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/DEXRefundAddressFragment.ktintegrations/maya/src/main/java/org/dash/wallet/integrations/maya/ui/MayaConvertCryptoFragment.ktintegrations/maya/src/test/java/org/dash/wallet/integrations/maya/payments/MayaCryptoCurrencySwapAmountTest.ktwallet/CHANGESwallet/build.gradle
| keyboardActions = if (onImeAction != null) { | ||
| KeyboardActions(onDone = { onImeAction() }) | ||
| } else { | ||
| KeyboardActions.Default | ||
| }, |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Ensure the keyboard is hidden when a custom IME action is provided.
When overriding the default onDone behavior in KeyboardActions, the software keyboard will no longer automatically dismiss itself. If the intended behavior is to execute onImeAction and then close the keyboard, you must hide it explicitly.
💻 Proposed fix
At the top of your AddressFieldContent composable (e.g., near line 149), retrieve the keyboard controller:
val keyboardController = LocalSoftwareKeyboardController.currentThen, update the KeyboardActions logic here to hide the keyboard:
- keyboardActions = if (onImeAction != null) {
- KeyboardActions(onDone = { onImeAction() })
- } else {
- KeyboardActions.Default
- },
+ keyboardActions = if (onImeAction != null) {
+ KeyboardActions(onDone = {
+ onImeAction()
+ keyboardController?.hide()
+ })
+ } else {
+ KeyboardActions.Default
+ },🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@common/src/main/java/org/dash/wallet/common/ui/components/AddressField.kt`
around lines 221 - 225, Update AddressFieldContent’s custom
KeyboardActions.onDone handling to retrieve LocalSoftwareKeyboardController and
explicitly hide the keyboard after invoking onImeAction. Preserve
KeyboardActions.Default when no custom IME action is provided.
Issue being fixed or feature implemented
Related PR's and Dependencies
Screenshots / Videos
How Has This Been Tested?
Checklist:
Summary by CodeRabbit