Skip to content

Commit a00e0f4

Browse files
authored
fix ts check (#507)
1 parent ab4ea1c commit a00e0f4

29 files changed

Lines changed: 350 additions & 198 deletions

apps/connect/src/routes/authenticate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ function AuthenticateComponent() {
327327

328328
try {
329329
const privyProvider = await embeddedWallet.getEthereumProvider();
330-
const _walletClient = createWalletClient({
330+
createWalletClient({
331331
account: embeddedWallet.address as `0x${string}`,
332332
chain: CHAIN,
333333
transport: custom(privyProvider),

apps/events/src/components/todos2.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export const Todos2 = () => {
170170
due: new Date('2025-08-20'),
171171
amount: 100,
172172
point: [12.34, 56.78],
173-
website: new URL('https://example.com'),
173+
website: 'https://example.com',
174174
});
175175
setNewTodoName('');
176176
}}

apps/events/src/mapping.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import type { Mapping } from '@graphprotocol/hypergraph';
12
import { Id } from '@graphprotocol/hypergraph';
2-
import type { Mapping } from '@graphprotocol/hypergraph/mapping';
33

4-
export const mapping: Mapping = {
4+
export const mapping: Mapping.Mapping = {
55
User: {
66
typeIds: [Id('bffa181e-a333-495b-949c-57f2831d7eca')],
77
properties: {

apps/events/src/routeTree.gen.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { Route as rootRoute } from './routes/__root'
1616
import { Route as AuthenticateSuccessImport } from './routes/authenticate-success'
1717
import { Route as IndexImport } from './routes/index'
1818
import { Route as SpaceSpaceIdImport } from './routes/space/$spaceId'
19-
import { Route as FriendsAccountIdImport } from './routes/friends/$accountId'
19+
import { Route as FriendsAccountAddressImport } from './routes/friends/$accountAddress'
2020
import { Route as AccountInboxInboxIdImport } from './routes/account-inbox/$inboxId'
2121
import { Route as SpaceSpaceIdIndexImport } from './routes/space/$spaceId/index'
2222
import { Route as SpaceSpaceIdUsersImport } from './routes/space/$spaceId/users'
@@ -62,9 +62,9 @@ const SpaceSpaceIdRoute = SpaceSpaceIdImport.update({
6262
getParentRoute: () => rootRoute,
6363
} as any)
6464

65-
const FriendsAccountIdRoute = FriendsAccountIdImport.update({
66-
id: '/friends/$accountId',
67-
path: '/friends/$accountId',
65+
const FriendsAccountAddressRoute = FriendsAccountAddressImport.update({
66+
id: '/friends/$accountAddress',
67+
path: '/friends/$accountAddress',
6868
getParentRoute: () => rootRoute,
6969
} as any)
7070

@@ -150,11 +150,11 @@ declare module '@tanstack/react-router' {
150150
preLoaderRoute: typeof AccountInboxInboxIdImport
151151
parentRoute: typeof rootRoute
152152
}
153-
'/friends/$accountId': {
154-
id: '/friends/$accountId'
155-
path: '/friends/$accountId'
156-
fullPath: '/friends/$accountId'
157-
preLoaderRoute: typeof FriendsAccountIdImport
153+
'/friends/$accountAddress': {
154+
id: '/friends/$accountAddress'
155+
path: '/friends/$accountAddress'
156+
fullPath: '/friends/$accountAddress'
157+
preLoaderRoute: typeof FriendsAccountAddressImport
158158
parentRoute: typeof rootRoute
159159
}
160160
'/space/$spaceId': {
@@ -239,7 +239,7 @@ export interface FileRoutesByFullPath {
239239
'/login': typeof LoginLazyRoute
240240
'/playground': typeof PlaygroundLazyRoute
241241
'/account-inbox/$inboxId': typeof AccountInboxInboxIdRoute
242-
'/friends/$accountId': typeof FriendsAccountIdRoute
242+
'/friends/$accountAddress': typeof FriendsAccountAddressRoute
243243
'/space/$spaceId': typeof SpaceSpaceIdRouteWithChildren
244244
'/space/$spaceId/chat': typeof SpaceSpaceIdChatRoute
245245
'/space/$spaceId/events': typeof SpaceSpaceIdEventsRoute
@@ -255,7 +255,7 @@ export interface FileRoutesByTo {
255255
'/login': typeof LoginLazyRoute
256256
'/playground': typeof PlaygroundLazyRoute
257257
'/account-inbox/$inboxId': typeof AccountInboxInboxIdRoute
258-
'/friends/$accountId': typeof FriendsAccountIdRoute
258+
'/friends/$accountAddress': typeof FriendsAccountAddressRoute
259259
'/space/$spaceId/chat': typeof SpaceSpaceIdChatRoute
260260
'/space/$spaceId/events': typeof SpaceSpaceIdEventsRoute
261261
'/space/$spaceId/playground': typeof SpaceSpaceIdPlaygroundRoute
@@ -271,7 +271,7 @@ export interface FileRoutesById {
271271
'/login': typeof LoginLazyRoute
272272
'/playground': typeof PlaygroundLazyRoute
273273
'/account-inbox/$inboxId': typeof AccountInboxInboxIdRoute
274-
'/friends/$accountId': typeof FriendsAccountIdRoute
274+
'/friends/$accountAddress': typeof FriendsAccountAddressRoute
275275
'/space/$spaceId': typeof SpaceSpaceIdRouteWithChildren
276276
'/space/$spaceId/chat': typeof SpaceSpaceIdChatRoute
277277
'/space/$spaceId/events': typeof SpaceSpaceIdEventsRoute
@@ -289,7 +289,7 @@ export interface FileRouteTypes {
289289
| '/login'
290290
| '/playground'
291291
| '/account-inbox/$inboxId'
292-
| '/friends/$accountId'
292+
| '/friends/$accountAddress'
293293
| '/space/$spaceId'
294294
| '/space/$spaceId/chat'
295295
| '/space/$spaceId/events'
@@ -304,7 +304,7 @@ export interface FileRouteTypes {
304304
| '/login'
305305
| '/playground'
306306
| '/account-inbox/$inboxId'
307-
| '/friends/$accountId'
307+
| '/friends/$accountAddress'
308308
| '/space/$spaceId/chat'
309309
| '/space/$spaceId/events'
310310
| '/space/$spaceId/playground'
@@ -318,7 +318,7 @@ export interface FileRouteTypes {
318318
| '/login'
319319
| '/playground'
320320
| '/account-inbox/$inboxId'
321-
| '/friends/$accountId'
321+
| '/friends/$accountAddress'
322322
| '/space/$spaceId'
323323
| '/space/$spaceId/chat'
324324
| '/space/$spaceId/events'
@@ -335,7 +335,7 @@ export interface RootRouteChildren {
335335
LoginLazyRoute: typeof LoginLazyRoute
336336
PlaygroundLazyRoute: typeof PlaygroundLazyRoute
337337
AccountInboxInboxIdRoute: typeof AccountInboxInboxIdRoute
338-
FriendsAccountIdRoute: typeof FriendsAccountIdRoute
338+
FriendsAccountAddressRoute: typeof FriendsAccountAddressRoute
339339
SpaceSpaceIdRoute: typeof SpaceSpaceIdRouteWithChildren
340340
}
341341

@@ -345,7 +345,7 @@ const rootRouteChildren: RootRouteChildren = {
345345
LoginLazyRoute: LoginLazyRoute,
346346
PlaygroundLazyRoute: PlaygroundLazyRoute,
347347
AccountInboxInboxIdRoute: AccountInboxInboxIdRoute,
348-
FriendsAccountIdRoute: FriendsAccountIdRoute,
348+
FriendsAccountAddressRoute: FriendsAccountAddressRoute,
349349
SpaceSpaceIdRoute: SpaceSpaceIdRouteWithChildren,
350350
}
351351

@@ -364,7 +364,7 @@ export const routeTree = rootRoute
364364
"/login",
365365
"/playground",
366366
"/account-inbox/$inboxId",
367-
"/friends/$accountId",
367+
"/friends/$accountAddress",
368368
"/space/$spaceId"
369369
]
370370
},
@@ -383,8 +383,8 @@ export const routeTree = rootRoute
383383
"/account-inbox/$inboxId": {
384384
"filePath": "account-inbox/$inboxId.tsx"
385385
},
386-
"/friends/$accountId": {
387-
"filePath": "friends/$accountId.tsx"
386+
"/friends/$accountAddress": {
387+
"filePath": "friends/$accountAddress.tsx"
388388
},
389389
"/space/$spaceId": {
390390
"filePath": "space/$spaceId.tsx",

apps/events/src/routes/friends/$accountId.tsx renamed to apps/events/src/routes/friends/$accountAddress.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { usePublicAccountInboxes } from '@graphprotocol/hypergraph-react';
22
import { createFileRoute } from '@tanstack/react-router';
33
import { InboxCard } from '../../components/InboxCard';
44

5-
export const Route = createFileRoute('/friends/$accountId')({
5+
export const Route = createFileRoute('/friends/$accountAddress')({
66
component: RouteComponent,
77
});
88

apps/next-example/src/components/providers.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { HypergraphAppProvider } from '@graphprotocol/hypergraph-react';
44

55
// recommended by https://docs.privy.io/basics/troubleshooting/react-frameworks#next-js
66
export default function Providers({ children }: { children: React.ReactNode }) {
7-
const _storage = typeof window !== 'undefined' ? window.localStorage : (undefined as unknown as Storage);
8-
97
return (
108
<HypergraphAppProvider
119
syncServerUri="http://localhost:3030"

apps/next-example/tsconfig.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
3-
"target": "ES2017",
4-
"lib": ["dom", "dom.iterable", "esnext"],
3+
"target": "ES2022",
4+
"lib": ["dom", "dom.iterable", "esnext", "ES2022"],
55
"allowJs": true,
66
"skipLibCheck": true,
77
"strict": true,
@@ -20,8 +20,10 @@
2020
],
2121
"paths": {
2222
"@/*": ["./src/*"],
23-
// "@graphprotocol/hypergraph": ["../../packages/hypergraph/src"],
24-
// "@graphprotocol/hypergraph-react": ["../../packages/hypergraph-react/src"]
23+
"@graphprotocol/hypergraph": ["../../packages/hypergraph/src/index.js"],
24+
"@graphprotocol/hypergraph/*": ["../../packages/hypergraph/src/*.js"],
25+
"@graphprotocol/hypergraph-react": ["../../packages/hypergraph-react/src/index.js"],
26+
"@graphprotocol/hypergraph-react/*": ["../../packages/hypergraph-react/src/*.js"]
2527
}
2628
},
2729
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],

apps/server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
"@hpke/core": "^1.7.2",
1616
"@noble/ciphers": "^1.3.0",
1717
"@noble/hashes": "^1.8.0",
18-
"@prisma/client": "^6.7.0",
18+
"@prisma/client": "^6.14.0",
1919
"@privy-io/server-auth": "^1.26.0",
2020
"body-parser": "^2.2.0",
2121
"cors": "^2.8.5",
2222
"effect": "^3.17.6",
2323
"express": "^5.1.0",
24-
"prisma": "^6.7.0",
24+
"prisma": "^6.14.0",
2525
"siwe": "^3.0.0",
2626
"viem": "^2.29.0",
2727
"ws": "^8.18.2"

apps/server/src/handlers/create-app-identity.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ type Params = {
55
address: string;
66
appId: string;
77
ciphertext: string;
8-
nonce: string;
98
signaturePublicKey: string;
109
encryptionPublicKey: string;
1110
accountProof: string;

apps/server/src/handlers/createUpdate.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const createUpdate = async ({
3636

3737
while (!success && retries < maxRetries) {
3838
try {
39+
// @ts-expect-error - fix it
3940
result = await prisma.$transaction(async (prisma) => {
4041
const lastUpdate = await prisma.update.findFirst({
4142
where: { spaceId },

0 commit comments

Comments
 (0)