Skip to content

Commit

Permalink
Merge pull request #443 from starknet-id/testnet
Browse files Browse the repository at this point in the history
MEP 13/10/2023
  • Loading branch information
fricoben authored Oct 13, 2023
2 parents 2800888 + 333b939 commit f20bcff
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const ClickablePersonhoodIcon: FunctionComponent<
const hexSessionId = "0x" + (sessionId as string).replace(/-/g, "");
setCallData(
identityChangeCalls.writeVerifierData(
process.env.NEXT_PUBLIC_VERIFIER_POP_CONTRACT as string,
tokenId,
Math.floor(Date.now() / 1000 + 15 * 60),
shortString.encodeShortString("proof_of_personhood"),
Expand Down
1 change: 1 addition & 0 deletions pages/discord.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const Discord: NextPage = () => {

setCalls(
identityChangeCalls.writeVerifierData(
process.env.NEXT_PUBLIC_VERIFIER_CONTRACT as string,
tokenId,
(signRequestData as DiscordSignRequestData).timestamp,
"discord",
Expand Down
1 change: 1 addition & 0 deletions pages/github.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const Github: NextPage = () => {

setCalls(
identityChangeCalls.writeVerifierData(
process.env.NEXT_PUBLIC_VERIFIER_CONTRACT as string,
tokenId,
(signRequestData as SignRequestData).timestamp,
"github",
Expand Down
1 change: 1 addition & 0 deletions pages/twitter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const Twitter: NextPage = () => {

setCalls(
identityChangeCalls.writeVerifierData(
process.env.NEXT_PUBLIC_VERIFIER_CONTRACT as string,
tokenId,
(signRequestData as SignRequestData).timestamp,
"twitter",
Expand Down
3 changes: 2 additions & 1 deletion utils/callData/identityChangeCalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import { Call } from "starknet";
import { stringToHex } from "../feltService";

function writeVerifierData(
contractAddress: string,
tokenId: string,
timestamp: number,
dataType: string,
dataToWrite: string | number,
signatures: string[]
): Call {
return {
contractAddress: process.env.NEXT_PUBLIC_VERIFIER_CONTRACT as string,
contractAddress,
entrypoint: "write_confirmation",
calldata: [
tokenId,
Expand Down

1 comment on commit f20bcff

@vercel
Copy link

@vercel vercel bot commented on f20bcff Oct 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.