diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 05e0735bd..4834dab6b 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -21,4 +21,4 @@ runs: - name: Generate api typings shell: bash - run: pnpm graphql:gen + run: pnpm --filter api graphql:gen diff --git a/.prettierrc.cjs b/.prettierrc.cjs index 3b59e2378..f0e1ba419 100644 --- a/.prettierrc.cjs +++ b/.prettierrc.cjs @@ -1,7 +1,7 @@ module.exports = { singleQuote: true, - arrowParens: "avoid", + arrowParens: 'avoid', semi: false, - proseWrap: "always", + proseWrap: 'always', printWidth: 100, } diff --git a/apps/frontend-v3/.gitignore b/apps/frontend-v3/.gitignore index b61c51b83..46d8193b6 100644 --- a/apps/frontend-v3/.gitignore +++ b/apps/frontend-v3/.gitignore @@ -41,8 +41,5 @@ next-env.d.ts # Sentry Config File .sentryclirc -# GrapgQL Codegen -/lib/shared/services/api/generated/ - # Sentry Config File .env.sentry-build-plugin diff --git a/apps/frontend-v3/app/(app)/debug/modal/page.tsx b/apps/frontend-v3/app/(app)/debug/modal/page.tsx index b37414e5b..0573a4cb6 100644 --- a/apps/frontend-v3/app/(app)/debug/modal/page.tsx +++ b/apps/frontend-v3/app/(app)/debug/modal/page.tsx @@ -2,7 +2,7 @@ import { SuccessOverlay } from '@/lib/shared/components/modals/SuccessOverlay' import { TransactionModalHeader } from '@/lib/shared/components/modals/TransactionModalHeader' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { useDisclosure } from '@chakra-ui/hooks' import { Button, diff --git a/apps/frontend-v3/app/(app)/debug/token-input/page.tsx b/apps/frontend-v3/app/(app)/debug/token-input/page.tsx index a541fed1d..2df271d20 100644 --- a/apps/frontend-v3/app/(app)/debug/token-input/page.tsx +++ b/apps/frontend-v3/app/(app)/debug/token-input/page.tsx @@ -3,7 +3,7 @@ import { useTokens } from '@/lib/modules/tokens/TokensProvider' import { TokenInput } from '@/lib/modules/tokens/TokenInput/TokenInput' import { Button, Card, Heading, Text, VStack, useDisclosure } from '@chakra-ui/react' -import { GqlChain, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlToken } from '@repo/api/graphql' import { useState } from 'react' import { TokenSelectModal } from '@/lib/modules/tokens/TokenSelectModal/TokenSelectModal' import { TokenBalancesProvider } from '@/lib/modules/tokens/TokenBalancesProvider' diff --git a/apps/frontend-v3/app/(app)/debug/token-select/page.tsx b/apps/frontend-v3/app/(app)/debug/token-select/page.tsx index fff6aecd5..f77423e59 100644 --- a/apps/frontend-v3/app/(app)/debug/token-select/page.tsx +++ b/apps/frontend-v3/app/(app)/debug/token-select/page.tsx @@ -3,7 +3,7 @@ import { TokenSelectModal } from '@/lib/modules/tokens/TokenSelectModal/TokenSelectModal' import { TokenBalancesProvider } from '@/lib/modules/tokens/TokenBalancesProvider' import { useTokens } from '@/lib/modules/tokens/TokensProvider' -import { GqlChain, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlToken } from '@repo/api/graphql' import { Button, useDisclosure, Text } from '@chakra-ui/react' import { useRef, useState } from 'react' diff --git a/apps/frontend-v3/app/(app)/pools/[chain]/[variant]/[id]/layout.tsx b/apps/frontend-v3/app/(app)/pools/[chain]/[variant]/[id]/layout.tsx index ed5cc0d20..f42d92f34 100644 --- a/apps/frontend-v3/app/(app)/pools/[chain]/[variant]/[id]/layout.tsx +++ b/apps/frontend-v3/app/(app)/pools/[chain]/[variant]/[id]/layout.tsx @@ -4,7 +4,7 @@ import { ChainSlug, getPoolTypeLabel, slugToChainMap } from '@/lib/modules/pool/ import { PropsWithChildren, Suspense } from 'react' import { PoolDetailSkeleton } from '@/lib/modules/pool/PoolDetail/PoolDetailSkeleton' import { getApolloServerClient } from '@/lib/shared/services/api/apollo-server.client' -import { GetPoolDocument } from '@/lib/shared/services/api/generated/graphql' +import { GetPoolDocument } from '@repo/api/graphql' import { Metadata } from 'next' import { PoolProvider } from '@/lib/modules/pool/PoolProvider' import { getProjectConfig } from '@/lib/config/getProjectConfig' diff --git a/apps/frontend-v3/app/(app)/pools/cow/page.tsx b/apps/frontend-v3/app/(app)/pools/cow/page.tsx index 44ada9c75..2adbecb19 100644 --- a/apps/frontend-v3/app/(app)/pools/cow/page.tsx +++ b/apps/frontend-v3/app/(app)/pools/cow/page.tsx @@ -1,6 +1,6 @@ import { PoolList } from '@/lib/modules/pool/PoolList/PoolList' import FadeInOnView from '@/lib/shared/components/containers/FadeInOnView' -import { GqlPoolType } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolType } from '@repo/api/graphql' import { Box, Skeleton } from '@chakra-ui/react' import { Suspense } from 'react' import { Metadata } from 'next' diff --git a/apps/frontend-v3/app/(app)/pools/page.tsx b/apps/frontend-v3/app/(app)/pools/page.tsx index 04726d6e3..11e4fb7cb 100644 --- a/apps/frontend-v3/app/(app)/pools/page.tsx +++ b/apps/frontend-v3/app/(app)/pools/page.tsx @@ -7,7 +7,7 @@ import { Suspense } from 'react' // import { getApolloServerClient } from '@/lib/shared/services/api/apollo-server.client' // import { getProjectConfig } from '@/lib/config/getProjectConfig' -// import { GetFeaturedPoolsDocument } from '@/lib/shared/services/api/generated/graphql' +// import { GetFeaturedPoolsDocument } from '@repo/api/graphql' // import { FeaturedPools } from '@/lib/modules/featured-pools/FeaturedPools' import { CowGalxeQuestPromoBanner } from '@/lib/shared/components/promos/CowGalxeQuestPromoBanner' diff --git a/apps/frontend-v3/app/(app)/swap/[[...slug]]/layout.tsx b/apps/frontend-v3/app/(app)/swap/[[...slug]]/layout.tsx index 42d0dd82f..8a5894a06 100644 --- a/apps/frontend-v3/app/(app)/swap/[[...slug]]/layout.tsx +++ b/apps/frontend-v3/app/(app)/swap/[[...slug]]/layout.tsx @@ -6,7 +6,7 @@ import { TokenBalancesProvider } from '@/lib/modules/tokens/TokenBalancesProvide import { TokenInputsValidationProvider } from '@/lib/modules/tokens/TokenInputsValidationProvider' import { useTokens } from '@/lib/modules/tokens/TokensProvider' import { TransactionStateProvider } from '@/lib/modules/transactions/transaction-steps/TransactionStateProvider' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { PropsWithChildren } from 'react' import { PriceImpactProvider } from '@/lib/modules/price-impact/PriceImpactProvider' import { DefaultPageContainer } from '@/lib/shared/components/containers/DefaultPageContainer' diff --git a/apps/frontend-v3/app/api/rpc/[chain]/route.ts b/apps/frontend-v3/app/api/rpc/[chain]/route.ts index 190a39ed3..d221d86ad 100644 --- a/apps/frontend-v3/app/api/rpc/[chain]/route.ts +++ b/apps/frontend-v3/app/api/rpc/[chain]/route.ts @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' type Params = { params: { diff --git a/apps/frontend-v3/lib/config/app.config.ts b/apps/frontend-v3/lib/config/app.config.ts index 71836c657..5982a7ca3 100644 --- a/apps/frontend-v3/lib/config/app.config.ts +++ b/apps/frontend-v3/lib/config/app.config.ts @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { keyBy } from 'lodash' import { Config, NetworkConfig, SupportedChainId } from './config.types' import networks from './networks' diff --git a/apps/frontend-v3/lib/config/config.types.ts b/apps/frontend-v3/lib/config/config.types.ts index d3097f1e1..e764e020f 100644 --- a/apps/frontend-v3/lib/config/config.types.ts +++ b/apps/frontend-v3/lib/config/config.types.ts @@ -1,5 +1,5 @@ import { Address } from 'viem' -import { GqlChain } from '../shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { chains } from '@/lib/modules/web3/ChainConfig' import { PoolIssue } from '../modules/pool/alerts/pool-issues/PoolIssue.type' import { SupportedWrapHandler } from '../modules/swap/swap.types' diff --git a/apps/frontend-v3/lib/config/networks/arbitrum.ts b/apps/frontend-v3/lib/config/networks/arbitrum.ts index 63c690641..312f0b361 100644 --- a/apps/frontend-v3/lib/config/networks/arbitrum.ts +++ b/apps/frontend-v3/lib/config/networks/arbitrum.ts @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { NetworkConfig } from '../config.types' import { convertHexToLowerCase } from '@/lib/shared/utils/objects' import { PoolIssue } from '@/lib/modules/pool/alerts/pool-issues/PoolIssue.type' diff --git a/apps/frontend-v3/lib/config/networks/avalanche.ts b/apps/frontend-v3/lib/config/networks/avalanche.ts index 28237c9cd..f9c09ddbf 100644 --- a/apps/frontend-v3/lib/config/networks/avalanche.ts +++ b/apps/frontend-v3/lib/config/networks/avalanche.ts @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { NetworkConfig } from '../config.types' import { convertHexToLowerCase } from '@/lib/shared/utils/objects' import { PoolIssue } from '@/lib/modules/pool/alerts/pool-issues/PoolIssue.type' diff --git a/apps/frontend-v3/lib/config/networks/base.ts b/apps/frontend-v3/lib/config/networks/base.ts index 6131dbd17..c70a2c56f 100644 --- a/apps/frontend-v3/lib/config/networks/base.ts +++ b/apps/frontend-v3/lib/config/networks/base.ts @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { NetworkConfig } from '../config.types' import { convertHexToLowerCase } from '@/lib/shared/utils/objects' diff --git a/apps/frontend-v3/lib/config/networks/fantom.ts b/apps/frontend-v3/lib/config/networks/fantom.ts index f1f45248a..31521f6ef 100644 --- a/apps/frontend-v3/lib/config/networks/fantom.ts +++ b/apps/frontend-v3/lib/config/networks/fantom.ts @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { NetworkConfig } from '../config.types' import { zeroAddress } from 'viem' import { convertHexToLowerCase } from '@/lib/shared/utils/objects' diff --git a/apps/frontend-v3/lib/config/networks/fraxtal.ts b/apps/frontend-v3/lib/config/networks/fraxtal.ts index 2e2a955db..e06c23624 100644 --- a/apps/frontend-v3/lib/config/networks/fraxtal.ts +++ b/apps/frontend-v3/lib/config/networks/fraxtal.ts @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { NetworkConfig } from '../config.types' import { convertHexToLowerCase } from '@/lib/shared/utils/objects' import { CSP_ISSUE_POOL_IDS } from '@/lib/shared/data/csp-issue' diff --git a/apps/frontend-v3/lib/config/networks/gnosis.ts b/apps/frontend-v3/lib/config/networks/gnosis.ts index 3f220114b..3bad80c91 100644 --- a/apps/frontend-v3/lib/config/networks/gnosis.ts +++ b/apps/frontend-v3/lib/config/networks/gnosis.ts @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { NetworkConfig } from '../config.types' import { convertHexToLowerCase } from '@/lib/shared/utils/objects' import { CSP_ISSUE_POOL_IDS } from '@/lib/shared/data/csp-issue' diff --git a/apps/frontend-v3/lib/config/networks/index.ts b/apps/frontend-v3/lib/config/networks/index.ts index 0babd5bc1..dabbaf5f7 100644 --- a/apps/frontend-v3/lib/config/networks/index.ts +++ b/apps/frontend-v3/lib/config/networks/index.ts @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import arbitrum from './arbitrum' import avalanche from './avalanche' import gnosis from './gnosis' diff --git a/apps/frontend-v3/lib/config/networks/mainnet.ts b/apps/frontend-v3/lib/config/networks/mainnet.ts index 58517f276..de30b3607 100644 --- a/apps/frontend-v3/lib/config/networks/mainnet.ts +++ b/apps/frontend-v3/lib/config/networks/mainnet.ts @@ -1,5 +1,5 @@ import { PoolIssue } from '@/lib/modules/pool/alerts/pool-issues/PoolIssue.type' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { convertHexToLowerCase } from '@/lib/shared/utils/objects' import { NetworkConfig } from '../config.types' import { CSP_ISSUE_POOL_IDS } from '../../shared/data/csp-issue' diff --git a/apps/frontend-v3/lib/config/networks/mode.ts b/apps/frontend-v3/lib/config/networks/mode.ts index 858666605..d8a9fcc48 100644 --- a/apps/frontend-v3/lib/config/networks/mode.ts +++ b/apps/frontend-v3/lib/config/networks/mode.ts @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { NetworkConfig } from '../config.types' import { convertHexToLowerCase } from '@/lib/shared/utils/objects' import { CSP_ISSUE_POOL_IDS } from '@/lib/shared/data/csp-issue' diff --git a/apps/frontend-v3/lib/config/networks/optimism.ts b/apps/frontend-v3/lib/config/networks/optimism.ts index 0f276fd52..83d845382 100644 --- a/apps/frontend-v3/lib/config/networks/optimism.ts +++ b/apps/frontend-v3/lib/config/networks/optimism.ts @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { NetworkConfig } from '../config.types' import { convertHexToLowerCase } from '@/lib/shared/utils/objects' import { CSP_ISSUE_POOL_IDS } from '@/lib/shared/data/csp-issue' diff --git a/apps/frontend-v3/lib/config/networks/polygon.ts b/apps/frontend-v3/lib/config/networks/polygon.ts index 2c887eb28..afc73c240 100644 --- a/apps/frontend-v3/lib/config/networks/polygon.ts +++ b/apps/frontend-v3/lib/config/networks/polygon.ts @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { NetworkConfig } from '../config.types' import { convertHexToLowerCase } from '@/lib/shared/utils/objects' import { PoolIssue } from '@/lib/modules/pool/alerts/pool-issues/PoolIssue.type' diff --git a/apps/frontend-v3/lib/config/networks/sepolia.ts b/apps/frontend-v3/lib/config/networks/sepolia.ts index 4811fa377..1a139b0d4 100644 --- a/apps/frontend-v3/lib/config/networks/sepolia.ts +++ b/apps/frontend-v3/lib/config/networks/sepolia.ts @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { NetworkConfig } from '../config.types' import { convertHexToLowerCase } from '@/lib/shared/utils/objects' diff --git a/apps/frontend-v3/lib/config/networks/zkevm.ts b/apps/frontend-v3/lib/config/networks/zkevm.ts index 71931b617..740763413 100644 --- a/apps/frontend-v3/lib/config/networks/zkevm.ts +++ b/apps/frontend-v3/lib/config/networks/zkevm.ts @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { NetworkConfig } from '../config.types' import { convertHexToLowerCase } from '@/lib/shared/utils/objects' import { PoolIssue } from '@/lib/modules/pool/alerts/pool-issues/PoolIssue.type' diff --git a/apps/frontend-v3/lib/config/projects/balancer.ts b/apps/frontend-v3/lib/config/projects/balancer.ts index 7fc8918e5..d897fc83e 100644 --- a/apps/frontend-v3/lib/config/projects/balancer.ts +++ b/apps/frontend-v3/lib/config/projects/balancer.ts @@ -1,6 +1,6 @@ import { ProjectConfig } from '@/lib/config/config.types' import { PartnerVariant } from '@/lib/modules/pool/pool.types' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { isProd } from '@/lib/config/app.config' export const ProjectConfigBalancer: ProjectConfig = { diff --git a/apps/frontend-v3/lib/config/projects/beets.ts b/apps/frontend-v3/lib/config/projects/beets.ts index c2bfa0176..686bf54ef 100644 --- a/apps/frontend-v3/lib/config/projects/beets.ts +++ b/apps/frontend-v3/lib/config/projects/beets.ts @@ -1,5 +1,5 @@ import { ProjectConfig } from '@/lib/config/config.types' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' export const beetsSupportedNetworks = [GqlChain.Fantom, GqlChain.Optimism] // as const satisifies GqlChain[] diff --git a/apps/frontend-v3/lib/modules/chains/ChainSelect.tsx b/apps/frontend-v3/lib/modules/chains/ChainSelect.tsx index 40a4ca7ef..f497f0eeb 100644 --- a/apps/frontend-v3/lib/modules/chains/ChainSelect.tsx +++ b/apps/frontend-v3/lib/modules/chains/ChainSelect.tsx @@ -3,7 +3,7 @@ import { getChainShortName } from '@/lib/config/app.config' import { getProjectConfig } from '@/lib/config/getProjectConfig' import { NetworkIcon } from '@/lib/shared/components/icons/NetworkIcon' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { getSelectStyles } from '@/lib/shared/services/chakra/custom/chakra-react-select' import { Box, HStack, Text } from '@chakra-ui/react' import { Select, OptionBase, GroupBase, SingleValue, chakraComponents } from 'chakra-react-select' diff --git a/apps/frontend-v3/lib/modules/chains/chain.utils.ts b/apps/frontend-v3/lib/modules/chains/chain.utils.ts index e7308ef9c..64e8ced6f 100644 --- a/apps/frontend-v3/lib/modules/chains/chain.utils.ts +++ b/apps/frontend-v3/lib/modules/chains/chain.utils.ts @@ -1,5 +1,5 @@ import { getChainId } from '@/lib/config/app.config' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' export function isMainnet(chain: GqlChain | number): boolean { return chain === GqlChain.Mainnet || chain === getChainId(GqlChain.Mainnet) diff --git a/apps/frontend-v3/lib/modules/chains/chains.constants.ts b/apps/frontend-v3/lib/modules/chains/chains.constants.ts index f3ffd9e10..d4f66d8e1 100644 --- a/apps/frontend-v3/lib/modules/chains/chains.constants.ts +++ b/apps/frontend-v3/lib/modules/chains/chains.constants.ts @@ -1,3 +1,3 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' export const UNSUPPORTED_CHAINS = [GqlChain.Fantom, GqlChain.Optimism] diff --git a/apps/frontend-v3/lib/modules/featured-pools/FeaturePoolCard.tsx b/apps/frontend-v3/lib/modules/featured-pools/FeaturePoolCard.tsx index 0ec3bf667..a6e06d85f 100644 --- a/apps/frontend-v3/lib/modules/featured-pools/FeaturePoolCard.tsx +++ b/apps/frontend-v3/lib/modules/featured-pools/FeaturePoolCard.tsx @@ -1,6 +1,6 @@ 'use client' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { FeaturedPool, Pool } from '../pool/PoolProvider' import { useRouter } from 'next/navigation' import { VStack, Text, Box, HStack, Image } from '@chakra-ui/react' diff --git a/apps/frontend-v3/lib/modules/featured-pools/FeaturedPools.tsx b/apps/frontend-v3/lib/modules/featured-pools/FeaturedPools.tsx index 90983c8c1..c24215955 100644 --- a/apps/frontend-v3/lib/modules/featured-pools/FeaturedPools.tsx +++ b/apps/frontend-v3/lib/modules/featured-pools/FeaturedPools.tsx @@ -2,7 +2,7 @@ import { BoxProps, Card, Box, Text, HStack } from '@chakra-ui/react' import { FeaturePoolCard } from './FeaturePoolCard' -import { GetFeaturedPoolsQuery } from '@/lib/shared/services/api/generated/graphql' +import { GetFeaturedPoolsQuery } from '@repo/api/graphql' import { PoolCarousel } from './PoolCarousel' import { FeaturedPool1SVG, diff --git a/apps/frontend-v3/lib/modules/featured-pools/PoolCarousel.tsx b/apps/frontend-v3/lib/modules/featured-pools/PoolCarousel.tsx index ec279e10f..96e151cff 100644 --- a/apps/frontend-v3/lib/modules/featured-pools/PoolCarousel.tsx +++ b/apps/frontend-v3/lib/modules/featured-pools/PoolCarousel.tsx @@ -1,6 +1,6 @@ 'use client' -import { GetFeaturedPoolsQuery } from '@/lib/shared/services/api/generated/graphql' +import { GetFeaturedPoolsQuery } from '@repo/api/graphql' import { useState } from 'react' import { Box, BoxProps, Card, Center, Text } from '@chakra-ui/react' import { FeaturePoolCard } from './FeaturePoolCard' diff --git a/apps/frontend-v3/lib/modules/marketing/useEcosystemPoolActivity.tsx b/apps/frontend-v3/lib/modules/marketing/useEcosystemPoolActivity.tsx index 456ff83b4..8f3f76479 100644 --- a/apps/frontend-v3/lib/modules/marketing/useEcosystemPoolActivity.tsx +++ b/apps/frontend-v3/lib/modules/marketing/useEcosystemPoolActivity.tsx @@ -4,7 +4,7 @@ import * as echarts from 'echarts/core' import { useEffect, useMemo, useRef, useState } from 'react' import { format } from 'date-fns' -import { GqlChain, GqlPoolEventType, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolEventType, GqlToken } from '@repo/api/graphql' import EChartsReactCore from 'echarts-for-react/lib/core' import { ColorMode, useTheme as useChakraTheme } from '@chakra-ui/react' import { useTheme as useNextTheme } from 'next-themes' diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolActivity/poolActivity.types.ts b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolActivity/poolActivity.types.ts index 14ae6fd9a..dd5511db2 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolActivity/poolActivity.types.ts +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolActivity/poolActivity.types.ts @@ -1,4 +1,4 @@ -import { GqlPoolType, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolType, GqlToken } from '@repo/api/graphql' import { BaseVariant, PoolVariant } from '../../pool.types' export type PoolActivityTokens = { diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolActivity/usePoolActivity.tsx b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolActivity/usePoolActivity.tsx index 2ead83726..037e172a0 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolActivity/usePoolActivity.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolActivity/usePoolActivity.tsx @@ -6,7 +6,7 @@ import { PropsWithChildren, createContext, useCallback, useMemo, useState } from import { useParams } from 'next/navigation' import { PoolVariant } from '../../pool.types' import { usePool } from '../../PoolProvider' -import { GqlPoolEventType } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolEventType } from '@repo/api/graphql' import { usePoolEvents } from '../../usePoolEvents' import { slugToChainMap, ChainSlug } from '../../pool.utils' import { useTokens } from '@/lib/modules/tokens/TokensProvider' diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolActivityChart/usePoolActivityChart.tsx b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolActivityChart/usePoolActivityChart.tsx index 01df35703..779af4c6c 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolActivityChart/usePoolActivityChart.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolActivityChart/usePoolActivityChart.tsx @@ -5,7 +5,7 @@ import * as echarts from 'echarts/core' import { useRef } from 'react' import { useParams } from 'next/navigation' import { secondsToMilliseconds, differenceInDays, format } from 'date-fns' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import EChartsReactCore from 'echarts-for-react/lib/core' import { ChainSlug, slugToChainMap } from '../../pool.utils' import { ColorMode, useTheme as useChakraTheme } from '@chakra-ui/react' diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolActivityTable/PoolActivityTableRow.tsx b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolActivityTable/PoolActivityTableRow.tsx index e6723deee..0636cac8f 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolActivityTable/PoolActivityTableRow.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolActivityTable/PoolActivityTableRow.tsx @@ -28,7 +28,7 @@ import { PoolActivityEl, PoolActivityTokens } from '../PoolActivity/poolActivity import { TokenIcon } from '@/lib/modules/tokens/TokenIcon' import { fNum } from '@/lib/shared/utils/numbers' import React from 'react' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { usePool } from '../../PoolProvider' interface Props extends GridProps { diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolComposition/PoolComposition.tsx b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolComposition/PoolComposition.tsx index 39ffe2432..1d95263ab 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolComposition/PoolComposition.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolComposition/PoolComposition.tsx @@ -4,7 +4,7 @@ import { Card, Divider, HStack, Heading, Skeleton, Stack, Text, VStack } from '@ import React from 'react' import { usePool } from '../../PoolProvider' import { Address } from 'viem' -import { GqlChain, GqlPoolTokenDetail } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolTokenDetail } from '@repo/api/graphql' import { useCurrency } from '@/lib/shared/hooks/useCurrency' import { fNum } from '@/lib/shared/utils/numbers' import { NoisyCard } from '@/lib/shared/components/containers/NoisyCard' diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolComposition/usePoolComposition.ts b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolComposition/usePoolComposition.ts index 79d89758d..701eb1fc0 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolComposition/usePoolComposition.ts +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolComposition/usePoolComposition.ts @@ -1,6 +1,6 @@ import { useMemo } from 'react' import { usePool } from '../../PoolProvider' -import { GqlPoolTokenDetail } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolTokenDetail } from '@repo/api/graphql' import { fNum } from '@/lib/shared/utils/numbers' type CompositionRow = { diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolInfo/PoolContracts.tsx b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolInfo/PoolContracts.tsx index a47554044..ac83fc357 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolInfo/PoolContracts.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolInfo/PoolContracts.tsx @@ -19,7 +19,7 @@ import { import { usePool } from '../../PoolProvider' import { ArrowUpRight } from 'react-feather' import { useMemo } from 'react' -import { GqlPriceRateProviderData, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlPriceRateProviderData, GqlToken } from '@repo/api/graphql' import { Address, zeroAddress } from 'viem' import { useTokens } from '@/lib/modules/tokens/TokensProvider' import { TokenIcon } from '@/lib/modules/tokens/TokenIcon' diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolInfo/PoolRisks/PoolRisks.tsx b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolInfo/PoolRisks/PoolRisks.tsx index 0a20084f3..8540573b7 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolInfo/PoolRisks/PoolRisks.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolInfo/PoolRisks/PoolRisks.tsx @@ -12,7 +12,7 @@ import { VStack, } from '@chakra-ui/react' import { usePool } from '../../../PoolProvider' -import { GqlPoolElement } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolElement } from '@repo/api/graphql' import { getPoolRisks, risksTitle } from './usePoolRisks' interface RisksListProps { diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolInfo/PoolRisks/usePoolRisks.ts b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolInfo/PoolRisks/usePoolRisks.ts index a24b7eab1..8b04f3acc 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolInfo/PoolRisks/usePoolRisks.ts +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolInfo/PoolRisks/usePoolRisks.ts @@ -1,4 +1,4 @@ -import { GqlChain, GqlPoolElement } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolElement } from '@repo/api/graphql' import { isMetaStable, isStable, isWeighted, isGyro } from '../../../pool.helpers' import { zeroAddress } from 'viem' diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolInfo/RateProviderInfo.tsx b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolInfo/RateProviderInfo.tsx index aab01eaa5..79c49e4fd 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolInfo/RateProviderInfo.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolInfo/RateProviderInfo.tsx @@ -1,5 +1,5 @@ import { TokenIcon } from '@/lib/modules/tokens/TokenIcon' -import { GqlPriceRateProviderData, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlPriceRateProviderData, GqlToken } from '@repo/api/graphql' import { Popover, PopoverTrigger, diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolMyLiquidity.tsx b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolMyLiquidity.tsx index 62bc1e79d..31a714f6b 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolMyLiquidity.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolMyLiquidity.tsx @@ -45,7 +45,7 @@ import { isVebalPool, shouldBlockAddLiquidity, calcUserShareOfPool, isFx } from import { getCanStake, migrateStakeTooltipLabel } from '../actions/stake.helpers' import { InfoOutlineIcon } from '@chakra-ui/icons' -import { GqlPoolStakingType } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolStakingType } from '@repo/api/graphql' import { ArrowUpRight } from 'react-feather' import { getChainId } from '@/lib/config/app.config' import { VeBalLink } from '../../vebal/VebalRedirectModal' diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolStats/PoolCharts/usePoolCharts.tsx b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolStats/PoolCharts/usePoolCharts.tsx index 491def1c6..ce8762b26 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolStats/PoolCharts/usePoolCharts.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolStats/PoolCharts/usePoolCharts.tsx @@ -6,7 +6,7 @@ import { GqlPoolType, GqlPoolSnapshotDataRange, GqlChain, -} from '@/lib/shared/services/api/generated/graphql' +} from '@repo/api/graphql' import { useQuery } from '@apollo/experimental-nextjs-app-support/ssr' import { useCallback, useMemo, useState } from 'react' import { useParams } from 'next/navigation' diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolStats/PoolSnapshot/PoolSnapshotValues.tsx b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolStats/PoolSnapshot/PoolSnapshotValues.tsx index 1b6e63e2a..ba6c21768 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolStats/PoolSnapshot/PoolSnapshotValues.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolStats/PoolSnapshot/PoolSnapshotValues.tsx @@ -2,7 +2,7 @@ import React, { memo, useMemo } from 'react' import { HStack, Heading, Skeleton, Text, VStack } from '@chakra-ui/react' -import { GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlToken } from '@repo/api/graphql' import { TokenIconStack } from '../../../../tokens/TokenIconStack' import { useCurrency } from '@/lib/shared/hooks/useCurrency' import { SECONDS_IN_DAY } from '@/test/utils/numbers' diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolStats/PoolSnapshot/UserSnapshotValues.tsx b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolStats/PoolSnapshot/UserSnapshotValues.tsx index e717af94e..669ccf060 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolStats/PoolSnapshot/UserSnapshotValues.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolStats/PoolSnapshot/UserSnapshotValues.tsx @@ -3,7 +3,7 @@ import React, { memo, useMemo } from 'react' import { Button, HStack, Heading, Skeleton, Text, Tooltip, VStack } from '@chakra-ui/react' import { TokenIconStack } from '../../../../tokens/TokenIconStack' -import { GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlToken } from '@repo/api/graphql' import { useCurrency } from '@/lib/shared/hooks/useCurrency' import { SECONDS_IN_DAY } from '@/test/utils/numbers' import { sumBy, isEmpty } from 'lodash' diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolUserEvents.tsx b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolUserEvents.tsx index b71bf59a0..96fb910d8 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolUserEvents.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolUserEvents.tsx @@ -14,7 +14,7 @@ import { import { usePool } from '../PoolProvider' import { useEffect, useLayoutEffect, useMemo, useState } from 'react' import { useCurrency } from '@/lib/shared/hooks/useCurrency' -import { GetPoolEventsQuery, GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GetPoolEventsQuery, GqlChain } from '@repo/api/graphql' import { TokenIcon } from '@/lib/modules/tokens/TokenIcon' import { formatDistanceToNow, secondsToMilliseconds } from 'date-fns' import { useBlockExplorer } from '@/lib/shared/hooks/useBlockExplorer' diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolWeightCharts/FeaturedPoolWeightChart.tsx b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolWeightCharts/FeaturedPoolWeightChart.tsx index fb6278609..2e11596ef 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolWeightCharts/FeaturedPoolWeightChart.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolWeightCharts/FeaturedPoolWeightChart.tsx @@ -1,7 +1,7 @@ 'use client' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' -import { GqlPoolTokenDetail } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' +import { GqlPoolTokenDetail } from '@repo/api/graphql' import { NoisyCard } from '@/lib/shared/components/containers/NoisyCard' import { useThemeColorMode } from '@/lib/shared/services/chakra/useThemeColorMode' import { Box, VStack, useTheme } from '@chakra-ui/react' diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolWeightCharts/PoolWeightChart.tsx b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolWeightCharts/PoolWeightChart.tsx index 90c7f78b4..9e68b6947 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolWeightCharts/PoolWeightChart.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolWeightCharts/PoolWeightChart.tsx @@ -1,6 +1,6 @@ 'use client' -import { GqlChain, GqlPoolTokenDetail } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolTokenDetail } from '@repo/api/graphql' import { NoisyCard } from '@/lib/shared/components/containers/NoisyCard' import { useThemeColorMode } from '@/lib/shared/services/chakra/useThemeColorMode' import { Box, VStack, useTheme } from '@chakra-ui/react' diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolWeightCharts/PoolWeightChartChainIcon.tsx b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolWeightCharts/PoolWeightChartChainIcon.tsx index d7d2a7108..323c040ea 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolWeightCharts/PoolWeightChartChainIcon.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolWeightCharts/PoolWeightChartChainIcon.tsx @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { Box } from '@chakra-ui/react' import { motion } from 'framer-motion' import Image from 'next/image' diff --git a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolWeightCharts/PoolWeightChartLegend.tsx b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolWeightCharts/PoolWeightChartLegend.tsx index 62b078bb4..62556923c 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolWeightCharts/PoolWeightChartLegend.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolDetail/PoolWeightCharts/PoolWeightChartLegend.tsx @@ -1,6 +1,6 @@ import { Box, HStack, Text } from '@chakra-ui/react' import { PoolWeightChartColorDef } from './PoolWeightChart' -import { GqlPoolTokenDetail } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolTokenDetail } from '@repo/api/graphql' export default function PoolWeightChartLegend({ displayTokens, diff --git a/apps/frontend-v3/lib/modules/pool/PoolList/PoolList.tsx b/apps/frontend-v3/lib/modules/pool/PoolList/PoolList.tsx index 37298419d..c86c64be9 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolList/PoolList.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolList/PoolList.tsx @@ -1,6 +1,6 @@ import { PoolListProvider } from '@/lib/modules/pool/PoolList/PoolListProvider' import { PoolListLayout } from './PoolListLayout' -import { GqlPoolType } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolType } from '@repo/api/graphql' export async function PoolList({ fixedPoolTypes }: { fixedPoolTypes?: GqlPoolType[] }) { return ( diff --git a/apps/frontend-v3/lib/modules/pool/PoolList/PoolListFilters.tsx b/apps/frontend-v3/lib/modules/pool/PoolList/PoolListFilters.tsx index 011923a53..f3bb8de04 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolList/PoolListFilters.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolList/PoolListFilters.tsx @@ -52,7 +52,7 @@ import { staggeredFadeInUp } from '@/lib/shared/utils/animations' import { getChainShortName } from '@/lib/config/app.config' import { usePoolList } from './PoolListProvider' import { MultiSelect } from '@/lib/shared/components/inputs/MultiSelect' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import Image from 'next/image' const SLIDER_MAX_VALUE = 10000000 diff --git a/apps/frontend-v3/lib/modules/pool/PoolList/PoolListProvider.tsx b/apps/frontend-v3/lib/modules/pool/PoolList/PoolListProvider.tsx index a634b495d..dc500a819 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolList/PoolListProvider.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolList/PoolListProvider.tsx @@ -2,7 +2,7 @@ 'use client' import { createContext, PropsWithChildren, useEffect } from 'react' -import { GetPoolsDocument, GqlPoolType } from '@/lib/shared/services/api/generated/graphql' +import { GetPoolsDocument, GqlPoolType } from '@repo/api/graphql' import { useQuery } from '@apollo/experimental-nextjs-app-support/ssr' import { usePoolListQueryState } from './usePoolListQueryState' import { useMandatoryContext } from '@/lib/shared/utils/contexts' diff --git a/apps/frontend-v3/lib/modules/pool/PoolList/PoolListTable/PoolListTableHeader.tsx b/apps/frontend-v3/lib/modules/pool/PoolList/PoolListTable/PoolListTableHeader.tsx index d00c7e46c..be34c6008 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolList/PoolListTable/PoolListTableHeader.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolList/PoolListTable/PoolListTableHeader.tsx @@ -2,7 +2,7 @@ import { Grid, GridItem, Icon, Text, VStack } from '@chakra-ui/react' import { usePoolListQueryState } from '../usePoolListQueryState' -import { GqlPoolOrderBy } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolOrderBy } from '@repo/api/graphql' import { PoolsColumnSort, orderByHash } from '../../pool.types' import { usePoolOrderByState } from '../usePoolOrderByState' import { Globe } from 'react-feather' diff --git a/apps/frontend-v3/lib/modules/pool/PoolList/PoolListTokenPills.tsx b/apps/frontend-v3/lib/modules/pool/PoolList/PoolListTokenPills.tsx index 9f66eef83..bcee790d5 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolList/PoolListTokenPills.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolList/PoolListTokenPills.tsx @@ -1,5 +1,5 @@ import { Badge, BadgeProps, HStack, Text, Wrap } from '@chakra-ui/react' -import { GqlChain, GqlPoolTokenDisplay } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolTokenDisplay } from '@repo/api/graphql' import { PoolListItem } from '../pool.types' import { TokenIcon } from '../../tokens/TokenIcon' import { fNum } from '@/lib/shared/utils/numbers' diff --git a/apps/frontend-v3/lib/modules/pool/PoolList/usePoolListQueryState.tsx b/apps/frontend-v3/lib/modules/pool/PoolList/usePoolListQueryState.tsx index e87d45448..630afca4d 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolList/usePoolListQueryState.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolList/usePoolListQueryState.tsx @@ -1,11 +1,6 @@ 'use client' -import { - GqlChain, - GqlPoolType, - GqlPoolOrderBy, - GqlPoolOrderDirection, -} from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolType, GqlPoolOrderBy, GqlPoolOrderDirection } from '@repo/api/graphql' import { uniq } from 'lodash' import { getProjectConfig } from '@/lib/config/getProjectConfig' import { useQueryState } from 'nuqs' diff --git a/apps/frontend-v3/lib/modules/pool/PoolList/usePoolOrderByState.ts b/apps/frontend-v3/lib/modules/pool/PoolList/usePoolOrderByState.ts index c966e0c52..4dea5cec5 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolList/usePoolOrderByState.ts +++ b/apps/frontend-v3/lib/modules/pool/PoolList/usePoolOrderByState.ts @@ -1,7 +1,7 @@ 'use client' /* eslint-disable react-hooks/exhaustive-deps */ -import { GqlPoolOrderBy } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolOrderBy } from '@repo/api/graphql' import { useState, useEffect } from 'react' import { usePoolListQueryState } from './usePoolListQueryState' diff --git a/apps/frontend-v3/lib/modules/pool/PoolProvider.spec.tsx b/apps/frontend-v3/lib/modules/pool/PoolProvider.spec.tsx index 082e47437..f42ecffb5 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolProvider.spec.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolProvider.spec.tsx @@ -1,4 +1,4 @@ -import { GetPoolQuery, GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GetPoolQuery, GqlChain } from '@repo/api/graphql' import { defaultPoolMock, defaultPoolResponseMock } from '@/test/msw/handlers/Pool.handlers' import { testHook } from '@/test/utils/custom-renderers' import { waitFor } from '@testing-library/react' diff --git a/apps/frontend-v3/lib/modules/pool/PoolProvider.tsx b/apps/frontend-v3/lib/modules/pool/PoolProvider.tsx index bfbb05d04..22369e3c8 100644 --- a/apps/frontend-v3/lib/modules/pool/PoolProvider.tsx +++ b/apps/frontend-v3/lib/modules/pool/PoolProvider.tsx @@ -1,12 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ 'use client' -import { - GetFeaturedPoolsQuery, - GetPoolDocument, - GetPoolQuery, - GqlChain, -} from '@/lib/shared/services/api/generated/graphql' +import { GetFeaturedPoolsQuery, GetPoolDocument, GetPoolQuery, GqlChain } from '@repo/api/graphql' import { createContext, PropsWithChildren, useRef } from 'react' import { useQuery } from '@apollo/client' import { FetchPoolProps } from './pool.types' diff --git a/apps/frontend-v3/lib/modules/pool/__mocks__/composableStablePoolMock.ts b/apps/frontend-v3/lib/modules/pool/__mocks__/composableStablePoolMock.ts index 60a17f2eb..f7787ebde 100644 --- a/apps/frontend-v3/lib/modules/pool/__mocks__/composableStablePoolMock.ts +++ b/apps/frontend-v3/lib/modules/pool/__mocks__/composableStablePoolMock.ts @@ -1,6 +1,6 @@ /* eslint-disable max-len */ -import { GqlChain, GqlPoolElement, GqlPoolType } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolElement, GqlPoolType } from '@repo/api/graphql' export const composableStablePoolMock: GqlPoolElement = { id: '0x156c02f3f7fef64a3a9d80ccf7085f23cce91d76000000000000000000000570', diff --git a/apps/frontend-v3/lib/modules/pool/__mocks__/getPoolMock.integration.spec.ts b/apps/frontend-v3/lib/modules/pool/__mocks__/getPoolMock.integration.spec.ts index eeb748521..458613523 100644 --- a/apps/frontend-v3/lib/modules/pool/__mocks__/getPoolMock.integration.spec.ts +++ b/apps/frontend-v3/lib/modules/pool/__mocks__/getPoolMock.integration.spec.ts @@ -1,5 +1,5 @@ import { gyro2CLP_USDC_DAI, recoveryModePoolId } from '@/lib/debug-helpers' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { getPoolMock } from './getPoolMock' /** diff --git a/apps/frontend-v3/lib/modules/pool/__mocks__/getPoolMock.ts b/apps/frontend-v3/lib/modules/pool/__mocks__/getPoolMock.ts index d2483a6c8..af89d511f 100644 --- a/apps/frontend-v3/lib/modules/pool/__mocks__/getPoolMock.ts +++ b/apps/frontend-v3/lib/modules/pool/__mocks__/getPoolMock.ts @@ -8,7 +8,7 @@ import { GqlChain, GetPoolQuery, GqlPoolElement, -} from '@/lib/shared/services/api/generated/graphql' +} from '@repo/api/graphql' import { nested50WETH_50_3poolId } from '@/lib/debug-helpers' import { Address } from 'viem' diff --git a/apps/frontend-v3/lib/modules/pool/__mocks__/gyroEPoolMock.ts b/apps/frontend-v3/lib/modules/pool/__mocks__/gyroEPoolMock.ts index 0beee2f5b..79118ca68 100644 --- a/apps/frontend-v3/lib/modules/pool/__mocks__/gyroEPoolMock.ts +++ b/apps/frontend-v3/lib/modules/pool/__mocks__/gyroEPoolMock.ts @@ -1,6 +1,6 @@ /* eslint-disable max-len */ -import { GqlPoolElement } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolElement } from '@repo/api/graphql' export const gyroEPoolMock: GqlPoolElement = { id: '0xf01b0684c98cd7ada480bfdf6e43876422fa1fc10002000000000000000005de', diff --git a/apps/frontend-v3/lib/modules/pool/__mocks__/gyroPoolMock.ts b/apps/frontend-v3/lib/modules/pool/__mocks__/gyroPoolMock.ts index 36600ab8b..9334e3cfe 100644 --- a/apps/frontend-v3/lib/modules/pool/__mocks__/gyroPoolMock.ts +++ b/apps/frontend-v3/lib/modules/pool/__mocks__/gyroPoolMock.ts @@ -1,6 +1,6 @@ /* eslint-disable max-len */ -import { GqlPoolElement } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolElement } from '@repo/api/graphql' export const gyroPoolMock: GqlPoolElement = { id: '0xdac42eeb17758daa38caf9a3540c808247527ae3000200000000000000000a2b', diff --git a/apps/frontend-v3/lib/modules/pool/__mocks__/metaStablePoolMock.ts b/apps/frontend-v3/lib/modules/pool/__mocks__/metaStablePoolMock.ts index bacd88f7e..6fbf86358 100644 --- a/apps/frontend-v3/lib/modules/pool/__mocks__/metaStablePoolMock.ts +++ b/apps/frontend-v3/lib/modules/pool/__mocks__/metaStablePoolMock.ts @@ -1,6 +1,6 @@ /* eslint-disable max-len */ -import { GqlChain, GqlPoolElement, GqlPoolType } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolElement, GqlPoolType } from '@repo/api/graphql' export const metaStablePoolMock: GqlPoolElement = { id: '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080', diff --git a/apps/frontend-v3/lib/modules/pool/__mocks__/nestedPoolMock.ts b/apps/frontend-v3/lib/modules/pool/__mocks__/nestedPoolMock.ts index a213a254d..3cb3f6eaa 100644 --- a/apps/frontend-v3/lib/modules/pool/__mocks__/nestedPoolMock.ts +++ b/apps/frontend-v3/lib/modules/pool/__mocks__/nestedPoolMock.ts @@ -1,6 +1,6 @@ /* eslint-disable max-len */ -import { GqlPoolElement } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolElement } from '@repo/api/graphql' export const nestedPoolMock: GqlPoolElement = { id: '0x08775ccb6674d6bdceb0797c364c2653ed84f3840002000000000000000004f0', diff --git a/apps/frontend-v3/lib/modules/pool/__mocks__/notAllowedPoolMock.ts b/apps/frontend-v3/lib/modules/pool/__mocks__/notAllowedPoolMock.ts index ceb64f2b0..498443163 100644 --- a/apps/frontend-v3/lib/modules/pool/__mocks__/notAllowedPoolMock.ts +++ b/apps/frontend-v3/lib/modules/pool/__mocks__/notAllowedPoolMock.ts @@ -1,9 +1,5 @@ /* eslint-disable max-len */ -import { - GqlChain, - GqlPoolNestingType, - GqlPoolType, -} from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolNestingType, GqlPoolType } from '@repo/api/graphql' import { Pool } from '../PoolProvider' export const notAllowedPoolMock: Pool = { diff --git a/apps/frontend-v3/lib/modules/pool/__mocks__/recoveryPoolMock.ts b/apps/frontend-v3/lib/modules/pool/__mocks__/recoveryPoolMock.ts index 1de4e9ea8..21ebaf644 100644 --- a/apps/frontend-v3/lib/modules/pool/__mocks__/recoveryPoolMock.ts +++ b/apps/frontend-v3/lib/modules/pool/__mocks__/recoveryPoolMock.ts @@ -1,6 +1,6 @@ /* eslint-disable max-len */ -import { GqlChain, GqlPoolElement } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolElement } from '@repo/api/graphql' // TODO: remove linear (nested) pools export const recoveryPoolMock: GqlPoolElement = { diff --git a/apps/frontend-v3/lib/modules/pool/actions/LiquidityActionHelpers.ts b/apps/frontend-v3/lib/modules/pool/actions/LiquidityActionHelpers.ts index 00c2709be..9d52d571f 100644 --- a/apps/frontend-v3/lib/modules/pool/actions/LiquidityActionHelpers.ts +++ b/apps/frontend-v3/lib/modules/pool/actions/LiquidityActionHelpers.ts @@ -1,7 +1,7 @@ import { getChainId, getNativeAsset, getNetworkConfig } from '@/lib/config/app.config' import { TokenAmountToApprove } from '@/lib/modules/tokens/approvals/approval-rules' import { nullAddress } from '@/lib/modules/web3/contracts/wagmi-helpers' -import { GqlChain, GqlPoolType, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolType, GqlToken } from '@repo/api/graphql' import { isSameAddress } from '@/lib/shared/utils/addresses' import { SentryError } from '@/lib/shared/utils/errors' import { bn, isZero } from '@/lib/shared/utils/numbers' diff --git a/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/AddLiquidityProvider.spec.tsx b/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/AddLiquidityProvider.spec.tsx index 27e9c8558..7f094ffad 100644 --- a/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/AddLiquidityProvider.spec.tsx +++ b/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/AddLiquidityProvider.spec.tsx @@ -1,5 +1,5 @@ import { balAddress, daiAddress, usdcAddress, usdtAddress, wETHAddress } from '@/lib/debug-helpers' -import { GqlPoolElement } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolElement } from '@repo/api/graphql' import { aBalWethPoolElementMock } from '@/test/msw/builders/gqlPoolElement.builders' import { DefaultAddLiquidityTestProvider, diff --git a/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/AddLiquidityProvider.tsx b/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/AddLiquidityProvider.tsx index ed83753cb..9a5b4a40e 100644 --- a/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/AddLiquidityProvider.tsx +++ b/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/AddLiquidityProvider.tsx @@ -2,7 +2,7 @@ 'use client' import { useTokens } from '@/lib/modules/tokens/TokensProvider' -import { GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlToken } from '@repo/api/graphql' import { useMandatoryContext } from '@/lib/shared/utils/contexts' import { HumanAmount } from '@balancer/sdk' import { PropsWithChildren, createContext, useEffect, useMemo, useState } from 'react' diff --git a/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/form/AddLiquidityForm.tsx b/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/form/AddLiquidityForm.tsx index 10d0b5b3b..86b839251 100644 --- a/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/form/AddLiquidityForm.tsx +++ b/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/form/AddLiquidityForm.tsx @@ -36,7 +36,7 @@ import { usePriceImpact } from '@/lib/modules/price-impact/PriceImpactProvider' import { useCurrency } from '@/lib/shared/hooks/useCurrency' import { AddLiquidityFormCheckbox } from './AddLiquidityFormCheckbox' import { isNativeOrWrappedNative, isNativeAsset } from '@/lib/modules/tokens/token.helpers' -import { GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlToken } from '@repo/api/graphql' import { NativeAssetSelectModal } from '@/lib/modules/tokens/NativeAssetSelectModal' import { useTokenInputsValidation } from '@/lib/modules/tokens/TokenInputsValidationProvider' import { GenericError } from '@/lib/shared/components/errors/GenericError' diff --git a/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/handlers/NestedAddLiquidity.handler.integration.spec.ts b/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/handlers/NestedAddLiquidity.handler.integration.spec.ts index 98b059af1..de2ac4b94 100644 --- a/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/handlers/NestedAddLiquidity.handler.integration.spec.ts +++ b/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/handlers/NestedAddLiquidity.handler.integration.spec.ts @@ -8,7 +8,7 @@ import { selectAddLiquidityHandler } from './selectAddLiquidityHandler' import { defaultTestUserAccount } from '@/test/anvil/anvil-setup' import { HumanTokenAmountWithAddress } from '@/lib/modules/tokens/token.types' import { getPoolMock } from '../../../__mocks__/getPoolMock' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' function selectNestedHandler(pool: Pool) { return selectAddLiquidityHandler(pool) as NestedAddLiquidityHandler diff --git a/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/queries/add-liquidity-keys.ts b/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/queries/add-liquidity-keys.ts index 06f748a88..debd716e9 100644 --- a/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/queries/add-liquidity-keys.ts +++ b/apps/frontend-v3/lib/modules/pool/actions/add-liquidity/queries/add-liquidity-keys.ts @@ -1,4 +1,4 @@ -import { GqlPoolType } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolType } from '@repo/api/graphql' import { requiresProportionalInput } from '../../LiquidityActionHelpers' import { AddLiquidityHandler } from '../handlers/AddLiquidity.handler' import { HumanTokenAmountWithAddress } from '@/lib/modules/tokens/token.types' diff --git a/apps/frontend-v3/lib/modules/pool/actions/claim/ClaimModal.tsx b/apps/frontend-v3/lib/modules/pool/actions/claim/ClaimModal.tsx index ef5cd251a..23aeb5e67 100644 --- a/apps/frontend-v3/lib/modules/pool/actions/claim/ClaimModal.tsx +++ b/apps/frontend-v3/lib/modules/pool/actions/claim/ClaimModal.tsx @@ -21,7 +21,7 @@ import { ActionModalFooter } from '@/lib/shared/components/modals/ActionModalFoo import { SuccessOverlay } from '@/lib/shared/components/modals/SuccessOverlay' import { HumanTokenAmountWithAddress } from '@/lib/modules/tokens/token.types' import { useEffect, useMemo, useState } from 'react' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { useResetStepIndexOnOpen } from '../useResetStepIndexOnOpen' import { useRouter } from 'next/navigation' import { AnimateHeightChange } from '@/lib/shared/components/modals/AnimatedModalBody' diff --git a/apps/frontend-v3/lib/modules/pool/actions/claim/useClaimAllRewardsStep.tsx b/apps/frontend-v3/lib/modules/pool/actions/claim/useClaimAllRewardsStep.tsx index cd9ae386a..da7f3afca 100644 --- a/apps/frontend-v3/lib/modules/pool/actions/claim/useClaimAllRewardsStep.tsx +++ b/apps/frontend-v3/lib/modules/pool/actions/claim/useClaimAllRewardsStep.tsx @@ -7,7 +7,7 @@ import { TransactionLabels, TransactionStep, } from '@/lib/modules/transactions/transaction-steps/lib' -import { GqlChain, GqlPoolStakingType } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolStakingType } from '@repo/api/graphql' import { sentryMetaForWagmiSimulation } from '@/lib/shared/utils/query-errors' import { useMemo, useState } from 'react' import { ManagedTransactionInput } from '../../../web3/contracts/useManagedTransaction' diff --git a/apps/frontend-v3/lib/modules/pool/actions/remove-liquidity/RemoveLiquidityProvider.spec.tsx b/apps/frontend-v3/lib/modules/pool/actions/remove-liquidity/RemoveLiquidityProvider.spec.tsx index 87e535c06..879c5d530 100644 --- a/apps/frontend-v3/lib/modules/pool/actions/remove-liquidity/RemoveLiquidityProvider.spec.tsx +++ b/apps/frontend-v3/lib/modules/pool/actions/remove-liquidity/RemoveLiquidityProvider.spec.tsx @@ -1,6 +1,6 @@ import { balAddress, wETHAddress } from '@/lib/debug-helpers' import { aTokenPriceMock } from '@/lib/modules/tokens/__mocks__/token.builders' -import { GqlPoolElement } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolElement } from '@repo/api/graphql' import { aBalWethPoolElementMock } from '@/test/msw/builders/gqlPoolElement.builders' import { aUserPoolBalance } from '@/test/msw/builders/gqlUserBalance.builders' import { mockTokenPricesList } from '@/test/msw/handlers/Tokens.handlers' diff --git a/apps/frontend-v3/lib/modules/pool/actions/remove-liquidity/RemoveLiquidityProvider.tsx b/apps/frontend-v3/lib/modules/pool/actions/remove-liquidity/RemoveLiquidityProvider.tsx index cc08b668f..75d4a7ce5 100644 --- a/apps/frontend-v3/lib/modules/pool/actions/remove-liquidity/RemoveLiquidityProvider.tsx +++ b/apps/frontend-v3/lib/modules/pool/actions/remove-liquidity/RemoveLiquidityProvider.tsx @@ -4,7 +4,7 @@ import { useTokens } from '@/lib/modules/tokens/TokensProvider' import { useUserAccount } from '@/lib/modules/web3/UserAccountProvider' import { LABELS } from '@/lib/shared/labels' -import { GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlToken } from '@repo/api/graphql' import { useMandatoryContext } from '@/lib/shared/utils/contexts' import { isDisabledWithReason } from '@/lib/shared/utils/functions/isDisabledWithReason' import { bn, isZero, safeSum } from '@/lib/shared/utils/numbers' diff --git a/apps/frontend-v3/lib/modules/pool/actions/remove-liquidity/form/RemoveLiquidityProportional.tsx b/apps/frontend-v3/lib/modules/pool/actions/remove-liquidity/form/RemoveLiquidityProportional.tsx index e0425c760..b33dacd83 100644 --- a/apps/frontend-v3/lib/modules/pool/actions/remove-liquidity/form/RemoveLiquidityProportional.tsx +++ b/apps/frontend-v3/lib/modules/pool/actions/remove-liquidity/form/RemoveLiquidityProportional.tsx @@ -2,7 +2,7 @@ 'use client' import TokenRow from '@/lib/modules/tokens/TokenRow/TokenRow' -import { GqlPoolType, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolType, GqlToken } from '@repo/api/graphql' import { Card, Text, VStack, useDisclosure } from '@chakra-ui/react' import { Address } from 'viem' import { useRemoveLiquidity } from '../RemoveLiquidityProvider' diff --git a/apps/frontend-v3/lib/modules/pool/actions/remove-liquidity/form/RemoveLiquiditySingleToken.tsx b/apps/frontend-v3/lib/modules/pool/actions/remove-liquidity/form/RemoveLiquiditySingleToken.tsx index a85fcdbcc..e8dce0c16 100644 --- a/apps/frontend-v3/lib/modules/pool/actions/remove-liquidity/form/RemoveLiquiditySingleToken.tsx +++ b/apps/frontend-v3/lib/modules/pool/actions/remove-liquidity/form/RemoveLiquiditySingleToken.tsx @@ -1,7 +1,7 @@ 'use client' import TokenRow from '@/lib/modules/tokens/TokenRow/TokenRow' -import { GqlChain, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlToken } from '@repo/api/graphql' import { Box, HStack, Radio, RadioGroup, Text, VStack } from '@chakra-ui/react' import { Address } from 'viem' import { useRemoveLiquidity } from '../RemoveLiquidityProvider' diff --git a/apps/frontend-v3/lib/modules/pool/actions/stake.helpers.ts b/apps/frontend-v3/lib/modules/pool/actions/stake.helpers.ts index 6da55e054..6c896a611 100644 --- a/apps/frontend-v3/lib/modules/pool/actions/stake.helpers.ts +++ b/apps/frontend-v3/lib/modules/pool/actions/stake.helpers.ts @@ -3,10 +3,7 @@ import { Pool } from '../PoolProvider' import { Address } from 'viem' import { HumanAmount } from '@balancer/sdk' import { isClaimableGauge } from '../pool.helpers' -import { - GqlPoolStakingType, - GqlUserStakedBalance, -} from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolStakingType, GqlUserStakedBalance } from '@repo/api/graphql' import { getStakedBalance } from '../user-balance.helpers' // eslint-disable-next-line max-len diff --git a/apps/frontend-v3/lib/modules/pool/alerts/usePoolAlerts.tsx b/apps/frontend-v3/lib/modules/pool/alerts/usePoolAlerts.tsx index 988f9aa0c..9b2d44364 100644 --- a/apps/frontend-v3/lib/modules/pool/alerts/usePoolAlerts.tsx +++ b/apps/frontend-v3/lib/modules/pool/alerts/usePoolAlerts.tsx @@ -1,7 +1,7 @@ import { getNetworkConfig } from '@/lib/config/app.config' import { BalAlertButton } from '@/lib/shared/components/alerts/BalAlertButton' import { BalAlertContent } from '@/lib/shared/components/alerts/BalAlertContent' -import { GqlPoolTokenDetail } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolTokenDetail } from '@repo/api/graphql' import { isNil } from 'lodash' import { usePathname, useRouter } from 'next/navigation' import { useEffect, useState } from 'react' diff --git a/apps/frontend-v3/lib/modules/pool/pool.helpers.ts b/apps/frontend-v3/lib/modules/pool/pool.helpers.ts index 48dfbf0c4..2a5c31ba2 100644 --- a/apps/frontend-v3/lib/modules/pool/pool.helpers.ts +++ b/apps/frontend-v3/lib/modules/pool/pool.helpers.ts @@ -9,7 +9,7 @@ import { GqlPoolStakingOtherGauge, GqlPoolTokenDetail, GqlPoolType, -} from '@/lib/shared/services/api/generated/graphql' +} from '@repo/api/graphql' import { isSameAddress } from '@/lib/shared/utils/addresses' import { Numberish, bn } from '@/lib/shared/utils/numbers' import BigNumber from 'bignumber.js' diff --git a/apps/frontend-v3/lib/modules/pool/pool.types.ts b/apps/frontend-v3/lib/modules/pool/pool.types.ts index 40bdbfe6d..9a1650b9e 100644 --- a/apps/frontend-v3/lib/modules/pool/pool.types.ts +++ b/apps/frontend-v3/lib/modules/pool/pool.types.ts @@ -5,7 +5,7 @@ import { GqlPoolType, GqlPoolOrderBy, GqlPoolOrderDirection, -} from '@/lib/shared/services/api/generated/graphql' +} from '@repo/api/graphql' import { parseAsArrayOf, parseAsInteger, diff --git a/apps/frontend-v3/lib/modules/pool/pool.utils.ts b/apps/frontend-v3/lib/modules/pool/pool.utils.ts index 965cde4da..7a8459bee 100644 --- a/apps/frontend-v3/lib/modules/pool/pool.utils.ts +++ b/apps/frontend-v3/lib/modules/pool/pool.utils.ts @@ -7,7 +7,7 @@ import { GqlPoolAprItem, GqlPoolTokenDisplay, GqlPoolAprItemType, -} from '@/lib/shared/services/api/generated/graphql' +} from '@repo/api/graphql' import { invert } from 'lodash' import { BaseVariant, diff --git a/apps/frontend-v3/lib/modules/pool/queries/useOnchainUserPoolBalances.integration.spec.ts b/apps/frontend-v3/lib/modules/pool/queries/useOnchainUserPoolBalances.integration.spec.ts index 3f3311651..d513c3520 100644 --- a/apps/frontend-v3/lib/modules/pool/queries/useOnchainUserPoolBalances.integration.spec.ts +++ b/apps/frontend-v3/lib/modules/pool/queries/useOnchainUserPoolBalances.integration.spec.ts @@ -9,7 +9,7 @@ import { defaultTestUserAccount } from '@/test/anvil/anvil-setup' import { ChainId } from '@balancer/sdk' import { waitFor } from '@testing-library/react' import { useOnchainUserPoolBalances } from './useOnchainUserPoolBalances' -import { GqlPoolElement } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolElement } from '@repo/api/graphql' import { connectWithDefaultUser } from '@/test/utils/wagmi/wagmi-connections' async function testUseChainPoolBalances(pool: GqlPoolElement) { diff --git a/apps/frontend-v3/lib/modules/pool/queries/useOnchainUserPoolBalances.ts b/apps/frontend-v3/lib/modules/pool/queries/useOnchainUserPoolBalances.ts index 1a40906bd..564708077 100644 --- a/apps/frontend-v3/lib/modules/pool/queries/useOnchainUserPoolBalances.ts +++ b/apps/frontend-v3/lib/modules/pool/queries/useOnchainUserPoolBalances.ts @@ -1,8 +1,5 @@ /* eslint-disable react-hooks/exhaustive-deps */ -import { - GqlPoolUserBalance, - GqlUserStakedBalance, -} from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolUserBalance, GqlUserStakedBalance } from '@repo/api/graphql' import { isSameAddress } from '@/lib/shared/utils/addresses' import { bn, safeSum } from '@/lib/shared/utils/numbers' import { captureNonFatalError } from '@/lib/shared/utils/query-errors' diff --git a/apps/frontend-v3/lib/modules/pool/queries/usePoolEnrichWithOnChainData.integration.spec.tsx b/apps/frontend-v3/lib/modules/pool/queries/usePoolEnrichWithOnChainData.integration.spec.tsx index 55d368364..fc82ef95d 100644 --- a/apps/frontend-v3/lib/modules/pool/queries/usePoolEnrichWithOnChainData.integration.spec.tsx +++ b/apps/frontend-v3/lib/modules/pool/queries/usePoolEnrichWithOnChainData.integration.spec.tsx @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { defaultTestUserAccount } from '@/test/anvil/anvil-setup' import { testHook } from '@/test/utils/custom-renderers' import { waitFor } from '@testing-library/react' diff --git a/apps/frontend-v3/lib/modules/pool/queries/usePoolEnrichWithOnChainData.tsx b/apps/frontend-v3/lib/modules/pool/queries/usePoolEnrichWithOnChainData.tsx index 3756c1539..b6d47a384 100644 --- a/apps/frontend-v3/lib/modules/pool/queries/usePoolEnrichWithOnChainData.tsx +++ b/apps/frontend-v3/lib/modules/pool/queries/usePoolEnrichWithOnChainData.tsx @@ -6,7 +6,7 @@ import { balancerV3VaultAbi } from '../../web3/contracts/abi/balancerV3Abi' import { weightedPoolV3Abi } from '../../web3/contracts/abi/weightedPoolV3Abi' import { Pool } from '../PoolProvider' import { BPT_DECIMALS } from '../pool.constants' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { bn, safeSum } from '@/lib/shared/utils/numbers' import { getVaultConfig, isCowAmmPool, isV1Pool, isV2Pool, isV3Pool } from '../pool.helpers' import { getChainId } from '@/lib/config/app.config' diff --git a/apps/frontend-v3/lib/modules/pool/queries/useUserStakedBalance.integration.spec.ts b/apps/frontend-v3/lib/modules/pool/queries/useUserStakedBalance.integration.spec.ts index 3f9d7ba44..ea6f01d85 100644 --- a/apps/frontend-v3/lib/modules/pool/queries/useUserStakedBalance.integration.spec.ts +++ b/apps/frontend-v3/lib/modules/pool/queries/useUserStakedBalance.integration.spec.ts @@ -1,4 +1,4 @@ -import { GqlChain, GqlPoolElement } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolElement } from '@repo/api/graphql' import { userStakedInNonPreferentialGauge } from '@/test/anvil/anvil-setup' import { testHook } from '@/test/utils/custom-renderers' import { connectWith, disconnectWith } from '@/test/utils/wagmi/wagmi-connections' diff --git a/apps/frontend-v3/lib/modules/pool/queries/useUserStakedBalance.tsx b/apps/frontend-v3/lib/modules/pool/queries/useUserStakedBalance.tsx index 7d1f3f6dd..d2c4bb1fc 100644 --- a/apps/frontend-v3/lib/modules/pool/queries/useUserStakedBalance.tsx +++ b/apps/frontend-v3/lib/modules/pool/queries/useUserStakedBalance.tsx @@ -1,8 +1,5 @@ import { getChainId } from '@/lib/config/app.config' -import { - GqlPoolStakingType, - GqlUserStakedBalance, -} from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolStakingType, GqlUserStakedBalance } from '@repo/api/graphql' import { bn } from '@/lib/shared/utils/numbers' import { compact, groupBy } from 'lodash' import { Address, formatUnits } from 'viem' diff --git a/apps/frontend-v3/lib/modules/pool/usePoolEvents.tsx b/apps/frontend-v3/lib/modules/pool/usePoolEvents.tsx index ab1194310..bb1f1bb0b 100644 --- a/apps/frontend-v3/lib/modules/pool/usePoolEvents.tsx +++ b/apps/frontend-v3/lib/modules/pool/usePoolEvents.tsx @@ -4,7 +4,7 @@ import { GqlPoolEventType, GqlPoolEventsDataRange, GetPoolEventsQuery, -} from '@/lib/shared/services/api/generated/graphql' +} from '@repo/api/graphql' import { FetchPolicy } from '@apollo/client' import { useQuery } from '@apollo/client' diff --git a/apps/frontend-v3/lib/modules/pool/user-balance.helpers.spec.ts b/apps/frontend-v3/lib/modules/pool/user-balance.helpers.spec.ts index 86c757955..ca21accde 100644 --- a/apps/frontend-v3/lib/modules/pool/user-balance.helpers.spec.ts +++ b/apps/frontend-v3/lib/modules/pool/user-balance.helpers.spec.ts @@ -1,9 +1,5 @@ import { aWjAuraWethPoolElementMock } from '@/test/msw/builders/gqlPoolElement.builders' -import { - GqlPoolStakingType, - GqlPoolUserBalance, - GqlUserStakedBalance, -} from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolStakingType, GqlPoolUserBalance, GqlUserStakedBalance } from '@repo/api/graphql' import { calcNonOnChainFetchedStakedBalance, calcTotalStakedBalanceInt, diff --git a/apps/frontend-v3/lib/modules/pool/user-balance.helpers.ts b/apps/frontend-v3/lib/modules/pool/user-balance.helpers.ts index 2fb77b66a..5b4a886f6 100644 --- a/apps/frontend-v3/lib/modules/pool/user-balance.helpers.ts +++ b/apps/frontend-v3/lib/modules/pool/user-balance.helpers.ts @@ -4,7 +4,7 @@ import { PoolListItem } from './pool.types' import { parseUnits } from 'viem' import { BPT_DECIMALS } from './pool.constants' import { HumanAmount } from '@balancer/sdk' -import { GqlPoolStakingType } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolStakingType } from '@repo/api/graphql' import { hasNonPreferentialStakedBalance, hasPreferentialGauge } from './actions/stake.helpers' export function calcTotalStakedBalance(pool: Pool | PoolListItem): HumanAmount { diff --git a/apps/frontend-v3/lib/modules/portfolio/PortfolioClaim/ClaimNetworkPools/ClaimNetworkBlock.tsx b/apps/frontend-v3/lib/modules/portfolio/PortfolioClaim/ClaimNetworkPools/ClaimNetworkBlock.tsx index c33f3e2a4..c183d7cf0 100644 --- a/apps/frontend-v3/lib/modules/portfolio/PortfolioClaim/ClaimNetworkPools/ClaimNetworkBlock.tsx +++ b/apps/frontend-v3/lib/modules/portfolio/PortfolioClaim/ClaimNetworkPools/ClaimNetworkBlock.tsx @@ -1,7 +1,7 @@ import { NetworkIcon } from '@/lib/shared/components/icons/NetworkIcon' import { Button, Card, Flex, HStack, Heading, IconButton, Stack } from '@chakra-ui/react' import { chainToSlugMap } from '../../../pool/pool.utils' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { useCurrency } from '@/lib/shared/hooks/useCurrency' import { useBreakpoints } from '@/lib/shared/hooks/useBreakpoints' import { ChevronRight } from 'react-feather' diff --git a/apps/frontend-v3/lib/modules/portfolio/PortfolioClaim/ClaimNetworkPools/ClaimNetworkPools.tsx b/apps/frontend-v3/lib/modules/portfolio/PortfolioClaim/ClaimNetworkPools/ClaimNetworkPools.tsx index b6aceb0e5..5135f2e13 100644 --- a/apps/frontend-v3/lib/modules/portfolio/PortfolioClaim/ClaimNetworkPools/ClaimNetworkPools.tsx +++ b/apps/frontend-v3/lib/modules/portfolio/PortfolioClaim/ClaimNetworkPools/ClaimNetworkPools.tsx @@ -3,7 +3,7 @@ import { Heading, Stack, Skeleton, SimpleGrid, Center, Text } from '@chakra-ui/react' import { usePortfolio } from '../../PortfolioProvider' import { ClaimNetworkBlock } from './ClaimNetworkBlock' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { chainToSlugMap } from '../../../pool/pool.utils' import { useUserAccount } from '@/lib/modules/web3/UserAccountProvider' import { useState } from 'react' diff --git a/apps/frontend-v3/lib/modules/portfolio/PortfolioClaim/ClaimProtocolRevenueModal.tsx b/apps/frontend-v3/lib/modules/portfolio/PortfolioClaim/ClaimProtocolRevenueModal.tsx index c3eaaec29..24f19258e 100644 --- a/apps/frontend-v3/lib/modules/portfolio/PortfolioClaim/ClaimProtocolRevenueModal.tsx +++ b/apps/frontend-v3/lib/modules/portfolio/PortfolioClaim/ClaimProtocolRevenueModal.tsx @@ -2,7 +2,7 @@ import { Modal, ModalBody, ModalCloseButton, ModalContent, Card } from '@chakra-ui/react' import { UsePortfolio, usePortfolio } from '@/lib/modules/portfolio/PortfolioProvider' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { Address } from 'viem' import { useBreakpoints } from '@/lib/shared/hooks/useBreakpoints' import { DesktopStepTracker } from '../../transactions/transaction-steps/step-tracker/DesktopStepTracker' diff --git a/apps/frontend-v3/lib/modules/portfolio/PortfolioClaim/useClaimableBalances.ts b/apps/frontend-v3/lib/modules/portfolio/PortfolioClaim/useClaimableBalances.ts index 359ee4677..2d749175d 100644 --- a/apps/frontend-v3/lib/modules/portfolio/PortfolioClaim/useClaimableBalances.ts +++ b/apps/frontend-v3/lib/modules/portfolio/PortfolioClaim/useClaimableBalances.ts @@ -9,7 +9,7 @@ import { AbiMap } from '../../web3/contracts/AbiMap' import { useUserAccount } from '../../web3/UserAccountProvider' import { BPT_DECIMALS } from '../../pool/pool.constants' import { ClaimablePool } from '../../pool/actions/claim/ClaimProvider' -import { GqlChain, GqlPoolStakingGaugeReward } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolStakingGaugeReward } from '@repo/api/graphql' import { groupBy, uniqBy } from 'lodash' import { onlyExplicitRefetch } from '@/lib/shared/utils/queries' diff --git a/apps/frontend-v3/lib/modules/portfolio/PortfolioProvider.tsx b/apps/frontend-v3/lib/modules/portfolio/PortfolioProvider.tsx index f086a64ab..5bd90839c 100644 --- a/apps/frontend-v3/lib/modules/portfolio/PortfolioProvider.tsx +++ b/apps/frontend-v3/lib/modules/portfolio/PortfolioProvider.tsx @@ -1,6 +1,6 @@ 'use client' -import { GetPoolsDocument } from '@/lib/shared/services/api/generated/graphql' +import { GetPoolsDocument } from '@repo/api/graphql' import { useQuery as useApolloQuery } from '@apollo/experimental-nextjs-app-support/ssr' import { createContext, PropsWithChildren, useCallback, useMemo } from 'react' import { useProtocolRewards } from './PortfolioClaim/useProtocolRewards' diff --git a/apps/frontend-v3/lib/modules/portfolio/PortfolioTable/PortfolioTable.tsx b/apps/frontend-v3/lib/modules/portfolio/PortfolioTable/PortfolioTable.tsx index d5e8c6777..e39aa779e 100644 --- a/apps/frontend-v3/lib/modules/portfolio/PortfolioTable/PortfolioTable.tsx +++ b/apps/frontend-v3/lib/modules/portfolio/PortfolioTable/PortfolioTable.tsx @@ -4,7 +4,7 @@ import { PortfolioTableHeader } from './PortfolioTableHeader' import { PortfolioTableRow } from './PortfolioTableRow' import { Card, Center, Checkbox, HStack, Heading, Stack, Text } from '@chakra-ui/react' import { useMemo, useState } from 'react' -import { GqlPoolOrderBy } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolOrderBy } from '@repo/api/graphql' import { useVebalBoost } from '../../vebal/useVebalBoost' import FadeInOnView from '@/lib/shared/components/containers/FadeInOnView' import { diff --git a/apps/frontend-v3/lib/modules/portfolio/PortfolioTable/useExpandedPools.ts b/apps/frontend-v3/lib/modules/portfolio/PortfolioTable/useExpandedPools.ts index fcab12688..99af218e9 100644 --- a/apps/frontend-v3/lib/modules/portfolio/PortfolioTable/useExpandedPools.ts +++ b/apps/frontend-v3/lib/modules/portfolio/PortfolioTable/useExpandedPools.ts @@ -1,7 +1,7 @@ import { useMemo } from 'react' import { Pool } from '../../pool/PoolProvider' import { isVebalPool } from '../../pool/pool.helpers' -import { GqlPoolStakingType } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolStakingType } from '@repo/api/graphql' export enum ExpandedPoolType { StakedBal = 'staked-bal', diff --git a/apps/frontend-v3/lib/modules/staking/gauge/useMinterApprovalStep.tsx b/apps/frontend-v3/lib/modules/staking/gauge/useMinterApprovalStep.tsx index adb9a0b77..a44e7b0e6 100644 --- a/apps/frontend-v3/lib/modules/staking/gauge/useMinterApprovalStep.tsx +++ b/apps/frontend-v3/lib/modules/staking/gauge/useMinterApprovalStep.tsx @@ -7,7 +7,7 @@ import { getNetworkConfig } from '@/lib/config/app.config' import { useHasMinterApproval } from './useHasMinterApproval' import { useMemo } from 'react' import { useUserAccount } from '@/lib/modules/web3/UserAccountProvider' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { sentryMetaForWagmiSimulation } from '@/lib/shared/utils/query-errors' import { ManagedTransactionButton } from '../../transactions/transaction-steps/TransactionButton' diff --git a/apps/frontend-v3/lib/modules/staking/selectStakingService.ts b/apps/frontend-v3/lib/modules/staking/selectStakingService.ts index 0b29c5425..e407b2baf 100644 --- a/apps/frontend-v3/lib/modules/staking/selectStakingService.ts +++ b/apps/frontend-v3/lib/modules/staking/selectStakingService.ts @@ -2,7 +2,7 @@ import { GaugeService } from '@/lib/shared/services/staking/gauge.service' import { BatchRelayerService } from '@/lib/shared/services/batch-relayer/batch-relayer.service' import { getNetworkConfig } from '@/lib/config/app.config' import { gaugeActionsService } from '@/lib/shared/services/batch-relayer/extensions/gauge-actions.service' -import { GqlChain, GqlPoolStakingType } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolStakingType } from '@repo/api/graphql' export function selectStakingService(chain: GqlChain, stakingType: GqlPoolStakingType) { const networkConfig = getNetworkConfig(chain) diff --git a/apps/frontend-v3/lib/modules/swap/SwapDetails.tsx b/apps/frontend-v3/lib/modules/swap/SwapDetails.tsx index 28e3cb5e4..d8aa1c9da 100644 --- a/apps/frontend-v3/lib/modules/swap/SwapDetails.tsx +++ b/apps/frontend-v3/lib/modules/swap/SwapDetails.tsx @@ -4,7 +4,7 @@ import { useCurrency } from '@/lib/shared/hooks/useCurrency' import { bn, fNum } from '@/lib/shared/utils/numbers' import { HStack, VStack, Text, Tooltip, Box } from '@chakra-ui/react' import { useSwap } from './SwapProvider' -import { GqlSorSwapType } from '@/lib/shared/services/api/generated/graphql' +import { GqlSorSwapType } from '@repo/api/graphql' import { useUserSettings } from '../user/settings/UserSettingsProvider' import { usePriceImpact } from '@/lib/modules/price-impact/PriceImpactProvider' import { SdkSimulateSwapResponse } from './swap.types' diff --git a/apps/frontend-v3/lib/modules/swap/SwapForm.tsx b/apps/frontend-v3/lib/modules/swap/SwapForm.tsx index e2f0018ca..5af0ee3ab 100644 --- a/apps/frontend-v3/lib/modules/swap/SwapForm.tsx +++ b/apps/frontend-v3/lib/modules/swap/SwapForm.tsx @@ -1,7 +1,7 @@ 'use client' import { TokenInput } from '@/lib/modules/tokens/TokenInput/TokenInput' -import { GqlChain, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlToken } from '@repo/api/graphql' import { HumanAmount } from '@balancer/sdk' import { Card, diff --git a/apps/frontend-v3/lib/modules/swap/SwapProvider.tsx b/apps/frontend-v3/lib/modules/swap/SwapProvider.tsx index 5a28b4ff6..e12bdb763 100644 --- a/apps/frontend-v3/lib/modules/swap/SwapProvider.tsx +++ b/apps/frontend-v3/lib/modules/swap/SwapProvider.tsx @@ -2,7 +2,7 @@ /* eslint-disable react-hooks/exhaustive-deps */ import { getNetworkConfig } from '@/lib/config/app.config' -import { GqlChain, GqlSorSwapType, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlSorSwapType, GqlToken } from '@repo/api/graphql' import { useMandatoryContext } from '@/lib/shared/utils/contexts' import { ApolloClient, useApolloClient, useReactiveVar } from '@apollo/client' import { PropsWithChildren, createContext, useEffect, useMemo, useState } from 'react' diff --git a/apps/frontend-v3/lib/modules/swap/handlers/AuraBalSwap.handler.ts b/apps/frontend-v3/lib/modules/swap/handlers/AuraBalSwap.handler.ts index a9bb56d1b..953bf8bc1 100644 --- a/apps/frontend-v3/lib/modules/swap/handlers/AuraBalSwap.handler.ts +++ b/apps/frontend-v3/lib/modules/swap/handlers/AuraBalSwap.handler.ts @@ -1,6 +1,6 @@ import { getChainId, getWrappedNativeAssetAddress } from '@/lib/config/app.config' import { SwapHandler } from './Swap.handler' -import { GqlSorSwapType, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlSorSwapType, GqlToken } from '@repo/api/graphql' import { AuraBalSwap, HumanAmount, Slippage, SwapKind, Token, TokenAmount } from '@balancer/sdk' import { formatUnits } from 'viem' import { TransactionConfig } from '../../web3/contracts/contract.types' diff --git a/apps/frontend-v3/lib/modules/swap/handlers/DefaultSwap.handler.ts b/apps/frontend-v3/lib/modules/swap/handlers/DefaultSwap.handler.ts index 9faddfcd7..4535dadd3 100644 --- a/apps/frontend-v3/lib/modules/swap/handlers/DefaultSwap.handler.ts +++ b/apps/frontend-v3/lib/modules/swap/handlers/DefaultSwap.handler.ts @@ -1,6 +1,6 @@ import { getChainId } from '@/lib/config/app.config' import { SwapHandler } from './Swap.handler' -import { GetSorSwapsDocument, GqlSorSwapType } from '@/lib/shared/services/api/generated/graphql' +import { GetSorSwapsDocument, GqlSorSwapType } from '@repo/api/graphql' import { ApolloClient } from '@apollo/client' import { Path, Slippage, Swap, SwapKind, TokenAmount } from '@balancer/sdk' import { formatUnits } from 'viem' diff --git a/apps/frontend-v3/lib/modules/swap/handlers/LidoWrap.handler.ts b/apps/frontend-v3/lib/modules/swap/handlers/LidoWrap.handler.ts index 2ff09f470..2c3a61379 100644 --- a/apps/frontend-v3/lib/modules/swap/handlers/LidoWrap.handler.ts +++ b/apps/frontend-v3/lib/modules/swap/handlers/LidoWrap.handler.ts @@ -13,7 +13,7 @@ import { Address, encodeFunctionData, formatUnits } from 'viem' import { Hex } from 'viem' import { bn } from '@/lib/shared/utils/numbers' import { getViemClient } from '@/lib/shared/services/viem/viem.client' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' const lidoRateProviderMap: Partial> = { [GqlChain.Mainnet]: '0x72d07d7dca67b8a406ad1ec34ce969c90bfee768', diff --git a/apps/frontend-v3/lib/modules/swap/handlers/Swap.handler.ts b/apps/frontend-v3/lib/modules/swap/handlers/Swap.handler.ts index 3b97e29ce..30eda8447 100644 --- a/apps/frontend-v3/lib/modules/swap/handlers/Swap.handler.ts +++ b/apps/frontend-v3/lib/modules/swap/handlers/Swap.handler.ts @@ -1,7 +1,7 @@ import { ApolloClient } from '@apollo/client' import { TransactionConfig } from '../../web3/contracts/contract.types' import { BuildSwapInputs, SimulateSwapResponse, SimulateSwapInputs } from '../swap.types' -import { GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlToken } from '@repo/api/graphql' /** * SwapHandler is an interface that defines the methods that must be implemented by a handler. diff --git a/apps/frontend-v3/lib/modules/swap/swap.helpers.ts b/apps/frontend-v3/lib/modules/swap/swap.helpers.ts index 3428fa495..10a32a634 100644 --- a/apps/frontend-v3/lib/modules/swap/swap.helpers.ts +++ b/apps/frontend-v3/lib/modules/swap/swap.helpers.ts @@ -1,6 +1,6 @@ import { Address } from 'viem' import { OSwapAction, SwapAction } from './swap.types' -import { GqlChain, GqlSorSwapType } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlSorSwapType } from '@repo/api/graphql' import { getNativeAssetAddress, getNetworkConfig, diff --git a/apps/frontend-v3/lib/modules/swap/swap.types.ts b/apps/frontend-v3/lib/modules/swap/swap.types.ts index c6bcc84e2..6ca5ac850 100644 --- a/apps/frontend-v3/lib/modules/swap/swap.types.ts +++ b/apps/frontend-v3/lib/modules/swap/swap.types.ts @@ -1,8 +1,4 @@ -import { - GetSorSwapsQuery, - GqlChain, - GqlSorSwapType, -} from '@/lib/shared/services/api/generated/graphql' +import { GetSorSwapsQuery, GqlChain, GqlSorSwapType } from '@repo/api/graphql' import { AuraBalSwapQueryOutput, ExactInQueryOutput, diff --git a/apps/frontend-v3/lib/modules/swap/useSwapStep.tsx b/apps/frontend-v3/lib/modules/swap/useSwapStep.tsx index f08c6ecf5..1e2e2564b 100644 --- a/apps/frontend-v3/lib/modules/swap/useSwapStep.tsx +++ b/apps/frontend-v3/lib/modules/swap/useSwapStep.tsx @@ -4,7 +4,7 @@ import { TransactionLabels, TransactionStep, } from '@/lib/modules/transactions/transaction-steps/lib' -import { GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlToken } from '@repo/api/graphql' import { sentryMetaForWagmiSimulation } from '@/lib/shared/utils/query-errors' import { VStack } from '@chakra-ui/react' import { capitalize } from 'lodash' diff --git a/apps/frontend-v3/lib/modules/swap/wrap.helpers.ts b/apps/frontend-v3/lib/modules/swap/wrap.helpers.ts index 597206cbe..a115078f1 100644 --- a/apps/frontend-v3/lib/modules/swap/wrap.helpers.ts +++ b/apps/frontend-v3/lib/modules/swap/wrap.helpers.ts @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { Address } from 'viem' import { isNativeAsset, isWrappedNativeAsset } from '../tokens/token.helpers' import { getNetworkConfig } from '@/lib/config/app.config' diff --git a/apps/frontend-v3/lib/modules/tokens/AddTokenToWalletButton.tsx b/apps/frontend-v3/lib/modules/tokens/AddTokenToWalletButton.tsx index 0ee24c1a5..62beac7e8 100644 --- a/apps/frontend-v3/lib/modules/tokens/AddTokenToWalletButton.tsx +++ b/apps/frontend-v3/lib/modules/tokens/AddTokenToWalletButton.tsx @@ -4,7 +4,7 @@ import { PlusSquareIcon } from '@chakra-ui/icons' import { IconButton, IconButtonProps, Tooltip } from '@chakra-ui/react' import { useWalletClient } from 'wagmi' import { useTokens } from './TokensProvider' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' export function AddTokenToWalletButton({ tokenAddress, diff --git a/apps/frontend-v3/lib/modules/tokens/NativeAssetSelectList.tsx b/apps/frontend-v3/lib/modules/tokens/NativeAssetSelectList.tsx index c790322ec..a6834c135 100644 --- a/apps/frontend-v3/lib/modules/tokens/NativeAssetSelectList.tsx +++ b/apps/frontend-v3/lib/modules/tokens/NativeAssetSelectList.tsx @@ -2,7 +2,7 @@ import { Box, BoxProps, Center, Text } from '@chakra-ui/react' import { TokenSelectListRow } from './TokenSelectModal/TokenSelectList/TokenSelectListRow' -import { GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlToken } from '@repo/api/graphql' import { useTokenBalances } from './TokenBalancesProvider' import { useUserAccount } from '@/lib/modules/web3/UserAccountProvider' import { useState } from 'react' diff --git a/apps/frontend-v3/lib/modules/tokens/NativeAssetSelectModal.tsx b/apps/frontend-v3/lib/modules/tokens/NativeAssetSelectModal.tsx index e317156fc..079a9a00a 100644 --- a/apps/frontend-v3/lib/modules/tokens/NativeAssetSelectModal.tsx +++ b/apps/frontend-v3/lib/modules/tokens/NativeAssetSelectModal.tsx @@ -12,7 +12,7 @@ import { VStack, } from '@chakra-ui/react' import { RefObject } from 'react' -import { GqlChain, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlToken } from '@repo/api/graphql' import { NativeAssetSelectList } from './NativeAssetSelectList' type Props = { diff --git a/apps/frontend-v3/lib/modules/tokens/TokenBalancesProvider.tsx b/apps/frontend-v3/lib/modules/tokens/TokenBalancesProvider.tsx index 77b0f206b..404b6a570 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokenBalancesProvider.tsx +++ b/apps/frontend-v3/lib/modules/tokens/TokenBalancesProvider.tsx @@ -10,7 +10,7 @@ import { isSameAddress } from '@/lib/shared/utils/addresses' import { PropsWithChildren, createContext, useState } from 'react' import { useMandatoryContext } from '@/lib/shared/utils/contexts' import { getNetworkConfig } from '@/lib/config/app.config' -import { GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlToken } from '@repo/api/graphql' import { exclNativeAssetFilter, nativeAssetFilter } from './token.helpers' const BALANCE_CACHE_TIME_MS = 30_000 diff --git a/apps/frontend-v3/lib/modules/tokens/TokenIcon.tsx b/apps/frontend-v3/lib/modules/tokens/TokenIcon.tsx index f5a39fa3c..517c2a8b1 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokenIcon.tsx +++ b/apps/frontend-v3/lib/modules/tokens/TokenIcon.tsx @@ -1,7 +1,7 @@ 'use client' import { useMemo, useState } from 'react' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { createAvatar } from '@dicebear/core' import { identicon } from '@dicebear/collection' import { Address } from 'viem' diff --git a/apps/frontend-v3/lib/modules/tokens/TokenIconStack.tsx b/apps/frontend-v3/lib/modules/tokens/TokenIconStack.tsx index 7d504cd57..25787b5a8 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokenIconStack.tsx +++ b/apps/frontend-v3/lib/modules/tokens/TokenIconStack.tsx @@ -1,8 +1,4 @@ -import { - GqlChain, - GqlPoolTokenDisplay, - GqlToken, -} from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolTokenDisplay, GqlToken } from '@repo/api/graphql' import { Box, HStack, StackProps } from '@chakra-ui/react' import { TokenIcon } from './TokenIcon' diff --git a/apps/frontend-v3/lib/modules/tokens/TokenInfoPopover.tsx b/apps/frontend-v3/lib/modules/tokens/TokenInfoPopover.tsx index 0915aca6f..7b81c497b 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokenInfoPopover.tsx +++ b/apps/frontend-v3/lib/modules/tokens/TokenInfoPopover.tsx @@ -1,5 +1,5 @@ import { getBlockExplorerName, useBlockExplorer } from '@/lib/shared/hooks/useBlockExplorer' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { HStack, IconButton, diff --git a/apps/frontend-v3/lib/modules/tokens/TokenInput/TokenInput.tsx b/apps/frontend-v3/lib/modules/tokens/TokenInput/TokenInput.tsx index cde353d3a..cff45b4be 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokenInput/TokenInput.tsx +++ b/apps/frontend-v3/lib/modules/tokens/TokenInput/TokenInput.tsx @@ -16,7 +16,7 @@ import { forwardRef, useTheme, } from '@chakra-ui/react' -import { GqlChain, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlToken } from '@repo/api/graphql' import { useTokens } from '../TokensProvider' import { useTokenBalances } from '../TokenBalancesProvider' import { useTokenInput } from './useTokenInput' diff --git a/apps/frontend-v3/lib/modules/tokens/TokenInput/useTokenInput.ts b/apps/frontend-v3/lib/modules/tokens/TokenInput/useTokenInput.ts index a2eb8f1f1..8f4493c08 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokenInput/useTokenInput.ts +++ b/apps/frontend-v3/lib/modules/tokens/TokenInput/useTokenInput.ts @@ -1,4 +1,4 @@ -import { GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlToken } from '@repo/api/graphql' import { Numberish, bn } from '@/lib/shared/utils/numbers' import { ChangeEvent } from 'react' import { useTokenBalances } from '../TokenBalancesProvider' diff --git a/apps/frontend-v3/lib/modules/tokens/TokenInputsValidationProvider.tsx b/apps/frontend-v3/lib/modules/tokens/TokenInputsValidationProvider.tsx index 4cf65ab5c..e27f4a1cf 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokenInputsValidationProvider.tsx +++ b/apps/frontend-v3/lib/modules/tokens/TokenInputsValidationProvider.tsx @@ -1,6 +1,6 @@ 'use client' -import { GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlToken } from '@repo/api/graphql' import { useMandatoryContext } from '@/lib/shared/utils/contexts' import { PropsWithChildren, createContext, useState } from 'react' import { Address } from 'viem' diff --git a/apps/frontend-v3/lib/modules/tokens/TokenRow/SwapTokenRow.tsx b/apps/frontend-v3/lib/modules/tokens/TokenRow/SwapTokenRow.tsx index 1fb028daf..d054f1e1f 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokenRow/SwapTokenRow.tsx +++ b/apps/frontend-v3/lib/modules/tokens/TokenRow/SwapTokenRow.tsx @@ -1,7 +1,7 @@ import { VStack, HStack, Text } from '@chakra-ui/react' import { Address } from 'viem' import TokenRow from './TokenRow' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { HumanAmount } from '@balancer/sdk' import { useSwap } from '../../swap/SwapProvider' import { slippageDiffLabel } from '@/lib/shared/utils/slippage' diff --git a/apps/frontend-v3/lib/modules/tokens/TokenRow/TokenRow.tsx b/apps/frontend-v3/lib/modules/tokens/TokenRow/TokenRow.tsx index 507832879..bff6f6c69 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokenRow/TokenRow.tsx +++ b/apps/frontend-v3/lib/modules/tokens/TokenRow/TokenRow.tsx @@ -3,11 +3,7 @@ import { Box, Button, HStack, Heading, Skeleton, Text, Tooltip, VStack } from '@chakra-ui/react' import { Address } from 'viem' import { useTokens } from '../TokensProvider' -import { - GqlChain, - GqlPoolTokenDisplay, - GqlToken, -} from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlPoolTokenDisplay, GqlToken } from '@repo/api/graphql' import { ReactNode, useEffect, useState } from 'react' import { TokenIcon } from '../TokenIcon' import { useCurrency } from '@/lib/shared/hooks/useCurrency' diff --git a/apps/frontend-v3/lib/modules/tokens/TokenRow/TokenRowGroup.tsx b/apps/frontend-v3/lib/modules/tokens/TokenRow/TokenRowGroup.tsx index e77f34c87..f2daab6cc 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokenRow/TokenRowGroup.tsx +++ b/apps/frontend-v3/lib/modules/tokens/TokenRow/TokenRowGroup.tsx @@ -1,4 +1,4 @@ -import { GqlChain, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlToken } from '@repo/api/graphql' import { useCurrency } from '@/lib/shared/hooks/useCurrency' import { VStack, HStack, Skeleton, Text } from '@chakra-ui/react' import TokenRow from './TokenRow' diff --git a/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectList/TokenSelectList.tsx b/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectList/TokenSelectList.tsx index e0b899561..cd549de35 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectList/TokenSelectList.tsx +++ b/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectList/TokenSelectList.tsx @@ -2,7 +2,7 @@ import { Box, BoxProps, Button, HStack, Text, Divider } from '@chakra-ui/react' import { TokenSelectListRow } from './TokenSelectListRow' -import { GqlChain, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlToken } from '@repo/api/graphql' import { useTokenBalances } from '../../TokenBalancesProvider' import { useUserAccount } from '@/lib/modules/web3/UserAccountProvider' import { useEffect, useRef, useState } from 'react' diff --git a/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectList/TokenSelectListRow.tsx b/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectList/TokenSelectListRow.tsx index 7b32de360..33529d6cb 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectList/TokenSelectListRow.tsx +++ b/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectList/TokenSelectListRow.tsx @@ -3,7 +3,7 @@ import { Box, BoxProps, HStack, VStack, Text } from '@chakra-ui/react' import { TokenIcon } from '../../TokenIcon' import { TokenAmount } from '../../token.types' -import { GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlToken } from '@repo/api/graphql' import { useUserAccount } from '@/lib/modules/web3/UserAccountProvider' import { useTokens } from '../../TokensProvider' import { useCurrency } from '@/lib/shared/hooks/useCurrency' diff --git a/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectList/useTokenSelectList.tsx b/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectList/useTokenSelectList.tsx index 409bedc3a..44cd0209b 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectList/useTokenSelectList.tsx +++ b/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectList/useTokenSelectList.tsx @@ -1,4 +1,4 @@ -import { GqlChain, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlToken } from '@repo/api/graphql' import { useTokens } from '../../TokensProvider' import { isSameAddress } from '@/lib/shared/utils/addresses' import { orderBy } from 'lodash' diff --git a/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectModal.tsx b/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectModal.tsx index 5546abaa0..7f11c3080 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectModal.tsx +++ b/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectModal.tsx @@ -13,7 +13,7 @@ import { } from '@chakra-ui/react' import { RefObject, useState } from 'react' import { TokenSelectList } from './TokenSelectList/TokenSelectList' -import { GqlChain, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlToken } from '@repo/api/graphql' import { TokenSelectPopular } from './TokenSelectPopular' import { SearchInput } from '@/lib/shared/components/inputs/SearchInput' import { getChainShortName } from '@/lib/config/app.config' diff --git a/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectPopular.tsx b/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectPopular.tsx index a0f21fccf..61297a617 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectPopular.tsx +++ b/apps/frontend-v3/lib/modules/tokens/TokenSelectModal/TokenSelectPopular.tsx @@ -1,6 +1,6 @@ /* eslint-disable react-hooks/exhaustive-deps */ import { getNetworkConfig } from '@/lib/config/app.config' -import { GqlChain, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlToken } from '@repo/api/graphql' import { HStack, Tag, Text, Wrap, WrapItem } from '@chakra-ui/react' import { useTokens } from '../TokensProvider' import { useMemo } from 'react' diff --git a/apps/frontend-v3/lib/modules/tokens/TokensProvider.spec.tsx b/apps/frontend-v3/lib/modules/tokens/TokensProvider.spec.tsx index 451e23c50..9749df967 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokensProvider.spec.tsx +++ b/apps/frontend-v3/lib/modules/tokens/TokensProvider.spec.tsx @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { testHook } from '@/test/utils/custom-renderers' import { waitFor } from '@testing-library/react' import { Address } from 'viem' diff --git a/apps/frontend-v3/lib/modules/tokens/TokensProvider.tsx b/apps/frontend-v3/lib/modules/tokens/TokensProvider.tsx index 13bf7ceb7..8861dc4b0 100644 --- a/apps/frontend-v3/lib/modules/tokens/TokensProvider.tsx +++ b/apps/frontend-v3/lib/modules/tokens/TokensProvider.tsx @@ -10,7 +10,7 @@ import { GqlChain, GqlPoolTokenDetail, GqlToken, -} from '@/lib/shared/services/api/generated/graphql' +} from '@repo/api/graphql' import { isSameAddress } from '@/lib/shared/utils/addresses' import { useMandatoryContext } from '@/lib/shared/utils/contexts' import { bn, Numberish } from '@/lib/shared/utils/numbers' diff --git a/apps/frontend-v3/lib/modules/tokens/__mocks__/AppGlobalData.builders.ts b/apps/frontend-v3/lib/modules/tokens/__mocks__/AppGlobalData.builders.ts index 306e09e43..6123443f9 100644 --- a/apps/frontend-v3/lib/modules/tokens/__mocks__/AppGlobalData.builders.ts +++ b/apps/frontend-v3/lib/modules/tokens/__mocks__/AppGlobalData.builders.ts @@ -1,4 +1,4 @@ -import { GetAppGlobalPollingDataQuery } from '@/lib/shared/services/api/generated/graphql' +import { GetAppGlobalPollingDataQuery } from '@repo/api/graphql' import { fakeTokenBySymbol } from '@/test/data/all-gql-tokens.fake' import { aGqlTokenPriceMock } from '@/test/msw/builders/gqlTokenPrice.builders' diff --git a/apps/frontend-v3/lib/modules/tokens/__mocks__/token.builders.ts b/apps/frontend-v3/lib/modules/tokens/__mocks__/token.builders.ts index 92bc4a16f..abb747a22 100644 --- a/apps/frontend-v3/lib/modules/tokens/__mocks__/token.builders.ts +++ b/apps/frontend-v3/lib/modules/tokens/__mocks__/token.builders.ts @@ -8,7 +8,7 @@ import { GqlPoolTokenDetail, GqlPoolTokenExpanded, GqlTokenPrice, -} from '@/lib/shared/services/api/generated/graphql' +} from '@repo/api/graphql' import { FakeTokenSymbol, allFakeGqlTokens, diff --git a/apps/frontend-v3/lib/modules/tokens/__mocks__/token.test.types.ts b/apps/frontend-v3/lib/modules/tokens/__mocks__/token.test.types.ts index 14e7c775e..6c5b8d417 100644 --- a/apps/frontend-v3/lib/modules/tokens/__mocks__/token.test.types.ts +++ b/apps/frontend-v3/lib/modules/tokens/__mocks__/token.test.types.ts @@ -2,7 +2,7 @@ * The types in this file only exist for testing reasons (MSW handlers will use them to mock GQL responses) */ -import { GetTokensQuery } from '@/lib/shared/services/api/generated/graphql' +import { GetTokensQuery } from '@repo/api/graphql' // Each Token in this list is a superset of TokenBase export type MswTokenList = GetTokensQuery['tokens'] diff --git a/apps/frontend-v3/lib/modules/tokens/approvals/approval-rules.ts b/apps/frontend-v3/lib/modules/tokens/approvals/approval-rules.ts index 998db2233..10e8b653b 100644 --- a/apps/frontend-v3/lib/modules/tokens/approvals/approval-rules.ts +++ b/apps/frontend-v3/lib/modules/tokens/approvals/approval-rules.ts @@ -3,7 +3,7 @@ import { isNativeAsset } from '@/lib/shared/utils/addresses' import { Address } from 'viem' import { MAX_BIGINT } from '@/lib/shared/utils/numbers' import { InputAmount } from '@balancer/sdk' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { requiresDoubleApproval } from '../token.helpers' export type TokenAmountToApprove = { diff --git a/apps/frontend-v3/lib/modules/tokens/approvals/useTokenApprovalSteps.tsx b/apps/frontend-v3/lib/modules/tokens/approvals/useTokenApprovalSteps.tsx index 48294da53..54ed5f24f 100644 --- a/apps/frontend-v3/lib/modules/tokens/approvals/useTokenApprovalSteps.tsx +++ b/apps/frontend-v3/lib/modules/tokens/approvals/useTokenApprovalSteps.tsx @@ -1,6 +1,6 @@ /* eslint-disable react-hooks/exhaustive-deps */ import { getChainId, getNativeAssetAddress } from '@/lib/config/app.config' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { isSameAddress } from '@/lib/shared/utils/addresses' import { sentryMetaForWagmiSimulation } from '@/lib/shared/utils/query-errors' import { useMemo } from 'react' diff --git a/apps/frontend-v3/lib/modules/tokens/token.helpers.spec.ts b/apps/frontend-v3/lib/modules/tokens/token.helpers.spec.ts index 849e09d1b..969e26b3a 100644 --- a/apps/frontend-v3/lib/modules/tokens/token.helpers.spec.ts +++ b/apps/frontend-v3/lib/modules/tokens/token.helpers.spec.ts @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { isWrappedNativeAsset, swapNativeWithWrapped, swapWrappedWithNative } from './token.helpers' import { HumanTokenAmountWithAddress } from './token.types' import { ethAddress, wETHAddress } from '@/lib/debug-helpers' diff --git a/apps/frontend-v3/lib/modules/tokens/token.helpers.ts b/apps/frontend-v3/lib/modules/tokens/token.helpers.ts index 37abe8259..aaf9790fa 100644 --- a/apps/frontend-v3/lib/modules/tokens/token.helpers.ts +++ b/apps/frontend-v3/lib/modules/tokens/token.helpers.ts @@ -4,7 +4,7 @@ import { getWrappedNativeAssetAddress, } from '@/lib/config/app.config' import { SupportedChainId } from '@/lib/config/config.types' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { includesAddress, isSameAddress } from '@/lib/shared/utils/addresses' import { Address } from 'viem' import { HumanTokenAmountWithAddress, TokenBase } from './token.types' diff --git a/apps/frontend-v3/lib/modules/tokens/token.types.ts b/apps/frontend-v3/lib/modules/tokens/token.types.ts index c44ff7a67..6069ec8bf 100644 --- a/apps/frontend-v3/lib/modules/tokens/token.types.ts +++ b/apps/frontend-v3/lib/modules/tokens/token.types.ts @@ -1,4 +1,4 @@ -import { GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlToken } from '@repo/api/graphql' import { Address, HumanAmount } from '@balancer/sdk' export type TokenBase = Pick diff --git a/apps/frontend-v3/lib/modules/tokens/useTotalUsdValue.ts b/apps/frontend-v3/lib/modules/tokens/useTotalUsdValue.ts index c410875da..d13e20e4a 100644 --- a/apps/frontend-v3/lib/modules/tokens/useTotalUsdValue.ts +++ b/apps/frontend-v3/lib/modules/tokens/useTotalUsdValue.ts @@ -2,7 +2,7 @@ import { useTokens } from '@/lib/modules/tokens/TokensProvider' import { isSameAddress } from '@/lib/shared/utils/addresses' import { safeSum } from '@/lib/shared/utils/numbers' import { useCallback } from 'react' -import { GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlToken } from '@repo/api/graphql' import { HumanTokenAmountWithAddress } from './token.types' export function useTotalUsdValue(tokens: GqlToken[]) { diff --git a/apps/frontend-v3/lib/modules/transactions/RecentTransactionsProvider.tsx b/apps/frontend-v3/lib/modules/transactions/RecentTransactionsProvider.tsx index 9c783f316..263151a3d 100644 --- a/apps/frontend-v3/lib/modules/transactions/RecentTransactionsProvider.tsx +++ b/apps/frontend-v3/lib/modules/transactions/RecentTransactionsProvider.tsx @@ -3,7 +3,7 @@ import { getChainId } from '@/lib/config/app.config' import { Toast } from '@/lib/shared/components/toasts/Toast' import { getBlockExplorerTxUrl } from '@/lib/shared/hooks/useBlockExplorer' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { useMandatoryContext } from '@/lib/shared/utils/contexts' import { ensureError } from '@/lib/shared/utils/errors' import { captureFatalError } from '@/lib/shared/utils/query-errors' diff --git a/apps/frontend-v3/lib/modules/transactions/transaction-steps/receipts/receipt-parsers.ts b/apps/frontend-v3/lib/modules/transactions/transaction-steps/receipts/receipt-parsers.ts index b8a522661..aabccf5fd 100644 --- a/apps/frontend-v3/lib/modules/transactions/transaction-steps/receipts/receipt-parsers.ts +++ b/apps/frontend-v3/lib/modules/transactions/transaction-steps/receipts/receipt-parsers.ts @@ -1,6 +1,6 @@ import { getNativeAssetAddress, getNetworkConfig } from '@/lib/config/app.config' import { BPT_DECIMALS } from '@/lib/modules/pool/pool.constants' -import { GqlChain, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlToken } from '@repo/api/graphql' import { bn } from '@/lib/shared/utils/numbers' import { HumanAmount } from '@balancer/sdk' import { Address, Log, erc20Abi, formatUnits, parseAbiItem, parseEventLogs } from 'viem' diff --git a/apps/frontend-v3/lib/modules/transactions/transaction-steps/receipts/receipt.hooks.integration.spec.ts b/apps/frontend-v3/lib/modules/transactions/transaction-steps/receipts/receipt.hooks.integration.spec.ts index dc7831a0c..6ceb9421c 100644 --- a/apps/frontend-v3/lib/modules/transactions/transaction-steps/receipts/receipt.hooks.integration.spec.ts +++ b/apps/frontend-v3/lib/modules/transactions/transaction-steps/receipts/receipt.hooks.integration.spec.ts @@ -3,7 +3,7 @@ import { waitFor } from '@testing-library/react' import { getGqlChain } from '@/lib/config/app.config' import { maticAddress } from '@/lib/debug-helpers' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { Address, Hash } from 'viem' import { polygon } from 'viem/chains' import { useAddLiquidityReceipt, useRemoveLiquidityReceipt, useSwapReceipt } from './receipt.hooks' diff --git a/apps/frontend-v3/lib/modules/transactions/transaction-steps/receipts/receipt.hooks.ts b/apps/frontend-v3/lib/modules/transactions/transaction-steps/receipts/receipt.hooks.ts index 197d9d038..740bbb862 100644 --- a/apps/frontend-v3/lib/modules/transactions/transaction-steps/receipts/receipt.hooks.ts +++ b/apps/frontend-v3/lib/modules/transactions/transaction-steps/receipts/receipt.hooks.ts @@ -1,6 +1,6 @@ import { getChainId } from '@/lib/config/app.config' import { useTokens } from '@/lib/modules/tokens/TokensProvider' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { Address, Hex } from 'viem' import { useTransaction, useWaitForTransactionReceipt } from 'wagmi' import { diff --git a/apps/frontend-v3/lib/modules/transactions/transaction-steps/step-tracker/DesktopStepTracker.tsx b/apps/frontend-v3/lib/modules/transactions/transaction-steps/step-tracker/DesktopStepTracker.tsx index bbc63c7e6..5cc1014fe 100644 --- a/apps/frontend-v3/lib/modules/transactions/transaction-steps/step-tracker/DesktopStepTracker.tsx +++ b/apps/frontend-v3/lib/modules/transactions/transaction-steps/step-tracker/DesktopStepTracker.tsx @@ -3,7 +3,7 @@ import { Card, Box, Divider, HStack, Heading, VStack } from '@chakra-ui/react' import { Steps } from './Steps' import { GasPriceCard } from '@/lib/shared/hooks/useGasPrice' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { TransactionStepsResponse } from '../useTransactionSteps' type Props = { diff --git a/apps/frontend-v3/lib/modules/transactions/transaction-steps/step-tracker/MobileStepTracker.tsx b/apps/frontend-v3/lib/modules/transactions/transaction-steps/step-tracker/MobileStepTracker.tsx index c7034ff20..e31250203 100644 --- a/apps/frontend-v3/lib/modules/transactions/transaction-steps/step-tracker/MobileStepTracker.tsx +++ b/apps/frontend-v3/lib/modules/transactions/transaction-steps/step-tracker/MobileStepTracker.tsx @@ -13,7 +13,7 @@ import { import { StepIndicator } from './Step' import { Steps } from './Steps' import { GasPriceCard } from '@/lib/shared/hooks/useGasPrice' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { useThemeColorMode } from '@/lib/shared/services/chakra/useThemeColorMode' import { TransactionStepsResponse } from '../useTransactionSteps' diff --git a/apps/frontend-v3/lib/modules/transactions/transaction-steps/useSignRelayerStep.tsx b/apps/frontend-v3/lib/modules/transactions/transaction-steps/useSignRelayerStep.tsx index df5baf37d..6eead9e0e 100644 --- a/apps/frontend-v3/lib/modules/transactions/transaction-steps/useSignRelayerStep.tsx +++ b/apps/frontend-v3/lib/modules/transactions/transaction-steps/useSignRelayerStep.tsx @@ -9,7 +9,7 @@ import { SignRelayerState } from '../../relayer/RelayerSignatureProvider' import { useMemo } from 'react' import { useChainSwitch } from '../../web3/useChainSwitch' import { getChainId } from '@/lib/config/app.config' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' export const signRelayerStepTitle = 'Sign relayer' diff --git a/apps/frontend-v3/lib/modules/vebal/useGaugeTotalSupplyAndUserBalance.ts b/apps/frontend-v3/lib/modules/vebal/useGaugeTotalSupplyAndUserBalance.ts index 7c6848e85..e3301c1c3 100644 --- a/apps/frontend-v3/lib/modules/vebal/useGaugeTotalSupplyAndUserBalance.ts +++ b/apps/frontend-v3/lib/modules/vebal/useGaugeTotalSupplyAndUserBalance.ts @@ -2,7 +2,7 @@ import { useMulticall } from '../web3/contracts/useMulticall' import { AbiMap } from '../web3/contracts/AbiMap' import { useUserAccount } from '../web3/UserAccountProvider' import networkConfigs from '@/lib/config/networks' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { GaugeArg } from './useVebalBoost' import { getChainId } from '@/lib/config/app.config' diff --git a/apps/frontend-v3/lib/modules/vebal/useVebalBoost.tsx b/apps/frontend-v3/lib/modules/vebal/useVebalBoost.tsx index 0a6ab8641..da0b72fb5 100644 --- a/apps/frontend-v3/lib/modules/vebal/useVebalBoost.tsx +++ b/apps/frontend-v3/lib/modules/vebal/useVebalBoost.tsx @@ -1,4 +1,4 @@ -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { useMemo } from 'react' import { bn } from '@/lib/shared/utils/numbers' import { isUndefined } from 'lodash' diff --git a/apps/frontend-v3/lib/modules/vebal/useVebalUserData.ts b/apps/frontend-v3/lib/modules/vebal/useVebalUserData.ts index 8d77927af..2d5cfbf29 100644 --- a/apps/frontend-v3/lib/modules/vebal/useVebalUserData.ts +++ b/apps/frontend-v3/lib/modules/vebal/useVebalUserData.ts @@ -1,4 +1,4 @@ -import { GetVeBalUserDocument, GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GetVeBalUserDocument, GqlChain } from '@repo/api/graphql' import { useUserAccount } from '../web3/UserAccountProvider' import { useQuery } from '@apollo/experimental-nextjs-app-support/ssr' diff --git a/apps/frontend-v3/lib/modules/web3/ChainConfig.tsx b/apps/frontend-v3/lib/modules/web3/ChainConfig.tsx index 22148f344..640b61f2f 100644 --- a/apps/frontend-v3/lib/modules/web3/ChainConfig.tsx +++ b/apps/frontend-v3/lib/modules/web3/ChainConfig.tsx @@ -17,7 +17,7 @@ import { } from 'wagmi/chains' import { getProjectConfig } from '@/lib/config/getProjectConfig' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { keyBy } from 'lodash' import { getBaseUrl } from '@/lib/shared/utils/urls' diff --git a/apps/frontend-v3/lib/modules/web3/CustomAvatar.tsx b/apps/frontend-v3/lib/modules/web3/CustomAvatar.tsx index 60f79031b..c6b7e8dde 100644 --- a/apps/frontend-v3/lib/modules/web3/CustomAvatar.tsx +++ b/apps/frontend-v3/lib/modules/web3/CustomAvatar.tsx @@ -1,6 +1,11 @@ import { Image, ImageProps } from '@chakra-ui/react' -// eslint-disable-next-line max-len -import { AvatarComponentProps } from '@rainbow-me/rainbowkit/dist/components/RainbowKitProvider/AvatarContext' + +// can't import from '@rainbow-me/rainbowkit/dist/components/RainbowKitProvider/AvatarContext' +type AvatarComponentProps = { + address: string + ensImage?: string | null + size: number +} export const CustomAvatar = ({ address, @@ -9,7 +14,7 @@ export const CustomAvatar = ({ alt, ...props }: ImageProps & AvatarComponentProps) => { - const avatarUrl = ensImage ? ensImage : `https://api.dicebear.com/7.x/thumbs/svg?seed=${address}` + const avatarUrl = ensImage ?? `https://api.dicebear.com/7.x/thumbs/svg?seed=${address}` return {alt} } diff --git a/apps/frontend-v3/lib/modules/web3/contracts/useOnTransactionSubmission.ts b/apps/frontend-v3/lib/modules/web3/contracts/useOnTransactionSubmission.ts index 4bf25f290..ae28e315d 100644 --- a/apps/frontend-v3/lib/modules/web3/contracts/useOnTransactionSubmission.ts +++ b/apps/frontend-v3/lib/modules/web3/contracts/useOnTransactionSubmission.ts @@ -2,7 +2,7 @@ import { useEffect } from 'react' import { Address } from 'viem' import { useRecentTransactions } from '../../transactions/RecentTransactionsProvider' import { TransactionLabels } from '@/lib/modules/transactions/transaction-steps/lib' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { AnalyticsEvent, trackEvent } from '@/lib/shared/services/fathom/Fathom' type NewTrackedTransactionRequest = { diff --git a/apps/frontend-v3/lib/shared/components/BlockExplorerLink.tsx b/apps/frontend-v3/lib/shared/components/BlockExplorerLink.tsx index 92305ef5d..6c4760ce3 100644 --- a/apps/frontend-v3/lib/shared/components/BlockExplorerLink.tsx +++ b/apps/frontend-v3/lib/shared/components/BlockExplorerLink.tsx @@ -4,7 +4,7 @@ import { HStack, Link, Text } from '@chakra-ui/react' import { ArrowUpRight } from 'react-feather' import { getBlockExplorerTxUrl, getBlockExplorerName } from '../hooks/useBlockExplorer' import { Address } from 'viem' -import { GqlChain } from '../services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' type Props = { transactionHash?: Address; chain: GqlChain } diff --git a/apps/frontend-v3/lib/shared/components/errors/TransactionTimeoutError.tsx b/apps/frontend-v3/lib/shared/components/errors/TransactionTimeoutError.tsx index ce7aa62f6..ab75d5c3d 100644 --- a/apps/frontend-v3/lib/shared/components/errors/TransactionTimeoutError.tsx +++ b/apps/frontend-v3/lib/shared/components/errors/TransactionTimeoutError.tsx @@ -2,7 +2,7 @@ import { AlertProps, Text } from '@chakra-ui/react' import { Address } from 'viem' -import { GqlChain } from '../../services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { BlockExplorerLink } from '../BlockExplorerLink' import { ErrorAlert } from './ErrorAlert' diff --git a/apps/frontend-v3/lib/shared/components/icons/NetworkIcon.tsx b/apps/frontend-v3/lib/shared/components/icons/NetworkIcon.tsx index 92c9ed18a..b52d4fbf8 100644 --- a/apps/frontend-v3/lib/shared/components/icons/NetworkIcon.tsx +++ b/apps/frontend-v3/lib/shared/components/icons/NetworkIcon.tsx @@ -1,5 +1,5 @@ import { Circle, SquareProps } from '@chakra-ui/react' -import { GqlChain } from '../../services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { getNetworkConfig } from '@/lib/config/app.config' import Image from 'next/image' import { useEffect, useState } from 'react' diff --git a/apps/frontend-v3/lib/shared/components/marketing/EcosystemChainSelect.tsx b/apps/frontend-v3/lib/shared/components/marketing/EcosystemChainSelect.tsx index 0afd9005a..48d367a1b 100644 --- a/apps/frontend-v3/lib/shared/components/marketing/EcosystemChainSelect.tsx +++ b/apps/frontend-v3/lib/shared/components/marketing/EcosystemChainSelect.tsx @@ -9,7 +9,7 @@ import { ChevronDown } from 'react-feather' import { motion } from 'framer-motion' import { pulseOnceWithDelay } from '@/lib/shared/utils/animations' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { supportedNetworks } from '@/lib/modules/web3/ChainConfig' import { gradientMap } from '@/lib/modules/marketing/useEcosystemPoolActivity' diff --git a/apps/frontend-v3/lib/shared/components/modals/TransactionModalHeader.tsx b/apps/frontend-v3/lib/shared/components/modals/TransactionModalHeader.tsx index 8bed5ee23..0e45692da 100644 --- a/apps/frontend-v3/lib/shared/components/modals/TransactionModalHeader.tsx +++ b/apps/frontend-v3/lib/shared/components/modals/TransactionModalHeader.tsx @@ -1,5 +1,5 @@ import { useBlockExplorer } from '@/lib/shared/hooks/useBlockExplorer' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { Center, HStack, ModalHeader, VStack, Text, Link } from '@chakra-ui/react' import { AnimatePresence, motion } from 'framer-motion' import { ReactNode } from 'react' diff --git a/apps/frontend-v3/lib/shared/components/tooltips/apr-tooltip/BaseAprTooltip.tsx b/apps/frontend-v3/lib/shared/components/tooltips/apr-tooltip/BaseAprTooltip.tsx index 0ffe0a649..2df167711 100644 --- a/apps/frontend-v3/lib/shared/components/tooltips/apr-tooltip/BaseAprTooltip.tsx +++ b/apps/frontend-v3/lib/shared/components/tooltips/apr-tooltip/BaseAprTooltip.tsx @@ -1,4 +1,4 @@ -import { GqlPoolAprItem } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolAprItem } from '@repo/api/graphql' import { PlacementWithLogical, Popover, diff --git a/apps/frontend-v3/lib/shared/components/tooltips/apr-tooltip/MainAprTooltip.tsx b/apps/frontend-v3/lib/shared/components/tooltips/apr-tooltip/MainAprTooltip.tsx index 3a641875c..cf96752f0 100644 --- a/apps/frontend-v3/lib/shared/components/tooltips/apr-tooltip/MainAprTooltip.tsx +++ b/apps/frontend-v3/lib/shared/components/tooltips/apr-tooltip/MainAprTooltip.tsx @@ -17,7 +17,7 @@ import { PoolListItem } from '@/lib/modules/pool/pool.types' import { FeaturedPool, Pool } from '@/lib/modules/pool/PoolProvider' import { isLBP } from '@/lib/modules/pool/pool.helpers' import { getProjectConfig } from '@/lib/config/getProjectConfig' -import { GqlPoolAprItemType } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolAprItemType } from '@repo/api/graphql' interface Props extends Omit< diff --git a/apps/frontend-v3/lib/shared/components/zen/ZenGarden.tsx b/apps/frontend-v3/lib/shared/components/zen/ZenGarden.tsx index ec5b85a09..ff801d96f 100644 --- a/apps/frontend-v3/lib/shared/components/zen/ZenGarden.tsx +++ b/apps/frontend-v3/lib/shared/components/zen/ZenGarden.tsx @@ -1,5 +1,5 @@ import { Box, BoxProps, useColorModeValue } from '@chakra-ui/react' -import { GqlPoolType } from '../../services/api/generated/graphql' +import { GqlPoolType } from '@repo/api/graphql' import { isClp, isStable, isWeighted, isCowAmmPool } from '@/lib/modules/pool/pool.helpers' import { CowSandPattern } from '../imgs/CowSandPattern' diff --git a/apps/frontend-v3/lib/shared/data/csp-issue.ts b/apps/frontend-v3/lib/shared/data/csp-issue.ts index 3769c7016..7febd05fd 100644 --- a/apps/frontend-v3/lib/shared/data/csp-issue.ts +++ b/apps/frontend-v3/lib/shared/data/csp-issue.ts @@ -1,5 +1,5 @@ import { PoolId } from '@/lib/modules/pool/pool.types' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' export const NO_RECOVERY_EXIT_POOL_IDS: Record = { [GqlChain.Mainnet]: [ diff --git a/apps/frontend-v3/lib/shared/hooks/_mocks_/aprTooltipDataMock.ts b/apps/frontend-v3/lib/shared/hooks/_mocks_/aprTooltipDataMock.ts index 21a34ca66..5c50705cf 100644 --- a/apps/frontend-v3/lib/shared/hooks/_mocks_/aprTooltipDataMock.ts +++ b/apps/frontend-v3/lib/shared/hooks/_mocks_/aprTooltipDataMock.ts @@ -1,4 +1,4 @@ -import { GqlPoolAprItem } from '../../services/api/generated/graphql' +import { GqlPoolAprItem } from '@repo/api/graphql' import { useAprTooltip } from '../useAprTooltip' const aprItems = [ diff --git a/apps/frontend-v3/lib/shared/hooks/useAprTooltip.spec.tsx b/apps/frontend-v3/lib/shared/hooks/useAprTooltip.spec.tsx index 8accad638..597c82b6e 100644 --- a/apps/frontend-v3/lib/shared/hooks/useAprTooltip.spec.tsx +++ b/apps/frontend-v3/lib/shared/hooks/useAprTooltip.spec.tsx @@ -3,7 +3,7 @@ import { bn, fNum } from '../utils/numbers' import { useAprTooltip } from './useAprTooltip' import { aprTooltipDataMock } from './_mocks_/aprTooltipDataMock' import BigNumber from 'bignumber.js' -import { GqlPoolAprItem, GqlPoolAprItemType } from '../services/api/generated/graphql' +import { GqlPoolAprItem, GqlPoolAprItemType } from '@repo/api/graphql' const defaultNumberFormatter = (value: string) => bn(bn(value).toFixed(4, BigNumber.ROUND_HALF_UP)) diff --git a/apps/frontend-v3/lib/shared/hooks/useAprTooltip.ts b/apps/frontend-v3/lib/shared/hooks/useAprTooltip.ts index 0c55ac14c..be8168d35 100644 --- a/apps/frontend-v3/lib/shared/hooks/useAprTooltip.ts +++ b/apps/frontend-v3/lib/shared/hooks/useAprTooltip.ts @@ -1,4 +1,4 @@ -import { GqlPoolAprItem, GqlPoolAprItemType } from '../services/api/generated/graphql' +import { GqlPoolAprItem, GqlPoolAprItemType } from '@repo/api/graphql' import { useThemeColorMode } from '../services/chakra/useThemeColorMode' import { bn } from '../utils/numbers' import BigNumber from 'bignumber.js' diff --git a/apps/frontend-v3/lib/shared/hooks/useBlockExplorer.ts b/apps/frontend-v3/lib/shared/hooks/useBlockExplorer.ts index b20180ff1..94e97b0c5 100644 --- a/apps/frontend-v3/lib/shared/hooks/useBlockExplorer.ts +++ b/apps/frontend-v3/lib/shared/hooks/useBlockExplorer.ts @@ -1,6 +1,6 @@ import { getNetworkConfig } from '@/lib/config/app.config' import { useNetworkConfig } from '@/lib/config/useNetworkConfig' -import { GqlChain } from '../services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' export function getBlockExplorerName(chain?: GqlChain) { const _chain = chain || GqlChain.Mainnet diff --git a/apps/frontend-v3/lib/shared/hooks/useGasPrice.tsx b/apps/frontend-v3/lib/shared/hooks/useGasPrice.tsx index 46d4754b8..57806151f 100644 --- a/apps/frontend-v3/lib/shared/hooks/useGasPrice.tsx +++ b/apps/frontend-v3/lib/shared/hooks/useGasPrice.tsx @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query' -import { GqlChain } from '../services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { getViemClient } from '../services/viem/viem.client' import { formatUnits } from 'viem' import { bn, fNum } from '../utils/numbers' diff --git a/apps/frontend-v3/lib/shared/hooks/useProtocolStats.ts b/apps/frontend-v3/lib/shared/hooks/useProtocolStats.ts index 28cc9e161..026f31b26 100644 --- a/apps/frontend-v3/lib/shared/hooks/useProtocolStats.ts +++ b/apps/frontend-v3/lib/shared/hooks/useProtocolStats.ts @@ -1,5 +1,5 @@ import { useQuery } from '@apollo/client' -import { GetProtocolStatsDocument } from '../services/api/generated/graphql' +import { GetProtocolStatsDocument } from '@repo/api/graphql' import { supportedNetworks } from '@/lib/modules/web3/ChainConfig' export function useProtocolStats() { diff --git a/apps/frontend-v3/lib/shared/services/api/apollo-global-data.provider.tsx b/apps/frontend-v3/lib/shared/services/api/apollo-global-data.provider.tsx index 93fd8555a..a13e08df7 100644 --- a/apps/frontend-v3/lib/shared/services/api/apollo-global-data.provider.tsx +++ b/apps/frontend-v3/lib/shared/services/api/apollo-global-data.provider.tsx @@ -8,10 +8,7 @@ * client render pass. */ import { getApolloServerClient } from '@/lib/shared/services/api/apollo-server.client' -import { - GetTokenPricesDocument, - GetTokensDocument, -} from '@/lib/shared/services/api/generated/graphql' +import { GetTokenPricesDocument, GetTokensDocument } from '@repo/api/graphql' import { getProjectConfig } from '@/lib/config/getProjectConfig' import { TokensProvider } from '@/lib/modules/tokens/TokensProvider' import { FiatFxRatesProvider } from '../../hooks/FxRatesProvider' diff --git a/apps/frontend-v3/lib/shared/services/viem/viem.client.ts b/apps/frontend-v3/lib/shared/services/viem/viem.client.ts index f43887022..c3a613fe5 100644 --- a/apps/frontend-v3/lib/shared/services/viem/viem.client.ts +++ b/apps/frontend-v3/lib/shared/services/viem/viem.client.ts @@ -1,5 +1,5 @@ import { createPublicClient } from 'viem' -import { GqlChain } from '../api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { getNetworkConfig } from '@/lib/config/app.config' import { chains, chainsByKey } from '@/lib/modules/web3/ChainConfig' import { Chain } from 'viem' diff --git a/apps/frontend-v3/lib/shared/utils/addresses.ts b/apps/frontend-v3/lib/shared/utils/addresses.ts index 29b7ea852..6aeebc47e 100644 --- a/apps/frontend-v3/lib/shared/utils/addresses.ts +++ b/apps/frontend-v3/lib/shared/utils/addresses.ts @@ -1,7 +1,7 @@ import { getNativeAssetAddress, getWrappedNativeAssetAddress } from '@/lib/config/app.config' import { SupportedChainId } from '@/lib/config/config.types' import { Address, checksumAddress, isAddress } from 'viem' -import { GqlChain } from '../services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' export function isSameAddress(address1: string, address2: string): boolean { if (!address1 || !address2) return false diff --git a/apps/frontend-v3/next.config.js b/apps/frontend-v3/next.config.js index 705c5c381..26bc2da9f 100644 --- a/apps/frontend-v3/next.config.js +++ b/apps/frontend-v3/next.config.js @@ -22,6 +22,7 @@ const nextConfig = { ], }, pageExtensions: ['tsx', `${process.env.PROTOCOL}.tsx`, 'ts'], + transpilePackages: ['@repo/api'], // Safe App setup headers: manifestHeaders, diff --git a/apps/frontend-v3/package.json b/apps/frontend-v3/package.json index 9cdc512e7..41a093097 100644 --- a/apps/frontend-v3/package.json +++ b/apps/frontend-v3/package.json @@ -4,11 +4,10 @@ "private": true, "license": "MIT", "scripts": { - "build": "PROTOCOL=bal pnpm graphql:gen && next build", - "dev": "concurrently \"pnpm graphql:gen --watch\" \"next dev\"", + "build": "PROTOCOL=bal pnpm --filter api graphql:gen && next build", + "dev": "concurrently \"pnpm --filter api graphql:gen --watch\" \"next dev\"", "gen:theme-typings": "chakra-cli tokens ./lib/shared/services/chakra/themes/bal/bal.theme.ts", "gen:wagmi": "pnpm wagmi generate", - "graphql:gen": "DOTENV_CONFIG_PATH=./.env.local graphql-codegen -r dotenv/config", "postinstall": "npm run gen:theme-typings", "lint": "next lint", "lint:fix": "next lint --fix", @@ -51,8 +50,6 @@ "fathom-client": "^3.7.0", "framer-motion": "^10.13.0", "graphql": "^16.7.1", - "graphql-request": "^6.1.0", - "graphql-tag": "^2.12.6", "lodash": "^4.17.21", "next": "14.2.0", "next-themes": "^0.3.0", @@ -81,12 +78,8 @@ "@apollo/experimental-nextjs-app-support": "^0.11.3", "@chakra-ui/cli": "^2.4.1", "@chakra-ui/styled-system": "^2.9.2", - "@graphql-codegen/cli": "^5.0.0", - "@graphql-codegen/client-preset": "^4.1.0", - "@graphql-codegen/schema-ast": "^4.0.0", - "@graphql-codegen/typescript-document-nodes": "^4.0.1", "@graphql-codegen/typescript-msw": "^1.1.6", - "@graphql-typed-document-node/core": "^3.2.0", + "@repo/api": "workspace:*", "@repo/eslint-config": "workspace:*", "@repo/typescript-config": "workspace:*", "@sentry/types": "^7.89.0", diff --git a/apps/frontend-v3/test/data/all-gql-tokens.fake.ts b/apps/frontend-v3/test/data/all-gql-tokens.fake.ts index f36e6e343..fbe934c1c 100644 --- a/apps/frontend-v3/test/data/all-gql-tokens.fake.ts +++ b/apps/frontend-v3/test/data/all-gql-tokens.fake.ts @@ -1,4 +1,4 @@ -import { GqlChain, GqlToken } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain, GqlToken } from '@repo/api/graphql' export const fakeTokenSymbols = [ 'ETH', diff --git a/apps/frontend-v3/test/integration/sdk-utils.ts b/apps/frontend-v3/test/integration/sdk-utils.ts index b8f957ee3..b90d6ef41 100644 --- a/apps/frontend-v3/test/integration/sdk-utils.ts +++ b/apps/frontend-v3/test/integration/sdk-utils.ts @@ -1,4 +1,4 @@ -import { GqlPoolElement } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolElement } from '@repo/api/graphql' import { isSameAddress } from '@/lib/shared/utils/addresses' import { VAULT, diff --git a/apps/frontend-v3/test/msw/builders/gqlPoolElement.builders.ts b/apps/frontend-v3/test/msw/builders/gqlPoolElement.builders.ts index 44bceb6b8..762f26ab8 100644 --- a/apps/frontend-v3/test/msw/builders/gqlPoolElement.builders.ts +++ b/apps/frontend-v3/test/msw/builders/gqlPoolElement.builders.ts @@ -18,7 +18,7 @@ import { GqlPoolTokenExpanded, GqlPoolType, GqlPoolWeighted, -} from '@/lib/shared/services/api/generated/graphql' +} from '@repo/api/graphql' import { DeepPartial } from '@apollo/client/utilities' import { mock } from 'vitest-mock-extended' import { aGqlStakingMock } from './gqlStaking.builders' diff --git a/apps/frontend-v3/test/msw/builders/gqlPoolMinimal.builders.ts b/apps/frontend-v3/test/msw/builders/gqlPoolMinimal.builders.ts index a6d081736..ff2bdfaee 100644 --- a/apps/frontend-v3/test/msw/builders/gqlPoolMinimal.builders.ts +++ b/apps/frontend-v3/test/msw/builders/gqlPoolMinimal.builders.ts @@ -5,7 +5,7 @@ import { GqlPoolAprValue, GqlPoolMinimal, GqlPoolType, -} from '@/lib/shared/services/api/generated/graphql' +} from '@repo/api/graphql' import { DeepPartial } from '@apollo/client/utilities' import { mock, mockDeep } from 'vitest-mock-extended' diff --git a/apps/frontend-v3/test/msw/builders/gqlStaking.builders.ts b/apps/frontend-v3/test/msw/builders/gqlStaking.builders.ts index 248cf7b52..08cc02331 100644 --- a/apps/frontend-v3/test/msw/builders/gqlStaking.builders.ts +++ b/apps/frontend-v3/test/msw/builders/gqlStaking.builders.ts @@ -3,7 +3,7 @@ import { GqlPoolStaking, GqlPoolStakingGaugeStatus, GqlPoolStakingType, -} from '@/lib/shared/services/api/generated/graphql' +} from '@repo/api/graphql' export const defaultTestGaugeAddress = '0x2d42910d826e5500579d121596e98a6eb33c0a1b' diff --git a/apps/frontend-v3/test/msw/builders/gqlTokenPrice.builders.ts b/apps/frontend-v3/test/msw/builders/gqlTokenPrice.builders.ts index f2986ef9b..ab752131c 100644 --- a/apps/frontend-v3/test/msw/builders/gqlTokenPrice.builders.ts +++ b/apps/frontend-v3/test/msw/builders/gqlTokenPrice.builders.ts @@ -1,4 +1,4 @@ -import { GqlTokenPrice } from '@/lib/shared/services/api/generated/graphql' +import { GqlTokenPrice } from '@repo/api/graphql' import { DeepPartial } from '@apollo/client/utilities' export function aGqlTokenPriceMock(...options: Partial[]): GqlTokenPrice { diff --git a/apps/frontend-v3/test/msw/builders/gqlUserBalance.builders.ts b/apps/frontend-v3/test/msw/builders/gqlUserBalance.builders.ts index 859f6c7c4..702601ada 100644 --- a/apps/frontend-v3/test/msw/builders/gqlUserBalance.builders.ts +++ b/apps/frontend-v3/test/msw/builders/gqlUserBalance.builders.ts @@ -1,4 +1,4 @@ -import { GqlPoolUserBalance } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolUserBalance } from '@repo/api/graphql' export function aUserPoolBalance(...options: Partial[]): GqlPoolUserBalance { const defaultBalance: GqlPoolUserBalance = { diff --git a/apps/frontend-v3/test/msw/handlers/AppGlobalData.handlers.ts b/apps/frontend-v3/test/msw/handlers/AppGlobalData.handlers.ts index ed88df57e..05336896e 100644 --- a/apps/frontend-v3/test/msw/handlers/AppGlobalData.handlers.ts +++ b/apps/frontend-v3/test/msw/handlers/AppGlobalData.handlers.ts @@ -1,4 +1,4 @@ -import { GetAppGlobalPollingDataDocument } from '@/lib/shared/services/api/generated/graphql' +import { GetAppGlobalPollingDataDocument } from '@repo/api/graphql' import { getQueryName, mockGQL } from '../utils' import { graphql } from 'msw' import { anAppGlobalData } from '@/lib/modules/tokens/__mocks__/AppGlobalData.builders' diff --git a/apps/frontend-v3/test/msw/handlers/Pool.handlers.ts b/apps/frontend-v3/test/msw/handlers/Pool.handlers.ts index f9ad69f96..778073655 100644 --- a/apps/frontend-v3/test/msw/handlers/Pool.handlers.ts +++ b/apps/frontend-v3/test/msw/handlers/Pool.handlers.ts @@ -1,4 +1,4 @@ -import { GetPoolDocument, GetPoolQuery } from '@/lib/shared/services/api/generated/graphql' +import { GetPoolDocument, GetPoolQuery } from '@repo/api/graphql' import { graphql } from 'msw' import { getQueryName, mockGQL } from '../utils' import { aGqlPoolElementMock } from '../builders/gqlPoolElement.builders' diff --git a/apps/frontend-v3/test/msw/handlers/PoolList.handlers.ts b/apps/frontend-v3/test/msw/handlers/PoolList.handlers.ts index 682403658..13457e067 100644 --- a/apps/frontend-v3/test/msw/handlers/PoolList.handlers.ts +++ b/apps/frontend-v3/test/msw/handlers/PoolList.handlers.ts @@ -1,4 +1,4 @@ -import { GetPoolsDocument } from '@/lib/shared/services/api/generated/graphql' +import { GetPoolsDocument } from '@repo/api/graphql' import { getQueryName, mockGQL } from '../utils' import { graphql } from 'msw' import { aGqlPoolMinimalMock } from '../builders/gqlPoolMinimal.builders' diff --git a/apps/frontend-v3/test/msw/handlers/Tokens.handlers.ts b/apps/frontend-v3/test/msw/handlers/Tokens.handlers.ts index 5812f9fdd..187271374 100644 --- a/apps/frontend-v3/test/msw/handlers/Tokens.handlers.ts +++ b/apps/frontend-v3/test/msw/handlers/Tokens.handlers.ts @@ -3,11 +3,7 @@ import { defaultTokenListMock, defaultTokenPriceListMock, } from '@/lib/modules/tokens/__mocks__/token.builders' -import { - GetTokenPricesDocument, - GetTokenPricesQuery, - GetTokensDocument, -} from '@/lib/shared/services/api/generated/graphql' +import { GetTokenPricesDocument, GetTokenPricesQuery, GetTokensDocument } from '@repo/api/graphql' import { graphql } from 'msw' import { getQueryName, mockGQL } from '../utils' import { GQLResponse } from './msw-helpers' diff --git a/apps/frontend-v3/test/msw/utils.spec.ts b/apps/frontend-v3/test/msw/utils.spec.ts index a0366cd75..3d37f70df 100644 --- a/apps/frontend-v3/test/msw/utils.spec.ts +++ b/apps/frontend-v3/test/msw/utils.spec.ts @@ -1,4 +1,4 @@ -import { GetPoolsDocument, GetTokensDocument } from '@/lib/shared/services/api/generated/graphql' +import { GetPoolsDocument, GetTokensDocument } from '@repo/api/graphql' import { getQueryName } from './utils' describe('getQueryName', () => { diff --git a/apps/frontend-v3/test/utils/custom-renderers.tsx b/apps/frontend-v3/test/utils/custom-renderers.tsx index ac26db59f..f0ffc0947 100644 --- a/apps/frontend-v3/test/utils/custom-renderers.tsx +++ b/apps/frontend-v3/test/utils/custom-renderers.tsx @@ -16,7 +16,7 @@ import { RecentTransactionsProvider } from '@/lib/modules/transactions/RecentTra import { TransactionStateProvider } from '@/lib/modules/transactions/transaction-steps/TransactionStateProvider' import { UserSettingsProvider } from '@/lib/modules/user/settings/UserSettingsProvider' import { UserAccountProvider } from '@/lib/modules/web3/UserAccountProvider' -import { GqlPoolElement } from '@/lib/shared/services/api/generated/graphql' +import { GqlPoolElement } from '@repo/api/graphql' import { testWagmiConfig } from '@/test/anvil/testWagmiConfig' import { ApolloProvider } from '@apollo/client' import { QueryClientProvider } from '@tanstack/react-query' diff --git a/apps/frontend-v3/test/vitest/setup-integration.ts b/apps/frontend-v3/test/vitest/setup-integration.ts index 020c41e34..10c56a3b5 100644 --- a/apps/frontend-v3/test/vitest/setup-integration.ts +++ b/apps/frontend-v3/test/vitest/setup-integration.ts @@ -1,7 +1,7 @@ import { connectWithDefaultUser, disconnectDefaultUser } from '../utils/wagmi/wagmi-connections' import * as transportsModule from '../../lib/modules/web3/transports' import { NetworksWithFork, getTestRpcSetup } from '../anvil/anvil-setup' -import { GqlChain } from '@/lib/shared/services/api/generated/graphql' +import { GqlChain } from '@repo/api/graphql' import { createPublicClient, http } from 'viem' import { mainnetTest, polygonTest } from '../anvil/testWagmiConfig' import { chainsByKey } from '@/lib/modules/web3/ChainConfig' diff --git a/apps/frontend-v3/tsconfig.json b/apps/frontend-v3/tsconfig.json index 5462ee937..d7dc76efd 100644 --- a/apps/frontend-v3/tsconfig.json +++ b/apps/frontend-v3/tsconfig.json @@ -2,6 +2,7 @@ "extends": "@repo/typescript-config/nextjs.json", "compilerOptions": { "module": "esnext", + "moduleResolution": "Bundler", "baseUrl": ".", "plugins": [ { @@ -13,15 +14,6 @@ }, "types": ["vitest/globals"] }, - "include": [ - "**/*.ts", - "**/*.tsx", - "global.d.ts", - "next-env.d.ts", - ".next/types/**/*.ts" - ], - "exclude": [ - "node_modules", - ".next" - ] + "include": ["**/*.ts", "**/*.tsx", "global.d.ts", "next-env.d.ts", ".next/types/**/*.ts"], + "exclude": ["node_modules", ".next"] } diff --git a/packages/api/.env.template b/packages/api/.env.template new file mode 100644 index 000000000..34134bc21 --- /dev/null +++ b/packages/api/.env.template @@ -0,0 +1 @@ +NEXT_PUBLIC_BALANCER_API_URL=https://api-v3.balancer.fi/graphql diff --git a/packages/api/.env.test b/packages/api/.env.test new file mode 100644 index 000000000..34134bc21 --- /dev/null +++ b/packages/api/.env.test @@ -0,0 +1 @@ +NEXT_PUBLIC_BALANCER_API_URL=https://api-v3.balancer.fi/graphql diff --git a/packages/api/.gitignore b/packages/api/.gitignore new file mode 100644 index 000000000..dc9b2375c --- /dev/null +++ b/packages/api/.gitignore @@ -0,0 +1 @@ +generated \ No newline at end of file diff --git a/apps/frontend-v3/codegen.ts b/packages/api/codegen.ts similarity index 76% rename from apps/frontend-v3/codegen.ts rename to packages/api/codegen.ts index 67cd667a2..ffe5bc073 100644 --- a/apps/frontend-v3/codegen.ts +++ b/packages/api/codegen.ts @@ -2,13 +2,13 @@ import { CodegenConfig } from '@graphql-codegen/cli' const config: CodegenConfig = { generates: { - ['./lib/shared/services/api/generated/schema.graphql']: { + ['./lib/generated/schema.graphql']: { schema: process.env.NEXT_PUBLIC_BALANCER_API_URL, plugins: ['schema-ast'], }, - [`./lib/shared/services/api/generated/`]: { + [`./lib/generated/`]: { schema: process.env.NEXT_PUBLIC_BALANCER_API_URL, - documents: ['./lib/shared/services/api/**/*.graphql'], + documents: ['./lib/**/*.graphql'], preset: 'client', config: { nonOptionalTypename: true, diff --git a/apps/frontend-v3/lib/shared/services/api/global.graphql b/packages/api/lib/global.graphql similarity index 100% rename from apps/frontend-v3/lib/shared/services/api/global.graphql rename to packages/api/lib/global.graphql diff --git a/apps/frontend-v3/lib/shared/services/api/pool.graphql b/packages/api/lib/pool.graphql similarity index 100% rename from apps/frontend-v3/lib/shared/services/api/pool.graphql rename to packages/api/lib/pool.graphql diff --git a/apps/frontend-v3/lib/shared/services/api/pools.graphql b/packages/api/lib/pools.graphql similarity index 100% rename from apps/frontend-v3/lib/shared/services/api/pools.graphql rename to packages/api/lib/pools.graphql diff --git a/apps/frontend-v3/lib/shared/services/api/protocol-stats.graphql b/packages/api/lib/protocol-stats.graphql similarity index 100% rename from apps/frontend-v3/lib/shared/services/api/protocol-stats.graphql rename to packages/api/lib/protocol-stats.graphql diff --git a/apps/frontend-v3/lib/shared/services/api/swap.graphql b/packages/api/lib/swap.graphql similarity index 100% rename from apps/frontend-v3/lib/shared/services/api/swap.graphql rename to packages/api/lib/swap.graphql diff --git a/apps/frontend-v3/lib/shared/services/api/trade.graphql b/packages/api/lib/trade.graphql similarity index 100% rename from apps/frontend-v3/lib/shared/services/api/trade.graphql rename to packages/api/lib/trade.graphql diff --git a/apps/frontend-v3/lib/shared/services/api/vebal.graphql b/packages/api/lib/vebal.graphql similarity index 100% rename from apps/frontend-v3/lib/shared/services/api/vebal.graphql rename to packages/api/lib/vebal.graphql diff --git a/packages/api/package.json b/packages/api/package.json new file mode 100644 index 000000000..ef7099796 --- /dev/null +++ b/packages/api/package.json @@ -0,0 +1,24 @@ +{ + "name": "@repo/api", + "version": "0.0.0", + "private": true, + "dependencies": { + "graphql": "^16.7.1", + "graphql-request": "^6.1.0", + "graphql-tag": "^2.12.6" + }, + "devDependencies": { + "@graphql-codegen/cli": "^5.0.0", + "@graphql-codegen/client-preset": "^4.1.0", + "@graphql-codegen/schema-ast": "^4.0.0", + "@graphql-codegen/typescript-document-nodes": "^4.0.1", + "@graphql-typed-document-node/core": "^3.2.0", + "@types/node": "20.3.2" + }, + "exports": { + "./graphql": "./lib/generated/graphql.ts" + }, + "scripts": { + "graphql:gen": "DOTENV_CONFIG_PATH=./.env.local graphql-codegen -r dotenv/config --config codegen.ts" + } +} diff --git a/packages/eslint-config/library.js b/packages/eslint-config/library.js index 9b59cc0fc..aab3f0ab4 100644 --- a/packages/eslint-config/library.js +++ b/packages/eslint-config/library.js @@ -1,11 +1,11 @@ -const { resolve } = require("node:path"); +const { resolve } = require('node:path') -const project = resolve(process.cwd(), "tsconfig.json"); +const project = resolve(process.cwd(), 'tsconfig.json') /** @type {import("eslint").Linter.Config} */ module.exports = { - extends: ["eslint:recommended", "prettier", "turbo"], - plugins: ["only-warn"], + extends: ['eslint:recommended', 'prettier', 'turbo'], + plugins: ['only-warn'], globals: { React: true, JSX: true, @@ -14,7 +14,7 @@ module.exports = { node: true, }, settings: { - "import/resolver": { + 'import/resolver': { typescript: { project, }, @@ -22,13 +22,13 @@ module.exports = { }, ignorePatterns: [ // Ignore dotfiles - ".*.js", - "node_modules/", - "dist/", + '.*.js', + 'node_modules/', + 'dist/', ], overrides: [ { - files: ["*.js?(x)", "*.ts?(x)"], + files: ['*.js?(x)', '*.ts?(x)'], }, ], -}; +} diff --git a/packages/eslint-config/next.js b/packages/eslint-config/next.js index b4663a83d..d4773de2f 100644 --- a/packages/eslint-config/next.js +++ b/packages/eslint-config/next.js @@ -1,16 +1,16 @@ -const { resolve } = require("node:path"); +const { resolve } = require('node:path') -const project = resolve(process.cwd(), "tsconfig.json"); +const project = resolve(process.cwd(), 'tsconfig.json') /** @type {import("eslint").Linter.Config} */ module.exports = { extends: [ - "eslint:recommended", + 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', - require.resolve("@vercel/style-guide/eslint/next"), - require.resolve("@vercel/style-guide/eslint/react"), - "turbo", + require.resolve('@vercel/style-guide/eslint/next'), + require.resolve('@vercel/style-guide/eslint/react'), + 'turbo', ], globals: { React: true, @@ -20,9 +20,9 @@ module.exports = { node: true, browser: true, }, - plugins: ['@typescript-eslint', 'prettier', "only-warn"], + plugins: ['@typescript-eslint', 'prettier', 'only-warn'], settings: { - "import/resolver": { + 'import/resolver': { typescript: { project, }, @@ -30,10 +30,10 @@ module.exports = { }, ignorePatterns: [ // Ignore dotfiles - ".*.js", - "node_modules/", + '.*.js', + 'node_modules/', ], - overrides: [{ files: ["*.js?(x)", "*.ts?(x)"] }], + overrides: [{ files: ['*.js?(x)', '*.ts?(x)'] }], rules: { 'prettier/prettier': 'warn', curly: ['error', 'multi-line'], @@ -70,4 +70,4 @@ module.exports = { }, ], }, -}; +} diff --git a/packages/eslint-config/react-internal.js b/packages/eslint-config/react-internal.js index bf0a20836..7ea83ca33 100644 --- a/packages/eslint-config/react-internal.js +++ b/packages/eslint-config/react-internal.js @@ -1,6 +1,6 @@ -const { resolve } = require("node:path"); +const { resolve } = require('node:path') -const project = resolve(process.cwd(), "tsconfig.json"); +const project = resolve(process.cwd(), 'tsconfig.json') /* * This is a custom ESLint configuration for use with @@ -10,8 +10,8 @@ const project = resolve(process.cwd(), "tsconfig.json"); /** @type {import("eslint").Linter.Config} */ module.exports = { - extends: ["eslint:recommended", "prettier", "turbo"], - plugins: ["only-warn"], + extends: ['eslint:recommended', 'prettier', 'turbo'], + plugins: ['only-warn'], globals: { React: true, JSX: true, @@ -20,7 +20,7 @@ module.exports = { browser: true, }, settings: { - "import/resolver": { + 'import/resolver': { typescript: { project, }, @@ -28,12 +28,12 @@ module.exports = { }, ignorePatterns: [ // Ignore dotfiles - ".*.js", - "node_modules/", - "dist/", + '.*.js', + 'node_modules/', + 'dist/', ], overrides: [ // Force ESLint to detect .tsx files - { files: ["*.js?(x)", "*.ts?(x)"] }, + { files: ['*.js?(x)', '*.ts?(x)'] }, ], -}; +} diff --git a/packages/typescript-config/base.json b/packages/typescript-config/base.json index 96955025d..543bb4cdb 100644 --- a/packages/typescript-config/base.json +++ b/packages/typescript-config/base.json @@ -15,6 +15,6 @@ "resolveJsonModule": true, "skipLibCheck": true, "strict": true, - "target": "es2022", + "target": "es2022" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5288c8caa..8419f1338 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -125,12 +125,6 @@ importers: graphql: specifier: ^16.7.1 version: 16.9.0 - graphql-request: - specifier: ^6.1.0 - version: 6.1.0(graphql@16.9.0) - graphql-tag: - specifier: ^2.12.6 - version: 2.12.6(graphql@16.9.0) lodash: specifier: ^4.17.21 version: 4.17.21 @@ -210,24 +204,12 @@ importers: '@chakra-ui/styled-system': specifier: ^2.9.2 version: 2.9.2 - '@graphql-codegen/cli': - specifier: ^5.0.0 - version: 5.0.2(@parcel/watcher@2.4.1)(@types/node@20.3.2)(bufferutil@4.0.8)(graphql@16.9.0)(typescript@5.4.5)(utf-8-validate@5.0.10) - '@graphql-codegen/client-preset': - specifier: ^4.1.0 - version: 4.3.3(graphql@16.9.0) - '@graphql-codegen/schema-ast': - specifier: ^4.0.0 - version: 4.1.0(graphql@16.9.0) - '@graphql-codegen/typescript-document-nodes': - specifier: ^4.0.1 - version: 4.0.9(graphql@16.9.0) '@graphql-codegen/typescript-msw': specifier: ^1.1.6 version: 1.1.6(graphql@16.9.0) - '@graphql-typed-document-node/core': - specifier: ^3.2.0 - version: 3.2.0(graphql@16.9.0) + '@repo/api': + specifier: workspace:* + version: link:../../packages/api '@repo/eslint-config': specifier: workspace:* version: link:../../packages/eslint-config @@ -337,6 +319,37 @@ importers: specifier: ^2.0.2 version: 2.0.2(typescript@5.4.5)(vitest@2.1.1(@types/node@20.3.2)(happy-dom@12.10.3)(msw@2.0.10(typescript@5.4.5))(terser@5.32.0)) + packages/api: + dependencies: + graphql: + specifier: ^16.7.1 + version: 16.9.0 + graphql-request: + specifier: ^6.1.0 + version: 6.1.0(graphql@16.9.0) + graphql-tag: + specifier: ^2.12.6 + version: 2.12.6(graphql@16.9.0) + devDependencies: + '@graphql-codegen/cli': + specifier: ^5.0.0 + version: 5.0.2(@parcel/watcher@2.4.1)(@types/node@20.3.2)(bufferutil@4.0.8)(graphql@16.9.0)(typescript@5.4.5)(utf-8-validate@5.0.10) + '@graphql-codegen/client-preset': + specifier: ^4.1.0 + version: 4.3.3(graphql@16.9.0) + '@graphql-codegen/schema-ast': + specifier: ^4.0.0 + version: 4.1.0(graphql@16.9.0) + '@graphql-codegen/typescript-document-nodes': + specifier: ^4.0.1 + version: 4.0.9(graphql@16.9.0) + '@graphql-typed-document-node/core': + specifier: ^3.2.0 + version: 3.2.0(graphql@16.9.0) + '@types/node': + specifier: 20.3.2 + version: 20.3.2 + packages/eslint-config: devDependencies: '@typescript-eslint/eslint-plugin': @@ -3911,9 +3924,6 @@ packages: '@types/node-forge@1.3.11': resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} - '@types/node@20.11.24': - resolution: {integrity: sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==} - '@types/node@20.3.2': resolution: {integrity: sha512-vOBLVQeCQfIcF/2Y7eKFTqrMnizK5lRNQ7ykML/5RuwVXVWxYkgwS7xbt4B6fKCUPgbSL5FSsjHQpaGQP/dQmw==} @@ -9185,9 +9195,6 @@ packages: uncrypto@0.1.3: resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} - undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - unenv@1.10.0: resolution: {integrity: sha512-wY5bskBQFL9n3Eca5XnhH6KbUo/tfvkwm9OpcdCvLaeA7piBNbavbOKJySEwQ1V0RH6HvNlSAFRTpvTqgKRQXQ==} @@ -14194,7 +14201,7 @@ snapshots: '@swc/helpers@0.5.5': dependencies: '@swc/counter': 0.1.3 - tslib: 2.6.2 + tslib: 2.7.0 '@tanstack/query-core@5.56.2': {} @@ -14275,7 +14282,7 @@ snapshots: '@types/connect@3.4.36': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.3.2 '@types/cookie@0.4.1': {} @@ -14327,16 +14334,12 @@ snapshots: '@types/mysql@2.15.26': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.3.2 '@types/node-forge@1.3.11': dependencies: '@types/node': 20.3.2 - '@types/node@20.11.24': - dependencies: - undici-types: 5.26.5 - '@types/node@20.3.2': {} '@types/normalize-package-data@2.4.4': {} @@ -14351,7 +14354,7 @@ snapshots: '@types/pg@8.6.1': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.3.2 pg-protocol: 1.6.1 pg-types: 2.2.0 @@ -14381,7 +14384,7 @@ snapshots: '@types/secp256k1@4.0.6': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.3.2 '@types/semver@7.5.0': {} @@ -14401,7 +14404,7 @@ snapshots: '@types/ws@8.5.12': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.3.2 '@types/yargs-parser@21.0.3': {} @@ -16791,23 +16794,24 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-plugin-import@2.29.0)(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-plugin-import@2.29.0)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 6.17.0(eslint@8.57.0)(typescript@5.3.3) eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-plugin-import@2.29.0)(eslint@8.57.0) transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): + eslint-module-utils@2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-plugin-import@2.29.0)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.1.0(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/parser': 6.17.0(eslint@8.57.0)(typescript@5.3.3) eslint: 8.57.0 - eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-plugin-import@2.29.0)(eslint@8.57.0) transitivePeerDependencies: - supports-color @@ -16854,7 +16858,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-plugin-import@2.29.0)(eslint@8.57.0))(eslint@8.57.0) hasown: 2.0.0 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -20847,8 +20851,6 @@ snapshots: uncrypto@0.1.3: {} - undici-types@5.26.5: {} - unenv@1.10.0: dependencies: consola: 3.2.3 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 3ff5faaaf..e9b0dad63 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,3 @@ packages: - - "apps/*" - - "packages/*" + - 'apps/*' + - 'packages/*' diff --git a/turbo.json b/turbo.json index a56798568..57e357740 100644 --- a/turbo.json +++ b/turbo.json @@ -34,7 +34,7 @@ "graphql:gen": { "dependsOn": ["^graphql:gen"], "inputs": [".env*"], - "outputs": ["lib/shared/services/api/generated/**"] + "outputs": ["generated/**"] } } }