Skip to content

Commit

Permalink
fix: superfulid subgraph url (#1420)
Browse files Browse the repository at this point in the history
  • Loading branch information
MantisClone authored Jun 27, 2024
1 parent d9feda6 commit 5e12642
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
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));
};

0 comments on commit 5e12642

Please sign in to comment.