4 KiB
SSSS Wallet Backup Round-Trip Test Results
Date: 2026-03-29
Tester: Kayos (subagent)
Build: phase1-dev @ 75edbd5499
Summary
✅ Backup to SSSS: PASSED
⚠️ Restore from SSSS: INCOMPLETE (needs delete wallet implementation)
Test Environment
- Emulator: Samsung Galaxy S10 (Android 14)
- Container: android-emulator on Lucy
- Account: @testbot-elementx:sulkta.com
- Network: Preprod Testnet
Wallet Under Test
- Mnemonic: (stored in
/root/.openclaw/workspace/memory/wallet-mnemonic.txt) - Expected Address:
addr_test1qzl3rfpsnejf5wjey74yxz8jzduqzxfq3ze6xsgfcrrt03dlmpn40atetazzuywm6eseptz3eh9z7y7tevgtmujwy3ussnvev7 - Verified: ✅ Address matches
Backup Test (Step 3)
UI Flow
- Opened wallet panel via DM room → wallet icon
- Navigated to Settings tab
- Tapped "Backup to Matrix" button (NEW)
- Entered recovery key:
b4a67d93602ec7741b743839c00c9cec902d8f709c6e22df98124606249e07b0 - Tapped "Backup" button
Result
✅ SUCCESS
Logcat output:
elementx: Wallet seed backed up to SSSS | WalletBackupServiceImpl.kt:37
elementx: Wallet backed up to SSSS successfully | WalletPanelPresenter.kt:176
Verification
Matrix account data stored at com.sulkta.cardano.wallet_seed:
{
"encrypted": {
"5b8ac89548308c51": {
"iv": "PgPZ2DjObIJfdXVCa+diag",
"ciphertext": "y1QvCtCJ+6WLmOLJTASU9zy5wuwIJveKNftS8hn9WuUvnudz6ICtwZFUbOPZpvpio3uq412L6BEWZd3Q3kIOfZT9RQhtCSTZFWOImOOrrigxdSx+MXxjIgqm+kc4zL8OLRLSbGYRamFSx6wXPEAzp+/V5vGD0IfsTOGzyGGg5tWcNxqHcmoNy9YTnBOGvafbCEBa3BPFYr86zIe3OPUB",
"mac": "1ML2/NUoK6+Lm6MhwW6OOrtQ+g1nq0pExv78e2T5ruc"
}
}
}
- Key ID
5b8ac89548308c51matches expected recovery key ID ✅ - Ciphertext is properly encrypted with SSSS ✅
- MAC present for integrity verification ✅
Delete/Restore Test (Steps 4-5)
Blocker
The "Delete Wallet" button doesn't trigger a confirmation dialog or actual deletion in the current implementation. The event handler has placeholder comments:
WalletPanelEvent.DeleteWallet -> {
// Show confirmation dialog - handled elsewhere
}
What's Needed
- Implement delete confirmation dialog in WalletPanelView
- Add actual delete logic in presenter (call
keyStorage.deleteWallet()) - Detect existing SSSS backup on setup screen to offer restore option
Code Changes Made
Files Modified/Created
-
WalletPanelState.kt - Added backup state properties:
showBackupDialog: BooleanbackupMode: BackupModebackupInProgress: BooleanbackupError: String?backupSuccess: String?
-
WalletPanelEvent.kt - Added backup events:
ShowBackupDialogShowRestoreDialogDismissBackupDialogConfirmBackup(recoveryKey: String)ConfirmRestore(recoveryKey: String)ClearBackupMessage
-
WalletPanelPresenter.kt - Added backup handling:
- Injected
WalletBackupServiceandCardanoKeyStorage - Implemented backup flow with key normalization
- Implemented restore flow (untested due to delete blocker)
- Injected
-
WalletPanelView.kt - Added:
BackupRecoveryKeyDialogcomposable- Dialog shows when
state.showBackupDialog == true
-
SettingsTabView.kt - Added:
- "Backup to Matrix" button with Cloud icon
onBackupToMatrixcallback
-
strings.xml - Added backup-related strings
Commit
feat(wallet): Add SSSS backup functionality
75edbd5499 on phase1-dev
Fresh APK Available
URL: http://192.168.0.5:8888/app-fdroid-arm64-v8a-debug.apk
Size: 220MB (arm64)
Next Steps
- Implement Delete Wallet - Add confirmation dialog and actual deletion
- Implement Restore Detection - Check for SSSS backup on wallet setup screen, offer restore option
- Test Full Round-Trip - Delete wallet → Restore from SSSS → Verify address matches
- Edge Cases - Test with wrong recovery key, corrupted backup, etc.
Screenshots
Final state: Settings tab showing "Backup to Matrix" button after successful backup.