diff --git a/apps/connect/.env.development b/apps/connect/.env.development index 1a660658..9ee365fd 100644 --- a/apps/connect/.env.development +++ b/apps/connect/.env.development @@ -2,6 +2,7 @@ VITE_HYPERGRAPH_SYNC_SERVER_ORIGIN="http://localhost:3030" VITE_HYPERGRAPH_CHAIN="geo-testnet" VITE_HYPERGRAPH_API_URL="https://hypergraph-v2-testnet.up.railway.app/graphql" VITE_HYPERGRAPH_RPC_URL="https://rpc-geo-test-zc16z3tcvf.t.conduit.xyz" +VITE_PRIVY_APP_ID="cmbhnmo1x000bla0mxudtd8z9" # VITE_HYPERGRAPH_CHAIN="geogenesis" # VITE_HYPERGRAPH_API_URL="https://hypergraph-v2.up.railway.app/graphql" # VITE_HYPERGRAPH_RPC_URL="https://rpc-geo-genesis-h0q2s21xx8.t.conduit.xyz" diff --git a/apps/connect/.env.production b/apps/connect/.env.production index 40aed403..3d095aac 100644 --- a/apps/connect/.env.production +++ b/apps/connect/.env.production @@ -1,4 +1,5 @@ VITE_HYPERGRAPH_SYNC_SERVER_ORIGIN="https://syncserver.hypergraph.thegraph.com" -VITE_HYPERGRAPH_CHAIN="geogenesis" -VITE_HYPERGRAPH_API_URL="https://hypergraph-v2.up.railway.app/graphql" -VITE_HYPERGRAPH_RPC_URL="https://rpc-geo-genesis-h0q2s21xx8.t.conduit.xyz" +VITE_HYPERGRAPH_CHAIN="geo-testnet" +VITE_HYPERGRAPH_API_URL="https://hypergraph-v2-testnet.up.railway.app/graphql" +VITE_HYPERGRAPH_RPC_URL="https://rpc-geo-test-zc16z3tcvf.t.conduit.xyz" +VITE_PRIVY_APP_ID="cmcccikza007bjy0niawgutl0" \ No newline at end of file diff --git a/apps/connect/src/Boot.tsx b/apps/connect/src/Boot.tsx index 40b74582..71a27fc5 100644 --- a/apps/connect/src/Boot.tsx +++ b/apps/connect/src/Boot.tsx @@ -47,7 +47,7 @@ export function Boot() { return ( + ); diff --git a/apps/events/src/routes/authenticate-success.tsx b/apps/events/src/routes/authenticate-success.tsx index cc46c424..b546efec 100644 --- a/apps/events/src/routes/authenticate-success.tsx +++ b/apps/events/src/routes/authenticate-success.tsx @@ -1,7 +1,5 @@ -import { Connect } from '@graphprotocol/hypergraph'; import { useHypergraphApp } from '@graphprotocol/hypergraph-react'; import { createFileRoute, useNavigate } from '@tanstack/react-router'; -import * as Effect from 'effect/Effect'; import { useEffect } from 'react'; export const Route = createFileRoute('/authenticate-success')({ diff --git a/apps/next-example/src/components/providers.tsx b/apps/next-example/src/components/providers.tsx index 3fa2a518..332613b7 100644 --- a/apps/next-example/src/components/providers.tsx +++ b/apps/next-example/src/components/providers.tsx @@ -7,7 +7,7 @@ export default function Providers({ children }: { children: React.ReactNode }) { const storage = typeof window !== 'undefined' ? window.localStorage : (undefined as unknown as Storage); return ( - + {children} ); diff --git a/packages/hypergraph-react/package.json b/packages/hypergraph-react/package.json index a7f6ae4e..c0469371 100644 --- a/packages/hypergraph-react/package.json +++ b/packages/hypergraph-react/package.json @@ -1,6 +1,6 @@ { "name": "@graphprotocol/hypergraph-react", - "version": "0.0.3", + "version": "0.0.5", "description": "React implementation and additional functionality, components, and hooks for the hypergraph SDK framework", "keywords": ["Web3", "Local-First", "Knowledge Graph", "Graph Protocol", "react"], "publishConfig": { diff --git a/packages/hypergraph-react/src/HypergraphAppContext.tsx b/packages/hypergraph-react/src/HypergraphAppContext.tsx index 880304a9..db5d672c 100644 --- a/packages/hypergraph-react/src/HypergraphAppContext.tsx +++ b/packages/hypergraph-react/src/HypergraphAppContext.tsx @@ -215,19 +215,28 @@ export function useHypergraphAuth() { } export type HypergraphAppProviderProps = Readonly<{ - storage: Identity.Storage; + storage?: Identity.Storage; syncServerUri?: string; chainId?: number; children: ReactNode; mapping: Mapping; }>; + +const mockStorage = { + getItem(_key: string) { + return null; + }, + setItem(_key: string, _value: string) {}, + removeItem(_key: string) {}, +}; + // 1) a) Get session token from local storage, or // b) Auth with the sync server // 2) a)Try to get identity from the sync server, or // b) If identity is not found, create a new identity // (and store it in the sync server) export function HypergraphAppProvider({ - storage, + storage = typeof window !== 'undefined' ? localStorage : mockStorage, syncServerUri = 'https://syncserver.hypergraph.thegraph.com', chainId = Connect.GEO_TESTNET.id, children, diff --git a/packages/hypergraph/package.json b/packages/hypergraph/package.json index 96f8bdea..d62dd5ce 100644 --- a/packages/hypergraph/package.json +++ b/packages/hypergraph/package.json @@ -1,6 +1,6 @@ { "name": "@graphprotocol/hypergraph", - "version": "0.0.3", + "version": "0.0.5", "description": "SDK for building performant, type-safe, local-first dapps on top of The Graph ecosystem knowledge graphs.", "publishConfig": { "access": "public",