Skip to content

Commit

Permalink
Merge pull request #336 from privacy-scaling-explorations/ref/ux-crea…
Browse files Browse the repository at this point in the history
…te-group

Improve ux when creating a group
  • Loading branch information
vplasencia authored Nov 29, 2023
2 parents c990ac3 + 88312af commit f0de319
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
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"
Expand Down Expand Up @@ -29,7 +30,8 @@ export default function FinalPreviewStep({

await semaphore.createGroup(group.name, group.treeDepth, admin)

navigate("/groups")
const groupId = BigInt(formatBytes32String(group.name))
navigate(`/groups/on-chain/${groupId}`)
} catch (error) {
setLoading(false)
alert(
Expand All @@ -53,8 +55,7 @@ export default function FinalPreviewStep({

return
}

navigate("/groups")
navigate(`/groups/off-chain/${response.id}`)
}
}, [group, signer, navigate])

Expand Down

0 comments on commit f0de319

Please sign in to comment.