From 67460bc9e681cbcd8508d998371e2a0396442bee Mon Sep 17 00:00:00 2001 From: bosko-m <88723596+bosko-m@users.noreply.github.com> Date: Sat, 19 Jul 2025 23:13:24 +0200 Subject: [PATCH 1/2] Update Proposal.hs - making sure it does exact txhash match Signed-off-by: bosko-m <88723596+bosko-m@users.noreply.github.com> --- govtool/backend/src/VVA/Proposal.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/govtool/backend/src/VVA/Proposal.hs b/govtool/backend/src/VVA/Proposal.hs index 6c31a8016..4d61ec752 100644 --- a/govtool/backend/src/VVA/Proposal.hs +++ b/govtool/backend/src/VVA/Proposal.hs @@ -87,7 +87,7 @@ getProposals mSearchTerms = withPool $ \conn -> do , "%" <> searchParam <> "%" , "%" <> searchParam <> "%" , "%" <> searchParam <> "%" - , "%" <> searchParam <> "%" + , searchParam ) case result of Left (e :: SomeException) -> do @@ -125,4 +125,4 @@ getPreviousEnactedProposal proposalType = withPool $ \conn -> do liftIO $ putStrLn $ "[DEBUG] Previous enacted proposal details: " ++ show details Nothing -> liftIO $ putStrLn "[DEBUG] No previous enacted proposal found" - return proposal \ No newline at end of file + return proposal From 8d3502bdf8e184cdbcf29320a5b83acdc8e3879a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Sun, 20 Jul 2025 09:55:40 +0200 Subject: [PATCH 2/2] fix(3911): ensure exact match for proposal ID to prevent multiple results for txHash#index --- govtool/backend/sql/list-proposals.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/govtool/backend/sql/list-proposals.sql b/govtool/backend/sql/list-proposals.sql index dfb54e12d..c0779c6d8 100644 --- a/govtool/backend/sql/list-proposals.sql +++ b/govtool/backend/sql/list-proposals.sql @@ -346,7 +346,7 @@ WHERE off_chain_vote_gov_action_data.abstract ILIKE ? OR off_chain_vote_gov_action_data.motivation ILIKE ? OR off_chain_vote_gov_action_data.rationale ILIKE ? OR - concat(encode(creator_tx.hash, 'hex'), '#', gov_action_proposal.index) ILIKE ?) + concat(encode(creator_tx.hash, 'hex'), '#', gov_action_proposal.index) = ?) GROUP BY gov_action_proposal.id, creator_tx.hash,