# Element X ADA Small Fixes - 2026-03-28 ## Bug 1: isDM Detection (Wallet Button Hidden) **Problem:** The wallet button in the DM room top bar was hidden because `isDM=false` for API-created rooms. The `isDirect` flag isn't set when rooms are created via API rather than through the app's normal DM flow. **Root Cause:** In `RoomIsDmCheck.kt`, the `isDm` check requires `isDirect=true AND activeMembersCount <= 2`. API-created rooms don't have `isDirect=true`. **Fix:** Modified `MessagesPresenter.kt` line 298: ```kotlin // Before isDmRoom = roomInfo.isDm, // After isDmRoom = roomInfo.isDm || roomInfo.activeMembersCount == 2L, ``` Now the wallet button shows for: - Actual Matrix DMs (`isDirect=true && activeMembersCount <= 2`) - Any 2-member room (catches API-created 1:1 rooms) **Commit:** `c1b927380f` - "fix: show wallet button for 2-member rooms even without isDirect flag" --- ## Bug 2: Export Recovery Phrase Button Does Nothing **Problem:** The "Show Recovery Phrase" button in wallet settings triggered `WalletPanelEvent.ExportRecoveryPhrase` but the handler just had `// TODO: Implement biometric auth then display mnemonic`. **Fix:** Implemented the full flow: 1. **WalletPanelState.kt** - Added state fields: - `requestBiometricAuth: Boolean` - triggers biometric prompt - `showMnemonicDialog: Boolean` - shows the mnemonic display - `mnemonicWords: List?` - the 24 words - `mnemonicError: String?` - error message if retrieval fails - New events: `LoadMnemonic`, `CancelBiometricAuth`, `DismissMnemonicDialog` 2. **WalletPanelPresenter.kt** - Event handling: - `ExportRecoveryPhrase` → sets `requestBiometricAuth = true` - `LoadMnemonic` → calls `walletManager.getMnemonic()` and shows dialog on success - `DismissMnemonicDialog` → clears mnemonic from state 3. **WalletPanelView.kt** - UI implementation: - `LaunchedEffect` watches `requestBiometricAuth` and triggers `BiometricPrompt` - Uses `BIOMETRIC_WEAK or DEVICE_CREDENTIAL` (accepts fingerprint/face/PIN) - On auth success → sends `LoadMnemonic` event - `MnemonicDisplayDialog` composable shows words in 4×6 grid - Each word shown as `"N. word"` in a chip - `FLAG_SECURE` set on dialog to prevent screenshots - Flag cleared when dialog dismissed **Commit:** `f56f124a39` - "feat: implement export recovery phrase with biometric auth" --- ## Build & Deploy - APK built successfully: `app-gplay-arm64-v8a-debug.apk` (207MB) - Served via nginx container on port 8888 - Download: `http://192.168.0.5:8888/app-gplay-arm64-v8a-debug.apk` ## Git Log ``` f56f124a39 feat: implement export recovery phrase with biometric auth c1b927380f fix: show wallet button for 2-member rooms even without isDirect flag bf3ad49bec (previous HEAD) ``` Branch `phase1-dev` pushed to Gitea.