From f159fc4b55dae6843890c3cd0981bcf424ff571d Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 16 Feb 2026 16:10:51 -0800 Subject: fix getpublickey --- src/components/AppForm.svelte | 57 +++++++++++-------------------------------- 1 file changed, 14 insertions(+), 43 deletions(-) (limited to 'src') diff --git a/src/components/AppForm.svelte b/src/components/AppForm.svelte index 25baad88..97472720 100644 --- a/src/components/AppForm.svelte +++ b/src/components/AppForm.svelte @@ -17,17 +17,7 @@ PUBLIC_COINOS_RELAY as relayUrl, } from "$env/static/public"; - let { - rate, - user, - name, - max_fee, - max_amount, - budget_renewal, - pubkey, - secret, - notify, - } = $props(); + let { rate, user, name, max_fee, max_amount, budget_renewal, pubkey, secret, notify } = $props(); let { currency } = $derived(user); onMount(() => { @@ -36,8 +26,9 @@ }); let generate = () => { - secret = bytesToHex(randomBytes(32)); - pubkey = getPublicKey(secret); + let secretBytes = randomBytes(32); + secret = bytesToHex(secretBytes); + pubkey = getPublicKey(secretBytes); }; let lud16 = $derived(`${user.username}@${$page.url.host}`); @@ -95,9 +86,7 @@ />
- + @@ -118,22 +105,10 @@
- +
-