From a901a8d815246825d895eddd9c392f8d6eff6838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Papie=C5=BC?= Date: Fri, 27 Sep 2024 13:22:12 +0200 Subject: [PATCH] fix(setup): fresh install crashes when creating wallet (#637) ## 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 :joy: --- src-tauri/src/internal_wallet.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/src/internal_wallet.rs b/src-tauri/src/internal_wallet.rs index 3130eab73..b3e1b5a86 100644 --- a/src-tauri/src/internal_wallet.rs +++ b/src-tauri/src/internal_wallet.rs @@ -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 }