Skip to content

Commit

Permalink
display ticket secret in qr code for devcon 7 in pod ticket and eddsa…
Browse files Browse the repository at this point in the history
… ticket UIs (#1900)
  • Loading branch information
ichub authored and rrrliu committed Sep 27, 2024
1 parent f9858e6 commit 6e1e026
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
3 changes: 2 additions & 1 deletion packages/ui/eddsa-ticket-pcd-ui/src/TicketQR.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export function TicketQR({
if (
[
"53edb3e7-6733-41e0-a9be-488877c5c572", // eth berlin
"508313ea-f16b-4729-bdf0-281c64493ca9" // eth prague
"508313ea-f16b-4729-bdf0-281c64493ca9", // eth prague
"5074edf5-f079-4099-b036-22223c0c6995" // devcon 7
].includes(pcd.claim.ticket.eventId) &&
pcd.claim.ticket.ticketSecret
) {
Expand Down
25 changes: 17 additions & 8 deletions packages/ui/pod-ticket-pcd-ui/src/CardBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,28 @@ function TicketQR({
idBasedVerifyURL: string;
}): JSX.Element {
const generate = useCallback(async () => {
console.log(
linkToTicket(
idBasedVerifyURL,
pcd.claim.ticket.ticketId,
pcd.claim.ticket.eventId
)
);
if (
[
"53edb3e7-6733-41e0-a9be-488877c5c572", // eth berlin
"508313ea-f16b-4729-bdf0-281c64493ca9", // eth prague
"5074edf5-f079-4099-b036-22223c0c6995" // devcon 7
].includes(pcd.claim.ticket.eventId) &&
pcd.claim.ticket.ticketSecret
) {
return pcd.claim.ticket.ticketSecret;
}

return linkToTicket(
idBasedVerifyURL,
pcd.claim.ticket.ticketId,
pcd.claim.ticket.eventId
);
}, [idBasedVerifyURL, pcd.claim.ticket.eventId, pcd.claim.ticket.ticketId]);
}, [
idBasedVerifyURL,
pcd.claim.ticket.eventId,
pcd.claim.ticket.ticketId,
pcd.claim.ticket.ticketSecret
]);

return (
<QRDisplayWithRegenerateAndStorage
Expand Down

0 comments on commit 6e1e026

Please sign in to comment.