From 4c0979bbb2ca6313684c107611b66dc64ae1e443 Mon Sep 17 00:00:00 2001 From: Thor <109517311+swimthor@users.noreply.github.com> Date: Wed, 26 Oct 2022 20:07:44 +0100 Subject: [PATCH] fix: remove USN-related logic --- apps/ui/src/config/ecosystems/aurora.ts | 42 ----------- apps/ui/src/config/ecosystems/solana.ts | 18 ----- apps/ui/src/config/pools.ts | 55 -------------- apps/ui/src/config/tokenProjects.ts | 20 ------ apps/ui/src/config/tokens.ts | 71 ------------------- apps/ui/src/images/tokens/lp_aurora_usn.svg | 1 - .../images/tokens/lp_metapool_aurora_usn.svg | 1 - apps/ui/src/images/tokens/usn.svg | 1 - apps/ui/src/pages/PoolsPage.tsx | 33 --------- packages/evm/src/ecosystems/aurora.ts | 24 ------- packages/token-projects/images/usn.svg | 1 - packages/token-projects/src/projects.ts | 21 ------ 12 files changed, 288 deletions(-) delete mode 100644 apps/ui/src/images/tokens/lp_aurora_usn.svg delete mode 100644 apps/ui/src/images/tokens/lp_metapool_aurora_usn.svg delete mode 100644 apps/ui/src/images/tokens/usn.svg delete mode 100644 packages/token-projects/images/usn.svg diff --git a/apps/ui/src/config/ecosystems/aurora.ts b/apps/ui/src/config/ecosystems/aurora.ts index 0f2c48059..709023e9f 100644 --- a/apps/ui/src/config/ecosystems/aurora.ts +++ b/apps/ui/src/config/ecosystems/aurora.ts @@ -46,23 +46,6 @@ const mainnet: EvmChainConfigV1 = { ], ]), }, - { - id: "mainnet-aurora-usn", - projectId: TokenProjectIdV1.Usn, - nativeDetails: { - address: "0x5183e1B1091804BC2602586919E6880ac1cf2896", - decimals: 18, - }, - wrappedDetails: new Map([ - [ - SOLANA_ECOSYSTEM_ID, - { - address: "3NDmtc2xKMpm8wCiaALey2y3EGhBkUNuXJ9m3JcjnHMM", - decimals: 8, - }, - ], - ]), - }, ], pools: [], }; @@ -104,23 +87,6 @@ const testnet: EvmChainConfigV1 = { ], ]), }, - { - id: "testnet-aurora-usn", - projectId: TokenProjectIdV1.Usn, - nativeDetails: { - address: "0x0000000000000000000000000000000000000000", // TODO: Update - decimals: 18, - }, - wrappedDetails: new Map([ - [ - SOLANA_ECOSYSTEM_ID, - { - address: "11111111111111111111111111111111", // TODO: Update - decimals: 8, - }, - ], - ]), - }, { id: "testnet-aurora-lp-usdc-usdt", projectId: TokenProjectIdV2.SwimLpAuroraUsdcUsdt, @@ -129,14 +95,6 @@ const testnet: EvmChainConfigV1 = { decimals: 8, }, }, - { - id: "testnet-aurora-lp-usn", - projectId: TokenProjectIdV2.SwimLpAuroraUsn, - nativeDetails: { - address: "0x1111111111111111111111111111111111111111", // TODO: Update - decimals: 8, - }, - }, ], pools: [], }; diff --git a/apps/ui/src/config/ecosystems/solana.ts b/apps/ui/src/config/ecosystems/solana.ts index 950db0af5..f1245ac97 100644 --- a/apps/ui/src/config/ecosystems/solana.ts +++ b/apps/ui/src/config/ecosystems/solana.ts @@ -179,15 +179,6 @@ const mainnet: SolanaChainConfigV1 = { }, wrappedDetails: EMPTY_MAP, }, - { - id: "mainnet-solana-lp-meta-aurora-usn", - projectId: TokenProjectIdV1.SwimAuroraUsnLp, - nativeDetails: { - address: "3eXCU7YoiCq3rZ6787pPFJE7TXBsKuTZ49wH2kFnuTeF", - decimals: 8, - }, - wrappedDetails: EMPTY_MAP, - }, { id: "mainnet-solana-lp-meta-fantom-usdc", projectId: TokenProjectIdV1.SwimFantomUsdcLp, @@ -399,15 +390,6 @@ const testnet: SolanaChainConfigV1 = { }, wrappedDetails: EMPTY_MAP, }, - { - id: "testnet-solana-lp-meta-aurora-usn", - projectId: TokenProjectIdV1.SwimAuroraUsnLp, - nativeDetails: { - address: "11111111111111111111111111111111", // TODO: Update - decimals: 8, - }, - wrappedDetails: EMPTY_MAP, - }, { id: "testnet-solana-lp-meta-fantom-usdc", projectId: TokenProjectIdV1.SwimFantomUsdcLp, diff --git a/apps/ui/src/config/pools.ts b/apps/ui/src/config/pools.ts index f955da968..081056706 100644 --- a/apps/ui/src/config/pools.ts +++ b/apps/ui/src/config/pools.ts @@ -243,28 +243,6 @@ const MAINNET_POOLS: readonly PoolSpec[] = [ ]), tokens: ["mainnet-aurora-usdt", "mainnet-solana-lp-hexapool"], }, - { - isDisabled: !process.env.REACT_APP_ENABLE_AURORA_USN, - id: "meta-aurora-usn", - ecosystem: SOLANA_ECOSYSTEM_ID, - displayName: "Aurora USN", - isStakingPool: false, - isStableSwap: true, - isLegacyPool: true, - contract: "SWimmSE5hgWsEruwPBLBVAFi3KyVfe8URU2pb4w7GZs", - address: "4Cos4Z3DaMa37MpvjfCEH93DqonPmDV3b6GuPvmWugqF", - authority: "9dowtd9EbAtC9iKyXWaC5TBmHTivDfdQ6JbeTvHiCK6p", - feeDecimals: 6, - lpToken: "mainnet-solana-lp-meta-aurora-usn", - tokenAccounts: new Map([ - ["mainnet-aurora-usn", "3dkbc5KuJSJ9ah87uVZRRLZMH1JKMaREQgcAkHSijWpR"], - [ - "mainnet-solana-lp-hexapool", - "9Ddfhn9P1BJvxtfCvgvKBfSiKSrwdDBBSUf9SdQkDDW5", - ], - ]), - tokens: ["mainnet-aurora-usn", "mainnet-solana-lp-hexapool"], - }, { isDisabled: !isEcosystemEnabled(EvmEcosystemId.Fantom), id: "meta-fantom-usdc", @@ -468,20 +446,6 @@ export const TESTNET_POOLS_FOR_RESTRUCTURE: readonly PoolSpec[] = [ lpToken: "testnet-aurora-lp-usdc-usdt", tokens: ["testnet-swimusd", "testnet-aurora-usdc", "testnet-aurora-usdt"], }, - { - isDisabled: true, - // TODO: Update !isPoolRestructureEnabled() || !process.env.REACT_APP_ENABLE_AURORA_USN, - id: "testnet-aurora-usn", - ecosystem: EvmEcosystemId.Aurora, - displayName: "Aurora USN", - isStakingPool: false, - isStableSwap: true, - isLegacyPool: false, - address: "11111111111111111111111111111111", // TODO: Update - feeDecimals: 6, - lpToken: "testnet-aurora-lp-usn", - tokens: ["testnet-swimusd", "testnet-aurora-usn"], - }, { isDisabled: true, // TODO: Update !isPoolRestructureEnabled(), id: "testnet-fantom-usdc", @@ -736,25 +700,6 @@ export const TESTNET_POOLS: readonly PoolSpec[] = [ ]), tokens: ["testnet-aurora-usdt", "testnet-solana-lp-hexapool"], }, - { - isDisabled: !process.env.REACT_APP_ENABLE_AURORA_USN, // TODO: Enable when deployed on testnet - id: "meta-aurora-usn", - ecosystem: SOLANA_ECOSYSTEM_ID, - displayName: "Aurora USN", - isStakingPool: false, - isStableSwap: true, - isLegacyPool: true, - contract: "SWimmSE5hgWsEruwPBLBVAFi3KyVfe8URU2pb4w7GZs", - address: "11111111111111111111111111111111", // TODO: Update - authority: "11111111111111111111111111111111", // TODO: Update - feeDecimals: 6, - lpToken: "testnet-solana-lp-meta-aurora-usn", - tokenAccounts: new Map([ - ["testnet-aurora-usn", "11111111111111111111111111111111"], // TODO: Update - ["testnet-solana-lp-hexapool", "11111111111111111111111111111111"], // TODO: Update - ]), - tokens: ["testnet-aurora-usn", "testnet-solana-lp-hexapool"], - }, { isDisabled: !isEcosystemEnabled(EvmEcosystemId.Fantom), id: "meta-fantom-usdc", diff --git a/apps/ui/src/config/tokenProjects.ts b/apps/ui/src/config/tokenProjects.ts index 3664ab432..4a9dfe8d2 100644 --- a/apps/ui/src/config/tokenProjects.ts +++ b/apps/ui/src/config/tokenProjects.ts @@ -15,7 +15,6 @@ import GST_SVG from "!!url-loader!../images/tokens/gst.svg"; import LP_ACALA_AUSD_SVG from "!!url-loader!../images/tokens/lp_acala_ausd.svg"; import LP_AURORA_USDC_SVG from "!!url-loader!../images/tokens/lp_aurora_usdc.svg"; import LP_AURORA_USDT_SVG from "!!url-loader!../images/tokens/lp_aurora_usdt.svg"; -import LP_AURORA_USN_SVG from "!!url-loader!../images/tokens/lp_aurora_usn.svg"; import LP_AVALANCHE_USDC_SVG from "!!url-loader!../images/tokens/lp_avalanche_usdc.svg"; import LP_AVALANCHE_USDT_SVG from "!!url-loader!../images/tokens/lp_avalanche_usdt.svg"; import LP_FANTOM_USDC_SVG from "!!url-loader!../images/tokens/lp_fantom_usdc.svg"; @@ -29,7 +28,6 @@ import SWIM_TOKEN_SVG from "!!url-loader!../images/tokens/swim.svg"; import SWIM_USD_SVG from "!!url-loader!../images/tokens/swim_usd.svg"; import USDC_SVG from "!!url-loader!../images/tokens/usdc.svg"; import USDT_SVG from "!!url-loader!../images/tokens/usdt.svg"; -import USN_SVG from "!!url-loader!../images/tokens/usn.svg"; import XSWIM_TOKEN_SVG from "!!url-loader!../images/tokens/xswim.svg"; /* eslint-enable import/no-unresolved, import/no-webpack-loader-syntax */ @@ -42,7 +40,6 @@ export enum TokenProjectIdV1 { SwimAcalaAusdLp = "swim-acala-ausd-lp-v1", SwimAuroraUsdcLp = "swim-aurora-usdc-lp-v1", SwimAuroraUsdtLp = "swim-aurora-usdt-lp-v1", - SwimAuroraUsnLp = "swim-aurora-usn-lp-v1", SwimAvalancheUsdcLp = "swim-avalanche-usdc-lp-v1", SwimAvalancheUsdtLp = "swim-avalanche-usdt-lp-v1", SwimFantomUsdcLp = "swim-fantom-usdc-lp-v1", @@ -55,7 +52,6 @@ export enum TokenProjectIdV1 { SwimUsdV1 = "swim-usd-v1", Usdc = "usdc-v1", Usdt = "usdt-v1", - Usn = "usn-v1", XSwim = "xswim-v1", } // Make sure no name collision with v2 @@ -89,14 +85,6 @@ export const TOKEN_PROJECTS_BY_ID_V1: ReadonlyRecord< isStablecoin: true, isLp: false, }, - [TokenProjectIdV1.Usn]: { - id: TokenProjectIdV1.Usn, - symbol: "USN", - displayName: "USN", - icon: USN_SVG, - isStablecoin: true, - isLp: false, - }, [TokenProjectIdV1.Busd]: { id: TokenProjectIdV1.Busd, symbol: "BUSD", @@ -217,14 +205,6 @@ export const TOKEN_PROJECTS_BY_ID_V1: ReadonlyRecord< isStablecoin: false, isLp: true, }, - [TokenProjectIdV1.SwimAuroraUsnLp]: { - id: TokenProjectIdV1.SwimAuroraUsnLp, - symbol: "SWIM-AURORA-USN-LP", - displayName: "Aurora USN LP", - icon: LP_AURORA_USN_SVG, - isStablecoin: false, - isLp: true, - }, [TokenProjectIdV1.SwimFantomUsdcLp]: { id: TokenProjectIdV1.SwimFantomUsdcLp, symbol: "SWIM-FANTOM-USDC-LP", diff --git a/apps/ui/src/config/tokens.ts b/apps/ui/src/config/tokens.ts index 68ed8942e..c28702d2f 100644 --- a/apps/ui/src/config/tokens.ts +++ b/apps/ui/src/config/tokens.ts @@ -214,17 +214,6 @@ const MAINNET_TOKENS: readonly TokenConfig[] = [ }, wrappedDetails: EMPTY_MAP, }, - { - isDisabled: !process.env.REACT_APP_ENABLE_AURORA_USN, - id: "mainnet-solana-lp-meta-aurora-usn", - projectId: TokenProjectIdV1.SwimAuroraUsnLp, - nativeEcosystemId: SOLANA_ECOSYSTEM_ID, - nativeDetails: { - address: "3eXCU7YoiCq3rZ6787pPFJE7TXBsKuTZ49wH2kFnuTeF", - decimals: 8, - }, - wrappedDetails: EMPTY_MAP, - }, { id: "mainnet-solana-lp-meta-fantom-usdc", projectId: TokenProjectIdV1.SwimFantomUsdcLp, @@ -483,25 +472,6 @@ const MAINNET_TOKENS: readonly TokenConfig[] = [ ], ]), }, - { - isDisabled: !process.env.REACT_APP_ENABLE_AURORA_USN, - id: "mainnet-aurora-usn", - projectId: TokenProjectIdV1.Usn, - nativeEcosystemId: EvmEcosystemId.Aurora, - nativeDetails: { - address: "0x5183e1B1091804BC2602586919E6880ac1cf2896", - decimals: 18, - }, - wrappedDetails: new Map([ - [ - SOLANA_ECOSYSTEM_ID, - { - address: "3NDmtc2xKMpm8wCiaALey2y3EGhBkUNuXJ9m3JcjnHMM", - decimals: 8, - }, - ], - ]), - }, { id: "mainnet-fantom-usdc", projectId: TokenProjectIdV1.Usdc, @@ -720,17 +690,6 @@ export const TESTNET_TOKENS_FOR_RESTRUCTURE: readonly TokenConfig[] = [ decimals: 8, }, }, - { - isDisabled: - !isPoolRestructureEnabled() || !process.env.REACT_APP_ENABLE_AURORA_USN, - id: "testnet-aurora-lp-usn", - projectId: TokenProjectIdV2.SwimLpAuroraUsn, - nativeEcosystemId: EvmEcosystemId.Aurora, - nativeDetails: { - address: "0x1111111111111111111111111111111111111111", // TODO: Update - decimals: 8, - }, - }, { isDisabled: !isPoolRestructureEnabled(), id: "testnet-fantom-lp-usdc", @@ -960,17 +919,6 @@ export const TESTNET_TOKENS: readonly TokenConfig[] = [ }, wrappedDetails: EMPTY_MAP, }, - { - isDisabled: !process.env.REACT_APP_ENABLE_AURORA_USN, - id: "testnet-solana-lp-meta-aurora-usn", - projectId: TokenProjectIdV1.SwimAuroraUsnLp, - nativeEcosystemId: SOLANA_ECOSYSTEM_ID, - nativeDetails: { - address: "11111111111111111111111111111111", // TODO: Update - decimals: 8, - }, - wrappedDetails: EMPTY_MAP, - }, { id: "testnet-solana-lp-meta-fantom-usdc", projectId: TokenProjectIdV1.SwimFantomUsdcLp, @@ -1228,25 +1176,6 @@ export const TESTNET_TOKENS: readonly TokenConfig[] = [ ], ]), }, - { - isDisabled: !process.env.REACT_APP_ENABLE_AURORA_USN, - id: "testnet-aurora-usn", - projectId: TokenProjectIdV1.Usn, - nativeEcosystemId: EvmEcosystemId.Aurora, - nativeDetails: { - address: "0x0000000000000000000000000000000000000000", // TODO: Update - decimals: 18, - }, - wrappedDetails: new Map([ - [ - SOLANA_ECOSYSTEM_ID, - { - address: "11111111111111111111111111111111", // TODO: Update - decimals: 8, - }, - ], - ]), - }, { id: "testnet-fantom-usdc", projectId: TokenProjectIdV1.Usdc, diff --git a/apps/ui/src/images/tokens/lp_aurora_usn.svg b/apps/ui/src/images/tokens/lp_aurora_usn.svg deleted file mode 100644 index 501c442ea..000000000 --- a/apps/ui/src/images/tokens/lp_aurora_usn.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/ui/src/images/tokens/lp_metapool_aurora_usn.svg b/apps/ui/src/images/tokens/lp_metapool_aurora_usn.svg deleted file mode 100644 index ac52b2008..000000000 --- a/apps/ui/src/images/tokens/lp_metapool_aurora_usn.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/ui/src/images/tokens/usn.svg b/apps/ui/src/images/tokens/usn.svg deleted file mode 100644 index f121dc022..000000000 --- a/apps/ui/src/images/tokens/usn.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/ui/src/pages/PoolsPage.tsx b/apps/ui/src/pages/PoolsPage.tsx index f081b0403..d8c9255b4 100644 --- a/apps/ui/src/pages/PoolsPage.tsx +++ b/apps/ui/src/pages/PoolsPage.tsx @@ -165,39 +165,6 @@ const PoolsPage = (): ReactElement => { /> )} - {(isUnfiltered || ecosystemId === EvmEcosystemId.Aurora) && ( - <> - - - - - )} - {!isEcosystemEnabled(EvmEcosystemId.Karura) && (isUnfiltered || ecosystemId === EvmEcosystemId.Karura) && ( <> diff --git a/packages/evm/src/ecosystems/aurora.ts b/packages/evm/src/ecosystems/aurora.ts index 2e744ed82..790d0759f 100644 --- a/packages/evm/src/ecosystems/aurora.ts +++ b/packages/evm/src/ecosystems/aurora.ts @@ -45,14 +45,6 @@ const mainnet: EvmChainConfig = { decimals: 6, }, }, - { - id: "mainnet-aurora-usn", - projectId: TokenProjectId.Usn, - nativeDetails: { - address: "0x5183e1B1091804BC2602586919E6880ac1cf2896", - decimals: 18, - }, - }, ], pools: [], }; @@ -87,14 +79,6 @@ const testnet: EvmChainConfig = { decimals: 6, }, }, - { - id: "testnet-aurora-usn", - projectId: TokenProjectId.Usn, - nativeDetails: { - address: "0x0000000000000000000000000000000000000000", // TODO: Update - decimals: 18, - }, - }, { id: "testnet-aurora-lp-usdc-usdt", projectId: TokenProjectId.SwimLpAuroraUsdcUsdt, @@ -103,14 +87,6 @@ const testnet: EvmChainConfig = { decimals: 8, }, }, - { - id: "testnet-aurora-lp-usn", - projectId: TokenProjectId.SwimLpAuroraUsn, - nativeDetails: { - address: "0x1111111111111111111111111111111111111111", // TODO: Update - decimals: 8, - }, - }, ], pools: [], }; diff --git a/packages/token-projects/images/usn.svg b/packages/token-projects/images/usn.svg deleted file mode 100644 index bb8440f0a..000000000 --- a/packages/token-projects/images/usn.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/token-projects/src/projects.ts b/packages/token-projects/src/projects.ts index 8c40d53be..8cbbf80fd 100644 --- a/packages/token-projects/src/projects.ts +++ b/packages/token-projects/src/projects.ts @@ -11,7 +11,6 @@ import LP_KARURA_USDT_SVG from "./images/lp_karura_usdt"; import SWIM_USD_SVG from "./images/swim_usd"; import USDC_SVG from "./images/usdc"; import USDT_SVG from "./images/usdt"; -import USN_SVG from "./images/usn"; export enum TokenProjectId { Ausd = "ausd", @@ -21,13 +20,11 @@ export enum TokenProjectId { SwimUsd = "swim-usd", Usdc = "usdc", Usdt = "usdt", - Usn = "usn", SwimLpEthereumUsdcUsdt = "swim-lp-ethereum-usdc-usdt", SwimLpBnbBusdUsdt = "swim-lp-bnb-busd-usdt", SwimLpAvalancheUsdcUsdt = "swim-lp-avalanche-usdc-usdt", SwimLpPolygonUsdcUsdt = "swim-lp-polygon-usdc-usdt", SwimLpAuroraUsdcUsdt = "swim-lp-aurora-usdc-usdt", - SwimLpAuroraUsn = "swim-lp-aurora-usn", SwimLpFantomUsdc = "swim-lp-fantom-usdc", SwimLpKaruraUsdt = "swim-lp-karura-usdt", SwimLpKaruraAusd = "swim-lp-karura-ausd", @@ -83,15 +80,6 @@ export const TOKEN_PROJECTS_BY_ID: ReadonlyRecord< isLp: false, tokenNumber: 0x0101, }, - [TokenProjectId.Usn]: { - id: TokenProjectId.Usn, - symbol: "USN", - displayName: "USN", - icon: USN_SVG, - isStablecoin: true, - isLp: false, - tokenNumber: 0x0102, - }, [TokenProjectId.Busd]: { id: TokenProjectId.Busd, symbol: "BUSD", @@ -182,15 +170,6 @@ export const TOKEN_PROJECTS_BY_ID: ReadonlyRecord< isLp: true, tokenNumber: null, }, - [TokenProjectId.SwimLpAuroraUsn]: { - id: TokenProjectId.SwimLpAuroraUsn, - symbol: "SWIM-LP-AURORA-USN", - displayName: "Aurora USN Pool LP", - icon: SWIM_USD_SVG, // TODO: update - isStablecoin: false, - isLp: true, - tokenNumber: null, - }, [TokenProjectId.SwimLpFantomUsdc]: { id: TokenProjectId.SwimLpFantomUsdc, symbol: "SWIM-LP-FANTOM-USDC",