Skip to content

Commit

Permalink
chore: revert changes to captionDotSeperator
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-watters committed Dec 15, 2023
1 parent 83e4ca1 commit 439bcf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/app/common/use-wallet-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useMemo } from 'react';
import { useHasLedgerKeys } from '@app/store/ledger/ledger.selectors';
import { useCurrentKeyDetails } from '@app/store/software-keys/software-key.selectors';

export enum WalletType {
enum WalletType {
Ledger = 'ledger',
Software = 'software',
}
Expand Down
13 changes: 2 additions & 11 deletions src/app/components/account/account-list-item-layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { ReactNode } from 'react';

import { SettingsSelectors } from '@tests/selectors/settings.selectors';
import { Box, Flex, HStack, Stack, StackProps, styled } from 'leather-styles/jsx';

import { WalletType, useWalletType } from '@app/common/use-wallet-type';
import { CheckmarkIcon } from '@app/ui/components/icons/checkmark-icon';
import { Spinner } from '@app/ui/components/spinner';
import { truncateMiddle } from '@app/ui/utils/truncate-middle';
Expand All @@ -23,11 +20,6 @@ interface AccountListItemLayoutProps extends StackProps {
onSelectAccount(): void;
}

function AddressWrapper({ walletType, children }: { walletType: WalletType; children: ReactNode }) {
if (walletType == WalletType.Ledger) return <>{children}</>;
return <CaptionDotSeparator>{children}</CaptionDotSeparator>;
}

export function AccountListItemLayout(props: AccountListItemLayoutProps) {
const {
index,
Expand All @@ -40,7 +32,6 @@ export function AccountListItemLayout(props: AccountListItemLayoutProps) {
children = null,
...rest
} = props;
const { walletType } = useWalletType();

return (
<Box mx={['space.05', 'space.06']}>
Expand Down Expand Up @@ -73,7 +64,7 @@ export function AccountListItemLayout(props: AccountListItemLayoutProps) {
)}
</HStack>
<HStack alignItems="center" gap="space.02" whiteSpace="nowrap">
<AddressWrapper walletType={walletType}>
<CaptionDotSeparator>
<StacksAccountLoader index={index}>
{account => (
<styled.span textStyle="caption.02">
Expand All @@ -89,7 +80,7 @@ export function AccountListItemLayout(props: AccountListItemLayoutProps) {
</styled.span>
)}
</BitcoinNativeSegwitAccountLoader>
</AddressWrapper>
</CaptionDotSeparator>
</HStack>
</Stack>
</Flag>
Expand Down

0 comments on commit 439bcf9

Please sign in to comment.