Skip to content

Commit

Permalink
warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hazae41 committed Oct 4, 2023
1 parent f586f0e commit ef340a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mods/foreground/entities/seeds/all/create/standalone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit ef340a2

Please sign in to comment.