* Fix the `assertSessionVerificationDisplayed.yaml` check
* Previous 'Location' is now 'Share location'
* We don't have a GPS location, so the text is 'Share selected location'
* 'Create a new conversation' is now 'Create room'
* Try adding a background logcat process
* 'Sign out' is now 'Remove this device'
* Adjust the logcat filtering so it silences everything that's not our app, otherwise the logs can get quite large
* Add floating date indicator while scrolling the timeline (#6433)
* Add `FeatureFlags.FloatingDateBadge`. This enables displaying the floating date badge in the timeline as you scroll.
* Don't display the floating badge if the timeline isn't reversed. Otherwise, this will affect talkback users and break the existing navigation
* Use `TimelineItem.formattedDate()` to get the date to display. Always try finding the closest one (usually it will be just the 1st one we try).
* Align designs with iOS. Also fix shadows in fade animation by adding some paddings.
* Update screenshots
---------
Co-authored-by: Gianluca Iavicoli <gianluca.iavicoli04@gmail.com>
Co-authored-by: ElementBot <android@element.io>
Implement a `customDetectVerticalDragGestures` that matches the original `detectVerticalDragGestures` expect we conditionally consume the initial DOWN event in compose to decide whether we need to drag the bottom sheet or scroll inside the Android `EditText`
* Fix crash when using `View.hideKeyboardAndAwaitAnimation`
Remove the `View.OnApplyWindowInsetsListener` used in modern Android versions to detect if the insets changed after they do the first time: this is a single use operation and the listener will be called every time the insets change
Also, replace `Mutex` with `CompletableDeferred` so it doesn't matter if it's called several times, we only care about the first one.
* Don't try to hide the keyboard if it's already hidden. Also, add a 1s timeout in case everything goes wrong and we somehow never complete the future.
* Try handling `ForegroundServiceStartNotAllowedException` better
The docs mention starting a foreground service when the app is on background is allowed when FCM receives a high priority notification, so we don't do it if the priority is not high.
Also, we handle the case where starting the foreground service fails so it doesn't crash the app.
- Add UtxoAsset model for native assets in UTXOs
- Update KoiosCardanoClient.getUtxos() to parse asset_list
- Add asset fields to PaymentRequest (policyId, name, quantity)
- DefaultTransactionBuilder: multi-asset tx with Amount.asset()
- Min UTXO: always include 1.5 ADA with token sends (protocol req)
- PaymentEntryPresenter: load available assets, handle selection
- PaymentEntryView: asset picker dropdown when tokens available
- PaymentConfirmation: show token name/quantity instead of ADA
- PaymentProgress: displayAmount field for token sends
- Wire asset data through entire nav flow (FlowNode/Nodes)
- Updated NativeAsset with metadata fields for NFT prep
- Add resolveHandle() to CardanoClient interface
- Implement via Koios asset_addresses API with Handle policy ID
- Add HandleResolved state to RecipientResolutionState
- Detect $handle prefix in PaymentEntryPresenter
- Show "Resolved from $handle ✓" card in PaymentEntryView
- 1-hour in-memory cache for handle lookups
- Case-insensitive handle resolution (normalize to lowercase)
- Add resolveHandle to FakeCardanoClient for testing
- CardanoNetworkConfig.NETWORK = MAINNET
- Koios API: api.koios.rest (was preprod.koios.rest)
- Explorer: cardanoscan.io (was preprod.cardanoscan.io)
- Address prefix: addr1 (was addr_test1)
- WalletPanelNode: use config for explorer URL
To flip back to testnet, change one line:
val NETWORK = CardanoNetwork.TESTNET
Use BIOMETRIC_WEAK | DEVICE_CREDENTIAL to support:
- Fingerprint/face → biometric prompt
- PIN only → PIN prompt
- No auth set up → allow through (dont block tx)
Auth fires when user taps Send on confirmation screen,
before tx is built/signed/submitted. On failure/cancel,
user stays on confirmation screen.
- Add ManualAddressChanged event for manual address entry
- Add manualAddressInput and manualAddressError fields to PaymentEntryState
- Add resolvedAddress field to track the final Cardano address
- Update PaymentEntryPresenter to handle manual address entry flow
- Add ManualAddressEntryCard component with embedded text field
- Validate manual addresses (addr1/addr_test1, length 58-108)
- Update PaymentEntryNode to pass resolvedAddress to confirmation screen
Flow B: When recipient has no linked wallet, show warning banner
and editable address field for manual entry. Continue button
enables when valid address is entered.
Implements public Cardano address directory using Matrix account data:
Publishing (write side):
- After wallet creation, import, or SSSS restore, the Cardano address
is written to the user Matrix account data
- Key: com.sulkta.cardano.address
- Content: { "address": "addr1..." }
- This is public/unencrypted for discovery by other users
Lookup (read side):
- When entering a Matrix user in /pay, their account data is checked
- If they have a linked Cardano address, it auto-fills the recipient
- UI shows "Address loaded from @username profile ✓" when found
- Shows "@username has not linked a wallet" if not found
- Graceful fallback to manual address entry
New files:
- CardanoAddressService interface (wallet:api)
- DefaultCardanoAddressService implementation (wallet:impl)
Updated:
- WalletSetupPresenter: calls publishAddress after all wallet setup paths
- PaymentEntryPresenter: looks up recipient address from Matrix
- PaymentEntryState: added Resolving and Found states
- PaymentEntryView: shows lookup progress and result cards
Enhanced the payment timeline card to display the recipient/sender address:
- Added truncatedToAddress and truncatedFromAddress to TimelineItemPaymentContent
- New truncateAddress() helper (first 8 + last 6 chars)
- Payment card now shows "To: addr_tes...ytjqp" for sent payments
- And "From: addr_tes...pd0hq" for received payments
- Updated wrapper to expose new properties
The card now displays:
- Amount in ADA (large, bold)
- Sent/Received indicator with Cardano icon
- Truncated recipient/sender address
- Status chip (Pending/Confirmed/Failed with icons)
- Truncated tx hash (tappable to CardanoScan)
- Testnet badge when applicable
- "View on CardanoScan →" link for confirmed transactions
The wallet button should only appear in genuine DM rooms. The previous
logic (isDm || activeMembersCount == 2L) was overly broad as it would
show the wallet in any 2-person room, including private rooms that
are not direct messages.
Now uses only roomInfo.isDm which properly checks:
- isDirect flag is true (Matrix spec DM indicator)
- activeMembersCount <= 2 (at most 2 active members)
This ensures the wallet button only appears in real 1:1 DM rooms.
Delete Wallet feature:
- Add showDeleteConfirmation state to WalletPanelState
- Add WalletDeleteConfirmationDialog composable with warning
- Non-dismissible dialog with clear warning about backup
- Wire DeleteWallet/ConfirmDeleteWallet/CancelDeleteWallet events
- Call keyStorage.deleteWallet() and clear wallet state on confirm
- Panel shows setup screen after deletion
Restore from SSSS feature:
- Add hasBackupWithoutKey() to WalletBackupService for checking backup existence
- Uses raw Matrix account data API to check if secret key exists
- Add RESTORE_FROM_CLOUD step to SetupStep enum
- Check for cloud backup on setup init (non-blocking)
- Show "Restore from Matrix Backup" button when backup exists
- Add recovery key input flow for cloud restore
- Restore decrypts mnemonic from SSSS and imports wallet
Both features enable complete wallet backup/restore round-trip via Matrix SSSS.
- Add "Backup to Matrix" button to wallet Settings tab
- Implement BackupRecoveryKeyDialog for entering recovery key
- Wire up WalletBackupService for SSSS encryption
- Add backup state to WalletPanelState and WalletPanelEvent
- Add localized strings for backup UI
Backup flow:
1. User taps "Backup to Matrix" in wallet settings
2. Dialog prompts for Matrix recovery key
3. Wallet mnemonic is encrypted with SSSS
4. Stored in Matrix account data as com.sulkta.cardano.wallet_seed
Tested: Successfully backed up wallet to SSSS on testnet.
Users can now import an existing wallet by entering their
12 or 24-word recovery phrase.
Features:
- New IMPORT_MNEMONIC step in wallet setup flow
- Live word count display (12/24 words)
- Clear button for input field
- Validates BIP39 mnemonic using cardano-client-lib
- FLAG_SECURE on import screen (mnemonic is sensitive)
- Paste-friendly single text area
- Inline error messages for invalid phrases
The imported wallet skips the backup prompt since the user
already has their recovery phrase.
Adds ability to backup wallet seed phrase to Matrix SSSS:
- WalletBackupService interface and implementation
- New BACKUP_TO_MATRIX step in wallet setup flow
- Recovery key input UI with FLAG_SECURE
- Graceful handling of invalid keys and missing SSSS setup
Users can now:
1. Write down seed phrase manually (existing)
2. Encrypt and store in Matrix account with recovery key
The backup is encrypted with the same key used for
cross-signing and message backup (SSSS).
Adds SecretStorage interface and RustSecretStorage implementation
for accessing Matrix SSSS (Secure Secret Storage and Sharing).
This enables storing and retrieving encrypted secrets using the
user's recovery key.
Also fixes SDK compatibility issues:
- Remove deprecated Sentry configuration from TracingService
- Make analytics SDK enableSentryLogging a no-op
Requires updated Rust SDK with SecretStoreWrapper FFI.
- Add biometric/device credential auth before showing mnemonic
- Display 24 words in 4x6 grid with word numbers
- Set FLAG_SECURE on dialog to prevent screenshots
- Mnemonic is cleared from memory when dialog dismissed
The isDm check requires isDirect=true which is not set for rooms
created via API. Relax the check to also show the wallet button
in any room with exactly 2 active members.
- Added getMnemonic() method to CardanoWalletManager interface
- Implemented in DefaultCardanoWalletManager using keyStorage
- Added TODO comment for Export Recovery Phrase implementation
- Discovered isDM bug: DM rooms not detected properly (wallet button hidden)
Bug found: Export Recovery Phrase button has no implementation - needs
biometric auth flow then mnemonic display.
Test results: Successfully sent 2 tADA to faucet return address
TX: b23c86bd50f9279a7ff28784716898c784f9d62f821b31d045e26830d581b8ca
The cardano-client-lib KoiosBackendService was returning empty responses
for funded addresses because it uses an outdated API format.
This fix:
- Uses OkHttp with direct POST requests to Koios v1 endpoints
- Correctly formats requests with _addresses array in body
- Parses JSON responses to extract balance and UTXOs
- Keeps cardano-client-lib backend for tx submission and protocol params
Tested with preprod address showing 10B lovelace balance correctly.
- Add trailing slash to Koios base URLs (required by Retrofit)
- Handle empty response bodies for unfunded addresses (returns [] from API)
- getBalance now returns 0 for unfunded addresses instead of failing
- getUtxos now returns empty list for unfunded addresses
- Add debug logging for Koios responses
The mnemonic encryption key should be device-protected (unlocked when device
is unlocked), not require biometric/PIN at time of use. This was breaking:
- Wallet creation on devices without biometrics
- Emulator testing entirely
Changes:
- Remove setUserAuthenticationRequired(true) from keystore key spec
- Remove setUserAuthenticationValidityDurationSeconds()
- Remove setInvalidatedByBiometricEnrollment()
- Remove emulator detection hacks (isEmulator, canUseBiometricAuth)
- Remove unused Build and BiometricManager imports
- Add documentation explaining security model
Security model:
- Mnemonic encrypted with AES-256-GCM using Android Keystore key
- Key is device-bound (cannot be extracted)
- Key is accessible when device is unlocked
- Transaction signing should use BiometricPrompt separately (future enhancement)
- Add additional emulator detection patterns for modern Android emulators
(sdk_gphone, emu device prefix, goldfish/ranchu hardware)
- On emulators or devices without biometric auth, skip user authentication
requirement for keystore keys (allows wallet creation without BiometricPrompt)
- Add debug logging for authentication requirement decisions
- Fixes UserNotAuthenticatedException on emulators
Tested on: sdk_gphone64_x86_64 (Android 14 emulator)
setUserAuthenticationValidityDurationSeconds(-1) requires BiometricPrompt.CryptoObject
for every cipher operation. Changed to 30s window for alpha — proper CryptoObject
flow deferred to Phase 5.
Fixes UserNotAuthenticatedException on storeMnemonic/getMnemonic.
Phase 4: Final features for Element X ADA alpha
## Wallet Setup Flow
- New setup state machine: WELCOME -> GENERATING -> ADDRESS -> BACKUP_PROMPT -> COMPLETE
- WalletSetupState.kt: state data class and events
- WalletSetupPresenter.kt: generates wallet via CardanoKeyStorage, state transitions
- WalletSetupView.kt: Compose UI with FLAG_SECURE for mnemonic display
- WalletSetupNode.kt: Appyx node with setup callbacks
- Wired into MessagesFlowNode via NavTarget.WalletSetup
- SSSS backup skipped for alpha (local-only, TODO for Phase 5)
## Payment Event Wiring
- PaymentProgressPresenter now sends Matrix payment event on tx confirmation
- Added roomId to PaymentProgressNode.Inputs and NavTarget.Progress
- Calls paymentEventSender.sendPaymentEvent() when SubmissionState.Confirmed
- Non-fatal if event fails (tx already succeeded)
## Files Changed
- features/wallet/impl/setup/ (new directory, 4 files)
- MessagesFlowNode.kt: NavTarget.WalletSetup, navigation wiring
- PaymentFlowNode.kt: roomId passthrough to Progress
- PaymentProgressNode.kt: roomId in Inputs
- PaymentProgressPresenter.kt: event sending on confirmation
Phase 3b: Deferred features completion
Task 1: /pay No-Wallet Guard
- Add noWalletSetup and isCheckingWallet flags to PaymentEntryState
- Update PaymentEntryPresenter to check wallet state early via collectAsState
- Add full-screen "Wallet Required" prompt to PaymentEntryView when no wallet
- Add onOpenWalletSettings callback through the entire navigation chain
- Wire callback in MessagesFlowNode to navigate to WalletPanel
Task 2: Payment Timeline Card (already existed, just fixed event type)
- Fix isPaymentEventType() to check for correct event types:
- co.sulkta.payment.request (was incorrectly com.sulkta.cardano.payment)
- co.sulkta.payment.status (for status updates)
Build verified: assembleGplayDebug passes
- Add WalletPanelView with 4 tabs (Overview, Assets, History, Settings)
- Overview tab shows balance, QR code for receiving, and Send ADA button
- Assets tab shows native tokens held at address
- History tab shows recent transactions with explorer links
- Settings tab shows address, network, and backup/delete options
- Add NativeAsset and TxSummary models to wallet API
- Add getAddressAssets() and getAddressTransactions() to CardanoClient
- Implement new methods in KoiosCardanoClient and FakeCardanoClient
- Add wallet button to MessagesViewTopBar (DM rooms only)
- Add isDmRoom to MessagesState for conditional UI
- Wire navigateToWallet() callback through to MessagesFlowNode
- Add NavTarget.WalletPanel and WalletPanelNode integration
- Add string resources for wallet panel UI
Known limitations:
- Uses Chart icon as placeholder for wallet (Compound lacks wallet icon)
- Wallet setup flow not implemented (TODO)
- Transaction amounts in history need additional API calls to calculate
- RustTimeline.sendRaw() now calls inner.sendRaw() via custom SDK .aar
- DefaultPaymentEventSender fully implemented: serializes payment data as JSON,
sends co.sulkta.payment.request and co.sulkta.payment.status event types
- matrix-rust-sdk.aar built from sulkta/send-raw-v1 fork with UniFFI binding
- Removes UnsupportedOperationException stub — payments now actually send
- CardanoWalletManager moved CardanoClient dep out of AppScope — was causing
Metro MissingBinding at compile time (CardanoClient is SessionScope)
- refreshBalance() now takes balanceLovelace param instead of fetching from client
- WalletState constructor calls fixed with all required fields
- app/build.gradle.kts: added META-INF/gradle/incremental.annotation.processors
to pickFirsts to resolve moshi-kotlin-codegen/lombok resource conflict
- App builds and launches successfully on emulator (verified)
- Document that sendRaw() is not yet available in the Matrix Rust SDK bindings
- Fix TimelineItemPaymentContent.formatAda() to properly format decimal amounts
- Fix TimelineEventContentMapper to handle JsonNull for txHash
- Add sendRaw stub to FakeTimeline for test compatibility
- Add matrix test dependency to wallet modules
- Simplify presenter tests to avoid turbine timeout flakiness
- Fix all test expectations to match actual implementation
BUILD SUCCESSFUL: 163 tests pass, 0 failures