From 15d7445c15cef240d15eb89b35e77c7986519194 Mon Sep 17 00:00:00 2001 From: Vasilis Xouris Date: Mon, 29 Jul 2024 13:58:49 -0700 Subject: [PATCH] fix(gql): get FOT from GQL for all supported chains --- lib/graphql/graphql-provider.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/graphql/graphql-provider.ts b/lib/graphql/graphql-provider.ts index e58643dbf9..51dc0b7042 100644 --- a/lib/graphql/graphql-provider.ts +++ b/lib/graphql/graphql-provider.ts @@ -34,10 +34,27 @@ export class UniGraphQLProvider implements IUniGraphQLProvider { * GraphQL Chain Enum located here: https://github.com/Uniswap/data-api-graphql/blob/main/graphql/schema.graphql#L155 * */ private _chainIdToGraphQLChainName(chainId: ChainId): string | undefined { - // TODO: add complete list / use data-graphql-api to populate. Only MAINNET for now. switch (chainId) { case ChainId.MAINNET: return 'ETHEREUM' + case ChainId.ARBITRUM_ONE: + return 'ARBITRUM' + case ChainId.AVALANCHE: + return 'AVALANCHE' + case ChainId.OPTIMISM: + return 'OPTIMISM' + case ChainId.POLYGON: + return 'POLYGON' + case ChainId.CELO: + return 'CELO' + case ChainId.BNB: + return 'BNB' + case ChainId.BASE: + return 'BASE' + case ChainId.BLAST: + return 'BLAST' + case ChainId.ZORA: + return 'ZORA' default: throw new Error(`UniGraphQLProvider._chainIdToGraphQLChainName unsupported ChainId: ${chainId}`) }