BTC Baseline price implemented
This commit is contained in:
1 parent
4702ff93d5
commit
09ec038700
10 files changed
+338
-538
No files matched your search
@@ -1223,7 +1223,7 @@
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": true,
|
||||
"isCollapsed": false,
|
||||
"angleToParent": 2,
|
||||
"distanceToParent": 3,
|
||||
"arrangementStyle": 0
|
||||
@@ -1490,7 +1490,7 @@
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": true,
|
||||
"isCollapsed": false,
|
||||
"angleToParent": 1,
|
||||
"distanceToParent": 3,
|
||||
"arrangementStyle": 0
|
||||
@@ -1833,12 +1833,12 @@
|
||||
"id": "018f1bfc-c56a-4c25-8624-5822809449a2",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 25068.438021998492,
|
||||
"y": 30060.066503677146
|
||||
"x": 25162.29870102263,
|
||||
"y": 30052.679508034227
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 25115.368361510562,
|
||||
"y": 30356.373005855687
|
||||
"x": 25162.29870102263,
|
||||
"y": 30352.679508034227
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -1857,8 +1857,8 @@
|
||||
"id": "3c035245-67cc-4657-9c32-626ea88c0423",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 25115.368361510562,
|
||||
"y": 30356.373005855687
|
||||
"x": 25162.29870102263,
|
||||
"y": 30352.679508034227
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 25162.29870102263,
|
||||
@@ -1894,12 +1894,12 @@
|
||||
"id": "668d3f18-41dd-4c13-b057-a7916316c19a",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 25434.69300086636,
|
||||
"y": 30118.075593521207
|
||||
"x": 25586.56276973456,
|
||||
"y": 30228.4154393223
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 25298.495850944495,
|
||||
"y": 30385.377550777717
|
||||
"x": 25374.430735378595,
|
||||
"y": 30440.547473678263
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -1918,8 +1918,8 @@
|
||||
"id": "738ea920-0ca8-4e64-b460-0b2fc9b9f9e7",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 25298.495850944495,
|
||||
"y": 30385.377550777717
|
||||
"x": 25374.430735378595,
|
||||
"y": 30440.547473678263
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 25162.29870102263,
|
||||
@@ -1955,12 +1955,12 @@
|
||||
"id": "53e2bf54-b312-417a-9a32-ca6b21046a87",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 25696.90261553565,
|
||||
"y": 30380.2852081905
|
||||
"x": 25762.29870102263,
|
||||
"y": 30652.679508034227
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 25429.60065827914,
|
||||
"y": 30516.482358112364
|
||||
"x": 25462.29870102263,
|
||||
"y": 30652.679508034227
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
@@ -1979,70 +1979,9 @@
|
||||
"id": "e363d7d2-9c3b-49ce-aca4-f2f4c606f035",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 25429.60065827914,
|
||||
"y": 30516.482358112364
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 25162.29870102263,
|
||||
"x": 25462.29870102263,
|
||||
"y": 30652.679508034227
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": false,
|
||||
"angleToParent": 2,
|
||||
"distanceToParent": 3,
|
||||
"arrangementStyle": 0
|
||||
},
|
||||
"uiObject": {
|
||||
"isRunning": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Pool Class",
|
||||
"name": "CMC Top 500 Exchange SA Token Listing",
|
||||
"config": "{}",
|
||||
"project": "Governance",
|
||||
"poolClasses": [],
|
||||
"pools": [
|
||||
{
|
||||
"type": "Pool",
|
||||
"name": "For the Exchange and/or Facilitators",
|
||||
"config": "{}",
|
||||
"project": "Governance",
|
||||
"poolClasses": [],
|
||||
"pools": [],
|
||||
"id": "b3e92f4c-cf21-4e88-a331-cc07ead6a242",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 25754.911705379713,
|
||||
"y": 30746.540187058366
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 25458.605203201172,
|
||||
"y": 30699.609847546297
|
||||
},
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": false,
|
||||
"angleToParent": 2,
|
||||
"distanceToParent": 3,
|
||||
"arrangementStyle": 0
|
||||
},
|
||||
"uiObject": {
|
||||
"isRunning": false
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": "88e61906-b259-4dd4-b505-1692dbf17863",
|
||||
"savedPayload": {
|
||||
"position": {
|
||||
"x": 25458.605203201172,
|
||||
"y": 30699.609847546297
|
||||
},
|
||||
"targetPosition": {
|
||||
"x": 25162.29870102263,
|
||||
"y": 30652.679508034227
|
||||
@@ -2100,7 +2039,7 @@
|
||||
"floatingObject": {
|
||||
"isPinned": false,
|
||||
"isFrozen": false,
|
||||
"isCollapsed": true,
|
||||
"isCollapsed": false,
|
||||
"angleToParent": 1,
|
||||
"distanceToParent": 3,
|
||||
"arrangementStyle": 0
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -94,7 +94,7 @@ function newGovernanceFunctionLibraryClaimsProgram() {
|
||||
if (
|
||||
node.payload.votingProgram !== undefined &&
|
||||
node.payload.votingProgram.votes !== undefined
|
||||
) {
|
||||
) {
|
||||
node.payload.claimsProgram = {
|
||||
count: 0,
|
||||
votes: 0
|
||||
@@ -465,13 +465,14 @@ function newGovernanceFunctionLibraryClaimsProgram() {
|
||||
if (node.tokensAwarded !== undefined && node.tokensAwarded.payload !== undefined) {
|
||||
|
||||
const tokensAwardedText = parseFloat(node.payload.claimsProgram.awarded.tokens.toFixed(0)).toLocaleString('en')
|
||||
const tokensAwardedBTC = ' ≃ ' + UI.projects.governance.utilities.conversions.estimateSATokensInBTC(node.payload.claimsProgram.awarded.tokens | 0) + ' BTC'
|
||||
|
||||
node.tokensAwarded.payload.uiObject.valueAngleOffset = 0
|
||||
node.tokensAwarded.payload.uiObject.valueAtAngle = true
|
||||
node.tokensAwarded.payload.uiObject.statusAngleOffset = 0
|
||||
node.tokensAwarded.payload.uiObject.statusAtAngle = true
|
||||
|
||||
node.tokensAwarded.payload.uiObject.setValue(tokensAwardedText + ' SA Tokens')
|
||||
node.tokensAwarded.payload.uiObject.setValue(tokensAwardedText + ' SA Tokens' + tokensAwardedBTC)
|
||||
node.tokensAwarded.payload.uiObject.setStatus('From ' + node.payload.claimsProgram.count + ' Claims.')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,11 +189,12 @@ function newGovernanceFunctionLibraryGithubProgram() {
|
||||
if (node.tokensAwarded !== undefined && node.tokensAwarded.payload !== undefined) {
|
||||
|
||||
const tokensAwardedText = parseFloat(node.payload.githubProgram.awarded.tokens.toFixed(0)).toLocaleString('en')
|
||||
const tokensAwardedBTC = ' ≃ ' + UI.projects.governance.utilities.conversions.estimateSATokensInBTC(node.payload.githubProgram.awarded.tokens | 0) + ' BTC'
|
||||
|
||||
node.tokensAwarded.payload.uiObject.valueAngleOffset = 0
|
||||
node.tokensAwarded.payload.uiObject.valueAtAngle = false
|
||||
|
||||
node.tokensAwarded.payload.uiObject.setValue(tokensAwardedText + ' SA Tokens')
|
||||
node.tokensAwarded.payload.uiObject.setValue(tokensAwardedText + ' SA Tokens' + tokensAwardedBTC)
|
||||
|
||||
node.tokensAwarded.payload.uiObject.statusAngleOffset = 0
|
||||
node.tokensAwarded.payload.uiObject.statusAtAngle = false
|
||||
|
||||
@@ -162,11 +162,12 @@ function newGovernanceFunctionLibraryStakingProgram() {
|
||||
if (node.tokensAwarded !== undefined && node.tokensAwarded.payload !== undefined) {
|
||||
|
||||
const tokensAwardedText = parseFloat(node.payload.stakingProgram.awarded.tokens.toFixed(0)).toLocaleString('en')
|
||||
const tokensAwardedBTC = ' ≃ ' + UI.projects.governance.utilities.conversions.estimateSATokensInBTC(node.payload.stakingProgram.awarded.tokens | 0) + ' BTC'
|
||||
|
||||
node.tokensAwarded.payload.uiObject.valueAngleOffset = 0
|
||||
node.tokensAwarded.payload.uiObject.valueAtAngle = false
|
||||
|
||||
node.tokensAwarded.payload.uiObject.setValue(tokensAwardedText + ' SA Tokens')
|
||||
node.tokensAwarded.payload.uiObject.setValue(tokensAwardedText + ' SA Tokens' + tokensAwardedBTC)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,12 +149,13 @@ function newGovernanceFunctionLibraryTokenMining() {
|
||||
const awarded = parseFloat(userProfile.tokensMined.payload.tokensMined.awarded.toFixed(0)).toLocaleString('en')
|
||||
const bonus = parseFloat(userProfile.tokensMined.payload.tokensMined.bonus.toFixed(0)).toLocaleString('en')
|
||||
const total = parseFloat(userProfile.tokensMined.payload.tokensMined.total.toFixed(0)).toLocaleString('en')
|
||||
const tokensAwardedBTC = ' ≃ ' + UI.projects.governance.utilities.conversions.estimateSATokensInBTC(userProfile.tokensMined.payload.tokensMined.total | 0) + ' BTC'
|
||||
|
||||
userProfile.tokensMined.payload.uiObject.valueAngleOffset = 0
|
||||
userProfile.tokensMined.payload.uiObject.valueAtAngle = true
|
||||
|
||||
userProfile.tokensMined.payload.uiObject.setStatus(awarded + ' Awarded + ' + bonus + ' Bonus')
|
||||
userProfile.tokensMined.payload.uiObject.setValue(total + ' SA Tokens')
|
||||
userProfile.tokensMined.payload.uiObject.setValue(total + ' SA Tokens' + tokensAwardedBTC)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -168,16 +168,15 @@ function newGovernanceFunctionLibraryTokens() {
|
||||
tokens = tokens | 0
|
||||
let status
|
||||
if (weight !== undefined && weight !== 0) {
|
||||
status = tokens.toLocaleString('en')
|
||||
+ ' ' + 'SA Tokens Reward' + ' - ' + 'Weight: ' + (weight * 100).toFixed(2) + " %"
|
||||
|
||||
status = 'Reward: ' + tokens.toLocaleString('en')
|
||||
+ ' ' + 'SA' + ' ≃ ' + UI.projects.governance.utilities.conversions.estimateSATokensInBTC(tokens | 0) + ' BTC ' + ' + Weight: ' + (weight * 100).toFixed(2) + " %"
|
||||
node.payload.uiObject.statusAngleOffset = 0
|
||||
node.payload.uiObject.statusAtAngle = true
|
||||
|
||||
node.payload.uiObject.setStatus(status)
|
||||
} else {
|
||||
status = tokens.toLocaleString('en')
|
||||
+ ' ' + 'SA Tokens Reward'
|
||||
status = 'Reward: ' + tokens.toLocaleString('en')
|
||||
+ ' ' + 'SA' + ' ≃ ' + UI.projects.governance.utilities.conversions.estimateSATokensInBTC(tokens | 0) + ' BTC '
|
||||
|
||||
node.payload.uiObject.statusAngleOffset = 0
|
||||
node.payload.uiObject.statusAtAngle = false
|
||||
|
||||
@@ -146,11 +146,12 @@ function newGovernanceUtilitiesBonusProgram() {
|
||||
if (node.tokensBonus !== undefined && node.tokensBonus.payload !== undefined) {
|
||||
|
||||
const tokensBonusText = parseFloat(node.payload[programPropertyName].bonus.tokens.toFixed(0)).toLocaleString('en')
|
||||
const tokensAwardedBTC = ' ≃ ' + UI.projects.governance.utilities.conversions.estimateSATokensInBTC(node.payload[programPropertyName].bonus.tokens | 0) + ' BTC'
|
||||
|
||||
node.tokensBonus.payload.uiObject.valueAngleOffset = 0
|
||||
node.tokensBonus.payload.uiObject.valueAtAngle = true
|
||||
|
||||
node.tokensBonus.payload.uiObject.setValue(tokensBonusText + ' SA Tokens')
|
||||
node.tokensBonus.payload.uiObject.setValue(tokensBonusText + ' SA Tokens' + tokensAwardedBTC)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,6 @@ function newGovernanceUtilitiesConversions () {
|
||||
const SA_BTC_BASELINE_EXCHANGE_RATE = 1.5 / 1000000
|
||||
const BTC = SATokens * SA_BTC_BASELINE_EXCHANGE_RATE
|
||||
|
||||
return SATokens + ' SA ≃ ' + BTC.toFixed(8) + ' BTC'
|
||||
return BTC.toFixed(3)
|
||||
}
|
||||
}
|
||||
@@ -414,13 +414,14 @@ function newGovernanceUtilitiesDecendentProgram() {
|
||||
if (node.tokensAwarded !== undefined && node.tokensAwarded.payload !== undefined) {
|
||||
|
||||
const tokensAwardedText = parseFloat(node.payload[programPropertyName].awarded.tokens.toFixed(0)).toLocaleString('en')
|
||||
const tokensAwardedBTC = ' ≃ ' + UI.projects.governance.utilities.conversions.estimateSATokensInBTC(node.payload[programPropertyName].awarded.tokens | 0) + ' BTC'
|
||||
|
||||
node.tokensAwarded.payload.uiObject.statusAngleOffset = 0
|
||||
node.tokensAwarded.payload.uiObject.statusAtAngle = true
|
||||
node.tokensAwarded.payload.uiObject.valueAngleOffset = 0
|
||||
node.tokensAwarded.payload.uiObject.valueAtAngle = true
|
||||
|
||||
node.tokensAwarded.payload.uiObject.setValue(tokensAwardedText + ' SA Tokens')
|
||||
node.tokensAwarded.payload.uiObject.setValue(tokensAwardedText + ' SA Tokens' + tokensAwardedBTC)
|
||||
node.tokensAwarded.payload.uiObject.setStatus('From ' + node.payload[programPropertyName].count + ' Descendants.')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user