Commit 5ac08e11 authored by Vignesh Mohankumar's avatar Vignesh Mohankumar Committed by GitHub

fix: link to lowercase chain name from position page (#6195)

* fix: link to lowercase chain name from position page

* fix: use existing const
parent d330eea3
...@@ -20,7 +20,8 @@ import { RowBetween, RowFixed } from 'components/Row' ...@@ -20,7 +20,8 @@ import { RowBetween, RowFixed } from 'components/Row'
import { Dots } from 'components/swap/styleds' import { Dots } from 'components/swap/styleds'
import Toggle from 'components/Toggle' import Toggle from 'components/Toggle'
import TransactionConfirmationModal, { ConfirmationModalContent } from 'components/TransactionConfirmationModal' import TransactionConfirmationModal, { ConfirmationModalContent } from 'components/TransactionConfirmationModal'
import { CHAIN_ID_TO_BACKEND_NAME, isGqlSupportedChain } from 'graphql/data/util' import { CHAIN_IDS_TO_NAMES } from 'constants/chains'
import { isGqlSupportedChain } from 'graphql/data/util'
import { useToken } from 'hooks/Tokens' import { useToken } from 'hooks/Tokens'
import { useV3NFTPositionManagerContract } from 'hooks/useContract' import { useV3NFTPositionManagerContract } from 'hooks/useContract'
import useIsTickAtLimit from 'hooks/useIsTickAtLimit' import useIsTickAtLimit from 'hooks/useIsTickAtLimit'
...@@ -54,7 +55,7 @@ import { LoadingRows } from './styleds' ...@@ -54,7 +55,7 @@ import { LoadingRows } from './styleds'
const getTokenLink = (chainId: SupportedChainId, address: string) => { const getTokenLink = (chainId: SupportedChainId, address: string) => {
if (isGqlSupportedChain(chainId)) { if (isGqlSupportedChain(chainId)) {
const chainName = CHAIN_ID_TO_BACKEND_NAME[chainId] const chainName = CHAIN_IDS_TO_NAMES[chainId]
return `${window.location.origin}/#/tokens/${chainName}/${address}` return `${window.location.origin}/#/tokens/${chainName}/${address}`
} else { } else {
return getExplorerLink(chainId, address, ExplorerDataType.TOKEN) return getExplorerLink(chainId, address, ExplorerDataType.TOKEN)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment