Skip to content

Commit

Permalink
fix: links
Browse files Browse the repository at this point in the history
  • Loading branch information
0xMasayoshi committed Aug 12, 2024
1 parent 11bf9dd commit 7c7201b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
10 changes: 5 additions & 5 deletions apps/web/src/app/(evm)/[chainId]/explore/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ export default async function ExploreLayout({
<LinkInternal
href={
isSushiSwapV3ChainId(chainId as SushiSwapV3ChainId)
? `/${chainId}/pool/v3/add`
? `/${ChainKey[chainId]}/pool/v3/add`
: isSushiSwapV2ChainId(chainId as SushiSwapV3ChainId)
? `/${chainId}/pool/v2/add`
? `/${ChainKey[chainId]}/pool/v2/add`
: ''
}
>
Expand All @@ -110,7 +110,7 @@ export default async function ExploreLayout({
asChild
>
<LinkInternal
href={`/${chainId}/pool/v3/add`}
href={`/${ChainKey[chainId]}/pool/v3/add`}
className="flex flex-col !items-start gap-1 cursor-pointer"
>
<div className="flex items-center gap-1 font-medium leading-none">
Expand All @@ -129,7 +129,7 @@ export default async function ExploreLayout({
{isSushiSwapV2ChainId(chainId as ChainId) ? (
<DropdownMenuItem asChild>
<LinkInternal
href={`/${chainId}/pool/v2/add`}
href={`/${ChainKey[chainId]}/pool/v2/add`}
className="flex flex-col !items-start gap-1 cursor-pointer"
>
<div className="flex items-center gap-1 font-medium leading-none">
Expand All @@ -154,7 +154,7 @@ export default async function ExploreLayout({
>
<LinkInternal
className="text-sm"
href={`/${chainId}/pool/incentivize`}
href={`/${ChainKey[chainId]}/pool/incentivize`}
>
I want to incentivize a pool
</LinkInternal>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/(evm)/[chainId]/pool/v3/add/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}`}
/>
</>
)
Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/ui/pool/AddSectionReviewModalLegacy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -496,7 +497,7 @@ export const AddSectionReviewModalLegacy: FC<AddSectionReviewModalLegacyProps> =
testId="incentivize-confirmation-modal"
successMessage="Successfully added liquidity"
buttonText="Go to pool"
buttonLink={`/pools/${chainId}:${poolAddress}`}
buttonLink={`/${ChainKey[chainId]}/pools/v2/${poolAddress}`}
txHash={data}
/>
</DialogProvider>
Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/ui/pool/CreatePositionManual.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -69,7 +70,7 @@ export const CreatePositionManual: FC<ManualProps> = ({ address, chainId }) => {
tokensLoading={false}
existingPosition={undefined}
tokenId={undefined}
successLink={`/pools/${chainId}:${address}?activeTab=myPositions`}
successLink={`/${ChainKey[chainId]}/pool/v3/${address}/positions`}
/>
</CardContent>
</Card>
Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/ui/pool/PoolPageV3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -62,7 +63,7 @@ const Pool: FC<{ pool: V3Pool }> = ({ pool }) => {
To create a smart pool position, click{' '}
<LinkInternal
shallow={true}
href={`/pool/${address}/smart`}
href={`/${ChainKey[chainId]}/pool/v3/${address}/smart`}
className="underline"
>
here
Expand Down
6 changes: 4 additions & 2 deletions apps/web/src/ui/pool/V3PositionView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -687,7 +687,9 @@ const Component: FC<{ chainId: string; address: string; position: string }> = ({
Anyone can add distributions to this pool.{' '}
{_token0 && _token1 ? (
<LinkInternal
href={`/pool/incentivize?chainId=${chainId}&fromCurrency=${
href={`${
ChainKey[chainId]
}/pool/incentivize?fromCurrency=${
_token0.isNative ? 'NATIVE' : _token0.address
}&toCurrency=${
_token1.isNative ? 'NATIVE' : _token1.address
Expand Down

0 comments on commit 7c7201b

Please sign in to comment.