diff --git a/packages/app/src/pages/MainPage.tsx b/packages/app/src/pages/MainPage.tsx index 1ac3b02..5fa5eba 100644 --- a/packages/app/src/pages/MainPage.tsx +++ b/packages/app/src/pages/MainPage.tsx @@ -4,12 +4,11 @@ import { useMount, useUpdateEffect } from "react-use"; import styled from "styled-components"; import _ from "lodash"; import { useAccount, useContractWrite, usePrepareContractWrite } from "wagmi"; -import { rawEmailToBuffer } from "@zk-email/helpers/dist/input-helpers"; import { downloadProofFiles, generateProof, verifyProof, -} from "@zk-email/helpers/dist/zkp"; +} from "@zk-email/helpers/dist/chunked-zkey"; import { abi } from "../abi.json"; import { generateTwitterVerifierCircuitInputs, @@ -431,15 +430,13 @@ export const MainPage: React.FC<{}> = (props) => { status !== "proof-files-downloaded-successfully" } onClick={async () => { - const emailBuffer = rawEmailToBuffer(emailFull); // Cleaned email as buffer - let input: ITwitterCircuitInputs; try { setDisplayMessage("Generating proof..."); setStatus("generating-input"); input = await generateTwitterVerifierCircuitInputs( - emailBuffer, + Buffer.from(emailFull), ethereumAddress ); diff --git a/packages/circuits/tests/twitter.test.ts b/packages/circuits/tests/twitter.test.ts index 22dc2f8..6253740 100644 --- a/packages/circuits/tests/twitter.test.ts +++ b/packages/circuits/tests/twitter.test.ts @@ -1,7 +1,7 @@ import { buildPoseidon } from "circomlibjs"; import { verifyDKIMSignature } from "@zk-email/helpers/dist/dkim"; import { generateTwitterVerifierCircuitInputs } from "../helpers"; -import { bigIntToChunkedBytes, bytesToBigInt, packedNBytesToString } from "@zk-email/helpers/dist/binaryFormat"; +import { bigIntToChunkedBytes, bytesToBigInt, packedNBytesToString } from "@zk-email/helpers/dist/binary-format"; const path = require("path"); const fs = require("fs");