Skip to content

Commit

Permalink
Merge pull request #2529 from IntersectMBO/staging
Browse files Browse the repository at this point in the history
fix: fix wrong DRep voting conditions
  • Loading branch information
MSzalowski authored Dec 16, 2024
2 parents 042caa0 + 81b3b7c commit b5ac058
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ changes.
- Fix scaling gov action votes on lower resolutions
- Fix storing url missing length validation [Issue 2044](https://github.com/IntersectMBO/govtool/issues/2044)
- Fix governance action details page crash on missing data [Issue 2511](https://github.com/IntersectMBO/govtool/issues/2511)
- Fix wrong voting conditions for drep

### Changed

Expand Down
4 changes: 2 additions & 2 deletions govtool/frontend/src/context/featureFlag.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe("FeatureFlagProvider", () => {
).toBe(true);
});

it("should hide DRep vote totals for MotionNoConfidence in full governance", () => {
it("should show DRep vote totals for MotionNoConfidence in full governance", () => {
mockUseAppContext.mockReturnValue({
...mockUseAppContextReturnValue,
isAppInitializing: false,
Expand All @@ -140,7 +140,7 @@ describe("FeatureFlagProvider", () => {
result.current.areDRepVoteTotalsDisplayed(
GovernanceActionType.NoConfidence,
),
).toBe(false);
).toBe(true);
});
});

Expand Down
10 changes: 2 additions & 8 deletions govtool/frontend/src/context/featureFlag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,10 @@ const FeatureFlagProvider = ({ children }: PropsWithChildren) => {
!isSecurityGroup)
);
}
if (isFullGovernance) {
return ![
GovernanceActionType.NoConfidence,
GovernanceActionType.NewCommittee,
GovernanceActionType.NewConstitution,
].includes(governanceActionType);
}

return true;
},
[isAppInitializing, isInBootstrapPhase, isFullGovernance],
[isAppInitializing, isInBootstrapPhase],
);

/**
Expand Down

0 comments on commit b5ac058

Please sign in to comment.