Voting own claims validation implemented
This commit is contained in:
1 parent
0f5520060a
commit
4d5690bcd6
3 files changed
+246
-53
No files matched your search
@@ -273,6 +273,15 @@ function newGovernanceFunctionLibraryVotingProgram() {
|
||||
node.type !== 'Weight Votes Switch'
|
||||
) {
|
||||
currentProgramNode.payload.votingProgram.usedPower = currentProgramNode.payload.votingProgram.usedPower + votes
|
||||
/*
|
||||
Here we will validate that users can not vote for their own claims.
|
||||
*/
|
||||
let votedUserProfile = UI.projects.visualScripting.utilities.hierarchy.getHiriarchyHead(node.payload.referenceParent)
|
||||
if (votedUserProfile.id === userProfile.id) {
|
||||
node.payload.uiObject.setErrorMessage('Voting your own claims is not allowed.')
|
||||
return
|
||||
}
|
||||
|
||||
distributeProgramPower(
|
||||
currentProgramNode,
|
||||
node.payload.referenceParent,
|
||||
|
||||
Reference in new issue
Block a user