Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/haust-dex/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion apps/haust-dex/codegen.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
3 changes: 2 additions & 1 deletion apps/haust-dex/src/components/PositionListItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down
4 changes: 2 additions & 2 deletions apps/haust-dex/src/graphql/thegraph/apollo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import store from '../../state/index'

const CHAIN_SUBGRAPH_URL: Record<number, string> = {
// 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] })
Expand Down
93 changes: 47 additions & 46 deletions apps/haust-dex/src/pages/Pool/PositionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);

Expand Down Expand Up @@ -724,52 +725,52 @@ function PositionPageContent() {
</RowFixed>
<ActionButtonResponsiveRow>
{currency0 && currency1 && feeAmount && tokenId ? (
isPositionStaked || !isUsersNFT ? (
<SmallButtonPrimary
padding="6px 8px"
width="fit-content"
$borderRadius="12px"
style={{ marginRight: '8px', opacity: 0.5 }}
disabled
>
<Trans>Increase Liquidity</Trans>
</SmallButtonPrimary>
) : (
<SmallButtonPrimary
as={Link}
to={`/increase/${currencyId(currency0)}/${currencyId(currency1)}/${feeAmount}/${tokenId}`}
padding="6px 8px"
width="fit-content"
$borderRadius="12px"
style={{ marginRight: '8px' }}
>
<Trans>Increase Liquidity</Trans>
</SmallButtonPrimary>
)
) : null}
isPositionStaked || !isUsersNFT ? (
<SmallButtonPrimary
padding="6px 8px"
width="fit-content"
$borderRadius="12px"
style={{ marginRight: '8px', opacity: 0.5 }}
disabled
>
<Trans>Increase Liquidity</Trans>
</SmallButtonPrimary>
) : (
<SmallButtonPrimary
as={Link}
to={`/increase/${currencyId(currency0)}/${currencyId(currency1)}/${feeAmount}/${tokenId}`}
padding="6px 8px"
width="fit-content"
$borderRadius="12px"
style={{ marginRight: '8px' }}
>
<Trans>Increase Liquidity</Trans>
</SmallButtonPrimary>
)
) : null}
{tokenId && !removed ? (
isPositionStaked || !isUsersNFT ? (
<SmallButtonPrimary
padding="6px 8px"
width="fit-content"
$borderRadius="12px"
style={{ opacity: 0.5 }}
disabled
>
<Trans>Remove Liquidity</Trans>
</SmallButtonPrimary>
) : (
<SmallButtonPrimary
as={Link}
to={`/remove/${tokenId}`}
padding="6px 8px"
width="fit-content"
$borderRadius="12px"
>
<Trans>Remove Liquidity</Trans>
</SmallButtonPrimary>
)
) : null}
isPositionStaked || !isUsersNFT ? (
<SmallButtonPrimary
padding="6px 8px"
width="fit-content"
$borderRadius="12px"
style={{ opacity: 0.5 }}
disabled
>
<Trans>Remove Liquidity</Trans>
</SmallButtonPrimary>
) : (
<SmallButtonPrimary
as={Link}
to={`/remove/${tokenId}`}
padding="6px 8px"
width="fit-content"
$borderRadius="12px"
>
<Trans>Remove Liquidity</Trans>
</SmallButtonPrimary>
)
) : null}
</ActionButtonResponsiveRow>
</ResponsiveRow>
<RowBetween></RowBetween>
Expand Down
3 changes: 2 additions & 1 deletion apps/haust-dex/src/pages/StakeLiquidity/V3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);

Expand Down