Skip to content

Commit

Permalink
chore(suite): reorganize coin control file structure to resemble comp…
Browse files Browse the repository at this point in the history
…onent structure
  • Loading branch information
komret committed Dec 18, 2024
1 parent 26879e4 commit a8a1b94
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { selectCurrentTargetAnonymity } from 'src/reducers/wallet/coinjoinReduce
import { selectLabelingDataForSelectedAccount } from 'src/reducers/suite/metadataReducer';
import { filterAndCategorizeUtxos } from 'src/utils/wallet/filterAndCategorizeUtxosUtils';

import { UtxoSelectionList } from './UtxoSelectionList';
import { UtxoSelectionList } from './UtxoSelectionList/UtxoSelectionList';
import { UtxoSearch } from './UtxoSearch';

const Header = styled.header`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { ReactNode } from 'react';
import styled from 'styled-components';
import { transparentize } from 'polished';

import { selectAccountTransactionsWithNulls } from '@suite-common/wallet-core';
import { selectAccountTransactions } from '@suite-common/wallet-core';
import { Icon, variables, IconName } from '@trezor/components';
import type { AccountUtxo } from '@trezor/connect';
import { CSSColor } from '@trezor/theme';

import { useSelector } from 'src/hooks/suite';
import { useSendFormContext } from 'src/hooks/wallet';

import { UtxoSelection } from './UtxoSelection';
import { UtxoSelection } from './UtxoSelection/UtxoSelection';

const Wrapper = styled.section`
border-bottom: 1px solid ${({ theme }) => theme.legacy.STROKE_GREY};
Expand Down Expand Up @@ -65,9 +65,7 @@ export const UtxoSelectionList = ({
}: UtxoSelectionListProps) => {
const { account } = useSendFormContext();

const accountTransactions = useSelector(state =>
selectAccountTransactionsWithNulls(state, account.key),
);
const accountTransactions = useSelector(state => selectAccountTransactions(state, account.key));

return (
<Wrapper>
Expand All @@ -89,7 +87,7 @@ export const UtxoSelectionList = ({
<UtxoSelection
key={`${utxo.txid}-${utxo.vout}`}
transaction={accountTransactions.find(
transaction => transaction?.txid === utxo.txid,
transaction => transaction.txid === utxo.txid,
)}
utxo={utxo}
/>
Expand Down

0 comments on commit a8a1b94

Please sign in to comment.