diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c709a28..6b769bf1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,7 @@ jobs: POSTHOG_HOSTNAME_HTTP: ${{ secrets.MAINNET_POSTHOG_HOSTNAME_HTTP }} GATSBY_GTM_SUPPORT: true GATSBY_GTM_ID: ${{ secrets.GTM_ID }} + SUBGRAPH_API_KEY: ${{ secrets.SUBGRAPH_API_KEY }} - uses: actions/upload-artifact@v3 with: diff --git a/src/config/subgraph.ts b/src/config/subgraph.ts index cde5cbef..cca1849b 100644 --- a/src/config/subgraph.ts +++ b/src/config/subgraph.ts @@ -1,5 +1,7 @@ export const T_NETWORK_SUBGRAPH_URL = "https://api.studio.thegraph.com/query/24143/threshold/0.0.4" -export const TBTC_SUBGRAPH_URL = - "https://api.thegraph.com/subgraphs/name/suntzu93/threshold-tbtc" +export const T_NETWORK_SUBGRAPH_ID = + "5TJAMbsRwm1avUTV4CofaLT4apfQoAiNcysEit9BWr6R" + +export const TBTC_SUBGRAPH_URL = `https://gateway-arbitrum.network.thegraph.com/api/${process.env.SUBGRAPH_API_KEY}/subgraphs/id/DETCX5Xm6tJfctRcZAxhQB9q3aK8P4BXLbujHmzEBXYV` diff --git a/src/hooks/tBTC/useTotalMints.ts b/src/hooks/tBTC/useTotalMints.ts index 9fca7035..094fc103 100644 --- a/src/hooks/tBTC/useTotalMints.ts +++ b/src/hooks/tBTC/useTotalMints.ts @@ -1,6 +1,6 @@ import { gql, request } from "graphql-request" -import { TBTC_SUBGRAPH_URL } from "../../config/subgraph" import { useEffect, useState } from "react" +import { TBTC_SUBGRAPH_URL } from "../../config/subgraph" export const useTotalMints = () => { const [totalMints, setTotalMints] = useState(undefined) @@ -22,8 +22,7 @@ export const useTotalMints = () => { ) { id } - } - ` + }` const result: { transactions: { id: string }[] } = await request( TBTC_SUBGRAPH_URL, diff --git a/src/templates/earn-page/btc/index.tsx b/src/templates/earn-page/btc/index.tsx index 14b88c9b..8bbd5bc7 100644 --- a/src/templates/earn-page/btc/index.tsx +++ b/src/templates/earn-page/btc/index.tsx @@ -4,7 +4,6 @@ import { Box, Stack, VStack } from "@chakra-ui/react" import RolePageTemplate from "../RolePageTemplate" import SectionTemplate from "../../home-page/SectionTemplate" import { BodyLg, H4, H5 } from "../../../components" -import { LPCardGroup } from "../../../components/LPCard" import { TBTCStats } from "./TBTCStats" import { gql } from "graphql-request" import { TBTC_SUBGRAPH_URL } from "../../../config/subgraph" diff --git a/src/templates/earn-page/staker/NetworkDistribution/index.tsx b/src/templates/earn-page/staker/NetworkDistribution/index.tsx index 11285a3e..8dba53a0 100644 --- a/src/templates/earn-page/staker/NetworkDistribution/index.tsx +++ b/src/templates/earn-page/staker/NetworkDistribution/index.tsx @@ -1,4 +1,4 @@ -import { Box, HStack, Icon, SimpleGrid, Stack } from "@chakra-ui/react" +import { Box, HStack, Icon, Stack } from "@chakra-ui/react" import { gql } from "graphql-request" import Card from "../../../../components/Card" import TStakedChart from "./TStakedChart" @@ -11,12 +11,8 @@ import { formatTokenAmount, formatUnits, } from "../../../../utils" -import StatBox from "../../../../components/StatBox" import { useTTokenPrice } from "../../../../contexts/TokenPriceContext" -import { - BsFillInfoCircleFill, - IoInformationCircleOutline, -} from "react-icons/all" +import { BsFillInfoCircleFill } from "react-icons/all" function NetworkDistribution() { const { isFetching, data, error } = useQuery<{ diff --git a/src/templates/home-page/Hero/index.tsx b/src/templates/home-page/Hero/index.tsx index 7c80715f..7db4d727 100644 --- a/src/templates/home-page/Hero/index.tsx +++ b/src/templates/home-page/Hero/index.tsx @@ -63,7 +63,7 @@ const Hero: FC<{ const { epoches } = totalStakedData || { epoches: [{ totalStaked: "0" }], } - const totalStaked = !error ? epoches[0].totalStaked : "0" + const totalStaked = !totalStakedError ? epoches[0].totalStaked : "0" const tPrice = useTTokenPrice() const totalValueStakedInUSD = exchangeAPI .toUsdBalance(formatUnits(totalStaked), tPrice)