Skip to content

Commit 0cc9442

Browse files
committed
fix: details
1 parent ed012ba commit 0cc9442

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

apps/events/src/components/create-events.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const createEvents = async ({
4646
});
4747
ops.push(...createCompanyTypeOps);
4848

49-
const { id: eventTypeId, ops: createEventTypeOps } = Graph.createEntity({
49+
const { ops: createEventTypeOps } = Graph.createEntity({
5050
name: 'My Test Event',
5151
types: ['6b8dbe76-389f-4bde-acdd-db9d5e387882'],
5252
relations: {
@@ -60,7 +60,6 @@ const createEvents = async ({
6060
walletClient: smartSessionClient,
6161
space,
6262
name: 'Create Job Offers, Companies and Events',
63-
network: 'TESTNET',
6463
});
6564
console.log('result', result);
6665
alert('Events created');

apps/events/src/components/create-properties-and-types-event.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ const createPropertiesAndTypesEvent = async ({
5353
walletClient: smartSessionClient,
5454
space,
5555
name: 'Create properties and types',
56-
network: 'TESTNET',
5756
});
5857
return {
5958
result,

apps/events/src/components/playground.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ export const Playground = () => {
7272
}
7373
await deleteEntity({
7474
id: event.id,
75-
// @ts-expect-error - TODO: fix the types error
7675
walletClient,
7776
});
7877
setIsDeleting(false);

packages/hypergraph-react/src/internal/use-create-entity-public.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { type GeoSmartAccount, Graph, Id, type PropertiesParam, type RelationsParam } from '@graphprotocol/grc-20';
1+
import { Graph, Id, type PropertiesParam, type RelationsParam } from '@graphprotocol/grc-20';
2+
import type { Connect } from '@graphprotocol/hypergraph';
23
import type { Entity } from '@graphprotocol/hypergraph';
34
import { Type, store } from '@graphprotocol/hypergraph';
45
import { useQueryClient } from '@tanstack/react-query';
@@ -19,7 +20,7 @@ export function useCreateEntityPublic<const S extends Entity.AnyNoContext>(
1920

2021
return async (
2122
data: Readonly<Schema.Schema.Type<Entity.Insert<S>>>,
22-
{ walletClient }: { walletClient: GeoSmartAccount },
23+
{ walletClient }: { walletClient: Connect.SmartSessionClient },
2324
// TODO: return the entity with this type: Promise<Entity.Entity<S>>
2425
) => {
2526
try {
@@ -79,7 +80,6 @@ export function useCreateEntityPublic<const S extends Entity.AnyNoContext>(
7980
space,
8081
name: `Create entity ${data.id}`,
8182
walletClient,
82-
network: 'TESTNET',
8383
});
8484
// TODO: temporary fix until we get the information from the API when a transaction is confirmed
8585
await new Promise((resolve) => setTimeout(resolve, 2000));

packages/hypergraph-react/src/internal/use-delete-entity-public.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { type GeoSmartAccount, Graph, type Op } from '@graphprotocol/grc-20';
2-
import type { Entity } from '@graphprotocol/hypergraph';
1+
import { Graph, type Op } from '@graphprotocol/grc-20';
2+
import type { Connect, Entity } from '@graphprotocol/hypergraph';
33
import { useQueryClient } from '@tanstack/react-query';
44
import request, { gql } from 'graphql-request';
55
import { publishOps } from '../publish-ops.js';
@@ -36,7 +36,7 @@ type EntityToDeleteQueryResult = {
3636
export const useDeleteEntityPublic = <S extends Entity.AnyNoContext>(type: S, { space }: DeleteEntityPublicParams) => {
3737
const queryClient = useQueryClient();
3838

39-
return async ({ id, walletClient }: { id: string; walletClient: GeoSmartAccount }) => {
39+
return async ({ id, walletClient }: { id: string; walletClient: Connect.SmartSessionClient }) => {
4040
try {
4141
const result = await request<EntityToDeleteQueryResult>(GEO_API_TESTNET_ENDPOINT, deleteEntityQueryDocument, {
4242
spaceId: space,
@@ -62,7 +62,6 @@ export const useDeleteEntityPublic = <S extends Entity.AnyNoContext>(type: S, {
6262
space,
6363
name: `Delete entity ${id}`,
6464
walletClient,
65-
network: 'TESTNET',
6665
});
6766
// TODO: temporary fix until we get the information from the API when a transaction is confirmed
6867
await new Promise((resolve) => setTimeout(resolve, 2000));

0 commit comments

Comments
 (0)