From d954aa4679c7c6670ed0e52f82118c7934e0a801 Mon Sep 17 00:00:00 2001 From: swimdrew Date: Mon, 24 Oct 2022 16:46:27 -0400 Subject: [PATCH] chore: Remove ethereum merge related code --- .../molecules/EthereumMergeWarning.tsx | 16 -- apps/ui/src/pages/PoolPage.tsx | 179 +++++++++--------- apps/ui/src/pages/PoolsPage.tsx | 7 +- apps/ui/src/pages/SwapPage/SwapPage.tsx | 5 +- 4 files changed, 89 insertions(+), 118 deletions(-) delete mode 100644 apps/ui/src/components/molecules/EthereumMergeWarning.tsx diff --git a/apps/ui/src/components/molecules/EthereumMergeWarning.tsx b/apps/ui/src/components/molecules/EthereumMergeWarning.tsx deleted file mode 100644 index 179c211ed..000000000 --- a/apps/ui/src/components/molecules/EthereumMergeWarning.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { EuiCallOut, EuiText } from "@elastic/eui"; -import type { ReactElement } from "react"; - -export const EthereumMergeWarning = (): ReactElement => ( - <> - - -

- { - "Please note that as a precaution we have temporarily disabled our pools while the Ethereum merge takes place." - } -

-
-
- -); diff --git a/apps/ui/src/pages/PoolPage.tsx b/apps/ui/src/pages/PoolPage.tsx index e79b0b49f..d7716d9ef 100644 --- a/apps/ui/src/pages/PoolPage.tsx +++ b/apps/ui/src/pages/PoolPage.tsx @@ -34,7 +34,6 @@ import { RemoveForm } from "../components/RemoveForm"; import { SlippageButton } from "../components/SlippageButton"; import { StatList } from "../components/StatList"; import { TokenConfigIcon, TokenIcon } from "../components/TokenIcon"; -import { EthereumMergeWarning } from "../components/molecules/EthereumMergeWarning"; import type { PoolSpec } from "../config"; import { getSolanaTokenDetails, getTokenDetailsForEcosystem } from "../config"; import { selectConfig } from "../core/selectors"; @@ -239,97 +238,93 @@ export const PoolPageInner = ({ - {process.env.REACT_APP_ETHEREUM_MERGE === "true" ? ( - - ) : ( - - - - ), - }, - { - id: "remove", - name: poolSpec.isStakingPool - ? t("glossary.unstake_tokens") - : t("general.remove_tokens_from_pool"), - content: ( - - ), - }, - ]} - /> - - - -

- {t("pool_page.pool_balance", { count: reserveStats.length })} -

-
- - - - -

- {t("pool_page.user_balance", { count: userLpStats.length })} -

-
- - - - {!poolSpec.isStakingPool && ( - <> - -

{t("pool_page.pool_info")}

-
- - - - )} - {getTokenDetailsForEcosystem(lpToken, EvmEcosystemId.Ethereum) !== - null && ( - { - showRegisterEthereumTokenPrompt(lpToken).catch(console.error); - }} - iconType={ETHEREUM_SVG} - > - {t("pool_page.add_lp_token_to_metamask")} - - )} - {getTokenDetailsForEcosystem(lpToken, EvmEcosystemId.Bnb) !== - null && ( - { - showRegisterBnbTokenPrompt(lpToken).catch(console.error); - }} - iconType={BNB_SVG} - > - {t("pool_page.add_lp_token_to_metamask")} - - )} -
-
- )} + + + + ), + }, + { + id: "remove", + name: poolSpec.isStakingPool + ? t("glossary.unstake_tokens") + : t("general.remove_tokens_from_pool"), + content: ( + + ), + }, + ]} + /> + + + +

+ {t("pool_page.pool_balance", { count: reserveStats.length })} +

+
+ + + + +

+ {t("pool_page.user_balance", { count: userLpStats.length })} +

+
+ + + + {!poolSpec.isStakingPool && ( + <> + +

{t("pool_page.pool_info")}

+
+ + + + )} + {getTokenDetailsForEcosystem(lpToken, EvmEcosystemId.Ethereum) !== + null && ( + { + showRegisterEthereumTokenPrompt(lpToken).catch(console.error); + }} + iconType={ETHEREUM_SVG} + > + {t("pool_page.add_lp_token_to_metamask")} + + )} + {getTokenDetailsForEcosystem(lpToken, EvmEcosystemId.Bnb) !== + null && ( + { + showRegisterBnbTokenPrompt(lpToken).catch(console.error); + }} + iconType={BNB_SVG} + > + {t("pool_page.add_lp_token_to_metamask")} + + )} +
+
); diff --git a/apps/ui/src/pages/PoolsPage.tsx b/apps/ui/src/pages/PoolsPage.tsx index b3a122c93..d46f1128d 100644 --- a/apps/ui/src/pages/PoolsPage.tsx +++ b/apps/ui/src/pages/PoolsPage.tsx @@ -28,7 +28,6 @@ import shallow from "zustand/shallow.js"; import { atomicToTvlString } from "../amounts"; import { PoolListItem } from "../components/PoolListItem"; -import { EthereumMergeWarning } from "../components/molecules/EthereumMergeWarning"; import { getPoolTokenEcosystems, hasTokenEcosystem, @@ -364,11 +363,7 @@ const PoolsPage = (): ReactElement => { - {process.env.REACT_APP_ETHEREUM_MERGE === "true" ? ( - - ) : ( - content - )} + {content} diff --git a/apps/ui/src/pages/SwapPage/SwapPage.tsx b/apps/ui/src/pages/SwapPage/SwapPage.tsx index 2fe46d2ea..2b69c4ea7 100644 --- a/apps/ui/src/pages/SwapPage/SwapPage.tsx +++ b/apps/ui/src/pages/SwapPage/SwapPage.tsx @@ -21,7 +21,6 @@ import { MultiConnectButton } from "../../components/ConnectButton"; import { RecentInteractions } from "../../components/RecentInteractions"; import { SlippageButton } from "../../components/SlippageButton"; import { SwapForm } from "../../components/SwapForm"; -import { EthereumMergeWarning } from "../../components/molecules/EthereumMergeWarning"; import { ECOSYSTEMS } from "../../config"; import { selectConfig } from "../../core/selectors"; import { useEnvironment } from "../../core/store"; @@ -80,9 +79,7 @@ const SwapPage = (): ReactElement => { - {process.env.REACT_APP_ETHEREUM_MERGE === "true" ? ( - - ) : nonStakingPools.length > 0 ? ( + {nonStakingPools.length > 0 ? ( ) : (