Skip to content

Commit

Permalink
fix: allow authors to bypass proposal validation
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Nov 30, 2024
1 parent 0bb9121 commit 98ce6f9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/ui/src/stores/votingPowers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ function isSpace(item: SpaceDetails | Proposal): item is Space {
return 'proposal_threshold' in item;
}

function isSpaceTeamMember(space: Space, account: string): boolean {
function isSpaceMember(space: Space, account: string): boolean {
return [
...(space.additionalRawData?.admins || []),
...(space.additionalRawData?.moderators || [])
...(space.additionalRawData?.moderators || []),
...(space.additionalRawData?.members || [])
]
.filter(Boolean)
.some(member => compareAddresses(member, account));
Expand Down Expand Up @@ -115,7 +116,7 @@ export const useVotingPowersStore = defineStore('votingPowers', () => {

vpItem.canPropose =
totalProposeVp >= BigInt(item.proposal_threshold) ||
isSpaceTeamMember(space as Space, account);
isSpaceMember(space as Space, account);
} else {
vpItem.canVote = vpItem.totalVotingPower > 0n;
}
Expand Down

0 comments on commit 98ce6f9

Please sign in to comment.