5.9 KiB
5.9 KiB
Element X ADA - Phase 3 Build Result
Date: 2026-03-28
Branch: phase1-dev
Commit: e33c87c164
Status: ✅ Build Successful
What Was Built
1. Wallet Panel UI (features/wallet/impl/src/main/kotlin/io/element/android/features/wallet/impl/panel/)
Created a complete wallet panel with 4 tabs:
Overview Tab:
- Balance display with ADA amount
- Testnet indicator when on preprod
- QR code for receiving payments (using zxing)
- Truncated address with tap-to-copy
- "Send ADA" button that navigates to payment flow
Assets Tab:
- Lists native tokens held at the wallet address
- Shows token name (decoded from hex if printable)
- Shows truncated policy ID
- Shows quantity
History Tab:
- Shows recent transactions
- Direction indicator (sent/received) with color coding
- Formatted date
- Truncated tx hash
- "View in explorer" link (cardanoscan.io or preprod.cardanoscan.io)
Settings Tab:
- Full wallet address display with copy button
- Network indicator (Testnet/Mainnet badge)
- Export recovery phrase option (UI only, biometric not wired)
- Delete wallet option (UI only, confirmation not wired)
2. Wallet API Models (features/wallet/api/)
NativeAsset.kt:
- Data class for Cardano native tokens
- Properties: policyId, assetName, quantity, displayName, fingerprint
- Computed properties: truncatedPolicyId, name (with hex→ASCII conversion)
TxSummary.kt:
- Data class for transaction history entries
- Properties: txHash, blockTime, totalOutput, fee, direction
- Computed properties: formattedDate, truncatedTxHash, amountAda, explorerUrl()
3. CardanoClient Extensions
Added to CardanoClient interface:
getAddressAssets(address: String): Result<List<NativeAsset>>getAddressTransactions(address: String, limit: Int = 20): Result<List<TxSummary>>
Implemented in KoiosCardanoClient:
- Both methods use Koios API with retry logic and rate limiting
- Transaction history is simplified (direction detection needs UTXO analysis)
Updated FakeCardanoClient with corresponding methods for testing.
4. Messages Integration
Wallet Button in DM Header:
- Added
isDmRoomproperty toMessagesState - Added
onWalletClickcallback toMessagesViewandMessagesViewTopBar - Wallet button (Chart icon) shows only in DM rooms
- Uses
CompoundIcons.Chart()as placeholder (Compound lacks a wallet icon)
Navigation Wiring:
- Added
NavTarget.WalletPaneltoMessagesFlowNode - Added
navigateToWallet()toMessagesNode.Callback - Created
WalletPanelNodewith Appyx pattern onSendAdacallback pops panel and pushes PaymentFlow
5. String Resources
Added features/wallet/impl/src/main/res/values/strings.xml with all wallet panel strings.
What Was NOT Built (Lower Priority)
- Wallet Setup Flow - The "Set Up Wallet" button UI exists but doesn't navigate to a real setup flow
- Recovery Phrase Export - Settings option exists but biometric authentication flow not wired
- Wallet Deletion Confirmation - Delete option exists but confirmation dialog not implemented
- No-wallet guard for /pay - Not implemented (would need MessageComposerPresenter changes)
- Payment timeline card renderer - Not implemented
- Detailed transaction amounts - History shows total output but needs additional API calls for accurate amounts
Known Issues
-
Icon Placeholders:
- Wallet icon uses
CompoundIcons.Chart()(no wallet icon in Compound) - Asset icon uses
CompoundIcons.Files() - External link uses
CompoundIcons.PopOut() - Arrow down for received tx uses
CompoundIcons.ArrowDown()(no ArrowDownLeft)
- Wallet icon uses
-
Transaction History Simplification:
- Direction detection is simplified (always RECEIVED)
- Total output shown but actual sent/received amount needs UTXO analysis
-
Deprecation Warnings:
TabRowdeprecated in favor ofPrimaryTabRow/SecondaryTabRowLocalClipboardManagerdeprecated in favor ofLocalClipboard- Cardano client
Accountconstructor deprecated
Build Verification
BUILD SUCCESSFUL in 1m 37s
3828 actionable tasks: 24 executed, 1 from cache, 3803 up-to-date
Full Gplay debug flavor builds successfully. APK available at:
/tmp/element-x-android/app/build/outputs/apk/gplay/debug/
Files Changed (24 files)
New Files:
features/wallet/api/.../NativeAsset.ktfeatures/wallet/api/.../TxSummary.ktfeatures/wallet/impl/.../panel/WalletPanelNode.ktfeatures/wallet/impl/.../panel/WalletPanelPresenter.ktfeatures/wallet/impl/.../panel/WalletPanelState.ktfeatures/wallet/impl/.../panel/WalletPanelView.ktfeatures/wallet/impl/.../panel/tabs/AssetsTabView.ktfeatures/wallet/impl/.../panel/tabs/HistoryTabView.ktfeatures/wallet/impl/.../panel/tabs/OverviewTabView.ktfeatures/wallet/impl/.../panel/tabs/SettingsTabView.ktfeatures/wallet/impl/src/main/res/values/strings.xml
Modified Files:
features/wallet/api/.../CardanoClient.ktfeatures/wallet/impl/build.gradle.ktsfeatures/wallet/impl/.../cardano/KoiosCardanoClient.ktfeatures/wallet/test/.../FakeCardanoClient.ktfeatures/messages/impl/.../MessagesFlowNode.ktfeatures/messages/impl/.../MessagesNode.ktfeatures/messages/impl/.../MessagesPresenter.ktfeatures/messages/impl/.../MessagesState.ktfeatures/messages/impl/.../MessagesStateProvider.ktfeatures/messages/impl/.../MessagesView.ktfeatures/messages/impl/.../MessagesViewWithIdentityChangePreview.ktfeatures/messages/impl/.../ThreadedMessagesNode.ktfeatures/messages/impl/.../topbars/MessagesViewTopBar.kt
Next Steps
- Add proper wallet icon to Compound design system or use custom icon
- Implement wallet setup flow navigation
- Wire biometric authentication for recovery phrase export
- Add wallet deletion confirmation dialog
- Implement no-wallet guard in MessageComposerPresenter for /pay command
- Create payment timeline card renderer for m.payment events
- Enhance transaction history with accurate amount calculation