diff --git a/apps/dashboard/package.json b/apps/dashboard/package.json index 22fde123..a7755886 100644 --- a/apps/dashboard/package.json +++ b/apps/dashboard/package.json @@ -18,7 +18,7 @@ "@emotion/styled": "^11.10.6", "@fontsource-variable/unbounded": "^5.0.5", "@rainbow-me/rainbowkit": "^0.12.8", - "@semaphore-protocol/data": "patch:@semaphore-protocol/data@npm%3A3.10.0#~/.yarn/patches/@semaphore-protocol-data-npm-3.10.0-48e6c0f59e.patch", + "@semaphore-protocol/data": "4.0.3", "ethers": "5.5.1", "framer-motion": "^10.0.1", "react": "^18.2.0", diff --git a/apps/dashboard/src/components/add-member-modal.tsx b/apps/dashboard/src/components/add-member-modal.tsx index cb4ce993..6fd5ed9a 100644 --- a/apps/dashboard/src/components/add-member-modal.tsx +++ b/apps/dashboard/src/components/add-member-modal.tsx @@ -132,7 +132,7 @@ ${memberIds.join("\n")} try { const semaphore = getSemaphoreContract("sepolia", signer as any) - await semaphore.addMembers(group.name, memberIds) + await semaphore.addMembers(group.id, memberIds) setIsLoading(false) onClose(memberIds) diff --git a/apps/dashboard/src/components/group-card.tsx b/apps/dashboard/src/components/group-card.tsx index 92d12f99..ed8b3860 100644 --- a/apps/dashboard/src/components/group-card.tsx +++ b/apps/dashboard/src/components/group-card.tsx @@ -57,8 +57,14 @@ export default function GroupCard({ ? icon2Image : icon1Image } - filter={treeDepth ? "inherit" : "grayscale(100%)"} - opacity={treeDepth ? "inherit" : ".4"} + filter={ + treeDepth || type === "on-chain" + ? "inherit" + : "grayscale(100%)" + } + opacity={ + treeDepth || type === "on-chain" ? "inherit" : ".4" + } htmlWidth="35px" alt="Bandada icon" /> diff --git a/apps/dashboard/src/components/new-group-stepper/final-preview-step.tsx b/apps/dashboard/src/components/new-group-stepper/final-preview-step.tsx index 02a28704..549added 100644 --- a/apps/dashboard/src/components/new-group-stepper/final-preview-step.tsx +++ b/apps/dashboard/src/components/new-group-stepper/final-preview-step.tsx @@ -1,4 +1,3 @@ -import { formatBytes32String } from "@ethersproject/strings" import { getSemaphoreContract } from "@bandada/utils" import { Box, Button, Heading, HStack, VStack } from "@chakra-ui/react" import { useCallback, useState } from "react" @@ -28,9 +27,13 @@ export default function FinalPreviewStep({ const semaphore = getSemaphoreContract("sepolia", signer as any) const admin = await signer.getAddress() - await semaphore.createGroup(group.name, group.treeDepth, admin) + const receipt = await semaphore.createGroup(admin) + + const groupIdBigNumber = + receipt.events?.[0]?.args?.[0].toString() + + const groupId = groupIdBigNumber.toString() - const groupId = BigInt(formatBytes32String(group.name)) navigate(`/groups/on-chain/${groupId}`) } catch (error) { setLoading(false) @@ -98,7 +101,7 @@ export default function FinalPreviewStep({ Back