diff --git a/src/components/Logs.tsx b/src/components/Logs.tsx index ec31ab9..bd53cee 100644 --- a/src/components/Logs.tsx +++ b/src/components/Logs.tsx @@ -1,15 +1,7 @@ import { MutinyWallet } from "@mutinywallet/mutiny-wasm"; import { createSignal, Show } from "solid-js"; -import { - Button, - InfoBox, - InnerCard, - NiceP, - SimpleDialog, - TextField, - VStack -} from "~/components"; +import { Button, InfoBox, InnerCard, NiceP, VStack } from "~/components"; import { useI18n } from "~/i18n/context"; import { downloadTextFile, eify } from "~/utils"; @@ -18,13 +10,11 @@ export function Logs() { // Create state for errors, password and dialog visibility const [error, setError] = createSignal(); - const [exportDecrypt, setExportDecrypt] = createSignal(false); - const [password, setPassword] = createSignal(); async function handleSave() { try { setError(undefined); - const logs = await MutinyWallet.get_logs(password()); // Use password if required + const logs = await MutinyWallet.get_logs(); await downloadTextFile( logs.join("") || "", "mutiny-logs.txt", @@ -32,26 +22,10 @@ export function Logs() { ); } catch (e) { console.error(e); - const err = eify(e); - if (err.message === "Incorrect password entered.") { - setExportDecrypt(true); - } else { - setError(err); - } + setError(eify(e)); } } - function savePassword(e: Event) { - e.preventDefault(); - handleSave(); - setPassword(undefined); // clear password after use - setExportDecrypt(false); // close the dialog - } - - function noop() { - // noop - } - return ( @@ -65,33 +39,6 @@ export function Logs() { {error()?.message} - -
-
- setPassword(e.currentTarget.value)} - error={""} - onBlur={noop} - onChange={noop} - /> - - {error()?.message} - - -
-
-
); }