From e01964df39349bbd9698d126285328f46e5fd929 Mon Sep 17 00:00:00 2001 From: Shannon Tenner Date: Tue, 25 Feb 2025 17:31:57 +0200 Subject: [PATCH] fix: use parent for creds path --- src-tauri/src/internal_wallet.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/internal_wallet.rs b/src-tauri/src/internal_wallet.rs index ddf7eccae..1dfc653ee 100644 --- a/src-tauri/src/internal_wallet.rs +++ b/src-tauri/src/internal_wallet.rs @@ -139,7 +139,12 @@ impl InternalWallet { Some(p) => p.clone(), None => return Err(anyhow!("No config path found")), }; - let passphrase = CredentialManager::default_with_dir(path) + + let path_parent = path + .parent() + .ok_or_else(|| anyhow!("Failed to get parent directory of wallet config file"))?; + + let passphrase = CredentialManager::default_with_dir(path_parent.to_path_buf()) .get_credentials()? .tari_seed_passphrase;