2.8 KiB
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:
// 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:
-
WalletPanelState.kt - Added state fields:
requestBiometricAuth: Boolean- triggers biometric promptshowMnemonicDialog: Boolean- shows the mnemonic displaymnemonicWords: List<String>?- the 24 wordsmnemonicError: String?- error message if retrieval fails- New events:
LoadMnemonic,CancelBiometricAuth,DismissMnemonicDialog
-
WalletPanelPresenter.kt - Event handling:
ExportRecoveryPhrase→ setsrequestBiometricAuth = trueLoadMnemonic→ callswalletManager.getMnemonic()and shows dialog on successDismissMnemonicDialog→ clears mnemonic from state
-
WalletPanelView.kt - UI implementation:
LaunchedEffectwatchesrequestBiometricAuthand triggersBiometricPrompt- Uses
BIOMETRIC_WEAK or DEVICE_CREDENTIAL(accepts fingerprint/face/PIN) - On auth success → sends
LoadMnemonicevent MnemonicDisplayDialogcomposable shows words in 4×6 grid- Each word shown as
"N. word"in a chip FLAG_SECUREset 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.