From ef340a2614cc6101e4b9bbc19d491c68f95b25cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Haz=20=C3=86=2041?= <4405263+hazae41@users.noreply.github.com> Date: Wed, 4 Oct 2023 22:37:27 +0200 Subject: [PATCH] warning --- src/mods/foreground/entities/seeds/all/create/standalone.tsx | 4 ++++ .../foreground/entities/wallets/all/create/standalone.tsx | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/mods/foreground/entities/seeds/all/create/standalone.tsx b/src/mods/foreground/entities/seeds/all/create/standalone.tsx index fcdd89ef..1b716217 100644 --- a/src/mods/foreground/entities/seeds/all/create/standalone.tsx +++ b/src/mods/foreground/entities/seeds/all/create/standalone.tsx @@ -63,6 +63,8 @@ export function StandaloneSeedCreatorDialog(props: CloseProps) { return new Err(new Panic()) if (!defPhraseInput) return new Err(new Panic()) + if (!confirm("Did you backup your seed phrase?")) + return Ok.void() const seed: SeedData = { type: "mnemonic", uuid, name: defNameInput, color, emoji, mnemonic: defPhraseInput } @@ -114,6 +116,8 @@ export function StandaloneSeedCreatorDialog(props: CloseProps) { return new Err(new Panic()) if (triedEncryptedPhrase == null) return new Err(new Panic()) + if (!confirm("Did you backup your seed phrase?")) + return Ok.void() const [_, cipherBase64] = triedEncryptedPhrase.throw(t) const cipher = Base64.get().tryDecodePadded(cipherBase64).throw(t).copyAndDispose() diff --git a/src/mods/foreground/entities/wallets/all/create/standalone.tsx b/src/mods/foreground/entities/wallets/all/create/standalone.tsx index 2559cf13..1a10ec49 100644 --- a/src/mods/foreground/entities/wallets/all/create/standalone.tsx +++ b/src/mods/foreground/entities/wallets/all/create/standalone.tsx @@ -61,6 +61,8 @@ export function StandaloneWalletCreatorDialog(props: CloseProps) { return new Err(new Panic()) if (!defKeyInput.startsWith("0x")) return new Err(new Panic()) + if (!confirm("Did you backup your private key?")) + return Ok.void() const privateKeyBytes = Base16.get().tryPadStartAndDecode(defKeyInput.slice(2)).throw(t).copyAndDispose() @@ -118,6 +120,8 @@ export function StandaloneWalletCreatorDialog(props: CloseProps) { return new Err(new Panic()) if (triedEncryptedPrivateKey == null) return new Err(new Panic()) + if (!confirm("Did you backup your private key?")) + return Ok.void() const [_, cipherBase64] = triedEncryptedPrivateKey.throw(t) const cipher = Base64.get().tryDecodePadded(cipherBase64).throw(t).copyAndDispose()