From 6a15dc773efaad82b90e2c639b0ff9846ea936d1 Mon Sep 17 00:00:00 2001 From: Daryna Shpankova Date: Thu, 5 Jun 2025 13:47:56 +0200 Subject: [PATCH] update subgraph --- apps/haust-dex/.env.production | 2 +- apps/haust-dex/codegen.yml | 2 +- .../src/components/PositionListItem/index.tsx | 3 +- apps/haust-dex/src/graphql/thegraph/apollo.ts | 4 +- .../haust-dex/src/pages/Pool/PositionPage.tsx | 93 ++++++++++--------- .../haust-dex/src/pages/StakeLiquidity/V3.tsx | 3 +- 6 files changed, 55 insertions(+), 52 deletions(-) diff --git a/apps/haust-dex/.env.production b/apps/haust-dex/.env.production index ed1bd966652..a472d597fef 100644 --- a/apps/haust-dex/.env.production +++ b/apps/haust-dex/.env.production @@ -8,6 +8,6 @@ REACT_APP_MOONPAY_PUBLISHABLE_KEY="pk_live_uQG4BJC4w3cxnqpcSqAfohdBFDTsY6E" REACT_APP_SENTRY_ENABLED=true REACT_APP_SENTRY_TRACES_SAMPLE_RATE=0.00003 REACT_APP_STATSIG_PROXY_URL="https://api.uniswap.org/v1/statsig-proxy" -REACT_APP_THE_GRAPH_SCHEMA_ENDPOINT="https://graph.stage.haust.app/subgraphs/name/haust/uniswap-v3" +REACT_APP_THE_GRAPH_SCHEMA_ENDPOINT="https://graph.testnet.haust.app/subgraphs/name/haust/uniswap-v3" REACT_APP_API_URL="https://haust-v3-stats.rocknblock.io/api/v1/" REACT_APP_WALLET_CONNECT_PROJECT_ID="4f9a1d1c515fa8f9dcd2c305e2e4e9ee" diff --git a/apps/haust-dex/codegen.yml b/apps/haust-dex/codegen.yml index 6fb9887d867..0029a9c55d3 100644 --- a/apps/haust-dex/codegen.yml +++ b/apps/haust-dex/codegen.yml @@ -1,5 +1,5 @@ overrideExisting: false -schema: 'https://graph.stage.haust.app/subgraphs/name/haust/uniswap-v3' +schema: 'https://graph.testnet.haust.app/subgraphs/name/haust/uniswap-v3' generates: ./src/graphql/thegraph/schema/schema.graphql: plugins: diff --git a/apps/haust-dex/src/components/PositionListItem/index.tsx b/apps/haust-dex/src/components/PositionListItem/index.tsx index 022076f63f3..da26c41a566 100644 --- a/apps/haust-dex/src/components/PositionListItem/index.tsx +++ b/apps/haust-dex/src/components/PositionListItem/index.tsx @@ -410,7 +410,8 @@ export default function PositionListItem({ const now = Math.floor(Date.now() / 1000) return incentiveEvents.some((incentive) => incentive.pool.toLowerCase() === poolAddress.toLowerCase() && - Number(incentive.endTime) > now + Number(incentive.endTime) > now && + Number(incentive.startTime) <= now ) }, [incentiveEvents, poolAddress]) diff --git a/apps/haust-dex/src/graphql/thegraph/apollo.ts b/apps/haust-dex/src/graphql/thegraph/apollo.ts index 027d3452e1e..25ad81aa4c2 100644 --- a/apps/haust-dex/src/graphql/thegraph/apollo.ts +++ b/apps/haust-dex/src/graphql/thegraph/apollo.ts @@ -5,9 +5,9 @@ import store from '../../state/index' const CHAIN_SUBGRAPH_URL: Record = { // TODO: change subgraph path when mainnet is ready - [SupportedChainId.HAUST]: 'https://graph.stage.haust.app/subgraphs/name/haust/uniswap-v3', + [SupportedChainId.HAUST]: 'https://graph.testnet.haust.app/subgraphs/name/haust/uniswap-v3', [SupportedChainId.HAUST_TESTNET]: - 'https://graph.stage.haust.app/subgraphs/name/haust/uniswap-v3', + 'https://graph.testnet.haust.app/subgraphs/name/haust/uniswap-v3', } const httpLink = new HttpLink({ uri: CHAIN_SUBGRAPH_URL[SupportedChainId.HAUST_TESTNET] }) diff --git a/apps/haust-dex/src/pages/Pool/PositionPage.tsx b/apps/haust-dex/src/pages/Pool/PositionPage.tsx index 4178b7c14e4..c15ddd27b73 100644 --- a/apps/haust-dex/src/pages/Pool/PositionPage.tsx +++ b/apps/haust-dex/src/pages/Pool/PositionPage.tsx @@ -469,7 +469,8 @@ function PositionPageContent() { const now = Math.floor(Date.now() / 1000); return incentiveEvents.find(incentive => incentive.pool.toLowerCase() === poolAddress.toLowerCase() && - Number(incentive.endTime) > now + Number(incentive.endTime) > now && + Number(incentive.startTime) <= now ); }, [incentiveEvents, poolAddress]); @@ -724,52 +725,52 @@ function PositionPageContent() { {currency0 && currency1 && feeAmount && tokenId ? ( - isPositionStaked || !isUsersNFT ? ( - - Increase Liquidity - - ) : ( - - Increase Liquidity - - ) - ) : null} + isPositionStaked || !isUsersNFT ? ( + + Increase Liquidity + + ) : ( + + Increase Liquidity + + ) + ) : null} {tokenId && !removed ? ( - isPositionStaked || !isUsersNFT ? ( - - Remove Liquidity - - ) : ( - - Remove Liquidity - - ) - ) : null} + isPositionStaked || !isUsersNFT ? ( + + Remove Liquidity + + ) : ( + + Remove Liquidity + + ) + ) : null} diff --git a/apps/haust-dex/src/pages/StakeLiquidity/V3.tsx b/apps/haust-dex/src/pages/StakeLiquidity/V3.tsx index 44a74e7992b..18dc26dedf3 100644 --- a/apps/haust-dex/src/pages/StakeLiquidity/V3.tsx +++ b/apps/haust-dex/src/pages/StakeLiquidity/V3.tsx @@ -116,7 +116,8 @@ function Remove({ tokenId }: { tokenId: BigNumber }) { const now = Math.floor(Date.now() / 1000); return incentiveEvents.find(incentive => incentive.pool.toLowerCase() === poolAddress?.toLowerCase() && - Number(incentive.endTime) > now + Number(incentive.endTime) > now && + Number(incentive.startTime) <= now ); }, [feeAmount, incentiveEvents, poolAddress, token0, token1]);