diff --git a/electron/lib/cookies/chromium.ts b/electron/lib/cookies/chromium.ts index 87e1c6d..7331c2d 100644 --- a/electron/lib/cookies/chromium.ts +++ b/electron/lib/cookies/chromium.ts @@ -247,17 +247,16 @@ const decryptAES256GCM = ( return str; }; -const getWindowsDecryptor = async ( +const getWindowsDecryptor = ( profile: ChromiumProfile, -): Promise<(value: Buffer) => string> => { +): ((value: Buffer) => string) => { const localState = JSON.parse( fs.readFileSync(path.join(profile.path, "../", "Local State"), "utf-8"), ) as chromiumLocalState; const base64_key = localState.os_crypt.encrypted_key; const encryptedKey = Buffer.from(base64_key, "base64"); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - //@ts-ignore - const wp = (await import("win-protect")) as winProtect; + // eslint-disable-next-line @typescript-eslint/no-var-requires + const wp = require("win-protect") as winProtect; return (value: Buffer) => { if (value[0] == 0x76 && value[1] == 0x31 && value[2] == 0x30) { const key: Buffer = wp.decrypt(