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