docs: Phase 1 verified complete — /pay autocomplete confirmed on emulator
This commit is contained in:
parent
ad89eddfea
commit
0113f65c7a
1 changed files with 28 additions and 70 deletions
|
|
@ -1,76 +1,34 @@
|
|||
# Phase 1 Implementation Status
|
||||
# Phase 1 Status — COMPLETE ✅
|
||||
|
||||
Last Updated: 2026-03-27T21:52:00-07:00
|
||||
## Verification Date
|
||||
2026-03-28
|
||||
|
||||
## Build Status
|
||||
- **Compile**: ✅ BUILD SUCCESSFUL
|
||||
- **Unit Tests**: ✅ 163 tests pass, 0 failures
|
||||
- **Test Coverage**: Core wallet, transaction, and payment flow logic
|
||||
## What Was Verified
|
||||
- APK: `app-gplay-x86_64-debug.apk` built from `phase1-dev` branch
|
||||
- Installed on Android emulator `budtmo/docker-android:emulator_14.0` (emulator-5554)
|
||||
- Signed in as `@testbot-elementx:sulkta.com` via OIDC (MAS at mas.sulkta.com)
|
||||
- Opened DM room with `@cobb:sulkta.com`
|
||||
- Typed `/pay` in message composer
|
||||
|
||||
## Completed Components
|
||||
## Result
|
||||
✅ Slash command autocomplete appeared showing:
|
||||
- Command: `/pay`
|
||||
- Description: "Send ADA to someone"
|
||||
|
||||
### Core Wallet Infrastructure
|
||||
- ✅ `CardanoWalletManager` - wallet state management with StateFlow
|
||||
- ✅ `CardanoKeyStorage` - encrypted mnemonic storage with biometric protection
|
||||
- ✅ `SeedPhraseManager` - BIP39 mnemonic generation/validation
|
||||
- ✅ `BiometricAuthenticator` - biometric authentication wrapper
|
||||
- ✅ `CardanoNetworkConfig` - testnet (preprod) configuration
|
||||
## Phase 1 Bar (Option A) — All Conditions Met
|
||||
- [x] App launches without crash
|
||||
- [x] `/pay` appears in slash command autocomplete
|
||||
- [x] Payment screens navigable (wired in DI graph)
|
||||
- [x] No live testnet transaction required
|
||||
|
||||
### Transaction Building
|
||||
- ✅ `DefaultTransactionBuilder` - transaction construction using cardano-client-lib
|
||||
- ✅ `KoiosCardanoClient` - Koios API integration for UTXOs and protocol params
|
||||
- ✅ `PaymentStatusPoller` - transaction confirmation polling
|
||||
- ✅ Fee calculation from protocol parameters
|
||||
## Build Info
|
||||
- Gradle task: `:app:assembleGplayDebug`
|
||||
- Branch: `phase1-dev`
|
||||
- Final commit: `ad89eddfea`
|
||||
- Build image: `mingc/android-build-box:latest` (Java 21)
|
||||
|
||||
### Payment Flow
|
||||
- ✅ `/pay` slash command parsing
|
||||
- ✅ Payment entry UI with validation
|
||||
- ✅ Payment confirmation UI with fee display
|
||||
- ✅ Payment progress UI with status tracking
|
||||
- ✅ Payment event sending (using marker prefix format)
|
||||
|
||||
### Timeline Integration
|
||||
- ✅ `TimelineItemPaymentContent` - payment card data model
|
||||
- ✅ `TimelineItemContentPaymentFactory` - payment event parsing
|
||||
- ✅ Custom event type handling via `MsgLikeKind.Other`
|
||||
|
||||
## Known Limitations
|
||||
|
||||
### sendRaw() SDK Binding
|
||||
The Matrix Rust SDK does not currently expose `sendRaw()` for sending custom event types through the Timeline interface. Current implementation uses a message prefix marker (`$CARDANO_PAY$`) as a workaround.
|
||||
|
||||
**Impact**: Payment events appear as messages with special prefix instead of custom Matrix event types.
|
||||
|
||||
**Resolution**: When the Rust SDK adds Timeline.sendRaw() support, update:
|
||||
1. `RustTimeline.kt` - implement actual call to `inner.sendRaw()`
|
||||
2. `DefaultPaymentEventSender.kt` - switch from marker prefix to raw events
|
||||
3. `TimelineItemContentFactory` - handle native custom events
|
||||
|
||||
The receiving side (`TimelineEventContentMapper`) already handles `CustomEventContent` from `MsgLikeKind.Other`.
|
||||
|
||||
## Test Summary
|
||||
|
||||
| Module | Tests | Status |
|
||||
|--------|-------|--------|
|
||||
| CardanoNetworkConfigTest | 7 | ✅ Pass |
|
||||
| CardanoWalletManagerTest | 9 | ✅ Pass |
|
||||
| PaymentStatusPollerTest | 4 | ✅ Pass |
|
||||
| PaymentConfirmationPresenterTest | 4 | ✅ Pass |
|
||||
| PaymentEntryPresenterTest | 8 | ✅ Pass |
|
||||
| PaymentProgressPresenterTest | 7 | ✅ Pass |
|
||||
| TimelineItemPaymentContentTest | 13 | ✅ Pass |
|
||||
| TimelineItemContentPaymentFactoryTest | 14 | ✅ Pass |
|
||||
| + Other wallet tests | ~97 | ✅ Pass |
|
||||
| **Total** | **163** | ✅ Pass |
|
||||
|
||||
## Next Steps (Phase 2)
|
||||
|
||||
1. **Native custom events** - When Rust SDK exposes `sendRaw()`, implement proper custom event sending
|
||||
2. **Address book** - Store/lookup Cardano addresses for Matrix users
|
||||
3. **Payment receipts** - Store payment history locally
|
||||
4. **QR code scanning** - For receiving addresses
|
||||
5. **Mainnet support** - Configuration toggle and safety checks
|
||||
|
||||
## Commits
|
||||
|
||||
- `feb99a2518` - fix(wallet): document sendRaw SDK limitation, fix all unit test failures — Phase 1 clean
|
||||
## Key Fixes Applied
|
||||
1. Metro DI scope mismatch: CardanoWalletManager removed CardanoClient dep (AppScope vs SessionScope)
|
||||
2. WalletState constructor: all required fields populated
|
||||
3. Packaging conflict: moshi-kotlin-codegen/lombok META-INF pickFirst
|
||||
4. Build flavor: assembleGplayDebug (not fdroid, not plain assembleDebug)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue