From 5e126428730e670b4ec6f1d2edb5124da8191912 Mon Sep 17 00:00:00 2001 From: MantisClone Date: Thu, 27 Jun 2024 09:13:44 -0400 Subject: [PATCH] fix: superfulid subgraph url (#1420) --- packages/payment-detection/codegen-superfluid.yml | 2 +- packages/payment-detection/src/thegraph/superfluid.ts | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/payment-detection/codegen-superfluid.yml b/packages/payment-detection/codegen-superfluid.yml index ab28fb695d..64379686ea 100644 --- a/packages/payment-detection/codegen-superfluid.yml +++ b/packages/payment-detection/codegen-superfluid.yml @@ -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: diff --git a/packages/payment-detection/src/thegraph/superfluid.ts b/packages/payment-detection/src/thegraph/superfluid.ts index e869dd7366..30924f24a4 100644 --- a/packages/payment-detection/src/thegraph/superfluid.ts +++ b/packages/payment-detection/src/thegraph/superfluid.ts @@ -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 = { optimism: 'optimism-mainnet', avalanche: 'avalanche-c', @@ -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)); };