From af8ed40077fd2bc7f681e9630949e7cefcf0124f Mon Sep 17 00:00:00 2001 From: hodlonaut Date: Fri, 20 Jun 2025 16:02:47 +1000 Subject: [PATCH] Change default sort of pool search from 'score' to 'roa' to encourage better stake distribution across Cardano pools --- src/API/api.js | 2 +- src/components/SortSelect.js | 8 ++++---- src/containers/Home.js | 2 +- src/containers/HomeRevamp.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/API/api.js b/src/API/api.js index 45c13ce..aadfea4 100644 --- a/src/API/api.js +++ b/src/API/api.js @@ -125,7 +125,7 @@ const toPoolArray: (?{| [string]: Pool |}) => Array = (pools) => { export function getPools(body: SearchParams): Promise { const requestBody = { - ...{ search: '', sort: Sorting.SCORE, limit: 250 }, + ...{ search: '', sort: Sorting.ROA, limit: 250 }, ...body, }; diff --git a/src/components/SortSelect.js b/src/components/SortSelect.js index e46768a..6c1d11b 100644 --- a/src/components/SortSelect.js +++ b/src/components/SortSelect.js @@ -48,14 +48,14 @@ type Props = {| |}; export const sortingSelectData = [ - { label: 'Score', value: Sorting.SCORE }, // default option on load + { label: 'ROA', value: Sorting.ROA }, // default option on load { label: 'Ticker and name', value: Sorting.TICKER }, ]; export const sortingSelectDataRevamp = [ - { label: 'Score', value: Sorting.SCORE }, // default option on load + { label: 'ROA', value: Sorting.ROA }, // default option on load + { label: 'Score', value: Sorting.SCORE }, { label: 'Ticker and name', value: Sorting.TICKER }, - { label: 'ROA', value: Sorting.ROA }, { label: 'Pool size', value: Sorting.POOL_SIZE }, { label: 'Saturation', value: Sorting.SATURATION }, { label: 'Costs', value: Sorting.COSTS }, @@ -64,7 +64,7 @@ export const sortingSelectDataRevamp = [ ]; function SortSelect({ filter, isRevamp = true, isDark }: Props): React$Node { - const [selectValue, setSelectValue] = React.useState('score'); + const [selectValue, setSelectValue] = React.useState('roa'); const handleChange = (e) => { setSelectValue(e.currentTarget.value); diff --git a/src/containers/Home.js b/src/containers/Home.js index 56166c8..44744ea 100644 --- a/src/containers/Home.js +++ b/src/containers/Home.js @@ -100,7 +100,7 @@ function Home(props: HomeProps): Node { const [status, setStatus] = React.useState('idle'); const [filterOptions, setFilterOptions] = React.useState({ search: '', - sort: 'score', + sort: 'roa', }); const [openModal, setOpenModal] = React.useState(false); const [confirmDelegationModal, setConfirmDelegationModal] = React.useState(false); diff --git a/src/containers/HomeRevamp.js b/src/containers/HomeRevamp.js index a3cceea..36e2954 100644 --- a/src/containers/HomeRevamp.js +++ b/src/containers/HomeRevamp.js @@ -155,7 +155,7 @@ function Home(props: HomeProps): Node { const [status, setStatus] = React.useState('idle'); const [filterOptions, setFilterOptions] = React.useState({ search: '', - sort: Sorting.SCORE, + sort: Sorting.ROA, sortDirection: SortingDirections.ASC, }); const [openModal, setOpenModal] = React.useState(false);