File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
packages/wallet-widget/src/components/Filter Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -56,9 +56,8 @@ export const CollectionsFilter = () => {
5656 < ListCardSelect
5757 key = { collection . contractAddress }
5858 isSelected = {
59- selectedCollections . find (
60- c => c . contractAddress === collection . contractAddress && c . chainId === collection . chainId
61- ) !== undefined
59+ selectedCollections . some ( c => c . contractAddress === collection . contractAddress && c . chainId === collection . chainId ) ||
60+ collections . length === 1
6261 }
6362 onClick = { collections . length > 1 ? ( ) => setSelectedCollections ( [ collection ] ) : undefined }
6463 >
Original file line number Diff line number Diff line change 1- import { formatAddress , getNetwork } from '@0xsequence/connect'
1+ import { formatAddress , getNetwork , useWallets } from '@0xsequence/connect'
22import { Text , TokenImage } from '@0xsequence/design-system'
33import { useGetTokenBalancesSummary } from '@0xsequence/hooks'
44import { ContractType } from '@0xsequence/indexer'
@@ -30,6 +30,7 @@ export const FilterMenu = ({
3030 type : 'tokens' | 'collectibles' | 'transactions'
3131 onClose : ( ) => void
3232} ) => {
33+ const { wallets } = useWallets ( )
3334 const { selectedWalletsObservable, selectedNetworksObservable, selectedCollectionsObservable } = useSettings ( )
3435 const selectedWallets = useObservable ( selectedWalletsObservable )
3536 const selectedNetworks = useObservable ( selectedNetworksObservable )
@@ -58,7 +59,7 @@ export const FilterMenu = ({
5859 } )
5960
6061 const walletsPreview =
61- selectedWallets . length > 1 ? (
62+ selectedWallets . length > 1 || wallets . length === 1 ? (
6263 < StackedIconTag
6364 iconList = { [ ] }
6465 label = {
You can’t perform that action at this time.
0 commit comments