feat(wallet): complete SSSS round-trip with delete and restore
Delete Wallet feature: - Add showDeleteConfirmation state to WalletPanelState - Add WalletDeleteConfirmationDialog composable with warning - Non-dismissible dialog with clear warning about backup - Wire DeleteWallet/ConfirmDeleteWallet/CancelDeleteWallet events - Call keyStorage.deleteWallet() and clear wallet state on confirm - Panel shows setup screen after deletion Restore from SSSS feature: - Add hasBackupWithoutKey() to WalletBackupService for checking backup existence - Uses raw Matrix account data API to check if secret key exists - Add RESTORE_FROM_CLOUD step to SetupStep enum - Check for cloud backup on setup init (non-blocking) - Show "Restore from Matrix Backup" button when backup exists - Add recovery key input flow for cloud restore - Restore decrypts mnemonic from SSSS and imports wallet Both features enable complete wallet backup/restore round-trip via Matrix SSSS.
This commit is contained in:
parent
75edbd5499
commit
da589ae78f
11 changed files with 489 additions and 28 deletions
|
|
@ -46,4 +46,14 @@ interface WalletBackupService {
|
|||
* @return True if a backup exists, false otherwise
|
||||
*/
|
||||
suspend fun hasBackup(recoveryKey: String): Result<Boolean>
|
||||
|
||||
/**
|
||||
* Check if a wallet backup exists in account data WITHOUT decrypting.
|
||||
*
|
||||
* This checks the raw Matrix account data to see if the secret key exists,
|
||||
* without needing the recovery key. Useful for UI to show restore option.
|
||||
*
|
||||
* @return True if the account data key exists, false otherwise
|
||||
*/
|
||||
suspend fun hasBackupWithoutKey(): Result<Boolean>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue