Skip to content

Commit

Permalink
fix: aurora QR code x wallet config path (#1570)
Browse files Browse the repository at this point in the history
Description
---
- per Brian's comment on the ticket the default path for
CredentialManager didn't match up to the initial one when creating a new
wallet (matched up to use parent)

Motivation and Context
---

- Fixes: #1566

How Has This Been Tested?
---
- locally, reset and removed all .alpha files, restarted and denied
keychain access:

~~_waiting for header sync **again** for the video_~~ video is ginormous
because it includes the sync process (wanted to show denying keychain
access right in the beginning) don't think i'll get it under 10mb :(

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Enhanced the wallet configuration process with improved error handling
for passphrase retrieval, contributing to increased reliability and a
smoother wallet setup experience.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
shanimal08 authored Feb 26, 2025
1 parent 1157f51 commit e2fa40d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src-tauri/src/internal_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e2fa40d

Please sign in to comment.