From 3d33f77fe8cca464b32568bd1d45380c55b3da2e Mon Sep 17 00:00:00 2001 From: Leandro Date: Fri, 18 Mar 2022 15:01:12 -0700 Subject: [PATCH] Removed unreacheable component from SwapMod and respective Mod --- .../AdvancedSwapDetailsDropdownMod.tsx | 30 ------------------- .../swap/AdvancedSwapDetailsDropdown/index.ts | 1 - src/custom/pages/Swap/SwapMod.tsx | 4 --- 3 files changed, 35 deletions(-) delete mode 100644 src/custom/components/swap/AdvancedSwapDetailsDropdown/AdvancedSwapDetailsDropdownMod.tsx delete mode 100644 src/custom/components/swap/AdvancedSwapDetailsDropdown/index.ts diff --git a/src/custom/components/swap/AdvancedSwapDetailsDropdown/AdvancedSwapDetailsDropdownMod.tsx b/src/custom/components/swap/AdvancedSwapDetailsDropdown/AdvancedSwapDetailsDropdownMod.tsx deleted file mode 100644 index f14167ab07..0000000000 --- a/src/custom/components/swap/AdvancedSwapDetailsDropdown/AdvancedSwapDetailsDropdownMod.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { Percent } from '@uniswap/sdk-core' -import styled from 'styled-components/macro' -import { useLastTruthy } from 'hooks/useLast' -import { AdvancedSwapDetails /* , AdvancedSwapDetailsProps */ } from 'components/swap/AdvancedSwapDetails' -import TradeGp from 'state/swap/TradeGp' - -const AdvancedDetailsFooter = styled.div<{ show: boolean }>` - width: 100%; - border-bottom-left-radius: 20px; - border-bottom-right-radius: 20px; - color: ${({ theme }) => theme.text2}; -` - -interface AdvancedSwapDetailsProps { - trade?: TradeGp - allowedSlippage: Percent -} - -export default function AdvancedSwapDetailsDropdown({ trade, ...rest }: AdvancedSwapDetailsProps) { - const lastTrade = useLastTruthy(trade) - - return ( - - - - ) -} - -// TODO: file no longer exists at origin. -// TODO: decide if we want to adapt to new code or make it a no longer "mod" file diff --git a/src/custom/components/swap/AdvancedSwapDetailsDropdown/index.ts b/src/custom/components/swap/AdvancedSwapDetailsDropdown/index.ts deleted file mode 100644 index 8a21838efa..0000000000 --- a/src/custom/components/swap/AdvancedSwapDetailsDropdown/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './AdvancedSwapDetailsDropdownMod' diff --git a/src/custom/pages/Swap/SwapMod.tsx b/src/custom/pages/Swap/SwapMod.tsx index fcc7088bbf..9161a6c8cb 100644 --- a/src/custom/pages/Swap/SwapMod.tsx +++ b/src/custom/pages/Swap/SwapMod.tsx @@ -72,7 +72,6 @@ import { HashLink } from 'react-router-hash-link' import { useGetQuoteAndStatus } from 'state/price/hooks' import { SwapProps, ButtonError, ButtonPrimary } from '.' // mod import TradeGp from 'state/swap/TradeGp' -import AdvancedSwapDetailsDropdown from 'components/swap/AdvancedSwapDetailsDropdown' import { formatSmart } from 'utils/format' import { RowSlippage } from 'components/swap/TradeSummary/RowSlippage' import usePrevious from 'hooks/usePrevious' @@ -961,9 +960,6 @@ export default function Swap({ } detailsTitle="This wallet is not yet supported" /> - ) : !swapIsUnsupported ? ( - // TODO: I think this in unreachable, given that `swapIsUnsupported` returns null when false on line 936 - ) : ( )}