From a431f65ab0b70e9f2b82cba12aea008778f1e8e1 Mon Sep 17 00:00:00 2001 From: Tien Nguyen Date: Mon, 21 Oct 2024 15:49:26 +0700 Subject: [PATCH] remove cronos and bttc (bittorent) chain --- package.json | 4 +- src/assets/images/btt-logo-dark.svg | 3 - src/components/Icons/Bttc.tsx | 34 --------- src/components/Icons/Cronos.tsx | 26 ------- src/components/Icons/CronosLogoFull.tsx | 51 -------------- src/components/Icons/index.ts | 3 - src/components/Web3Provider/index.tsx | 4 -- src/constants/bases.ts | 2 - src/constants/index.ts | 2 +- src/constants/networks.ts | 16 +---- src/constants/networks/bttc.ts | 73 -------------------- src/constants/networks/cronos.ts | 69 ------------------ src/constants/networks/index.ts | 2 - src/constants/permit.ts | 3 - src/constants/tokenLists/token-info.ts | 4 -- src/constants/tokens.ts | 34 +-------- src/hooks/useElasticLegacy.ts | 14 ---- src/pages/About/AboutKNC.tsx | 1 - src/pages/About/AboutKyberSwap/index.tsx | 4 -- src/pages/BuyCrypto/index.tsx | 2 - src/pages/ElasticSnapshot/data/category.json | 8 --- src/pages/ElasticSnapshot/data/data.json | 17 ----- src/pages/ElasticSnapshot/index.tsx | 1 - src/utils/tokenInfo.ts | 16 ----- yarn.lock | 42 ++--------- 25 files changed, 12 insertions(+), 423 deletions(-) delete mode 100644 src/assets/images/btt-logo-dark.svg delete mode 100644 src/components/Icons/Bttc.tsx delete mode 100644 src/components/Icons/Cronos.tsx delete mode 100644 src/components/Icons/CronosLogoFull.tsx delete mode 100644 src/constants/networks/bttc.ts delete mode 100644 src/constants/networks/cronos.ts delete mode 100644 src/constants/tokenLists/token-info.ts diff --git a/package.json b/package.json index 55d9b8e18f..82f302d255 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@esbuild-plugins/node-globals-polyfill": "^0.2.3", "@holdstation/paymaster-helper": "^2.0.20", "@kyberswap/ks-sdk-classic": "^1.0.3", - "@kyberswap/ks-sdk-core": "1.1.5", + "@kyberswap/ks-sdk-core": "1.1.6", "@kyberswap/ks-sdk-elastic": "^1.1.2", "@kyberswap/oauth2": "1.0.2", "@lingui/macro": "^4.6.0", @@ -200,7 +200,7 @@ "vite-tsconfig-paths": "^4.0.8" }, "resolutions": { - "@kyberswap/ks-sdk-core": "1.1.5", + "@kyberswap/ks-sdk-core": "1.1.6", "babel-plugin-lodash/@babel/types": "~7.20.0", "react-error-overlay": "6.0.9" } diff --git a/src/assets/images/btt-logo-dark.svg b/src/assets/images/btt-logo-dark.svg deleted file mode 100644 index 428127ad72..0000000000 --- a/src/assets/images/btt-logo-dark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/components/Icons/Bttc.tsx b/src/components/Icons/Bttc.tsx deleted file mode 100644 index aa4d71bde1..0000000000 --- a/src/components/Icons/Bttc.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import useTheme from 'hooks/useTheme' - -function Bttc({ size = 36, color }: { size?: number; color?: string }) { - const theme = useTheme() - return ( - - - - - - - - - - - - - - ) -} - -export default Bttc diff --git a/src/components/Icons/Cronos.tsx b/src/components/Icons/Cronos.tsx deleted file mode 100644 index aa12509373..0000000000 --- a/src/components/Icons/Cronos.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import useTheme from 'hooks/useTheme' - -function Cronos({ size }: { size?: number }) { - const theme = useTheme() - return ( - - - - - - - - - - - - ) -} - -export default Cronos diff --git a/src/components/Icons/CronosLogoFull.tsx b/src/components/Icons/CronosLogoFull.tsx deleted file mode 100644 index 9381438171..0000000000 --- a/src/components/Icons/CronosLogoFull.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import useTheme from 'hooks/useTheme' - -function CronosLogoFull({ color }: { size?: number; color?: string }) { - const theme = useTheme() - - return ( - - - - - - - - - - - - - - - - - - ) -} - -export default CronosLogoFull diff --git a/src/components/Icons/index.ts b/src/components/Icons/index.ts index 2be49c709e..44e041fdaa 100644 --- a/src/components/Icons/index.ts +++ b/src/components/Icons/index.ts @@ -2,11 +2,8 @@ export { default as Arbitrum } from './Arbitrum' export { default as Avalanche } from './Avalanche' export { default as BestPrice } from './BestPrice' export { default as Binance } from './Binance' -export { default as Bttc } from './Bttc' export { default as CircleFocus } from './CircleFocus' export { default as Clock } from './Clock' -export { default as Cronos } from './Cronos' -export { default as CronosLogoFull } from './CronosLogoFull' export { default as Drop } from './Drop' export { default as Enter } from './Enter' export { default as Ethereum } from './Ethereum' diff --git a/src/components/Web3Provider/index.tsx b/src/components/Web3Provider/index.tsx index d4ebf51ce6..51e9dc458a 100644 --- a/src/components/Web3Provider/index.tsx +++ b/src/components/Web3Provider/index.tsx @@ -7,10 +7,8 @@ import { arbitrum, avalanche, base, - bitTorrent, blast, bsc, - cronos, fantom, linea, mainnet, @@ -161,8 +159,6 @@ export const wagmiConfig = createConfig({ fantom, blast, xLayer, - cronos, - bitTorrent, ], connectors: [ injectedWithFallback(), diff --git a/src/constants/bases.ts b/src/constants/bases.ts index 34cd2e88b9..fbc922dbf7 100644 --- a/src/constants/bases.ts +++ b/src/constants/bases.ts @@ -16,8 +16,6 @@ const WETH_ONLY: ChainTokenList = { [ChainId.AVAXTESTNET]: [WETH[ChainId.AVAXTESTNET]], [ChainId.AVAXMAINNET]: [WETH[ChainId.AVAXMAINNET]], [ChainId.FANTOM]: [WETH[ChainId.FANTOM]], - [ChainId.CRONOS]: [WETH[ChainId.CRONOS]], - [ChainId.BTTC]: [WETH[ChainId.BTTC]], [ChainId.ARBITRUM]: [WETH[ChainId.ARBITRUM]], [ChainId.OPTIMISM]: [WETH[ChainId.OPTIMISM]], [ChainId.ZKSYNC]: [WETH[ChainId.ZKSYNC]], diff --git a/src/constants/index.ts b/src/constants/index.ts index 86419cb018..8a32a77b5f 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -239,7 +239,7 @@ export const TRANSACTION_STATE_DEFAULT: TransactionFlowState = { pendingText: '', } -export const CHAINS_SUPPORT_FEE_CONFIGS = [ChainId.CRONOS] +export const CHAINS_SUPPORT_FEE_CONFIGS: ChainId[] = [] export const CHAINS_SUPPORT_CROSS_CHAIN = ENV.ENV_KEY === ENV.EnvKeys.PROD || ENV.ENV_KEY === ENV.EnvKeys.STG ? [ diff --git a/src/constants/networks.ts b/src/constants/networks.ts index 58dd95e601..e1d9fbcd55 100644 --- a/src/constants/networks.ts +++ b/src/constants/networks.ts @@ -9,8 +9,6 @@ import { blast, bnb, bnbTestnet, - bttc, - cronos, ethereum, fantom, görli, @@ -38,9 +36,7 @@ const NETWORKS_INFO_CONFIG: NETWORKS_INFO_CONFIG_TYPE = { [ChainId.AVAXMAINNET]: avax, [ChainId.AVAXTESTNET]: avaxTestnet, [ChainId.FANTOM]: fantom, - [ChainId.CRONOS]: cronos, [ChainId.ARBITRUM]: arbitrum, - [ChainId.BTTC]: bttc, [ChainId.OPTIMISM]: optimism, [ChainId.ZKSYNC]: zksync, [ChainId.LINEA]: linea, @@ -76,8 +72,6 @@ export const MAINNET_NETWORKS = [ ChainId.BSCMAINNET, ChainId.AVAXMAINNET, ChainId.FANTOM, - ChainId.BTTC, - ChainId.CRONOS, ChainId.BLAST, ChainId.MANTLE, ChainId.XLAYER, @@ -105,7 +99,7 @@ export function isSupportedChainId(chainId?: number): chainId is ChainId { return !!(NETWORKS_INFO_CONFIG as any)[chainId] } -export const FAUCET_NETWORKS = [ChainId.BTTC] +export const FAUCET_NETWORKS = [] // Fee options instead of dynamic fee export const STATIC_FEE_OPTIONS: { [chainId: number]: number[] | undefined } = { @@ -115,8 +109,6 @@ export const STATIC_FEE_OPTIONS: { [chainId: number]: number[] | undefined } = { [ChainId.AVAXMAINNET]: [8, 10, 50, 300, 500, 1000], [ChainId.FANTOM]: [8, 10, 50, 300, 500, 1000], [ChainId.BSCMAINNET]: [8, 10, 50, 300, 500, 1000], - [ChainId.CRONOS]: [8, 10, 50, 300, 500, 1000], - [ChainId.BTTC]: [8, 10, 50, 300, 500, 1000], [ChainId.OPTIMISM]: [8, 10, 50, 300, 500, 1000], [ChainId.GÖRLI]: [8, 10, 50, 300, 500, 1000], [ChainId.ZKSYNC]: [8, 10, 50, 300, 500, 1000], @@ -145,8 +137,6 @@ export const CLAIM_REWARDS_DATA_URL: { [chainId: number]: string } = { 'https://raw.githubusercontent.com/KyberNetwork/avax-trading-contest-reward-distribution/develop/results/reward_proof.json', [ChainId.MATIC]: 'https://raw.githubusercontent.com/KyberNetwork/zkyber-reward-distribution/main/results/latest_merkle_data.json', - [ChainId.BTTC]: - 'https://raw.githubusercontent.com/KyberNetwork/trading-contest-reward-distribution/main/bttc/results/reward_proof.json', } export const DEFAULT_REWARDS: { [key: string]: string[] } = { @@ -165,12 +155,10 @@ export const SUPPORTED_NETWORKS_FOR_MY_EARNINGS = [ ChainId.BSCMAINNET, ChainId.AVAXMAINNET, ChainId.FANTOM, - ChainId.CRONOS, - ChainId.BTTC, ] export const COMING_SOON_NETWORKS_FOR_MY_EARNINGS: ChainId[] = [] export const COMING_SOON_NETWORKS_FOR_MY_EARNINGS_LEGACY: ChainId[] = [] -export const COMING_SOON_NETWORKS_FOR_MY_EARNINGS_CLASSIC: ChainId[] = [ChainId.CRONOS] +export const COMING_SOON_NETWORKS_FOR_MY_EARNINGS_CLASSIC: ChainId[] = [] export const BLOCTO_SUPPORTED_NETWORKS: ChainId[] = [ ChainId.MAINNET, ChainId.ARBITRUM, diff --git a/src/constants/networks/bttc.ts b/src/constants/networks/bttc.ts deleted file mode 100644 index 756af6ae78..0000000000 --- a/src/constants/networks/bttc.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { ChainId } from '@kyberswap/ks-sdk-core' - -import { NetworkInfo } from 'constants/networks/type' - -const EMPTY_ARRAY: any[] = [] -const NOT_SUPPORT = null - -const bttcInfo: NetworkInfo = { - chainId: ChainId.BTTC, - route: 'bittorrent', - ksSettingRoute: 'bttc', - priceRoute: 'bttc', - poolFarmRoute: 'bttc', - aggregatorRoute: 'bttc', - name: 'BitTorrent', - icon: 'https://storage.googleapis.com/ks-setting-1d682dca/acc93879-119a-48ce-8a91-a4a6c0321c131699420171767.png', - - iconSelected: NOT_SUPPORT, - - defaultBlockSubgraph: 'https://bttc-graph.kyberengineering.io/subgraphs/name/kybernetwork/bttc-blocks', - etherscanUrl: 'https://bttcscan.com', - etherscanName: 'Bttcscan', - bridgeURL: 'https://bttc.bittorrent.com/bridge/', - nativeToken: { - symbol: 'BTT', - name: 'BTT', - logo: 'https://storage.googleapis.com/ks-setting-1d682dca/1d9bbed0-0f29-48b9-b610-1bc35efcc41f.png', - decimal: 18, - minForGas: 10 ** 16, - }, - defaultRpcUrl: 'https://bttc.kyberengineering.io', - multicall: '0xBF69a56D35B8d6f5A8e0e96B245a72F735751e54', - classic: { - defaultSubgraph: 'https://bttc-graph.kyberengineering.io/subgraphs/name/kybernetwork/kyberswap-exchange-bttc', - static: { - zap: '0x2abE8750e4a65584d7452316356128C936273e0D', - router: '0x5649B4DD00780e99Bab7Abb4A3d581Ea1aEB23D0', - factory: '0x1c758aF0688502e49140230F6b0EBd376d429be5', - }, - oldStatic: NOT_SUPPORT, - dynamic: { - zap: '0x83D4908c1B4F9Ca423BEE264163BC1d50F251c31', - router: '0xEaE47c5D99f7B31165a7f0c5f7E0D6afA25CFd55', - factory: '0xD9bfE9979e9CA4b2fe84bA5d4Cf963bBcB376974', - }, - claimReward: '0x1a91f5ADc7cB5763d35A26e98A18520CB9b67e70', - fairlaunch: EMPTY_ARRAY, - fairlaunchV2: [ - '0x8e9Bd30D15420bAe4B7EC0aC014B7ECeE864373C', - '0xa107e6466Be74361840059a11e390200371a7538', - '0x89929Bc485cE72D2Af7b7283B40b921e9F4f80b3', - ], - }, - elastic: { - defaultSubgraph: 'https://bttc-graph.kyberengineering.io/subgraphs/name/kybernetwork/kyberswap-elastic-bttc', - startBlock: 21964498, - coreFactory: '0xC7a590291e07B9fe9E64b86c58fD8fC764308C4A', - nonfungiblePositionManager: '0xe222fBE074A436145b255442D919E4E3A6c6a480', - tickReader: '0x8Fd8Cb948965d9305999D767A02bf79833EADbB3', - initCodeHash: '0x00e263aaa3a2c06a89b53217a9e7aad7e15613490a72e0f95f303c4de2dc7045', - quoter: '0x4d47fd5a29904Dae0Ef51b1c450C9750F15D7856', - routers: '0xF9c2b5746c946EF883ab2660BbbB1f10A5bdeAb4', - farms: [], - }, - limitOrder: NOT_SUPPORT, - averageBlockTimeInSeconds: 2, // TODO: check these info - coingeckoNetworkId: 'tron', - coingeckoNativeTokenId: 'bittorrent', - dexToCompare: NOT_SUPPORT, - geckoTermialId: 'bttc', -} - -export default bttcInfo diff --git a/src/constants/networks/cronos.ts b/src/constants/networks/cronos.ts deleted file mode 100644 index d81302151c..0000000000 --- a/src/constants/networks/cronos.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { ChainId } from '@kyberswap/ks-sdk-core' - -import cronosIcon from 'assets/networks/cronos.svg' -import CronosLogo from 'assets/svg/cronos-token-logo.svg' -import { NetworkInfo } from 'constants/networks/type' - -const EMPTY_ARRAY: any[] = [] -const NOT_SUPPORT = null - -const cronosInfo: NetworkInfo = { - chainId: ChainId.CRONOS, - route: 'cronos', - ksSettingRoute: 'cronos', - priceRoute: 'cronos', - poolFarmRoute: 'cronos', - aggregatorRoute: 'cronos', - name: 'Cronos', - icon: cronosIcon, - iconSelected: cronosIcon, - defaultBlockSubgraph: 'https://cronos-graph.kyberengineering.io/subgraphs/name/kybernetwork/cronos-blocks', - etherscanUrl: 'https://cronoscan.com', - etherscanName: 'Cronos explorer', - bridgeURL: 'https://cronos.org/bridge/', - nativeToken: { - symbol: 'CRO', - name: 'CRO', - logo: CronosLogo, - decimal: 18, - minForGas: 10 ** 16, - }, - defaultRpcUrl: 'https://evm-cronos.crypto.org', - multicall: '0x63Abb9973506189dC3741f61d25d4ed508151E6d', - classic: { - defaultSubgraph: 'https://cronos-graph.kyberengineering.io/subgraphs/name/kybernetwork/kyberswap-exchange-cronos', - static: { - zap: '0x2abE8750e4a65584d7452316356128C936273e0D', - router: '0x5649B4DD00780e99Bab7Abb4A3d581Ea1aEB23D0', - factory: '0x1c758aF0688502e49140230F6b0EBd376d429be5', - }, - oldStatic: NOT_SUPPORT, - dynamic: { - zap: '0x83D4908c1B4F9Ca423BEE264163BC1d50F251c31', - router: '0xEaE47c5D99f7B31165a7f0c5f7E0D6afA25CFd55', - factory: '0xD9bfE9979e9CA4b2fe84bA5d4Cf963bBcB376974', - }, - claimReward: NOT_SUPPORT, - fairlaunch: EMPTY_ARRAY, - fairlaunchV2: EMPTY_ARRAY, - }, - elastic: { - defaultSubgraph: 'https://cronos-graph.kyberengineering.io/subgraphs/name/kybernetwork/kyberswap-elastic-cronos', - startBlock: 8393012, - coreFactory: '0xC7a590291e07B9fe9E64b86c58fD8fC764308C4A', - nonfungiblePositionManager: '0xe222fBE074A436145b255442D919E4E3A6c6a480', - tickReader: '0x8Fd8Cb948965d9305999D767A02bf79833EADbB3', - initCodeHash: '0x00e263aaa3a2c06a89b53217a9e7aad7e15613490a72e0f95f303c4de2dc7045', - quoter: '0x4d47fd5a29904Dae0Ef51b1c450C9750F15D7856', - routers: '0xF9c2b5746c946EF883ab2660BbbB1f10A5bdeAb4', - farms: [], - }, - limitOrder: NOT_SUPPORT, - averageBlockTimeInSeconds: 6, - coingeckoNetworkId: 'cronos', - coingeckoNativeTokenId: 'crypto-com-chain', - dexToCompare: 'vvs', - geckoTermialId: 'cronos', -} - -export default cronosInfo diff --git a/src/constants/networks/index.ts b/src/constants/networks/index.ts index e66e43792a..a70007240e 100644 --- a/src/constants/networks/index.ts +++ b/src/constants/networks/index.ts @@ -3,8 +3,6 @@ export { default as avax } from './avax' export { default as avaxTestnet } from './avax-testnet' export { default as bnb } from './bnb' export { default as bnbTestnet } from './bnb-testnet' -export { default as bttc } from './bttc' -export { default as cronos } from './cronos' export { default as ethereum } from './ethereum' export { default as fantom } from './fantom' export { default as görli } from './görli' diff --git a/src/constants/permit.ts b/src/constants/permit.ts index 752a27f274..ab8b0436e1 100644 --- a/src/constants/permit.ts +++ b/src/constants/permit.ts @@ -38,9 +38,6 @@ export const PERMITTABLE_TOKENS: { '0xeEeEEb57642040bE42185f49C52F7E9B38f8eeeE': { type: PermitType.AMOUNT, version: '1' }, // ELK '0x8497842420cFdbc97896C2353D75d89Fc8D5Be5D': { type: PermitType.AMOUNT, version: '1' }, // VERSA }, - [ChainId.CRONOS]: { - '0xe6801928061CDbE32AC5AD0634427E140EFd05F9': { type: PermitType.AMOUNT, version: '1' }, //BIFI - }, [ChainId.ARBITRUM]: { // '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1': { type: PermitType.SALT, version: '1' }, // '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8': { type: PermitType.SALT, version: '1' }, //USDC diff --git a/src/constants/tokenLists/token-info.ts b/src/constants/tokenLists/token-info.ts deleted file mode 100644 index 712474e4b3..0000000000 --- a/src/constants/tokenLists/token-info.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const MAP_TOKEN_HAS_MULTI_BY_NETWORK: { [key: string]: { [key: string]: string } } = { - // these network have many type of usdt, .... => hardcode 1 type - bittorrent: { usdt: 'usdt_e' }, -} diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 95d72cafba..2a12aa7877 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -28,15 +28,7 @@ export const NativeCurrencies = new Proxy(NativeCurrenciesLocal, { // This list is intentionally different from the list above // Was requested from product team, to implement Swap fee config export const STABLE_COIN_ADDRESSES_TO_TAKE_FEE: Record = { - [ChainId.CRONOS]: [ - '0xc21223249CA28397B4B6541dfFaEcC539BfF0c59', // usdc - '0xF2001B145b43032AAF5Ee2884e456CCd805F677D', // dai - '0x66e428c3f67a68878562e79A0234c1F83c208770', // usdt - '0xC74D59A548ecf7fc1754bb7810D716E9Ac3e3AE5', // busd - '0x2Ae35c8E3D4bD57e8898FF7cd2bBff87166EF8cb', // MAI - ], [ChainId.ZKSYNC]: [], - [ChainId.BTTC]: [], [ChainId.MATIC]: [], [ChainId.OPTIMISM]: [], [ChainId.GÖRLI]: [], @@ -60,8 +52,8 @@ export const STABLE_COIN_ADDRESSES_TO_TAKE_FEE: Record = { // This is basically the same as STABLE_COIN_ADDRESSES_TO_TAKE_FEE, // but with native token address and wrapped native token address export const TOKENS_WITH_FEE_TIER_1: Record = CHAINS_SUPPORT_FEE_CONFIGS.reduce((acc, chainId) => { - if (STABLE_COIN_ADDRESSES_TO_TAKE_FEE[chainId].length) { - acc[chainId] = [...STABLE_COIN_ADDRESSES_TO_TAKE_FEE[chainId], ETHER_ADDRESS, WETH[chainId].address] + if ((STABLE_COIN_ADDRESSES_TO_TAKE_FEE[chainId] as string[]).length) { + acc[chainId] = [...STABLE_COIN_ADDRESSES_TO_TAKE_FEE[chainId], ETHER_ADDRESS, (WETH[chainId] as Token).address] } else { acc[chainId] = [] } @@ -97,27 +89,11 @@ export const SUPER_STABLE_COINS_ADDRESS: { [chainId in ChainId]: string[] } = { '0x04068DA6C83AFCFA0e13ba15A6696662335D5B75', // usdc '0x049d68029688eAbF473097a2fC38ef61633A3C7A', // fusdt ], - [ChainId.CRONOS]: [ - '0xF2001B145b43032AAF5Ee2884e456CCd805F677D', // dai - '0xc21223249CA28397B4B6541dfFaEcC539BfF0c59', // usdc - '0x66e428c3f67a68878562e79A0234c1F83c208770', // usdt - '0xC74D59A548ecf7fc1754bb7810D716E9Ac3e3AE5', // busd - ], [ChainId.ARBITRUM]: [ '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1', // dai '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8', // usdc '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9', // usdt ], - [ChainId.BTTC]: [ - '0x9B5F27f6ea9bBD753ce3793a07CbA3C74644330d', // usdt_b - '0xCa424b845497f7204D9301bd13Ff87C0E2e86FCF', // usdc_b - '0x17F235FD5974318E4E2a5e37919a209f7c37A6d1', // usdd_t - '0x935faA2FCec6Ab81265B301a30467Bbc804b43d3', // usdc_t - - '0xdB28719F7f938507dBfe4f0eAe55668903D34a15', // usdt_t - '0xE887512ab8BC60BcC9224e1c3b5Be68E26048B8B', // usdt_e - '0xAE17940943BA9440540940DB0F1877f101D39e8b', // usdc_e - ], [ChainId.OPTIMISM]: [ '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1', // Dai '0x94b008aA00579c1307B0EF2c499aD98a8ce58e58', // usdt @@ -291,7 +267,6 @@ export const CORRELATED_COINS_ADDRESS: { [chainId in ChainId]: string[][] } = { ], ], [ChainId.FANTOM]: [], - [ChainId.CRONOS]: [], [ChainId.ARBITRUM]: [ [ // Eth/wstEth: @@ -339,7 +314,6 @@ export const CORRELATED_COINS_ADDRESS: { [chainId in ChainId]: string[][] } = { '0x35751007a407ca6feffe80b3cb397736d2cf4dbe', ], ], - [ChainId.BTTC]: [], [ChainId.OPTIMISM]: [ [ // wBtc/sBtc: @@ -429,7 +403,6 @@ export const KNC: { [chainId in ChainId]: Token } = { [ChainId.BSCTESTNET]: new Token(ChainId.BSCTESTNET, '0x51E8D106C646cA58Caf32A47812e95887C071a62', 18, 'KNC', 'KNC'), [ChainId.BSCMAINNET]: new Token(ChainId.BSCMAINNET, '0xfe56d5892BDffC7BF58f2E84BE1b2C32D21C308b', 18, 'KNC', 'KNC'), [ChainId.AVAXMAINNET]: new Token(ChainId.AVAXMAINNET, '0x39fC9e94Caeacb435842FADeDeCB783589F50f5f', 18, 'KNC', 'KNC'), - [ChainId.BTTC]: new Token(ChainId.BTTC, '0x18fA72e0EE4C580a129b0CE5bD0694d716C7443E', 18, 'KNC_b', 'KNC v2 - BSC'), [ChainId.ARBITRUM]: new Token(ChainId.ARBITRUM, '0xe4DDDfe67E7164b0FE14E218d80dC4C08eDC01cB', 18, 'KNC', 'KNC'), [ChainId.OPTIMISM]: new Token(ChainId.OPTIMISM, '0xa00e3a3511aac35ca78530c85007afcd31753819', 18, 'KNC', 'KNC'), [ChainId.LINEA]: new Token(ChainId.LINEA, '0x3b2F62d42DB19B30588648bf1c184865D4C3B1D6', 18, 'KNC', 'KNC'), @@ -437,7 +410,6 @@ export const KNC: { [chainId in ChainId]: Token } = { [ChainId.BASE]: new Token(ChainId.BASE, '0x28fe69Ff6864C1C218878BDCA01482D36B9D57b1', 18, 'KNC', 'KNC'), // TODO(viet-nv): KNC does not exist on the below chain - [ChainId.CRONOS]: new Token(ChainId.CRONOS, KNC_ADDRESS, 18, 'KNC', 'KNC'), [ChainId.FANTOM]: new Token(ChainId.FANTOM, KNC_ADDRESS, 18, 'KNC', 'KNC'), [ChainId.SCROLL]: new Token(ChainId.SCROLL, KNC_ADDRESS, 18, 'KNC', 'KNC'), [ChainId.ZKSYNC]: new Token(ChainId.ZKSYNC, KNC_ADDRESS, 18, 'KNC', 'KNC'), @@ -461,10 +433,8 @@ export const DEFAULT_OUTPUT_TOKEN_BY_CHAIN: Partial> = { 'USDC.e', ), [ChainId.FANTOM]: new Token(ChainId.FANTOM, '0x28a92dde19D9989F39A49905d7C9C2FAc7799bDf', 6, 'USDC', 'USD Coin'), - [ChainId.CRONOS]: new Token(ChainId.CRONOS, '0xc21223249CA28397B4B6541dfFaEcC539BfF0c59', 6, 'USDC', 'USD Coin'), [ChainId.ARBITRUM]: new Token(ChainId.ARBITRUM, '0x912CE59144191C1204E64559FE8253a0e49E6548', 18, 'ARB', 'Arbitrum'), [ChainId.OPTIMISM]: new Token(ChainId.OPTIMISM, '0x7F5c764cBc14f9669B88837ca1490cCa17c31607', 6, 'USDC', 'USD Coin'), - [ChainId.BTTC]: new Token(ChainId.BTTC, '0x9B5F27f6ea9bBD753ce3793a07CbA3C74644330d', 18, 'USDT_b', 'Tether USD_BSC'), [ChainId.GÖRLI]: new Token(ChainId.GÖRLI, '0x2bf64acf7ead856209749d0d125e9ade2d908e7f', 18, 'USDT', 'Tether USD'), [ChainId.ZKSYNC]: new Token(ChainId.ZKSYNC, '0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4', 6, 'USDC', 'USD Coin'), [ChainId.ZKEVM]: new Token(ChainId.ZKEVM, '0x1E4a5963aBFD975d8c9021ce480b42188849D41d', 6, 'USDT', 'Tether USD'), diff --git a/src/hooks/useElasticLegacy.ts b/src/hooks/useElasticLegacy.ts index d6d9436b00..b4b6b26ce5 100644 --- a/src/hooks/useElasticLegacy.ts +++ b/src/hooks/useElasticLegacy.ts @@ -85,20 +85,6 @@ export const config: { positionManagerContract: '0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8', tickReaderContract: '0x165c68077ac06c83800d19200e6E2B08D02dE75D', }, - - [ChainId.BTTC]: { - subgraphUrl: 'https://bttc-graph.kyberengineering.io/subgraphs/name/kybernetwork/kyberswap-elastic-bttc-legacy', - farmContract: '', - positionManagerContract: '0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8', - tickReaderContract: '0x165c68077ac06c83800d19200e6E2B08D02dE75D', - }, - - [ChainId.CRONOS]: { - subgraphUrl: 'https://cronos-graph.kyberengineering.io/subgraphs/name/kybernetwork/kyberswap-elastic-cronos-legacy', - farmContract: '', - positionManagerContract: '0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8', - tickReaderContract: '0x165c68077ac06c83800d19200e6E2B08D02dE75D', - }, } interface Token { diff --git a/src/pages/About/AboutKNC.tsx b/src/pages/About/AboutKNC.tsx index 075cefd923..7b80108560 100644 --- a/src/pages/About/AboutKNC.tsx +++ b/src/pages/About/AboutKNC.tsx @@ -213,7 +213,6 @@ function AboutKNC() { ChainId.MATIC, ChainId.BSCMAINNET, ChainId.AVAXMAINNET, - ChainId.BTTC, ChainId.ARBITRUM, ChainId.OPTIMISM, ChainId.LINEA, diff --git a/src/pages/About/AboutKyberSwap/index.tsx b/src/pages/About/AboutKyberSwap/index.tsx index a850115c99..30333a63e8 100644 --- a/src/pages/About/AboutKyberSwap/index.tsx +++ b/src/pages/About/AboutKyberSwap/index.tsx @@ -7,7 +7,6 @@ import aggregatorStatsApi from 'services/aggregatorStats' import styled from 'styled-components' import ArbitrumDark from 'assets/images/Arbitrum_HorizontalLogo-dark.svg' -import BTTCDark from 'assets/images/btt-logo-dark.svg' import KNCGraphic from 'assets/images/knc-graphic.png' import AboutAvalanche from 'assets/svg/about_icon_avalanche.svg' import BSC from 'assets/svg/about_icon_bsc.svg' @@ -19,7 +18,6 @@ import { FooterSocialLink } from 'components/Footer/Footer' import { BestPrice, Clock, - CronosLogoFull, FantomLogoFull, LineaFull, LowestSlippage, @@ -339,9 +337,7 @@ function AboutKyberSwap() { avalanche_icon - - btt diff --git a/src/pages/BuyCrypto/index.tsx b/src/pages/BuyCrypto/index.tsx index eff4401330..1a7c0a9e0a 100644 --- a/src/pages/BuyCrypto/index.tsx +++ b/src/pages/BuyCrypto/index.tsx @@ -185,12 +185,10 @@ function BuyCrypto() { [ChainId.FANTOM]: 'fantom', [ChainId.ZKSYNC]: null, - [ChainId.CRONOS]: null, [ChainId.GÖRLI]: null, [ChainId.MUMBAI]: null, [ChainId.BSCTESTNET]: null, [ChainId.AVAXTESTNET]: null, - [ChainId.BTTC]: null, } const supportedCurrencies = [ 'AVAX', diff --git a/src/pages/ElasticSnapshot/data/category.json b/src/pages/ElasticSnapshot/data/category.json index 73cc8117b4..03b568a78a 100644 --- a/src/pages/ElasticSnapshot/data/category.json +++ b/src/pages/ElasticSnapshot/data/category.json @@ -483,14 +483,6 @@ "token0": "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e", "token1": "0x7678e162f38ec9ef2bfd1d0aaf9fd93355e5fa0b" } - ], - "cronos": [ - { - "pool": "0x4cd62dfe871e06fd8e08614d07ddc06af87cee90", - "pair": "WCRO-ELK", - "token0": "0x5C7F8A570d578ED84E63fdFA7b1eE72dEae1AE23", - "token1": "0xeEeEEb57642040bE42185f49C52F7E9B38f8eeeE" - } ] }, "category 3": { diff --git a/src/pages/ElasticSnapshot/data/data.json b/src/pages/ElasticSnapshot/data/data.json index 5e9e6b1b65..ec4c602152 100644 --- a/src/pages/ElasticSnapshot/data/data.json +++ b/src/pages/ElasticSnapshot/data/data.json @@ -87392,23 +87392,6 @@ "fee_token0": 8297830000000000, "fee_token1": 161903000000000000000 } - }, - { - "position_id": 9, - "position_usd": 3829.88, - "liquidity_usd": 3827.07, - "fee_usd": 2.82, - "info": { - "pool": "0x4cd62dfe871e06fd8e08614d07ddc06af87cee90", - "chain": "cronos", - "pair": "WCRO-ELK", - "token0": "0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23", - "token1": "0xeeeeeb57642040be42185f49c52f7e9b38f8eeee", - "liquidity_token0": 19406000000000000524288, - "liquidity_token1": 18142499999999999344640, - "fee_token0": 14275900000000000000, - "fee_token1": 13346400000000000000 - } } ] }, diff --git a/src/pages/ElasticSnapshot/index.tsx b/src/pages/ElasticSnapshot/index.tsx index cdbc2db3fa..cf264fef5e 100644 --- a/src/pages/ElasticSnapshot/index.tsx +++ b/src/pages/ElasticSnapshot/index.tsx @@ -575,7 +575,6 @@ const chainToChainId: { [key: string]: ChainId } = { arbitrum: 42161, avalanche: 43114, base: 8453, - cronos: 25, polygon: 137, } const Logo = ({ chainId, address0, address1 }: { chainId: ChainId; address0: string; address1: string }) => { diff --git a/src/utils/tokenInfo.ts b/src/utils/tokenInfo.ts index 560d20acdf..7e37f4f780 100644 --- a/src/utils/tokenInfo.ts +++ b/src/utils/tokenInfo.ts @@ -1,24 +1,8 @@ import { ChainId, Currency, NativeCurrency, Token, WETH } from '@kyberswap/ks-sdk-core' import { ETHER_ADDRESS } from 'constants/index' -import { MAP_TOKEN_HAS_MULTI_BY_NETWORK } from 'constants/tokenLists/token-info' import { TokenInfo, WrappedTokenInfo } from 'state/lists/wrappedTokenInfo' -/** - * hard code: ex: usdt => usdt_e, ... if network has multi symbol same name base on network - * @param network ex: poylgon, ... - * @param value symbol name, ex: usdt, ... - * @returns - */ -export const convertSymbol = (network: string, value: string) => { - const mapData = MAP_TOKEN_HAS_MULTI_BY_NETWORK[network] - if (mapData) { - const newValue = mapData[value] - if (newValue) return newValue - } - return value -} - export const getFormattedAddress = (chainId: ChainId, address?: string, fallback?: string): string => { try { if (!address) return fallback || '' diff --git a/yarn.lock b/yarn.lock index e58d78dabb..706d318db4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3733,10 +3733,10 @@ tiny-warning "^1.0.3" toformat "^2.0.0" -"@kyberswap/ks-sdk-core@1.1.5", "@kyberswap/ks-sdk-core@^1.0.5": - version "1.1.5" - resolved "https://registry.yarnpkg.com/@kyberswap/ks-sdk-core/-/ks-sdk-core-1.1.5.tgz#d742b494e55d53e1c85db9c28dac32741268ba1e" - integrity sha512-bMLtGopqjratn0TWSNMh8qtcotWyE4Ek8rL4DB8J0OZnv3y79QlGq4lhKGAHPmx35GWZomlw2RDrctqHlvORaQ== +"@kyberswap/ks-sdk-core@1.1.6", "@kyberswap/ks-sdk-core@^1.0.5": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@kyberswap/ks-sdk-core/-/ks-sdk-core-1.1.6.tgz#14b03c00408973c66df7b896b94fa4430d7d460b" + integrity sha512-VuG2xvNPY+/Ls+5Lrr41MuEFnJ/fdvpmXioflefICNU/n8UaNwB2QuD0+ozFFOflnEP3hIf712JDGmgRt+T1SA== dependencies: "@ethersproject/address" "^5.0.2" big.js "^5.2.2" @@ -4946,15 +4946,6 @@ "@sentry/types" "8.34.0" "@sentry/utils" "8.34.0" -"@sentry/core@7.24.2": - version "7.24.2" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.24.2.tgz#d3b69cc9c5703a4b35be1d648379804b099894e6" - integrity sha512-CDfrVvr3PQ0qImJv7/6yN/5hxhwxy1HicxTL9K5RwSDoXqgK3kUGv/WmTvPNIVB2RQKodLwzS2T52NFRxRoqNw== - dependencies: - "@sentry/types" "7.24.2" - "@sentry/utils" "7.24.2" - tslib "^1.9.3" - "@sentry/core@8.34.0": version "8.34.0" resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.34.0.tgz#92efe1cc8ced843beee636c344e66086d8915563" @@ -4974,34 +4965,11 @@ "@sentry/utils" "8.34.0" hoist-non-react-statics "^3.3.2" -"@sentry/tracing@^7.18.0": - version "7.24.2" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.24.2.tgz#d9f0cf7d3055283a50fd38b14e0891b729c5d107" - integrity sha512-rK1HUeCLM27DGGah1+5DN0C9Y4g9dnyMU5rdrRxGQGqxIJiwzHYwJI9xoNoAVMmt8jqFliDEpYvh2jsW8593IA== - dependencies: - "@sentry/core" "7.24.2" - "@sentry/types" "7.24.2" - "@sentry/utils" "7.24.2" - tslib "^1.9.3" - -"@sentry/types@7.24.2": - version "7.24.2" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.24.2.tgz#2ef728db8eea14de8ba916896837d0cbeb3d28da" - integrity sha512-x2LEnKBPzUVzTGspvB0CjZmt1dWeJsLVHGeDKPUMUm004nIscFCxJsmYefqaJQdaIUMqDit5ApwcmKchuK6VKQ== - "@sentry/types@8.34.0": version "8.34.0" resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.34.0.tgz#b02da72d1be67df5246aa9a97ca661ee71569372" integrity sha512-zLRc60CzohGCo6zNsNeQ9JF3SiEeRE4aDCP9fDDdIVCOKovS+mn1rtSip0qd0Vp2fidOu0+2yY0ALCz1A3PJSQ== -"@sentry/utils@7.24.2": - version "7.24.2" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.24.2.tgz#7120a8d36bd1d05043c902a0f22fbc2012fe2116" - integrity sha512-VuuYEF39v43Qk6YZMid8Em/N0HqCsS5ItuTSvunMtBai2dzDAIkJ2LqemF95wWFAXrzpLy4Nx3QyGVHayMn31A== - dependencies: - "@sentry/types" "7.24.2" - tslib "^1.9.3" - "@sentry/utils@8.34.0": version "8.34.0" resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.34.0.tgz#5ba543381a9de0ada1196df1fc5cde3b891de41e" @@ -18930,7 +18898,7 @@ tsconfck@^2.1.0: resolved "https://registry.yarnpkg.com/tsconfck/-/tsconfck-2.1.2.tgz#f667035874fa41d908c1fe4d765345fcb1df6e35" integrity sha512-ghqN1b0puy3MhhviwO2kGF8SeMDNhEbnKxjK7h6+fvY9JAxqvXi8y5NAHSQv687OVboS2uZIByzGd45/YxrRHg== -tslib@1.14.1, tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: +tslib@1.14.1, tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==