diff --git a/balancer-js/src/modules/data/liquidity-gauges/multicall.spec.ts b/balancer-js/src/modules/data/liquidity-gauges/multicall.spec.ts index 08738d6a6..d91ad8cb5 100644 --- a/balancer-js/src/modules/data/liquidity-gauges/multicall.spec.ts +++ b/balancer-js/src/modules/data/liquidity-gauges/multicall.spec.ts @@ -1,3 +1,4 @@ +// yarn test:only ./src/modules/data/liquidity-gauges/multicall.spec.ts import { expect } from 'chai'; import { JsonRpcProvider } from '@ethersproject/providers'; import { Zero } from '@ethersproject/constants'; @@ -65,7 +66,7 @@ describe('Liquidity gauge multicall', () => { const fetcher = new LiquidityGaugesMulticallRepository(multicall, 1); const gauges = new LiquidityGaugesSubgraphRepository( - 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges' + 'https://api.studio.thegraph.com/query/75376/balancer-gauges/version/latest' ); let gaugeAddresses: string[]; diff --git a/balancer-js/src/modules/data/pool/subgraph.ts b/balancer-js/src/modules/data/pool/subgraph.ts index ac8d3966b..87fe30938 100644 --- a/balancer-js/src/modules/data/pool/subgraph.ts +++ b/balancer-js/src/modules/data/pool/subgraph.ts @@ -38,6 +38,7 @@ export class PoolsSubgraphRepository public skip = 0; private blockHeight: undefined | (() => Promise); private query: GraphQLQuery; + private isCustomQuery: boolean; /** * Repository with optional lazy loaded blockHeight @@ -60,7 +61,7 @@ export class PoolsSubgraphRepository }, }, }; - + this.isCustomQuery = !!options.query; const args = Object.assign({}, options.query?.args || defaultArgs); const attrs = Object.assign({}, options.query?.attrs || {}); @@ -128,6 +129,8 @@ export class PoolsSubgraphRepository * @returns */ async find(id: string, refresh = false): Promise { + if(this.isCustomQuery) + return await this.findBy('id', id); // If we're not refreshing and the pool exists in caches then return if (!refresh && this.pools) { const cachedPool = (await this.pools).find((pool) => pool.id === id); diff --git a/balancer-js/src/modules/pools/apr/apr.integration.spec.ts b/balancer-js/src/modules/pools/apr/apr.integration.spec.ts index b48099287..0cde300ce 100644 --- a/balancer-js/src/modules/pools/apr/apr.integration.spec.ts +++ b/balancer-js/src/modules/pools/apr/apr.integration.spec.ts @@ -23,7 +23,8 @@ const usdStable = const auraBALveBAL = '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249'; -describe('APR tests', () => { +// APRs are offered via API now +describe.skip('APR tests', () => { describe('pool with yield tokens', () => { it('has tokenAprs', async () => { const pool = await pools.find(ethStEth);