1- import { Graph } from '@graphprotocol/grc-20' ;
2- import { store } from '@graphprotocol/hypergraph' ;
1+ import { Config , store } from '@graphprotocol/hypergraph' ;
32import { useQuery } from '@tanstack/react-query' ;
43import { useSelector } from '@xstate/store/react' ;
54import { gql , request } from 'graphql-request' ;
@@ -10,7 +9,6 @@ const publicSpacesQueryDocument = gql`
109query Spaces($accountAddress: String!) {
1110 spaces(filter: {members: {some: {address: {is: $accountAddress}}}}) {
1211 id
13- spaceAddress
1412 page {
1513 name
1614 }
@@ -21,7 +19,6 @@ query Spaces($accountAddress: String!) {
2119type PublicSpacesQueryResult = {
2220 spaces : {
2321 id : string ;
24- spaceAddress : string ;
2522 page : {
2623 name : string ;
2724 } | null ;
@@ -38,7 +35,7 @@ export const useSpaces = (params: { mode: 'public' | 'private' }) => {
3835 queryKey : [ 'hypergraph-public-spaces' , params . mode ] ,
3936 queryFn : async ( ) => {
4037 const result = await request < PublicSpacesQueryResult > (
41- `${ Graph . TESTNET_API_ORIGIN } /v2/graphql` ,
38+ `${ Config . getApiOrigin ( ) } /v2/graphql` ,
4239 publicSpacesQueryDocument ,
4340 {
4441 accountAddress,
@@ -48,7 +45,6 @@ export const useSpaces = (params: { mode: 'public' | 'private' }) => {
4845 ? result . spaces . map ( ( space ) => ( {
4946 id : space . id ,
5047 name : space . page ?. name ,
51- spaceAddress : space . spaceAddress ,
5248 } ) )
5349 : [ ] ;
5450 } ,
0 commit comments