diff --git a/nym-wallet/src-tauri/src/wallet_storage/account_data.rs b/nym-wallet/src-tauri/src/wallet_storage/account_data.rs index 79daa7e111..dddb114cbb 100644 --- a/nym-wallet/src-tauri/src/wallet_storage/account_data.rs +++ b/nym-wallet/src-tauri/src/wallet_storage/account_data.rs @@ -99,6 +99,14 @@ impl StoredWallet { pub fn password_can_decrypt_all(&self, password: &UserPassword) -> bool { self.decrypt_all(password).is_ok() } + + pub fn try_decrypt_all(&self, password: &UserPassword) -> Vec { + self + .accounts + .iter() + .filter_map(|account| account.account.decrypt_struct(password).ok()) + .collect() + } } impl Default for StoredWallet {