From 7af01f7b00993db0f36bc83adeaf83d99399a449 Mon Sep 17 00:00:00 2001 From: jeremy-babylonchain Date: Mon, 25 Nov 2024 17:59:38 +0800 Subject: [PATCH 1/2] add random order in fp --- src/app/api/getFinalityProviders.ts | 2 ++ .../components/Staking/FinalityProviders/FinalityProviders.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/api/getFinalityProviders.ts b/src/app/api/getFinalityProviders.ts index 6d444d4e..77063881 100644 --- a/src/app/api/getFinalityProviders.ts +++ b/src/app/api/getFinalityProviders.ts @@ -37,12 +37,14 @@ 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, }; diff --git a/src/app/components/Staking/FinalityProviders/FinalityProviders.tsx b/src/app/components/Staking/FinalityProviders/FinalityProviders.tsx index 7794ef13..aac6009a 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), + queryFn: ({ pageParam = "" }) => getFinalityProviders(pageParam, "random"), getNextPageParam: (lastPage) => lastPage?.pagination?.next_key !== "" ? lastPage?.pagination?.next_key From 089e2f1deaa3a04e6355775687b5ad36890e89c6 Mon Sep 17 00:00:00 2001 From: wjrjerome Date: Tue, 26 Nov 2024 12:07:37 +1100 Subject: [PATCH 2/2] bump version to 0.3.12 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d8aed12c..8470b686 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "simple-staking", - "version": "0.3.11", + "version": "0.3.12", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "simple-staking", - "version": "0.3.11", + "version": "0.3.12", "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 d737fba7..35aa0848 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "simple-staking", - "version": "0.3.11", + "version": "0.3.12", "private": true, "scripts": { "dev": "next dev",