Skip to content

Commit

Permalink
fix(setup): fresh install crashes when creating wallet (#637)
Browse files Browse the repository at this point in the history
## Issue
Application has been crashing during fresh setup because of:
```
ERROR Error loading internal wallet: No matching entry found in secure storage
```

It happens because `entry.delete_credential()?;` throws NoEntry error.:

![image](https://github.com/user-attachments/assets/9fb3759b-dda3-410c-919c-65fe979e9636)


## Solution
I just drop this error since it's expected in 99% cases 😂
  • Loading branch information
mmrrnn authored Sep 27, 2024
1 parent ae4d626 commit a901a8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src-tauri/src/internal_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl InternalWallet {
}
Err(_) => {
let passphrase = SafePassword::from(generate_password(32));
entry.delete_credential()?;
let _ = entry.delete_credential();
entry.set_password(&String::from_utf8(passphrase.reveal().clone())?)?;
passphrase
}
Expand Down

0 comments on commit a901a8d

Please sign in to comment.