From 7c7201bc36e1bbd4bfb75de988583de642a99476 Mon Sep 17 00:00:00 2001 From: 0xMasayoshi <0xMasayoshi@protonmail.com> Date: Mon, 12 Aug 2024 23:43:00 +0700 Subject: [PATCH] fix: links --- apps/web/src/app/(evm)/[chainId]/explore/layout.tsx | 10 +++++----- apps/web/src/app/(evm)/[chainId]/pool/v3/add/page.tsx | 2 +- apps/web/src/ui/pool/AddSectionReviewModalLegacy.tsx | 3 ++- apps/web/src/ui/pool/CreatePositionManual.tsx | 3 ++- apps/web/src/ui/pool/PoolPageV3.tsx | 3 ++- apps/web/src/ui/pool/V3PositionView.tsx | 6 ++++-- 6 files changed, 16 insertions(+), 11 deletions(-) diff --git a/apps/web/src/app/(evm)/[chainId]/explore/layout.tsx b/apps/web/src/app/(evm)/[chainId]/explore/layout.tsx index 34c7a64073..eceb167fe0 100644 --- a/apps/web/src/app/(evm)/[chainId]/explore/layout.tsx +++ b/apps/web/src/app/(evm)/[chainId]/explore/layout.tsx @@ -86,9 +86,9 @@ export default async function ExploreLayout({ @@ -110,7 +110,7 @@ export default async function ExploreLayout({ asChild >
@@ -129,7 +129,7 @@ export default async function ExploreLayout({ {isSushiSwapV2ChainId(chainId as ChainId) ? (
@@ -154,7 +154,7 @@ export default async function ExploreLayout({ > I want to incentivize a pool diff --git a/apps/web/src/app/(evm)/[chainId]/pool/v3/add/page.tsx b/apps/web/src/app/(evm)/[chainId]/pool/v3/add/page.tsx index ceb58538cf..e2c8748604 100644 --- a/apps/web/src/app/(evm)/[chainId]/pool/v3/add/page.tsx +++ b/apps/web/src/app/(evm)/[chainId]/pool/v3/add/page.tsx @@ -127,7 +127,7 @@ const _Add: FC = () => { tokensLoading={tokensLoading} existingPosition={position ?? undefined} tokenId={tokenId} - successLink={`/pools/${chainId}:${poolAddress}?activeTab=myPositions`} + successLink={`/${ChainKey[chainId]}/pools/v3/${poolAddress}/positions/${tokenId}`} /> ) diff --git a/apps/web/src/ui/pool/AddSectionReviewModalLegacy.tsx b/apps/web/src/ui/pool/AddSectionReviewModalLegacy.tsx index d5ead893fb..ea8059cd43 100644 --- a/apps/web/src/ui/pool/AddSectionReviewModalLegacy.tsx +++ b/apps/web/src/ui/pool/AddSectionReviewModalLegacy.tsx @@ -35,6 +35,7 @@ import { } from 'src/lib/wagmi/hooks/utils/hooks/useTransactionDeadline' import { useApproved } from 'src/lib/wagmi/systems/Checker/Provider' import { gasMargin, slippageAmount } from 'sushi/calculate' +import { ChainKey } from 'sushi/chain' import { SushiSwapV2ChainId } from 'sushi/config' import { BentoBoxChainId } from 'sushi/config' import { Amount, Type } from 'sushi/currency' @@ -496,7 +497,7 @@ export const AddSectionReviewModalLegacy: FC = testId="incentivize-confirmation-modal" successMessage="Successfully added liquidity" buttonText="Go to pool" - buttonLink={`/pools/${chainId}:${poolAddress}`} + buttonLink={`/${ChainKey[chainId]}/pools/v2/${poolAddress}`} txHash={data} /> diff --git a/apps/web/src/ui/pool/CreatePositionManual.tsx b/apps/web/src/ui/pool/CreatePositionManual.tsx index 1554cbcb48..6a0ed7570a 100644 --- a/apps/web/src/ui/pool/CreatePositionManual.tsx +++ b/apps/web/src/ui/pool/CreatePositionManual.tsx @@ -11,6 +11,7 @@ import { } from '@sushiswap/ui' import React, { FC, useMemo, useState } from 'react' import { ConcentratedLiquidityWidget } from 'src/ui/pool/ConcentratedLiquidityWidget' +import { ChainKey } from 'sushi' import { SushiSwapV3ChainId } from 'sushi/config' import { unwrapToken } from 'sushi/currency' import { useAccount } from 'wagmi' @@ -69,7 +70,7 @@ export const CreatePositionManual: FC = ({ address, chainId }) => { tokensLoading={false} existingPosition={undefined} tokenId={undefined} - successLink={`/pools/${chainId}:${address}?activeTab=myPositions`} + successLink={`/${ChainKey[chainId]}/pool/v3/${address}/positions`} /> diff --git a/apps/web/src/ui/pool/PoolPageV3.tsx b/apps/web/src/ui/pool/PoolPageV3.tsx index b353b67247..e58d599d27 100644 --- a/apps/web/src/ui/pool/PoolPageV3.tsx +++ b/apps/web/src/ui/pool/PoolPageV3.tsx @@ -20,6 +20,7 @@ import { import { FC } from 'react' import { useTokenAmountDollarValues } from 'src/lib/hooks' import { useConcentratedLiquidityPoolReserves } from 'src/lib/wagmi/hooks/pools/hooks/useConcentratedLiquidityPoolReserves' +import { ChainKey } from 'sushi' import { formatUSD } from 'sushi/format' import { ConcentratedLiquidityProvider } from './ConcentratedLiquidityProvider' import { PoolRewardDistributionsCard } from './PoolRewardDistributionsCard' @@ -62,7 +63,7 @@ const Pool: FC<{ pool: V3Pool }> = ({ pool }) => { To create a smart pool position, click{' '} here diff --git a/apps/web/src/ui/pool/V3PositionView.tsx b/apps/web/src/ui/pool/V3PositionView.tsx index dbb151604d..6ba5920f52 100644 --- a/apps/web/src/ui/pool/V3PositionView.tsx +++ b/apps/web/src/ui/pool/V3PositionView.tsx @@ -40,7 +40,7 @@ import { useConcentratedLiquidityPositionsFromTokenId } from 'src/lib/wagmi/hook import { useTokenWithCache } from 'src/lib/wagmi/hooks/tokens/useTokenWithCache' import { getDefaultTTL } from 'src/lib/wagmi/hooks/utils/hooks/useTransactionDeadline' import { Checker } from 'src/lib/wagmi/systems/Checker' -import { Chain } from 'sushi/chain' +import { Chain, ChainKey } from 'sushi/chain' import { SushiSwapV3ChainId, isAngleEnabledChainId } from 'sushi/config' import { Amount, unwrapToken } from 'sushi/currency' import { formatPercent, formatUSD } from 'sushi/format' @@ -687,7 +687,9 @@ const Component: FC<{ chainId: string; address: string; position: string }> = ({ Anyone can add distributions to this pool.{' '} {_token0 && _token1 ? (