Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/payment-detection/codegen-superfluid.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
overwrite: true
schema: 'https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-goerli'
schema: 'https://subgraph-endpoints.superfluid.dev/eth-sepolia/protocol-v1'
documents: src/thegraph/queries/superfluid/*.graphql
generates:
src/thegraph/generated/graphql-superfluid.ts:
Expand Down
6 changes: 2 additions & 4 deletions packages/payment-detection/src/thegraph/superfluid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { GraphQLClient } from 'graphql-request';
import { getSdk } from './generated/graphql-superfluid';
import { RequestConfig } from 'graphql-request/src/types';

const BASE_URL = `https://api.thegraph.com`;
const BASE_URL = `https://subgraph-endpoints.superfluid.dev`;
const NETWORK_TO_URL: Record<string, string> = {
optimism: 'optimism-mainnet',
avalanche: 'avalanche-c',
Expand Down Expand Up @@ -31,8 +31,6 @@ export const getTheGraphSuperfluidClient = (
// which is a better security but would require an update of the
// library each time the subgraph is updated, which isn't ideal
// for early testing.
const url = `${baseUrl}/subgraphs/name/superfluid-finance/protocol-v1-${
NETWORK_TO_URL[network] || network
}`;
const url = `${baseUrl}/${NETWORK_TO_URL[network] || network}/protocol-v1`;
return getSdk(new GraphQLClient(url, clientOptions));
};