diff --git a/Projects/Governance/UI/Function-Libraries/Tokens.js b/Projects/Governance/UI/Function-Libraries/Tokens.js index 805f56807..f8fca3438 100644 --- a/Projects/Governance/UI/Function-Libraries/Tokens.js +++ b/Projects/Governance/UI/Function-Libraries/Tokens.js @@ -168,7 +168,7 @@ function newGovernanceFunctionLibraryTokens() { let status if (weight !== undefined && weight !== 0) { status = parseFloat(tokens.toFixed(2)).toLocaleString('en') - + ' ' + 'SA Tokens Reward' + ' - ' + 'Weight: ' + weight.toFixed(2) + + ' ' + 'SA Tokens Reward' + ' - ' + 'Weight: ' + (weight * 100).toFixed(2) + " %" } else { status = parseFloat(tokens.toFixed(2)).toLocaleString('en') + ' ' + 'SA Tokens Reward' diff --git a/Projects/Governance/UI/Function-Libraries/VotingProgram.js b/Projects/Governance/UI/Function-Libraries/VotingProgram.js index 52a40796e..fa8cfb53c 100644 --- a/Projects/Governance/UI/Function-Libraries/VotingProgram.js +++ b/Projects/Governance/UI/Function-Libraries/VotingProgram.js @@ -130,7 +130,7 @@ function newGovernanceFunctionLibraryVotingProgram() { function distributeProgram(programNode) { if (programNode.payload === undefined) { return } - + let votes = programNode.payload.votingProgram.votes programNode.payload.votingProgram.ownPower = votes distributeProgramPower(programNode, votes) @@ -270,7 +270,7 @@ function newGovernanceFunctionLibraryVotingProgram() { } function drawVotes(node, votes, percentage) { - votes = parseFloat(votes.toFixed(2)).toLocaleString('en') + ' ' + 'Voting Power' + if (node.payload !== undefined) { if (node.type === 'Voting Program') { @@ -304,8 +304,23 @@ function newGovernanceFunctionLibraryVotingProgram() { node.payload.uiObject.percentageAngleOffset = 180 node.payload.uiObject.percentageAtAngle = true } + let voteType = 'Voting Power' - node.payload.uiObject.setValue(votes) + if ( + node.type.indexOf('Weight') >= 0 || + node.type.indexOf('Pool') >= 0 || + node.type.indexOf('Feature') >= 0 || + node.type.indexOf('Asset') >= 0 + ) { + voteType = 'Weight Power' + } + + if (node.type.indexOf('Claim') >= 0) { + voteType = 'Claim Support Power' + } + + const votesText = parseFloat(votes.toFixed(2)).toLocaleString('en') + ' ' + voteType + node.payload.uiObject.setValue(votesText) if (percentage !== undefined) { node.payload.uiObject.setPercentage(percentage.toFixed(2))