Skip to content

Build 11.9 - #1514

Merged
HashEngineering merged 142 commits into
masterfrom
build-11.9
Jul 21, 2026
Merged

HashEngineering merged 142 commits into
masterfrom
build-11.9

Conversation

@HashEngineering

@HashEngineering HashEngineering commented Jul 15, 2026 •

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

Related PR's and Dependencies

Screenshots / Videos

How Has This Been Tested?

  • QA (Mobile Team)

Checklist:

  • I have performed a self-review of my own code and added comments where necessary
  • I have added or updated relevant unit/integration/functional/e2e tests

Summary by CodeRabbit

  • New Features
    • Released version 11.9.0 with updates to Dash DEX, Maya conversion, DashPay, and shared wallet experiences.
    • Added more consistent asset-specific amount handling across supported networks and tokens.
  • Bug Fixes
    • Improved swap tracking recovery after unexpected errors.
    • Prevented placeholder transaction references from appearing in swap progress.
    • Corrected amount rounding to avoid inaccurate refunds and on-chain values.
  • UI Improvements
    • Improved address field keyboard, focus, placeholder, and trailing-action behavior.

HashEngineering and others added 22 commits July 8, 2026 13:37
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]>
…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]>
@HashEngineering HashEngineering self-assigned this Jul 15, 2026
@coderabbitai

coderabbitai Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2953023b-f789-4c8d-8031-8adbc007083b

📥 Commits

Reviewing files that changed from the base of the PR and between 3475730 and edf78f5.

📒 Files selected for processing (1)
  • integrations/maya/src/test/java/org/dash/wallet/integrations/maya/payments/MayaCryptoCurrencySwapAmountTest.kt
🚧 Files skipped from review as they are similar to previous changes (1)
  • integrations/maya/src/test/java/org/dash/wallet/integrations/maya/payments/MayaCryptoCurrencySwapAmountTest.kt

📝 Walkthrough

Walkthrough

The 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.

Changes

Maya swap amount precision

Layer / File(s) Summary
Currency precision contract
integrations/maya/.../payments/MayaCryptoCurrency.kt
Adds shared token-decimal resolution, capped swap scales, downward amount formatting, and chain-specific native and token decimal overrides.
Asset-aware amount flows
integrations/maya/.../ui/DEXEnterAmountViewModel.kt, integrations/maya/.../ui/DEXRefundAddressFragment.kt
Uses asset-specific scales and downward rounding when displaying, validating, and submitting swap amounts.
Quantization validation
integrations/maya/src/test/.../MayaCryptoCurrencySwapAmountTest.kt
Tests decimal mappings, downward quantization, payment-URI base-unit preservation, and precision limits across registered currencies.

Swap tracking resilience

Layer / File(s) Summary
Polling and failure handling
integrations/maya/.../api/SwapTrackingService.kt
Retries non-cancellation polling failures while preserving coroutine cancellation and continuing active-order processing.
Status and transaction-hash filtering
integrations/maya/.../api/SwapTrackingService.kt
Ignores stale NOT_STARTED results and filters all-zero placeholder outbound hashes.

Address field interaction wiring

Layer / File(s) Summary
Text input and trailing controls
common/src/main/java/org/dash/wallet/common/ui/components/AddressField.kt
Wires IME completion, focus handling, optional focus requests, placeholders, and conditional trailing controls.

Release metadata

Layer / File(s) Summary
Release notes and version defaults
wallet/CHANGES, wallet/build.gradle
Adds the v11.9.0 changelog entry and updates fallback Android version 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
Loading

Possibly related PRs

Suggested reviewers: abaranouski

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 43.24% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is too generic and does not describe the main change in the PR. Use a concise descriptive title such as "Improve Maya swap quantization and DEX flow for 11.9".
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch build-11.9

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@HashEngineering
HashEngineering changed the base branch from feat/dash-dex-improvements to master July 21, 2026 02:40
# 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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7e75c47 and 3475730.

📒 Files selected for processing (9)
  • 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/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/MayaConvertCryptoFragment.kt
  • integrations/maya/src/test/java/org/dash/wallet/integrations/maya/payments/MayaCryptoCurrencySwapAmountTest.kt
  • wallet/CHANGES
  • wallet/build.gradle

Comment on lines 221 to 225
keyboardActions = if (onImeAction != null) {
KeyboardActions(onDone = { onImeAction() })
} else {
KeyboardActions.Default
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.current

Then, 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.

@HashEngineering
HashEngineering merged commit a6b7b2f into master Jul 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants