diff --git a/Projects/Governance/Schemas/App-Schema/user-profile-vote.json b/Projects/Governance/Schemas/App-Schema/user-profile-vote.json index b5a2d135e..1d250710a 100644 --- a/Projects/Governance/Schemas/App-Schema/user-profile-vote.json +++ b/Projects/Governance/Schemas/App-Schema/user-profile-vote.json @@ -31,7 +31,7 @@ "addLeftIcons": true, "level": 2, "attachingRules": { - "compatibleTypes": "->Votes Switch->" + "compatibleTypes": "->User Profile Votes Switch->" }, "referencingRules": { "compatibleTypes": "->User Profile->" diff --git a/Projects/Governance/UI/Function-Libraries/VotingProgram.js b/Projects/Governance/UI/Function-Libraries/VotingProgram.js index 596ae1971..3c10e2a54 100644 --- a/Projects/Governance/UI/Function-Libraries/VotingProgram.js +++ b/Projects/Governance/UI/Function-Libraries/VotingProgram.js @@ -242,7 +242,7 @@ function newGovernanceFunctionLibraryVotingProgram() { votes / 10, undefined, generation + 1, - userProfile + node.payload.referenceParent ) } return @@ -337,7 +337,7 @@ function newGovernanceFunctionLibraryVotingProgram() { node.payload.uiObject.setErrorMessage( 'Voting Power Switching Error. Total Percentage of children nodes is grater that 100.', UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR - ) + ) return } let defaultPercentage = 0 @@ -410,7 +410,7 @@ function newGovernanceFunctionLibraryVotingProgram() { if (percentage !== undefined) { node.payload.uiObject.setPercentage(percentage.toFixed(2), - UI.projects.governance.globals.designer.SET_PERCENTAGE_COUNTER + UI.projects.governance.globals.designer.SET_PERCENTAGE_COUNTER ) } return @@ -466,7 +466,7 @@ function newGovernanceFunctionLibraryVotingProgram() { if (percentage !== undefined) { node.payload.uiObject.setPercentage(percentage.toFixed(2), - UI.projects.governance.globals.designer.SET_PERCENTAGE_COUNTER + UI.projects.governance.globals.designer.SET_PERCENTAGE_COUNTER ) } } @@ -486,7 +486,7 @@ function newGovernanceFunctionLibraryVotingProgram() { node.payload.uiObject.setPercentage(percentage, UI.projects.governance.globals.designer.SET_PERCENTAGE_COUNTER - ) + ) if (node.payload.referenceParent !== undefined) { node.payload.uiObject.statusAngleOffset = 0 @@ -522,7 +522,7 @@ function newGovernanceFunctionLibraryVotingProgram() { node.payload.uiObject.setErrorMessage( 'To install votes you need a Reference Parent', UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR - ) + ) return } scanNodeBranch(node, node.payload.referenceParent) diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index 315329d1b..38785729e 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -435,6 +435,7 @@ function newGovernanceUserProfileSpace() { ) userProfile.payload.blockchainTokens = Number(data.result) / 1000000000000000000 userProfile.payload.reputation = Math.min(reputationByAddress.get(blockchainAccount.toLowerCase()) | 0, userProfile.payload.blockchainTokens) + console.log('Reputation of ' + userProfile.name + ' is ' , userProfile.payload.reputation) } waitingForResponses-- }).catch(function (err) {