import { useArk } from "@lume/ark"; import { useStorage } from "@lume/storage"; import { downloadDir } from "@tauri-apps/api/path"; import { message, save } from "@tauri-apps/plugin-dialog"; import { writeTextFile } from "@tauri-apps/plugin-fs"; import { relaunch } from "@tauri-apps/plugin-process"; import { useRouteError } from "react-router-dom"; interface RouteError { statusText: string; message: string; } export function ErrorScreen() { const ark = useArk(); const storage = useStorage(); const error = useRouteError() as RouteError; const restart = async () => { await relaunch(); }; const download = async () => { try { const downloadPath = await downloadDir(); const fileName = `nostr_keys_${new Date().toISOString()}.txt`; const filePath = await save({ defaultPath: `${downloadPath}/${fileName}`, }); const nsec = await storage.loadPrivkey(ark.account.pubkey); if (filePath) { if (nsec) { await writeTextFile( filePath, `Nostr account, generated by Lume (lume.nu)\nPublic key: ${ark.account.id}\nPrivate key: ${nsec}`, ); } else { await writeTextFile( filePath, `Nostr account, generated by Lume (lume.nu)\nPublic key: ${ark.account.id}`, ); } } // else { user cancel action } } catch (e) { await message(e, { title: "Cannot download account keys", type: "error", }); } }; return (

Sorry, an unexpected error has occurred.

Don't panic, your account is safe.
Here are what things you can do:

1. Try to close and re-open the app
2. Backup Nostr account
3. Report this issue to Lume
Report

{error.statusText || error.message}

4. Use another Nostr client

While waiting for Lume release the bug fixes, you always can use other Nostr clients with your account:

); }