Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
),
);

Expand Down