Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dyczka committed Oct 15, 2024
1 parent 9291a9b commit 023f419
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions govtool/backend/src/VVA/API.hs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ drepList mSearchQuery statuses mSortMode mPage mPageSize = do
dreps <- cacheRequest dRepListCache () DRep.listDReps

let filterDRepsByQuery = case mSearchQuery of
Nothing -> filter $ \Types.DRepRegistration {..} -> dRepRegistrationType == Types.DRep
Nothing -> id
Just query -> filter $ \Types.DRepRegistration {..} ->
case dRepRegistrationType of
Types.SoleVoter -> query == dRepRegistrationView || query == dRepRegistrationDRepHash
Expand Down Expand Up @@ -176,7 +176,7 @@ drepList mSearchQuery statuses mSortMode mPage mPageSize = do
let page = (fromIntegral $ fromMaybe 0 mPage) :: Int
pageSize = (fromIntegral $ fromMaybe 10 mPageSize) :: Int

total = length allValidDReps :: Int
total = length dreps :: Int

let elements = take pageSize $ drop (page * pageSize) allValidDReps

Expand Down

0 comments on commit 023f419

Please sign in to comment.