Skip to content

Commit 0319b3d

Browse files
committed
fix: Info
1 parent 9411920 commit 0319b3d

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

apps/web/src/views/InfinityInfo/components/Tokens/TokenInfo.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import TransactionTable from 'views/V3Info/components/TransactionsTable'
5757
import { MonoSpace, StyledCMCLink } from 'views/V3Info/components/shared'
5858
import { unixToDate } from 'views/V3Info/utils/date'
5959
import { formatDollarAmount } from 'views/V3Info/utils/numbers'
60+
import { PERSIST_CHAIN_KEY } from 'config/constants'
6061
import { infinityInfoPath } from '../../constants'
6162
import { usePoolsDataForToken } from './hooks/usePoolsDataForToken'
6263
import { useTokenChartData } from './hooks/useTokenChartData'
@@ -265,7 +266,9 @@ const TokenInfo: React.FC<{ address: string }> = ({ address }) => {
265266
</NextLinkFromReactRouter>
266267
) : null}
267268
<NextLinkFromReactRouter
268-
to={`/swap?outputCurrency=${swapOutputCurrency}&chain=${CHAIN_QUERY_NAME[multiChainId[chainName]]}`}
269+
to={`/swap?outputCurrency=${swapOutputCurrency}&chain=${
270+
CHAIN_QUERY_NAME[multiChainId[chainName]]
271+
}&${PERSIST_CHAIN_KEY}=1`}
269272
>
270273
<Button>{t('Trade')}</Button>
271274
</NextLinkFromReactRouter>

apps/web/src/views/Info/Pools/PoolPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ const PoolPage: React.FC<React.PropsWithChildren<{ address: string }>> = ({ addr
220220
</Button>
221221
</NextLinkFromReactRouter>
222222
<NextLinkFromReactRouter
223-
to={`/swap?inputCurrency=${poolData.token0.address}&outputCurrency=${poolData.token1.address}&chainId=${multiChainId[chainName]}`}
223+
to={`/swap?inputCurrency=${poolData.token0.address}&outputCurrency=${poolData.token1.address}&chainId=${multiChainId[chainName]}&${PERSIST_CHAIN_KEY}=1`}
224224
>
225225
<Button>{t('Trade')}</Button>
226226
</NextLinkFromReactRouter>

apps/web/src/views/Info/Tokens/TokenPage.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import TransactionTable from 'views/Info/components/InfoTables/TransactionsTable
4747
import Percent from 'views/Info/components/Percent'
4848
import useCMCLink from 'views/Info/hooks/useCMCLink'
4949
import { DISABLED_ADD_LIQUIDITY_CHAINS } from 'config/constants/liquidity'
50+
import { PERSIST_CHAIN_KEY } from 'config/constants'
5051

5152
dayjs.extend(duration)
5253

@@ -173,7 +174,9 @@ const TokenPage: React.FC<React.PropsWithChildren<{ routeAddress: string }>> = (
173174
>
174175
{t('Add Liquidity')}
175176
</Button>
176-
<NextLinkFromReactRouter to={`/swap?outputCurrency=${address}&chainId=${multiChainId[chainName]}`}>
177+
<NextLinkFromReactRouter
178+
to={`/swap?outputCurrency=${address}&chainId=${multiChainId[chainName]}&${PERSIST_CHAIN_KEY}=1`}
179+
>
177180
<Button>{t('Trade')}</Button>
178181
</NextLinkFromReactRouter>
179182
</Flex>

apps/web/src/views/V3Info/views/PoolPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ const PoolPage: React.FC<{ address: string }> = ({ address }) => {
250250
<NextLinkFromReactRouter
251251
to={`/swap?inputCurrency=${poolData.token0.address}&outputCurrency=${poolData.token1.address}&chain=${
252252
CHAIN_QUERY_NAME[multiChainId[chainName]]
253-
}`}
253+
}&${PERSIST_CHAIN_KEY}=1`}
254254
>
255255
<Button>{t('Trade')}</Button>
256256
</NextLinkFromReactRouter>

apps/web/src/views/V3Info/views/TokenPage.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import { CurrencyLogo } from 'views/Info/components/CurrencyLogo'
4343
import useCMCLink from 'views/Info/hooks/useCMCLink'
4444
import { DISABLED_ADD_LIQUIDITY_CHAINS } from 'config/constants/liquidity'
4545
import { useRouter } from 'next/router'
46+
import { PERSIST_CHAIN_KEY } from 'config/constants'
4647
import BarChart from '../components/BarChart/alt'
4748
import { LocalLoader } from '../components/Loader'
4849
import Percent from '../components/Percent'
@@ -240,7 +241,9 @@ const TokenPage: React.FC<{ address: string; chain?: string }> = ({ address, cha
240241
{t('Add Liquidity')}
241242
</Button>
242243
<NextLinkFromReactRouter
243-
to={`/swap?outputCurrency=${address}&chain=${CHAIN_QUERY_NAME[multiChainId[chainName]]}`}
244+
to={`/swap?outputCurrency=${address}&chain=${
245+
CHAIN_QUERY_NAME[multiChainId[chainName]]
246+
}&${PERSIST_CHAIN_KEY}=1`}
244247
>
245248
<Button>{t('Trade')}</Button>
246249
</NextLinkFromReactRouter>

0 commit comments

Comments
 (0)