Improve code splitting

This commit is contained in:
2025-09-24 15:18:30 +03:00
Unverified
parent 9dc534736d
commit f98b91ea3c
4 changed files with 17 additions and 54 deletions
+2 -2
View File
@@ -90,7 +90,7 @@ export async function ensureKeysOnLogin(password: string, token: string): Promis
currentPublicKey = serverPub;
} else {
// We don't have the corresponding public key from server; regenerate pair to resync
const pair = generateX25519KeyPair();
const pair = await generateX25519KeyPair();
currentPublicKey = pair.publicKey;
currentPrivateKey = pair.privateKey;
await uploadPublicKey(currentPublicKey, token);
@@ -107,7 +107,7 @@ export async function ensureKeysOnLogin(password: string, token: string): Promis
}
// First-time setup: generate keys and upload
const pair = generateX25519KeyPair();
const pair = await generateX25519KeyPair();
currentPublicKey = pair.publicKey;
currentPrivateKey = pair.privateKey;
await uploadPublicKey(currentPublicKey, token);