From 863f4b3dcb3dc63cbd47f7145b70f0b42be1f040 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 31 Oct 2021 12:49:34 +0100 Subject: [PATCH] Governance Bug Fixed with Reputation Calculation --- Projects/Governance/Plugins/Positions/Superalgos.json | 2 +- .../Governance/UI/Spaces/User-Profile-Space/UserProfile.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Projects/Governance/Plugins/Positions/Superalgos.json b/Projects/Governance/Plugins/Positions/Superalgos.json index e88bbac5f..41acf0c69 100644 --- a/Projects/Governance/Plugins/Positions/Superalgos.json +++ b/Projects/Governance/Plugins/Positions/Superalgos.json @@ -3271,7 +3271,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index c3c19f1cc..4f66b2f82 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -150,8 +150,12 @@ function newGovernanceUserProfileSpace() { if (transfer.from !== UI.projects.governance.globals.saToken.SA_TOKEN_BSC_TREASURY_ACCOUNT_ADDRESS) { continue } let currentReputation = Number(transfer.value) / UI.projects.governance.globals.saToken.SA_TOKEN_BSC_DECIMAL_FACTOR + if (transfer.to.toLowerCase() === '0x9F25cc5f3e70b907269CebbB45D812313b3e9143'.toLowerCase()) { + console.log('COZED') + } let previousReputation = reputationByAddress.get(transfer.to.toLowerCase()) - let newReputation = previousReputation | 0 + currentReputation + if (previousReputation === undefined) {previousReputation = 0} + let newReputation = previousReputation + currentReputation reputationByAddress.set(transfer.to.toLowerCase(), newReputation) } //console.log('[INFO] tokenTransfers = ' + JSON.stringify(tokenTransfers))