diff --git a/src/app/components/KeyDownload.svelte b/src/app/components/KeyDownload.svelte index a9909f7b..b30c0ea5 100644 --- a/src/app/components/KeyDownload.svelte +++ b/src/app/components/KeyDownload.svelte @@ -95,8 +95,6 @@ try { await downloadText("Nostr Secret Key.txt", cleanupCopy(instructions)) - - didDownload = true } catch (e) { // Dismissing the native share sheet rejects with "Share canceled" — leave // the flow gated so the user can try again rather than showing an error. @@ -104,6 +102,8 @@ pushToast({theme: "error", message: "We couldn't save your key. Please try again."}) } } + + didDownload = true } const onPasswordChange = () => { diff --git a/src/app/components/QRCode.svelte b/src/app/components/QRCode.svelte index a792dc49..af21fe0e 100644 --- a/src/app/components/QRCode.svelte +++ b/src/app/components/QRCode.svelte @@ -13,7 +13,7 @@ const copy = () => clip(code) $effect(() => { - if (canvas && code) { + if (canvas && wrapper && code) { QRCode.toCanvas(canvas, code) } })