aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-11-05 22:48:29 -0800
committerAdam Soltys <[email protected]>2024-11-05 22:48:29 -0800
commitacc3dee428f2a0e173549066c0ce611320dbc6b0 (patch)
treec73262c955642ca84df5275e588920bc226fa034
parent4bb28759a7d3e718c0e6fb85d61c8c40035a2087 (diff)
downloadcoinos-ui-acc3dee428f2a0e173549066c0ce611320dbc6b0.tar.gz
coinos-ui-acc3dee428f2a0e173549066c0ce611320dbc6b0.zip
remove generate
-rw-r--r--src/lib/nostr.ts16
-rw-r--r--src/routes/(static)/login/+page.svelte10
2 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/nostr.ts b/src/lib/nostr.ts
index f45dc811..8aea40d7 100644
--- a/src/lib/nostr.ts
+++ b/src/lib/nostr.ts
@@ -1,24 +1,24 @@
-import { browser } from "$app/environment";
-import { hexToUint8Array } from "uint8array-extras";
-import { get } from "svelte/store";
import { Buffer } from "buffer";
-import { wait, post, stretch } from "$lib/utils";
+import { browser } from "$app/environment";
import { decrypted, password as pw, passwordPrompt, pin } from "$lib/store";
+import { post, stretch, wait } from "$lib/utils";
import {
- getPublicKey,
+ type EventTemplate,
finalizeEvent,
+ getPublicKey,
nip04,
nip19,
- type EventTemplate,
} from "nostr-tools";
+import { get } from "svelte/store";
+import { hexToUint8Array } from "uint8array-extras";
import {
- encrypt as nip49encrypt,
decrypt as nip49decrypt,
+ encrypt as nip49encrypt,
} from "nostr-tools/nip49";
-import { mnemonicToEntropy, entropyToMnemonic } from "@scure/bip39";
import { bech32m } from "@scure/base";
+import { entropyToMnemonic, mnemonicToEntropy } from "@scure/bip39";
import { wordlist } from "@scure/bip39/wordlists/english";
import { generateSeedWords, privateKeyFromSeedWords } from "nostr-tools/nip06";
diff --git a/src/routes/(static)/login/+page.svelte b/src/routes/(static)/login/+page.svelte
index 80795160..3f66c4d5 100644
--- a/src/routes/(static)/login/+page.svelte
+++ b/src/routes/(static)/login/+page.svelte
@@ -50,7 +50,6 @@
let data = new FormData(this);
let user = Object.fromEntries(data);
- await generate(user);
for (let k in user) {
data.set(k, user[k]);
@@ -105,7 +104,10 @@
placeholder={$t("login.username")}
/>
- <label for="password" class="input flex items-center justify-center gap-2 w-full">
+ <label
+ for="password"
+ class="input flex items-center justify-center gap-2 w-full"
+ >
{#if revealPassword}
<input
class="clean w-full grow focus:!outline-offset-0"
@@ -136,9 +138,7 @@
</label>
<div class="flex justify-end items-center">
- <a
- href="/forgot"
- class="underline underline-offset-4 text-secondary"
+ <a href="/forgot" class="underline underline-offset-4 text-secondary"
>{$t("login.forgotUserOrPassword")}</a
>
</div>