Skip to content

Commit

Permalink
fix: simpler error type and added TODO (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipHarald authored Aug 25, 2023
1 parent c018136 commit 6aed92c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/nextjs/pages/example-zk/GenerateProof.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,8 @@ export const GenerateProof = ({ requiredBirthYear }: { requiredBirthYear: number
try {
const { proof } = await generateProof("LessThenSignedAge", parsedForm as ParsedArgs);
setProof(proof);
} catch (e) {
if (e instanceof Error) {
console.error(e.stack);
} else {
console.error(`Unknown error: ${e}`);
}
} catch (e: any) {
console.error(e.stack);
}
};
return (
Expand Down
2 changes: 2 additions & 0 deletions packages/nextjs/utils/noir/circuit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import circuitData from "~~/generated/circuits.json";

// TODO: the types here needs some work to work in a more general context.

type KindInteger = {
kind: "integer";
sign: "signed" | "unsigned";
Expand Down

0 comments on commit 6aed92c

Please sign in to comment.