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.