forked from coracle/flotilla
Fix incorrect secret being downloaded
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
import {nsecEncode} from "nostr-tools/nip19"
|
||||
import {encrypt} from "nostr-tools/nip49"
|
||||
import {hexToBytes} from "@welshman/lib"
|
||||
import {makeSecret} from "@welshman/util"
|
||||
import {preventDefault, downloadText} from "@lib/html"
|
||||
import Key from "@assets/icons/key-minimalistic.svg?dataurl"
|
||||
import ArrowDown from "@assets/icons/arrow-down.svg?dataurl"
|
||||
@@ -17,13 +16,12 @@
|
||||
import {PLATFORM_NAME} from "@app/core/state"
|
||||
|
||||
type Props = {
|
||||
secret: string
|
||||
next: () => unknown
|
||||
submitText?: string
|
||||
}
|
||||
|
||||
const {next, submitText = "Continue"}: Props = $props()
|
||||
|
||||
const secret = makeSecret()
|
||||
const {secret, next, submitText = "Continue"}: Props = $props()
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
profile: Profile
|
||||
}
|
||||
|
||||
const props: Props = $props()
|
||||
const {secret, profile}: Props = $props()
|
||||
|
||||
const next = () => pushModal(SignUpComplete, props)
|
||||
const next = () => pushModal(SignUpComplete, {secret, profile})
|
||||
</script>
|
||||
|
||||
<KeyDownload {next} />
|
||||
<KeyDownload {secret} {next} />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import type {Profile} from "@welshman/util"
|
||||
import {makeProfile} from "@welshman/util"
|
||||
import {makeProfile, makeSecret} from "@welshman/util"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import AltArrowRight from "@assets/icons/alt-arrow-right.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
@@ -18,6 +18,7 @@
|
||||
const {flow}: Props = $props()
|
||||
|
||||
const initialValues = {
|
||||
secret: makeSecret(),
|
||||
profile: makeProfile(),
|
||||
shouldBroadcast: false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user