Merge pull request #2406 from Luis-Fernando-Molina/develop

Contribution: Governance Bug Fixed with Reputation Calculation
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-10-31 07:49:57 -04:00
commit 9ddb80f3b2
2 files changed
+6 -2

No files matched your search

@@ -3271,7 +3271,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"isCollapsed": true,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -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))