We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 097e8b1 + 1a6e26b commit 3079d0aCopy full SHA for 3079d0a
packages/proof/src/get-snark-artifacts.node.ts
@@ -8,11 +8,7 @@ export default async function getSnarkArtifacts(treeDepth: number): Promise<Snar
8
const tmpDir = "semaphore-proof"
9
const tmpPath = `${tmp.tmpdir}/${tmpDir}-${treeDepth}`
10
11
- if (!fs.existsSync(tmpPath)) {
12
- tmp.dirSync({ name: `${tmpDir}-${treeDepth}` })
13
- }
14
-
15
- if (fs.readdirSync(tmpPath).length !== 2) {
+ if (!fs.existsSync(tmpPath) || fs.readdirSync(tmpPath).length !== 2) {
16
await download(`https://semaphore.cedoor.dev/artifacts/${treeDepth}/semaphore.wasm`, tmpPath)
17
await download(`https://semaphore.cedoor.dev/artifacts/${treeDepth}/semaphore.zkey`, tmpPath)
18
}
0 commit comments