From 1d8c9e16a37f2703241df824f0913f6d39e4a2b7 Mon Sep 17 00:00:00 2001 From: wjrjerome Date: Thu, 5 Dec 2024 13:44:40 +1100 Subject: [PATCH] fix: revert FP random sort --- package-lock.json | 4 ++-- package.json | 2 +- src/app/api/getFinalityProviders.ts | 7 ------- .../Staking/FinalityProviders/FinalityProviders.tsx | 2 +- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 61d3665f..60278676 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "simple-staking", - "version": "0.3.13", + "version": "0.3.15", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "simple-staking", - "version": "0.3.13", + "version": "0.3.15", "dependencies": { "@babylonlabs-io/btc-staking-ts": "0.3.0", "@bitcoin-js/tiny-secp256k1-asmjs": "2.2.3", diff --git a/package.json b/package.json index 5318409a..804debc6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "simple-staking", - "version": "0.3.14", + "version": "0.3.15", "private": true, "scripts": { "dev": "next dev", diff --git a/src/app/api/getFinalityProviders.ts b/src/app/api/getFinalityProviders.ts index 77063881..cb5a803a 100644 --- a/src/app/api/getFinalityProviders.ts +++ b/src/app/api/getFinalityProviders.ts @@ -37,16 +37,9 @@ interface DescriptionAPI { export const getFinalityProviders = async ( key: string, - sort: string, ): Promise => { - // const limit = 100; - // const reverse = false; - const params = { pagination_key: encode(key), - sort, - // "pagination_reverse": reverse, - // "pagination_limit": limit, }; const response = await apiWrapper( diff --git a/src/app/components/Staking/FinalityProviders/FinalityProviders.tsx b/src/app/components/Staking/FinalityProviders/FinalityProviders.tsx index aac6009a..7794ef13 100644 --- a/src/app/components/Staking/FinalityProviders/FinalityProviders.tsx +++ b/src/app/components/Staking/FinalityProviders/FinalityProviders.tsx @@ -35,7 +35,7 @@ export const FinalityProviders: React.FC = ({ isRefetchError: isRefetchFinalityProvidersError, } = useInfiniteQuery({ queryKey: ["finality providers"], - queryFn: ({ pageParam = "" }) => getFinalityProviders(pageParam, "random"), + queryFn: ({ pageParam = "" }) => getFinalityProviders(pageParam), getNextPageParam: (lastPage) => lastPage?.pagination?.next_key !== "" ? lastPage?.pagination?.next_key