From 6d874cc34aec02aa131db2eeb8bfd498550dd6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Fri, 29 Apr 2022 16:53:51 +0200 Subject: [PATCH] wallet: remove list_accounts_for_password --- nym-wallet/src-tauri/src/main.rs | 1 - .../src-tauri/src/operations/mixnet/account.rs | 17 ----------------- 2 files changed, 18 deletions(-) diff --git a/nym-wallet/src-tauri/src/main.rs b/nym-wallet/src-tauri/src/main.rs index dba176ab7e..0130ca496c 100644 --- a/nym-wallet/src-tauri/src/main.rs +++ b/nym-wallet/src-tauri/src/main.rs @@ -44,7 +44,6 @@ fn main() { mixnet::account::get_validator_api_urls, mixnet::account::get_validator_nymd_urls, mixnet::account::list_accounts, - mixnet::account::list_accounts_for_password, mixnet::account::logout, mixnet::account::remove_account_for_password, mixnet::account::remove_password, diff --git a/nym-wallet/src-tauri/src/operations/mixnet/account.rs b/nym-wallet/src-tauri/src/operations/mixnet/account.rs index 5709dcdf58..b75f7ef34d 100644 --- a/nym-wallet/src-tauri/src/operations/mixnet/account.rs +++ b/nym-wallet/src-tauri/src/operations/mixnet/account.rs @@ -521,23 +521,6 @@ pub async fn list_accounts( Ok(all_accounts) } -// WIP(JON): consider changing return type -#[tauri::command] -pub fn list_accounts_for_password(password: &str) -> Result, BackendError> { - // Currently we only support a single, default, id in the wallet - let id = wallet_storage::AccountId::new(DEFAULT_WALLET_ACCOUNT_ID.to_string()); - let password = wallet_storage::UserPassword::new(password.to_string()); - let login = wallet_storage::load_existing_wallet_login_information(&id, &password)?; - let ids = match login { - StoredLogin::Mnemonic(_) => vec![id.to_string()], - StoredLogin::Multiple(ref accounts) => accounts - .get_accounts() - .map(|account| account.id.to_string()) - .collect::>(), - }; - Ok(ids) -} - #[tauri::command] pub async fn sign_in_decrypted_account( account_id: &str,