Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
Fix encryption errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Sep 7, 2022
1 parent b974291 commit 61ae0eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/src/encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub fn set_entry(name: String, data: String) {
let service = "authme_dev";
let entry = keyring::Entry::new(&service, &name);

entry.set_password(data.as_str()).unwrap_or_else(|error| error.into());
entry.set_password(data.as_str()).unwrap();
}

#[tauri::command]
Expand Down
6 changes: 1 addition & 5 deletions interface/libraries/encryption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ export const generateRandomKey = async (): Promise<Buffer> => {
* Sets an entry on the system keychain
*/
export const setEntry = async (name: string, data: string) => {
const res = await invoke("set_entry", { name, data })

if (res === "error") {
dialog.message("Failed to set an entry on your systems keychain!\n\n Please try again or choose the password method!", { type: "error" })
}
await invoke("set_entry", { name, data })
}

/**
Expand Down

0 comments on commit 61ae0eb

Please sign in to comment.