Skip to content

Commit

Permalink
added EAS
Browse files Browse the repository at this point in the history
  • Loading branch information
KENILSHAHH committed Jun 30, 2024
1 parent b811d51 commit cf7d921
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/nextjs/app/api/orchestrator/[frameId]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ async function getResponse(req: NextRequest): Promise<NextResponse> {
const frameId = url.replace(`/api/orchestrator`, "");
const body = await req.json();
console.log("body", body);
if (body.untrustedData?.buttonIndex != "") {
const txnId = body.untrustedData?.transactionId;
const attestation = await createAttestation(txnId);
return new NextResponse(JSON.stringify({ message: "Attestation Created", attestation }), { status: 200 });
}
const state = JSON.parse(decodeURIComponent(body.untrustedData?.state as string));
let stateUpdate
if (state) {
Expand Down

0 comments on commit cf7d921

Please sign in to comment.