Skip to content

Commit

Permalink
fix: union type error
Browse files Browse the repository at this point in the history
  • Loading branch information
neel-ds committed Mar 28, 2024
1 parent de3eab5 commit c8fe967
Show file tree
Hide file tree
Showing 18 changed files with 867 additions and 93 deletions.
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"querystring": "^0.2.1",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.2.0",
"siwe": "^1.1.6",
"siwe": "^2.1.4",
"sqlite3": "^5.1.4",
"typeorm": "^0.3.12",
"uuid": "^9.0.0"
Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/app/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export class AuthService {
expectedNonce: string
) {
const siweMessage = new SiweMessage(message)
const { address, statement, domain, nonce } =
await siweMessage.validate(signature)
const { data } = await siweMessage.verify({ signature })
const { address, domain, statement, nonce } = data

if (nonce !== expectedNonce) {
throw new UnprocessableEntityException("Invalid nonce")
Expand Down
1 change: 1 addition & 0 deletions apps/client/src/pages/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export default function HomePage(): JSX.Element {
)

return (
// @ts-ignore --Expression produces a union type that is too complex to represent. This patch will be fixed.
<Container maxW="container.md" pt="20" pb="20" px="8" centerContent>
<VStack spacing="20" pb="30px" w="100%">
<HStack mb="60px" justify="space-between" w="100%">
Expand Down
9 changes: 6 additions & 3 deletions apps/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,24 @@
},
"devDependencies": {
"@nomicfoundation/hardhat-chai-matchers": "^2.0.6",
"@nomicfoundation/hardhat-ethers": "^3.0.0",
"@nomicfoundation/hardhat-ethers": "^3.0.5",
"@nomicfoundation/hardhat-ignition": "^0.15.0",
"@nomicfoundation/hardhat-ignition-ethers": "^0.15.0",
"@nomicfoundation/hardhat-network-helpers": "^1.0.10",
"@nomicfoundation/hardhat-toolbox": "^5.0.0",
"@nomicfoundation/hardhat-verify": "^2.0.5",
"@nomicfoundation/ignition-core": "^0.15.0",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@nomiclabs/hardhat-etherscan": "^3.1.8",
"@semaphore-protocol/group": "3.9.0",
"@semaphore-protocol/identity": "3.9.0",
"@semaphore-protocol/proof": "3.9.0",
"@typechain/ethers-v6": "^0.5.1",
"@typechain/hardhat": "^6.1.2",
"@typechain/hardhat": "^9.1.0",
"@types/chai": "^4.3.14",
"@types/mocha": "^10.0.6",
"@types/node": ">=12.0.0",
"chai": "^5.1.0",
"chai": "4.3.7",
"dotenv": "^16.0.3",
"ethers": "^6.11.1",
"hardhat": "^2.22.2",
Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/.env.local
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ VITE_CLIENT_URL=http://localhost:3002
VITE_CLIENT_INVITES_URL=http://localhost:3002?inviteCode=\
VITE_ETHEREUM_NETWORK=sepolia
VITE_GITHUB_CLIENT_ID=a83a8b014ef38270fb22
VITE_PROJECT_ID=bandada
VITE_TWITTER_CLIENT_ID=NV82Mm85NWlSZ1llZkpLMl9vN3A6MTpjaQ
VITE_TWITTER_REDIRECT_URI=http://localhost:3001/credentials
1 change: 1 addition & 0 deletions apps/dashboard/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ VITE_CLIENT_URL=https://client.bandada.pse.dev
VITE_CLIENT_INVITES_URL=https://client.bandada.pse.dev?inviteCode=\
VITE_ETHEREUM_NETWORK=sepolia
VITE_GITHUB_CLIENT_ID=6ccd7b93e84260e353f9
VITE_PROJECT_ID=bandada
VITE_TWITTER_CLIENT_ID=NV82Mm85NWlSZ1llZkpLMl9vN3A6MTpjaQ
VITE_TWITTER_REDIRECT_URI=https://bandada.pse.dev/credentials
1 change: 1 addition & 0 deletions apps/dashboard/.env.staging
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ VITE_CLIENT_URL=https://client-staging.bandada.pse.dev
VITE_CLIENT_INVITES_URL=https://client-staging.bandada.pse.dev?inviteCode=\
VITE_ETHEREUM_NETWORK=sepolia
VITE_GITHUB_CLIENT_ID=6ccd7b93e84260e353f9
VITE_PROJECT_ID=bandada
VITE_TWITTER_CLIENT_ID=NV82Mm85NWlSZ1llZkpLMl9vN3A6MTpjaQ
VITE_TWITTER_REDIRECT_URI=https://staging.bandada.pse.dev/credentials
3 changes: 3 additions & 0 deletions apps/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<link rel="icon" type="image/x-icon" href="./src/assets/favicon.ico" />
</head>
<body>
<script>
var global = global || window
</script>
<div id="root"></div>
<script type="module" src="./src/main.tsx"></script>
</body>
Expand Down
7 changes: 4 additions & 3 deletions apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@
"react-dom": "^18.2.0",
"react-icons": "^4.10.1",
"react-router-dom": "^6.8.1",
"siwe": "^1.1.6",
"siwe": "^2.1.4",
"viem": "2.x",
"wagmi": "^2.5.12"
},
"devDependencies": {
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@vitejs/plugin-react": "^3.1.0",
"@vitejs/plugin-react": "^4.2.1",
"typescript": "^5.4.3",
"vite": "^4.1.0"
"vite": "^5.2.6",
"vite-plugin-node-polyfills": "^0.21.0"
}
}
1 change: 1 addition & 0 deletions apps/dashboard/src/components/add-member-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ ${memberIds.join("\n")}
isCentered
>
<ModalOverlay />
{/* @ts-ignore -- Expression produces a union type that is too complex to represent. This patch will be fixed. */}
<ModalContent bgColor="balticSea.50" maxW="450px">
<ModalBody p="25px 30px">
<Heading fontSize="25px" fontWeight="500" mb="25px" as="h1">
Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/src/components/goerli-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default function GoerliGroupCard({
const { hasCopied: hasCopiedGroupId, onCopy: onCopyGroupId } =
useClipboard(id)
return (
// @ts-ignore -- Expression produces a union type that is too complex to represent. This patch will be fixed.
<Box>
<Text fontSize="20px">{name}</Text>

Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/src/components/group-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default function GroupCard({
treeDepth
}: GroupCardProps): JSX.Element {
return (
// @ts-ignore -- Expression produces a union type that is too complex to represent. This patch will be fixed.
<VStack
borderRadius="8px"
borderColor="balticSea.200"
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/context/auth-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function AuthContextProvider({ children }: { children: ReactNode }) {
],
{
appName,
projectId: process.env.PROJECT_ID! // WALLET CONNECT PROJECT ID
projectId: import.meta.env.VITE_PROJECT_ID! // WALLET CONNECT PROJECT ID
}
)

Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/src/pages/404.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { FaSadTear } from "react-icons/fa"

export default function NotFoundPage(): JSX.Element {
return (
// @ts-ignore -- Expression produces a union type that is too complex to represent. This patch will be fixed.
<Container flex="1" mb="80px" mt="300px" px="80px" maxW="container.lg">
<Heading textAlign="center" as="h2" size="xl">
404 Not Found <Icon boxSize="35px" as={FaSadTear} />
Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/src/pages/group.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck -- Expression produces a union type that is too complex to represent. This patch will be fixed.
import {
Box,
Button,
Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/src/pages/groups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export default function GroupsPage(): JSX.Element {
)

return (
// @ts-ignore -- Expression produces a union type that is too complex to represent. This patch will be fixed.
<Container maxW="container.xl" px="8" pb="20">
<VStack spacing="9" flex="1">
<HStack justifyContent="space-between" width="100%">
Expand Down
7 changes: 4 additions & 3 deletions apps/dashboard/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import react from "@vitejs/plugin-react"
import { defineConfig } from "vite"
import { nodePolyfills } from "vite-plugin-node-polyfills"

// https://vitejs.dev/config/
export default defineConfig(() => ({
plugins: [react()]
}))
export default defineConfig({
plugins: [react(), nodePolyfills()]
})
Loading

0 comments on commit c8fe967

Please sign in to comment.