We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e83ddf commit d998206Copy full SHA for d998206
scripts/generateKeys.ts
@@ -1,17 +1,14 @@
1
import { writeFile } from "node:fs/promises";
2
-import { dirname, join } from "node:path";
3
-import { fileURLToPath } from "node:url";
+import { join } from "node:path";
4
import { generatePrivateKey } from "viem/accounts";
5
import { generateEncryptionKeyHex } from "@/helpers";
6
7
-const __dirname = dirname(fileURLToPath(import.meta.url));
8
-
9
console.log("Generating keys...");
10
11
const walletKey = generatePrivateKey();
12
const encryptionKeyHex = generateEncryptionKeyHex();
13
14
-const filePath = join(".", ".env");
+const filePath = join(process.cwd(), ".env");
15
16
await writeFile(
17
filePath,
0 commit comments