Skip to content

Commit

Permalink
remove userAssetsCount
Browse files Browse the repository at this point in the history
  • Loading branch information
benisgold committed Sep 17, 2024
1 parent 814f75c commit 57b4479
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/list/NoResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export enum NoResultsType {

export const NoResults = ({ onL2, type }: { onL2?: boolean; type: NoResultsType }) => {
const { colors } = useTheme();
const assetCount = useUserAssetsStore(state => state.userAssetsCount);
const assetCount = useUserAssetsStore(state => state.userAssets.size);

let title;
let description;
Expand Down
3 changes: 0 additions & 3 deletions src/state/assets/userAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export interface UserAssetsState {
userAssets: Map<UniqueId, ParsedSearchAsset>;
legacyUserAssets: ParsedAddressAsset[];
isLoadingUserAssets: boolean;
userAssetsCount: number;
getBalanceSortedChainList: () => ChainId[];
getChainsWithBalance: () => ChainId[];
getFilteredUserAssetIds: () => UniqueId[];
Expand Down Expand Up @@ -187,7 +186,6 @@ export const createUserAssetsStore = (address: Address | string) =>
userAssets: new Map(),
legacyUserAssets: [],
isLoadingUserAssets: false,
userAssetsCount: 0,

getBalanceSortedChainList: () => {
const chainBalances = [...get().chainBalances.entries()];
Expand Down Expand Up @@ -385,7 +383,6 @@ export const createUserAssetsStore = (address: Address | string) =>
legacyUserAssets,
searchCache,
userAssets: userAssetsMap,
userAssetsCount: userAssets.length,
};
}),
}),
Expand Down

0 comments on commit 57b4479

Please sign in to comment.