Clean up the code

This commit is contained in:
2025-09-06 12:33:57 +03:00
Unverified
parent c88015ae39
commit 27666594ff
35 changed files with 28 additions and 2390 deletions
+3 -5
View File
@@ -1,7 +1,7 @@
import { API_BASE_URL } from "../core/config";
import { getAuthHeaders } from "./api";
import { generateX25519KeyPair } from "../crypto/asymmetric";
import { encryptBackupWithPassword, decryptBackupWithPassword, encodeBlob, decodeBlob } from "../crypto/backup";
import { generateX25519KeyPair } from "../utils/crypto/asymmetric";
import { encryptBackupWithPassword, decryptBackupWithPassword, encodeBlob, decodeBlob } from "../utils/crypto/backup";
import { b64, ub64 } from "../utils/utils";
import type { BackupBlob, UploadPublicKeyRequest } from "../core/types";
@@ -97,6 +97,4 @@ export async function ensureKeysOnLogin(password: string, token: string): Promis
const encBlob = await encryptBackupWithPassword(password, { version: 1, privateKey: currentPrivateKey });
await uploadBackupBlob(encodeBlob(encBlob), token);
return { publicKey: currentPublicKey, privateKey: currentPrivateKey };
}
}