From f0789cd017f785b40e4f0a4be1663d4c9bdb3969 Mon Sep 17 00:00:00 2001 From: woody <125113430+woodenfurniture@users.noreply.github.com> Date: Thu, 16 Jan 2025 09:40:04 +1100 Subject: [PATCH] fix: hide YouSaved and YouCouldHaveSaved components (#8586) --- .../components/TradeSuccess/TradeSuccess.tsx | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/src/components/MultiHopTrade/components/TradeSuccess/TradeSuccess.tsx b/src/components/MultiHopTrade/components/TradeSuccess/TradeSuccess.tsx index 9f599758224..2d74de5cb1c 100644 --- a/src/components/MultiHopTrade/components/TradeSuccess/TradeSuccess.tsx +++ b/src/components/MultiHopTrade/components/TradeSuccess/TradeSuccess.tsx @@ -5,7 +5,6 @@ import { CardBody, CardFooter, Collapse, - Divider, Flex, HStack, Icon, @@ -13,7 +12,6 @@ import { useDisclosure, } from '@chakra-ui/react' import type { Asset } from '@shapeshiftoss/types' -import { bnOrZero } from '@shapeshiftoss/utils' import type { InterpolationOptions } from 'node-polyglot' import { useCallback } from 'react' import { useTranslate } from 'react-polyglot' @@ -22,16 +20,10 @@ import { AnimatedCheck } from 'components/AnimatedCheck' import { AssetIcon } from 'components/AssetIcon' import { SlideTransition } from 'components/SlideTransition' import { Text } from 'components/Text' -import { - selectLastHop, - selectTradeQuoteAffiliateFeeAfterDiscountUserCurrency, - selectTradeQuoteAffiliateFeeDiscountUserCurrency, -} from 'state/slices/tradeQuoteSlice/selectors' +import { selectLastHop } from 'state/slices/tradeQuoteSlice/selectors' import { useAppSelector } from 'state/store' import { TwirlyToggle } from '../TwirlyToggle' -import { YouCouldHaveSaved } from './components/YouCouldHaveSaved' -import { YouSaved } from './components/YouSaved' export type TradeSuccessProps = { handleBack: () => void @@ -60,15 +52,6 @@ export const TradeSuccess = ({ const lastHop = useAppSelector(selectLastHop) - const feeSavingUserCurrency = useAppSelector(selectTradeQuoteAffiliateFeeDiscountUserCurrency) - - const affiliateFeeUserCurrency = useAppSelector( - selectTradeQuoteAffiliateFeeAfterDiscountUserCurrency, - ) - - const hasFeeSaving = !bnOrZero(feeSavingUserCurrency).isZero() - const couldHaveReducedFee = !hasFeeSaving && !bnOrZero(affiliateFeeUserCurrency).isZero() - const AmountsLine = useCallback(() => { if (!(sellAsset && buyAsset)) return null if (!(sellAmountCryptoPrecision && buyAmountCryptoPrecision)) return null @@ -114,13 +97,8 @@ export const TradeSuccess = ({ - {hasFeeSaving && } - {couldHaveReducedFee && ( - - )} -