From 066d7537e54a46c043832a28516628b4ab6fe59f Mon Sep 17 00:00:00 2001 From: Jiri Zbytovsky Date: Tue, 10 Dec 2024 15:37:16 +0100 Subject: [PATCH] fix(suite): remove useless HiddenPlaceholder code --- .../suite/src/components/suite/FiatValue.tsx | 8 +------- .../DeviceItem/WalletInstance.tsx | 19 ++++++------------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/packages/suite/src/components/suite/FiatValue.tsx b/packages/suite/src/components/suite/FiatValue.tsx index cf583242058..0b658d625a6 100644 --- a/packages/suite/src/components/suite/FiatValue.tsx +++ b/packages/suite/src/components/suite/FiatValue.tsx @@ -15,12 +15,6 @@ import { HiddenPlaceholder } from 'src/components/suite'; import { HiddenPlaceholderProps } from './HiddenPlaceholder'; -const StyledHiddenPlaceholder = styled((props: HiddenPlaceholderProps) => ( - -))` - font-variant-numeric: tabular-nums; -`; - // Do NOT use any prop from , its here just to fix types const SameWidthNums = styled.span` font-variant-numeric: tabular-nums; @@ -86,7 +80,7 @@ export const FiatValue = ({ const { FiatAmountFormatter } = useFormatters(); const value = shouldConvert ? fiatAmount : amount; - const WrapperComponent = disableHiddenPlaceholder ? SameWidthNums : StyledHiddenPlaceholder; + const WrapperComponent = disableHiddenPlaceholder ? SameWidthNums : HiddenPlaceholder; const isTokenKnown = useSelector(state => selectIsSpecificCoinDefinitionKnown(state, symbol, tokenAddress || ('' as TokenAddress)), diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/WalletInstance.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/WalletInstance.tsx index d28f2ed7204..cbc58c2192a 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/WalletInstance.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/WalletInstance.tsx @@ -11,12 +11,7 @@ import { Card, Icon, Tooltip, Row, Column, Text, Divider } from '@trezor/compone import { getAllAccounts, getTotalFiatBalance } from '@suite-common/wallet-utils'; import { spacings, negativeSpacings } from '@trezor/theme'; -import { - WalletLabeling, - Translation, - MetadataLabeling, - HiddenPlaceholder, -} from 'src/components/suite'; +import { WalletLabeling, Translation, MetadataLabeling } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { AcquiredDevice, ForegroundAppProps } from 'src/types/suite'; import { selectLabelingDataForWallet } from 'src/reducers/suite/metadataReducer'; @@ -163,13 +158,11 @@ export const WalletInstance = ({ - - - + {(isViewOnlyRendered ||