Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix wrong DRep voting conditions #2526

Merged
merged 2 commits into from
Dec 16, 2024
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
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
Loading