68 lines
2.5 KiB
Markdown
68 lines
2.5 KiB
Markdown
# Phase 5 Complete: Biometric Auth + Mainnet Flip
|
|
|
|
**Date:** 2026-03-29
|
|
**Branch:** phase1-dev
|
|
**Commits:**
|
|
- `d975d7d761` - feat(wallet): require biometric/PIN auth before transaction signing
|
|
- `dde0dd9f4f` - feat(wallet): flip to Cardano mainnet
|
|
|
|
## Task 1: Biometric Authentication at Transaction Signing ✅
|
|
|
|
**Implementation:**
|
|
- `BiometricAuthenticator.kt` now uses `BIOMETRIC_WEAK | DEVICE_CREDENTIAL`
|
|
- Works for all device security types:
|
|
- Has fingerprint/face → biometric prompt
|
|
- PIN only → PIN prompt
|
|
- No auth set up → allows through (doesn't block transactions)
|
|
- Fires when user taps "Send" on confirmation screen, BEFORE tx is built/signed/submitted
|
|
- On auth failure/cancel → stays on confirmation screen, tx not submitted
|
|
|
|
**Location:** `features/wallet/impl/src/main/kotlin/io/element/android/features/wallet/impl/biometric/BiometricAuthenticator.kt`
|
|
|
|
**Wired into:** `PaymentConfirmationNode.kt` - calls `biometricAuthenticator.authenticate()` in the `onConfirm` handler
|
|
|
|
## Task 2: Mainnet Flip ✅
|
|
|
|
**Changed in CardanoNetworkConfig.kt:**
|
|
```kotlin
|
|
val NETWORK: CardanoNetwork = CardanoNetwork.MAINNET
|
|
```
|
|
|
|
**All derived values now use mainnet:**
|
|
- Network ID: 1 (was 0)
|
|
- Koios API: `https://api.koios.rest/api/v1/` (was preprod.koios.rest)
|
|
- Explorer: `https://cardanoscan.io` (was preprod.cardanoscan.io)
|
|
- Address prefix: `addr1` (was `addr_test1`)
|
|
- Network name: "Mainnet" (was "Preprod Testnet")
|
|
- cardano-client-lib: `Networks.mainnet()` (was `Networks.preprod()`)
|
|
|
|
**Also fixed:** `WalletPanelNode.kt` now uses `CardanoNetworkConfig.EXPLORER_BASE_URL` instead of hardcoded URLs
|
|
|
|
**To flip back to testnet:** Change one line:
|
|
```kotlin
|
|
val NETWORK: CardanoNetwork = CardanoNetwork.TESTNET
|
|
```
|
|
|
|
## Task 3: QA Pass ✅
|
|
|
|
- Build succeeds clean
|
|
- No hardcoded `preprod` URLs in production code (only in preview providers for UI testing)
|
|
- Address validation accepts `addr1...` format
|
|
- Explorer links point to mainnet cardanoscan.io
|
|
|
|
## APK
|
|
|
|
**Download:** `http://192.168.0.5:8888/element-x-ada-mainnet.apk`
|
|
**Size:** 220 MB (arm64-v8a debug)
|
|
**Type:** Fdroid Debug (no Google Play services)
|
|
|
|
## Remaining for Production
|
|
|
|
1. **Code signing** - Need release keystore for Play Store
|
|
2. **Testing** - Manual QA on real device with biometric
|
|
3. **Wallet recovery** - Users on testnet will need to create new wallets (different addresses)
|
|
4. **Balance migration** - Old testnet balances don't exist on mainnet (expected)
|
|
|
|
---
|
|
|
|
*This completes Phase 5 of Element X ADA integration.*
|