Skip to content

Commit

Permalink
Merge pull request #621 from IntersectMBO/603-ga-display-searching-fu…
Browse files Browse the repository at this point in the history
…ll-and-partial-search-of-ga-id-is-not-working

[#603] improve filter flexibility
  • Loading branch information
MSzalowski authored Apr 4, 2024
2 parents 012face + 35fd4ec commit 95dfcea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ changes.

### Changed

- `proposal/list` allows user to search by tx hash [Issue 603](https://github.com/IntersectMBO/govtool/issues/603)
- `proposal/list` returns additional data such ass `expiryEpochNo`, `createdEpochNo`, `title`, `about`, `motivation`,
`rationale`. `TreasuryWithdrawals` GAs also got nicely formated details. [Issue 372](https://github.com/IntersectMBO/govtool/issues/372)
- `drep/list` now return also `status` and `type` fields. Also it now returns the retired dreps, and you can search for given drep by name using optional query parameter. If the drep name is passed exactly, then you can even find a drep that's sole voter. [Issue 446](https://github.com/IntersectMBO/govtool/issues/446)
Expand Down
3 changes: 2 additions & 1 deletion govtool/backend/src/VVA/API.hs
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,12 @@ listProposals selectedTypes sortMode mPage mPageSize mDrepRaw mSearchQuery = do
about <- Text.toLower <$> proposalResponseAbout
motivation <- Text.toLower <$> proposalResponseMotivation
rationale <- Text.toLower <$> proposalResponseRationale

let govActionId = unHexText proposalResponseTxHash <> "#" <> Text.pack (show proposalResponseIndex)
let result = searchQuery `isInfixOf` title
|| searchQuery `isInfixOf` about
|| searchQuery `isInfixOf` motivation
|| searchQuery `isInfixOf` rationale
|| searchQuery `isInfixOf` govActionId

pure result

Expand Down

0 comments on commit 95dfcea

Please sign in to comment.