From 23ce8d7f4cda360db4b6121febe87e4640b50bf9 Mon Sep 17 00:00:00 2001
From: "kwrobel.eth" <djstrong@gmail.com>
Date: Mon, 20 Jan 2025 13:12:36 +0100
Subject: [PATCH] Set fetchCollectionMembers limit (#555)

* Set fetchCollectionMembers limit

* larger height

* max-h?

* feat: [SC-26100] :recycle: Remove automatic seed generation from NameGraph SDK

* fix: :bug: Update Ui rendering in Collection Details page for collection names box size

* Add changeset

---------

Co-authored-by: FrancoAguzzi <frankind.eth@gmail.com>
Co-authored-by: lightwalker.eth <126201998+lightwalker-eth@users.noreply.github.com>
---
 .changeset/long-ties-wonder.md                              | 5 +++++
 .../app/collections/[id]/explore-collection-page.tsx        | 3 ++-
 packages/namegraph-sdk/src/index.ts                         | 6 ++----
 3 files changed, 9 insertions(+), 5 deletions(-)
 create mode 100644 .changeset/long-ties-wonder.md

diff --git a/.changeset/long-ties-wonder.md b/.changeset/long-ties-wonder.md
new file mode 100644
index 000000000..8c70c021b
--- /dev/null
+++ b/.changeset/long-ties-wonder.md
@@ -0,0 +1,5 @@
+---
+"@namehash/namegraph-sdk": patch
+---
+
+default seed for scrambleCollectionTokens
diff --git a/apps/namegraph.dev/app/collections/[id]/explore-collection-page.tsx b/apps/namegraph.dev/app/collections/[id]/explore-collection-page.tsx
index 1f33ffe8e..f589f78c9 100644
--- a/apps/namegraph.dev/app/collections/[id]/explore-collection-page.tsx
+++ b/apps/namegraph.dev/app/collections/[id]/explore-collection-page.tsx
@@ -114,6 +114,7 @@ export const ExploreCollectionPage = ({ id }: { id: string }) => {
     setLoadingCollectionMembers(true);
     fetchCollectionMembers(id, {
       offset: (params.page - 1) * navigationConfig.itemsPerPage,
+      limit: navigationConfig.itemsPerPage,
     })
       .then((res) => {
         if (res) {
@@ -313,7 +314,7 @@ export const ExploreCollectionPage = ({ id }: { id: string }) => {
                     <div className="w-full">
                       <div className="w-full mb-8">
                         <div className="w-full flex flex-col space-y-4 p-3 rounded-xl border border-gray-200">
-                          <div className="w-full h-[517px] flex flex-col justify-start">
+                          <div className="w-full h-[877px] flex flex-col justify-start">
                             <div className="h-full">
                               {/* Collection Count and Sort */}
                               <div className="max-w-[756px] w-full flex flex-col md:flex-row md:items-center md:justify-between space-y-4 md:space-y-0 mb-5">
diff --git a/packages/namegraph-sdk/src/index.ts b/packages/namegraph-sdk/src/index.ts
index 69af50b1b..406aec9af 100644
--- a/packages/namegraph-sdk/src/index.ts
+++ b/packages/namegraph-sdk/src/index.ts
@@ -119,8 +119,7 @@ export class NameGraph {
     },
   ): Promise<NameGraphSuggestion[]> {
     const max_sample_size = 5;
-    const random_seed = Number(Number(Math.random() * 10).toFixed(0));
-    const seed = options?.seed || random_seed;
+    const seed = options?.seed;
 
     const payload = {
       collection_id,
@@ -158,8 +157,7 @@ export class NameGraph {
     const method = options?.method || default_method;
     const n_top_members = 25;
     const max_suggestions = 10;
-    const random_seed = Number(Number(Math.random() * 10).toFixed(0));
-    const seed = options?.seed || random_seed;
+    const seed = options?.seed;
 
     const payload = {
       collection_id,