Governance more votes

This commit is contained in:
Luis Fernando Molina committed 2021-07-28 17:03:50 +02:00
1 parent cd6a74b2ee
commit 4702ff93d5
4 files changed
+30 -2

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
function newGovernanceGlobalsReports() {
let thisObject = {
REPORTS_SPACE_WIDTH: 1250
REPORTS_SPACE_WIDTH: 1350
}
return thisObject
}
@@ -37,7 +37,15 @@ function newGovernanceUtilitiesCommonTables() {
"type": "number",
"order": "descending",
"textAlign": "center",
"format": "2 decimals"
"format": "integer"
},
{
"name": "rewardInBTC",
"label": "Reward In BTC",
"type": "number",
"order": "descending",
"textAlign": "center",
"format": "8 decimals"
},
{
"name": "weight",
@@ -84,6 +92,7 @@ function newGovernanceUtilitiesCommonTables() {
let tableRecord = {
"name": name,
"tokensReward": node.payload.tokens | 0,
"rewardInBTC": UI.projects.governance.utilities.conversions.estimateSATokensInBTC(node.payload.tokens | 0),
"weight": node.payload.weight,
"weightPower": node.payload.votingProgram.votes
}
@@ -0,0 +1,14 @@
function newGovernanceUtilitiesConversions () {
let thisObject = {
estimateSATokensInBTC: estimateSATokensInBTC
}
return thisObject
function estimateSATokensInBTC(SATokens) {
const SA_BTC_BASELINE_EXCHANGE_RATE = 1.5 / 1000000
const BTC = SATokens * SA_BTC_BASELINE_EXCHANGE_RATE
return SATokens + ' SA ≃ ' + BTC.toFixed(8) + ' BTC'
}
}
+5
View File
@@ -1098,6 +1098,11 @@
"name": "Filters",
"propertyName": "filters",
"functionName": "newGovernanceUtilitiesFilters"
},
{
"name": "Conversions",
"propertyName": "conversions",
"functionName": "newGovernanceUtilitiesConversions"
}
],
"spaces": [