diff --git a/Projects/Governance/UI/Function-Libraries/Votes.js b/Projects/Governance/UI/Function-Libraries/VotingProgram.js similarity index 97% rename from Projects/Governance/UI/Function-Libraries/Votes.js rename to Projects/Governance/UI/Function-Libraries/VotingProgram.js index 44b823711..baee81886 100644 --- a/Projects/Governance/UI/Function-Libraries/Votes.js +++ b/Projects/Governance/UI/Function-Libraries/VotingProgram.js @@ -266,14 +266,11 @@ function newGovernanceFunctionLibraryVotingProgram() { } function drawVotes(node, votes, percentage) { - votes = parseFloat(votes.toFixed(2)).toLocaleString('en') + ' ' + 'Votes' + votes = parseFloat(votes.toFixed(2)).toLocaleString('en') + ' ' + 'Voting Power' if (node.payload !== undefined) { if (node.type === 'Voting Program') { - node.payload.uiObject.statusAngleOffset = 0 - node.payload.uiObject.statusAtAngle = false - - node.payload.uiObject.setStatus("Votes = Tokens Power") + drawProgram(node) if (percentage !== undefined) { node.payload.uiObject.setPercentage(percentage.toFixed(2)) @@ -310,6 +307,18 @@ function newGovernanceFunctionLibraryVotingProgram() { node.payload.uiObject.setPercentage(percentage.toFixed(2)) } } + + function drawProgram(node) { + if (node.payload !== undefined) { + + const ownPowerText = parseFloat(node.payload.votingProgram.ownPower.toFixed(2)).toLocaleString('en') + + node.payload.uiObject.statusAngleOffset = 0 + node.payload.uiObject.statusAtAngle = false + + node.payload.uiObject.setStatus(ownPowerText + ' Voting Power') + } + } } }