BUILD FAILED - Multiple critical issues found:
- Timeline.sendRaw() doesn't exist in SDK
- Koios backend API usage wrong
- DI import paths wrong
- Parcelize imports wrong
- Compose API mismatches
See PHASE1-STATUS.md for full details and remediation plan.
- Rename getNetworks() to getNetwork() in CardanoNetworkConfig
- Return Network type instead of Networks
- Update all callers in CardanoKeyStorageImpl, CardanoWalletManager, DefaultTransactionBuilder
TimelineItemEventContent is a sealed interface in messages:impl, so external
modules cannot add implementers to its hierarchy.
Solution: Create TimelineItemPaymentContentWrapper in messages:impl that
implements the sealed interface and wraps the wallet API's payment content.
Changes:
- Remove inheritance from TimelineItemPaymentContent (wallet:api)
- Add TimelineItemPaymentContentWrapper (messages:impl)
- Update TimelineItemContentFactory to wrap payment content
- Update TimelineItemEventContentView to use wrapper
- Add Timeline.sendRaw() to send custom Matrix events
- Add CustomEventContent type for receiving custom events
- Update TimelineEventContentMapper to handle MsgLikeKind.Other
- Update TimelineItemContentFactory to intercept payment events
- Rewrite DefaultPaymentEventSender to use sendRaw instead of text markers
- Update TimelineItemContentPaymentFactory to parse raw JSON
- Remove text-marker detection from TimelineItemContentMessageFactory
- Update tests to use raw event API
- Mark raw event SDK blocker as RESOLVED in BLOCKERS.md
Event type: co.sulkta.payment.request (reverse-domain format)
Status updates: co.sulkta.payment.status
Benefits:
- Proper Matrix protocol compliance
- No JSON embedded in text messages
- Events won't be indexed by search
- Clean separation from regular messages
Task 7: Timeline Payment Card
- TimelineItemPaymentView integration with TimelineItemEventContentView
- Payment card rendering for both sender and recipient perspectives
- Unit tests for TimelineItemPaymentContent
Task 8: Raw Event Handling
- Modified TimelineItemContentMessageFactory to intercept payment events
- Added isSentByMe parameter propagation through content factories
- FakePaymentEventSender for testing
- Unit tests for TimelineItemContentPaymentFactory
SDK Limitation Workaround:
Since matrix-rust-sdk doesn't expose raw event sending or UnknownContent
raw JSON, payment events are encoded as text messages with a marker:
[cardano-payment:v1]{...json...}
This falls back gracefully for non-wallet clients while enabling
rich payment card rendering for wallet-enabled clients.
Implements the payment flow UI for the Element X ADA wallet:
## Screens
- PaymentEntryScreen: Amount/recipient input with pre-filling from /pay command
- PaymentConfirmationScreen: Transaction details with fee estimation (FLAG_SECURE)
- PaymentProgressScreen: Submission status with polling for confirmation
## Features
- Biometric authentication before payment confirmation
- Matrix user detection with 'hasn't linked wallet' inline message
- CardanoScan explorer link for transaction viewing
- Testnet warning banner
- Insufficient funds detection
## Wire-up
- MessageComposerPresenter intercepts /pay commands
- SlashCommandParser integration for command detection
- Navigation to PaymentFlowNode on valid /pay command
- Snackbar error on parse errors
## Technical
- Circuit presenter pattern with Molecule/Turbine tests
- @PreviewsDayNight for all Composables
- Metro DI integration
- Fake implementations for testing
Includes PaymentEntryPresenterTest, PaymentConfirmationPresenterTest,
PaymentProgressPresenterTest with comprehensive coverage.
- Documents what was completed vs what needs verification
- Lists items requiring Android SDK to test (compilation, ktlint, tests)
- Raises 3 questions requiring human decision:
1. Wallet scope (per-session vs app-wide)
2. Key storage behavior on biometric changes
3. Testnet vs mainnet for initial development
Task 1 of Phase 1 - Module Scaffolding
- Created features/wallet/api module with WalletEntryPoint and WalletState
- Created features/wallet/impl module with Metro DI setup
- Created features/wallet/test module with FakeWalletEntryPoint
- Added PaymentFlowNode placeholder with Appyx navigation
- Added Cardano client library dependencies (0.7.1)
- Added proguard rules for Cardano library
- Added basic unit tests for WalletState
The module follows Element X patterns:
- Metro for dependency injection (@ContributesTo, @ContributesBinding, @ContributesNode)
- Appyx for navigation (BaseFlowNode pattern)
- api/impl/test module separation
- Feature entry point pattern for navigation
This module scaffolding blocks all subsequent tasks (2-8) in Phase 1.
* Start the `FetchPushForegroundService ` in foreground ASAP. This is a first step to mitigate `ForegroundServiceDidNotStartInTimeException` being thrown.
* Don't stop the service immediately if it's running but not in foreground. Try waiting up to 5s for it to be in foreground.