forked from iotaledger/firefly
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: require at least one answer (iotaledger#5718)
* fix: adjust logic to automatically abstain * fix: PR fixes --------- Co-authored-by: Tuditi <[email protected]> Co-authored-by: Mark Nardi <[email protected]>
- Loading branch information
1 parent
3d42057
commit b0b5a28
Showing
5 changed files
with
47 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/shared/lib/contexts/governance/utils/isProposalVotable.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ProposalStatus } from '../enums' | ||
|
||
export function isProposalVotable(status: ProposalStatus): boolean { | ||
switch (status) { | ||
case ProposalStatus.Commencing: | ||
case ProposalStatus.Holding: | ||
return true | ||
case ProposalStatus.Upcoming: | ||
case ProposalStatus.Ended: | ||
default: | ||
return false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters