3.5 KiB
3.5 KiB
Element X ADA - Phase 4 Build Result
Date: 2026-03-28
Branch: phase1-dev
Commit: 1dbc4c92c4
Build Status: ✅ SUCCESS
Features Implemented
1. Wallet Setup Flow ✅
Created a complete wallet setup flow accessible from WalletPanelNode.onSetupWallet():
New Files:
features/wallet/impl/.../setup/WalletSetupState.kt— State data class and eventsfeatures/wallet/impl/.../setup/WalletSetupPresenter.kt— Business logic, wallet generationfeatures/wallet/impl/.../setup/WalletSetupView.kt— Compose UI with 5 screensfeatures/wallet/impl/.../setup/WalletSetupNode.kt— Appyx navigation node
State Machine:
WELCOME → GENERATING → SHOW_ADDRESS → BACKUP_PROMPT → COMPLETE
Features:
- "Create New Wallet" calls
CardanoKeyStorage.generateWallet() - "Import Existing Wallet" shows placeholder message (out of scope for alpha)
- Shows generated Cardano address
- Displays 24-word mnemonic in 3-column grid
- FLAG_SECURE enabled when displaying mnemonic (prevents screenshots)
- "I have written down my recovery phrase" checkbox required
- Reinitializes wallet manager on completion
SSSS Decision: Skipped for alpha. Wallet backup is local-only. Added TODO comment for Phase 5 Matrix SSSS integration.
2. Payment Event Wiring ✅
After successful transaction confirmation, the payment event is now sent to the Matrix room timeline:
Modified Files:
PaymentProgressPresenter.kt— AddedpaymentEventSender,roomId, event sending logicPaymentProgressNode.kt— AddedroomIdtoInputsPaymentFlowNode.kt— AddedroomIdtoNavTarget.Progress, passthrough logicMessagesFlowNode.kt— AddedNavTarget.WalletSetupand resolve case
Flow:
- Tx builds and signs
- Tx submits to Koios
PaymentStatusPollerconfirms transactionSubmissionState.ConfirmedtriggerssendPaymentEvent()- Payment card appears in room timeline
Error Handling: Event send failure is non-fatal (tx already succeeded).
Files Changed
| File | Change |
|---|---|
setup/WalletSetupState.kt |
New |
setup/WalletSetupPresenter.kt |
New |
setup/WalletSetupView.kt |
New |
setup/WalletSetupNode.kt |
New |
MessagesFlowNode.kt |
Modified — NavTarget.WalletSetup |
PaymentFlowNode.kt |
Modified — roomId passthrough |
PaymentProgressNode.kt |
Modified — roomId in Inputs |
PaymentProgressPresenter.kt |
Modified — event sending |
Total: 4 new files, 4 modified files, 646 lines added
Build Output
BUILD SUCCESSFUL in 1m 28s
3819 actionable tasks: 20 executed, 3799 up-to-date
Only warnings (deprecation notices, not errors).
Testing Checklist
Wallet Setup
- Open wallet panel with no wallet → "Set Up Wallet" button visible
- Click "Set Up Wallet" → navigates to setup screen
- Click "Create New Wallet" → spinner → address shown
- "Continue to Backup" → 24-word mnemonic displayed
- FLAG_SECURE active (screenshots blocked)
- Checkbox enables "Complete Setup"
- Done → returns to wallet panel with wallet initialized
Payment Event
/pay 10 addr_test1...→ confirmation → progress- After confirmation → payment card appears in timeline
- Card shows tx hash, amount, network
- "View on Explorer" opens Cardanoscan
Next Steps (Phase 5)
- SSSS backup integration when Matrix SDK exposes
setAccountData - Import existing wallet flow
- QR code address sharing
- Transaction history tab
- Multi-asset support (tokens, NFTs)