Skip to content

Commit

Permalink
Modified 0n literal for BigInt(0)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcvelmer committed Aug 11, 2023
1 parent fd7a87f commit be99c3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/zk/ff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const q: bigint = BigInt('218882428718392752222464057452572750885483644004160343

export function bigIntToFF(bi: bigint): bigint {
if (bi == q) {
return 0n;
} else if (bi < q && bi != 0n) {
return BigInt(0);
} else if (bi < q && bi != BigInt(0)) {
return bi;
}
return bi % q;
Expand Down

0 comments on commit be99c3e

Please sign in to comment.