diff --git a/components/items/ItemsGrid/useNftActions.ts b/components/items/ItemsGrid/useNftActions.ts index f0338eeffa..b665480167 100644 --- a/components/items/ItemsGrid/useNftActions.ts +++ b/components/items/ItemsGrid/useNftActions.ts @@ -27,26 +27,19 @@ export const fetchNft = async (nftId: string): Promise => { export const prepareListingQuery = ( entities: TokenEntity[], - isThereAnythingToList: boolean, ) => { const { accountId } = useAuth() - - const tokenSearchTerm = { id_in: entities.map(n => n.id) } - const variables = { first: 10000, // some large number search: [ { - token: tokenSearchTerm, + token: { id_in: entities.map(n => n.id) }, currentOwner_eq: accountId.value, burned_eq: false, }, ], } - const searchKey = isThereAnythingToList ? 'price_eq' : 'price_gt' - variables.search[0][searchKey] = '0' - return { query: nftListWithSearch, variables, @@ -74,10 +67,7 @@ const getCachedAndMissingEntities = ( const fetchMissingEntities = async ( missingEntities: TokenEntity[], ): Promise => { - const { query, variables } = prepareListingQuery( - missingEntities, - await checkIfAnythingToList(missingEntities), - ) + const { query, variables } = prepareListingQuery(missingEntities) const { client } = usePrefix() const { data } = await useAsyncQuery<{ nFTEntities: NFTWitToken[] }>({