diff --git a/CHANGELOG.md b/CHANGELOG.md index 25bb40f23..9c630fce7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ changes. ### Fixed +- Fix disappearing proposals in the governance actions list for the same tx hashes [Issue 3918](https://github.com/IntersectMBO/govtool/issues/3918) + ### Changed ### Removed diff --git a/govtool/frontend/src/components/organisms/DashboardGovernanceActions.tsx b/govtool/frontend/src/components/organisms/DashboardGovernanceActions.tsx index ccdf0b84c..c129179a9 100644 --- a/govtool/frontend/src/components/organisms/DashboardGovernanceActions.tsx +++ b/govtool/frontend/src/components/organisms/DashboardGovernanceActions.tsx @@ -88,8 +88,12 @@ export const DashboardGovernanceActions = () => { const prevFilters = usePrevious(queryFilters); const prevSorting = usePrevious(chosenSorting); - const stableFilters = isAdjusting ? prevFilters ?? queryFilters : queryFilters; - const stableSorting = isAdjusting ? prevSorting ?? chosenSorting : chosenSorting; + const stableFilters = isAdjusting + ? prevFilters ?? queryFilters + : queryFilters; + const stableSorting = isAdjusting + ? prevSorting ?? chosenSorting + : chosenSorting; const { proposals, isProposalsLoading } = useGetProposalsQuery({ filters: stableFilters, @@ -109,7 +113,9 @@ export const DashboardGovernanceActions = () => { const filteredActions = proposalCategory.actions.filter((action) => { const hasVote = votes?.some((voteCategory) => voteCategory.actions.some( - (voteAction) => voteAction.proposal.txHash === action.txHash, + (voteAction) => + voteAction.proposal.txHash === action.txHash && + voteAction.proposal.index === action.index, ), );