From d5e0db2a2a05fe1bb3572ab14f07a43287b44505 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 22 Jun 2021 12:51:30 +0200 Subject: [PATCH] Claims Bug Fixed --- .../User-Profiles/Luis-Fernando-Molina.json | 427 +++++++++++------- .../App-Schema/governance-project.json | 2 +- .../UI/Function-Libraries/Claims.js | 37 +- 3 files changed, 284 insertions(+), 182 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index dcc0e90e8..ce213c04b 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -549,7 +549,72 @@ "config": "{}", "project": "Governance", "votesSwitch": [], - "claimVotesSwitch": [], + "claimVotesSwitch": [ + { + "type": "Claim Votes Switch", + "name": "New Claim Votes Switch", + "config": "{}", + "project": "Governance", + "claimVotesSwitch": [], + "positionClaimVotes": [], + "assetClaimVotes": [], + "featureClaimVotes": [ + { + "type": "Feature Claim Vote", + "name": "Luis-Fernando-Molina Feature X Data Mining", + "config": "{}", + "project": "Governance", + "id": "4381f059-44c8-4843-9cac-8a7cf41fa14c", + "savedPayload": { + "position": { + "x": 29291.212129593012, + "y": 23941.616203036338 + }, + "targetPosition": { + "x": 29511.12769114196, + "y": 23737.564381705062 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": {}, + "referenceParent": { + "type": "Feature Contribution Claim", + "name": "Feature X Data Mining", + "id": "edf1a5c9-7802-4856-918c-3cd5a7a9caf7" + } + } + } + ], + "id": "d69739f9-958e-480e-95e3-a72bb5f6ceab", + "savedPayload": { + "position": { + "x": 29511.12769114196, + "y": 23737.564381705062 + }, + "targetPosition": { + "x": 29731.043252690906, + "y": 23533.512560373787 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], "weightVotesSwitch": [ { "type": "Weight Votes Switch", @@ -584,12 +649,12 @@ "id": "fa27ae9a-2aaa-4b77-a865-f42c4b1e3cde", "savedPayload": { "position": { - "x": 29387.672339067136, - "y": 24450.227157469242 + "x": 28975.318020024322, + "y": 24155.72523266658 }, "targetPosition": { - "x": 29167.75677751819, - "y": 24246.175336137967 + "x": 28886.89146770105, + "y": 23869.053390930738 }, "floatingObject": { "isPinned": false, @@ -615,12 +680,12 @@ "id": "6d9d9712-7a90-4dac-bdcb-1c62c2656155", "savedPayload": { "position": { - "x": 29101.000497331293, - "y": 24538.653709792514 + "x": 28682.839646369775, + "y": 24088.968952479685 }, "targetPosition": { - "x": 29167.75677751819, - "y": 24246.175336137967 + "x": 28886.89146770105, + "y": 23869.053390930738 }, "floatingObject": { "isPinned": false, @@ -645,12 +710,12 @@ "id": "128afaa5-16bb-4d08-9f49-abfc954f2b58", "savedPayload": { "position": { - "x": 29167.75677751819, - "y": 24246.175336137967 + "x": 28886.89146770105, + "y": 23869.053390930738 }, "targetPosition": { - "x": 29079.330225194917, - "y": 23959.503494402124 + "x": 28953.647747887946, + "y": 23576.57501727619 }, "floatingObject": { "isPinned": false, @@ -685,12 +750,12 @@ "id": "1fa92d72-8c7c-4595-90f0-83b72cff9dd8", "savedPayload": { "position": { - "x": 28671.226582532367, - "y": 24399.33461750002 + "x": 28380.30406441626, + "y": 23753.428121922734 }, "targetPosition": { - "x": 28875.278403863642, - "y": 24179.41905595107 + "x": 28666.975906152104, + "y": 23665.001569599463 }, "floatingObject": { "isPinned": false, @@ -715,12 +780,12 @@ "id": "8a915b0f-36c1-4019-b006-02c4a5d47079", "savedPayload": { "position": { - "x": 28875.278403863642, - "y": 24179.41905595107 + "x": 28666.975906152104, + "y": 23665.001569599463 }, "targetPosition": { - "x": 29079.330225194917, - "y": 23959.503494402124 + "x": 28953.647747887946, + "y": 23576.57501727619 }, "floatingObject": { "isPinned": false, @@ -748,12 +813,12 @@ "id": "b313f748-da26-4c50-8ba1-36fff49f3a0f", "savedPayload": { "position": { - "x": 29079.330225194917, - "y": 23959.503494402124 + "x": 28953.647747887946, + "y": 23576.57501727619 }, "targetPosition": { - "x": 29146.086505381812, - "y": 23667.025120747578 + "x": 29157.69956921922, + "y": 23356.659455727244 }, "floatingObject": { "isPinned": false, @@ -794,12 +859,12 @@ "id": "a32cb176-83c0-4800-b630-01f1df6d2301", "savedPayload": { "position": { - "x": 29227.178352395596, - "y": 24386.735169013577 + "x": 28868.072144639955, + "y": 24020.492564391414 }, "targetPosition": { - "x": 28992.628907655188, - "y": 24199.688228455958 + "x": 28758.469837330038, + "y": 23741.230439798153 }, "floatingObject": { "isPinned": false, @@ -825,12 +890,12 @@ "id": "33a03a57-6811-4cad-94af-14a0597e9fb3", "savedPayload": { "position": { - "x": 29026.21825048618, - "y": 24497.80189142393 + "x": 28638.502230034115, + "y": 24016.199116559146 }, "targetPosition": { - "x": 28992.628907655188, - "y": 24199.688228455958 + "x": 28758.469837330038, + "y": 23741.230439798153 }, "floatingObject": { "isPinned": false, @@ -856,12 +921,12 @@ "id": "b820443f-890c-4401-bead-82e4617943b0", "savedPayload": { "position": { - "x": 28805.58196709757, - "y": 24434.237673196367 + "x": 28479.207712736777, + "y": 23850.83274710807 }, "targetPosition": { - "x": 28992.628907655188, - "y": 24199.688228455958 + "x": 28758.469837330038, + "y": 23741.230439798153 }, "floatingObject": { "isPinned": false, @@ -886,12 +951,12 @@ "id": "c8894826-483a-4c6d-92e7-8190ea952717", "savedPayload": { "position": { - "x": 28992.628907655188, - "y": 24199.688228455958 + "x": 28758.469837330038, + "y": 23741.230439798153 }, "targetPosition": { - "x": 28959.039564824194, - "y": 23901.574565487987 + "x": 28878.43744462596, + "y": 23466.26176303716 }, "floatingObject": { "isPinned": false, @@ -926,12 +991,12 @@ "id": "cb05c8ff-235b-4b97-9c41-d3cbee5d797d", "savedPayload": { "position": { - "x": 28584.945683708956, - "y": 24370.673454968804 + "x": 28319.91319543944, + "y": 23685.466377656994 }, "targetPosition": { - "x": 28771.992624266575, - "y": 24136.124010228395 + "x": 28599.1753200327, + "y": 23575.864070347077 }, "floatingObject": { "isPinned": false, @@ -956,12 +1021,12 @@ "id": "307ed30b-fbb2-49c8-ad8a-7e45d9fd8815", "savedPayload": { "position": { - "x": 28771.992624266575, - "y": 24136.124010228395 + "x": 28599.1753200327, + "y": 23575.864070347077 }, "targetPosition": { - "x": 28959.039564824194, - "y": 23901.574565487987 + "x": 28878.43744462596, + "y": 23466.26176303716 }, "floatingObject": { "isPinned": false, @@ -996,12 +1061,12 @@ "id": "40d246e2-1cd8-4e8e-a9d9-33a3256f1f75", "savedPayload": { "position": { - "x": 28362.81223888825, - "y": 23968.753251149974 + "x": 28328.500091103975, + "y": 23226.326548445315 }, "targetPosition": { - "x": 28660.925901856222, - "y": 23935.16390831898 + "x": 28603.468767864968, + "y": 23346.294155741238 }, "floatingObject": { "isPinned": false, @@ -1026,12 +1091,12 @@ "id": "021a8f3b-eccc-4cce-9884-f3b51d7470d8", "savedPayload": { "position": { - "x": 28660.925901856222, - "y": 23935.16390831898 + "x": 28603.468767864968, + "y": 23346.294155741238 }, "targetPosition": { - "x": 28959.039564824194, - "y": 23901.574565487987 + "x": 28878.43744462596, + "y": 23466.26176303716 }, "floatingObject": { "isPinned": false, @@ -1059,12 +1124,12 @@ "id": "8a321cf8-2b35-4c65-80fc-6474597c9a4e", "savedPayload": { "position": { - "x": 28959.039564824194, - "y": 23901.574565487987 + "x": 28878.43744462596, + "y": 23466.26176303716 }, "targetPosition": { - "x": 29146.086505381812, - "y": 23667.025120747578 + "x": 29157.69956921922, + "y": 23356.659455727244 }, "floatingObject": { "isPinned": false, @@ -1111,12 +1176,12 @@ "id": "0d922c8d-d7fe-4ee1-a842-bc09b07f5a39", "savedPayload": { "position": { - "x": 28913.22967107475, - "y": 24538.202894296737 + "x": 28520.450748489904, + "y": 23994.69312167965 }, "targetPosition": { - "x": 28684.38079951607, - "y": 24344.223013931998 + "x": 28419.251752275053, + "y": 23712.27718168138 }, "floatingObject": { "isPinned": false, @@ -1142,12 +1207,12 @@ "id": "096f39eb-d93d-48a0-a66a-818fdfc36236", "savedPayload": { "position": { - "x": 28755.504912830722, - "y": 24635.67002541986 + "x": 28335.123535483253, + "y": 24000.239754144248 }, "targetPosition": { - "x": 28684.38079951607, - "y": 24344.223013931998 + "x": 28419.251752275053, + "y": 23712.27718168138 }, "floatingObject": { "isPinned": false, @@ -1173,12 +1238,12 @@ "id": "1cf165ee-f898-43bc-9601-9158cd23b651", "savedPayload": { "position": { - "x": 28570.613160720193, - "y": 24621.814304074196 + "x": 28181.93044187815, + "y": 23895.794471415884 }, "targetPosition": { - "x": 28684.38079951607, - "y": 24344.223013931998 + "x": 28419.251752275053, + "y": 23712.27718168138 }, "floatingObject": { "isPinned": false, @@ -1204,12 +1269,12 @@ "id": "594d2230-1402-4ed3-8d36-7ef134db9e68", "savedPayload": { "position": { - "x": 28429.17677980987, - "y": 24501.92814487515 + "x": 28119.386022590003, + "y": 23721.2518215322 }, "targetPosition": { - "x": 28684.38079951607, - "y": 24344.223013931998 + "x": 28419.251752275053, + "y": 23712.27718168138 }, "floatingObject": { "isPinned": false, @@ -1234,12 +1299,12 @@ "id": "6e843832-f035-4bf5-a533-e7c24241d5da", "savedPayload": { "position": { - "x": 28684.38079951607, - "y": 24344.223013931998 + "x": 28419.251752275053, + "y": 23712.27718168138 }, "targetPosition": { - "x": 28706.799827592, - "y": 24045.061874777643 + "x": 28588.24776969414, + "y": 23464.40554938658 }, "floatingObject": { "isPinned": false, @@ -1274,12 +1339,12 @@ "id": "c9c48c3d-05e2-4620-841e-9326df488b8f", "savedPayload": { "position": { - "x": 28337.425448634724, - "y": 24458.39199560542 + "x": 28061.695113596146, + "y": 23637.67274469409 }, "targetPosition": { - "x": 28436.509167221273, - "y": 24175.22699651291 + "x": 28289.086630539783, + "y": 23441.986521310653 }, "floatingObject": { "isPinned": false, @@ -1305,12 +1370,12 @@ "id": "6da35c2d-089c-4406-ba0d-f899e680ed29", "savedPayload": { "position": { - "x": 28166.218506850546, - "y": 24305.392118248175 + "x": 27989.925491385427, + "y": 23419.567493234725 }, "targetPosition": { - "x": 28436.509167221273, - "y": 24175.22699651291 + "x": 28289.086630539783, + "y": 23441.986521310653 }, "floatingObject": { "isPinned": false, @@ -1336,12 +1401,12 @@ "id": "3a6da240-0f49-466d-88f9-6ea746d34c55", "savedPayload": { "position": { - "x": 28153.344168128762, - "y": 24076.14327792636 + "x": 28093.400407156347, + "y": 23214.595004367016 }, "targetPosition": { - "x": 28436.509167221273, - "y": 24175.22699651291 + "x": 28289.086630539783, + "y": 23441.986521310653 }, "floatingObject": { "isPinned": false, @@ -1366,12 +1431,12 @@ "id": "b20ba922-208b-4aa8-8a57-270a54a39806", "savedPayload": { "position": { - "x": 28436.509167221273, - "y": 24175.22699651291 + "x": 28289.086630539783, + "y": 23441.986521310653 }, "targetPosition": { - "x": 28706.799827592, - "y": 24045.061874777643 + "x": 28588.24776969414, + "y": 23464.40554938658 }, "floatingObject": { "isPinned": false, @@ -1399,12 +1464,12 @@ "id": "4827d415-f407-47f3-b389-d6429c676250", "savedPayload": { "position": { - "x": 28706.799827592, - "y": 24045.061874777643 + "x": 28588.24776969414, + "y": 23464.40554938658 }, "targetPosition": { - "x": 28875.795845011085, - "y": 23797.190242482844 + "x": 28858.538430064866, + "y": 23334.240427651315 }, "floatingObject": { "isPinned": false, @@ -1439,12 +1504,12 @@ "id": "f28026a2-7299-45c3-9f42-e0a64311e114", "savedPayload": { "position": { - "x": 28306.344045486003, - "y": 23904.936336142182 + "x": 28311.50565861571, + "y": 23142.8253821563 }, "targetPosition": { - "x": 28576.63470585673, - "y": 23774.771214406916 + "x": 28610.666797770067, + "y": 23165.24441023223 }, "floatingObject": { "isPinned": false, @@ -1470,12 +1535,12 @@ "id": "57196823-651b-4285-bf18-a4bbd9fa3066", "savedPayload": { "position": { - "x": 28328.76307356193, - "y": 23605.77519698783 + "x": 28480.5016760348, + "y": 22894.953749861503 }, "targetPosition": { - "x": 28576.63470585673, - "y": 23774.771214406916 + "x": 28610.666797770067, + "y": 23165.24441023223 }, "floatingObject": { "isPinned": false, @@ -1500,12 +1565,12 @@ "id": "2fb14c74-e3b6-43db-86e3-3f67fb3aa657", "savedPayload": { "position": { - "x": 28576.63470585673, - "y": 23774.771214406916 + "x": 28610.666797770067, + "y": 23165.24441023223 }, "targetPosition": { - "x": 28875.795845011085, - "y": 23797.190242482844 + "x": 28858.538430064866, + "y": 23334.240427651315 }, "floatingObject": { "isPinned": false, @@ -1533,12 +1598,12 @@ "id": "30929e97-3faa-4a62-b45d-c22716b3df8e", "savedPayload": { "position": { - "x": 28875.795845011085, - "y": 23797.190242482844 + "x": 28858.538430064866, + "y": 23334.240427651315 }, "targetPosition": { - "x": 29146.086505381812, - "y": 23667.025120747578 + "x": 29157.69956921922, + "y": 23356.659455727244 }, "floatingObject": { "isPinned": false, @@ -1573,12 +1638,12 @@ "id": "a3cd897e-df9e-49ab-88a7-02869b81523b", "savedPayload": { "position": { - "x": 28546.086505381812, - "y": 23667.025120747578 + "x": 28638.084326948556, + "y": 23056.659455727244 }, "targetPosition": { - "x": 28846.086505381812, - "y": 23667.025120747578 + "x": 28897.89194808389, + "y": 23206.659455727244 }, "floatingObject": { "isPinned": false, @@ -1603,12 +1668,12 @@ "id": "40c0e3d0-1165-4ff9-8242-211d9f0a7a85", "savedPayload": { "position": { - "x": 28846.086505381812, - "y": 23667.025120747578 + "x": 28897.89194808389, + "y": 23206.659455727244 }, "targetPosition": { - "x": 29146.086505381812, - "y": 23667.025120747578 + "x": 29157.69956921922, + "y": 23356.659455727244 }, "floatingObject": { "isPinned": false, @@ -1643,12 +1708,12 @@ "id": "247ec21c-2331-460f-b803-a108db234804", "savedPayload": { "position": { - "x": 28605.50518464036, - "y": 23406.694877277045 + "x": 28819.70753438105, + "y": 22860.916191137647 }, "targetPosition": { - "x": 28875.795845011085, - "y": 23536.85999901231 + "x": 28988.703551800136, + "y": 23108.787823432445 }, "floatingObject": { "isPinned": false, @@ -1673,12 +1738,12 @@ "id": "e7eea9e5-4df6-4a6b-8a2a-5e46373a77fa", "savedPayload": { "position": { - "x": 28875.795845011085, - "y": 23536.85999901231 + "x": 28988.703551800136, + "y": 23108.787823432445 }, "targetPosition": { - "x": 29146.086505381812, - "y": 23667.025120747578 + "x": 29157.69956921922, + "y": 23356.659455727244 }, "floatingObject": { "isPinned": false, @@ -1713,12 +1778,12 @@ "id": "e55378fa-5093-4225-864d-8ff41d99dd6a", "savedPayload": { "position": { - "x": 28662.39031695665, - "y": 23477.18835586002 + "x": 28833.72476477311, + "y": 22950.407900549788 }, "targetPosition": { - "x": 28959.03956482419, - "y": 23432.47567600717 + "x": 29112.98688936637, + "y": 23060.010207859705 }, "floatingObject": { "isPinned": false, @@ -1744,12 +1809,12 @@ "id": "61584484-e4c2-4166-8e41-f8473f8c669f", "savedPayload": { "position": { - "x": 28679.77744023093, - "y": 23322.873368697252 + "x": 28925.939948808747, + "y": 22825.460763119296 }, "targetPosition": { - "x": 28959.03956482419, - "y": 23432.47567600717 + "x": 29112.98688936637, + "y": 23060.010207859705 }, "floatingObject": { "isPinned": false, @@ -1775,12 +1840,12 @@ "id": "a6bb434c-67fd-4429-a4b4-f51a0c9a07ed", "savedPayload": { "position": { - "x": 28771.992624266568, - "y": 23197.92623126676 + "x": 29068.274209513518, + "y": 22763.360959992166 }, "targetPosition": { - "x": 28959.03956482419, - "y": 23432.47567600717 + "x": 29112.98688936637, + "y": 23060.010207859705 }, "floatingObject": { "isPinned": false, @@ -1806,12 +1871,12 @@ "id": "e718201a-9ce4-4eb5-aade-1e844f59af64", "savedPayload": { "position": { - "x": 28914.32688497134, - "y": 23135.82642813963 + "x": 29222.589196676287, + "y": 22780.748083266444 }, "targetPosition": { - "x": 28959.03956482419, - "y": 23432.47567600717 + "x": 29112.98688936637, + "y": 23060.010207859705 }, "floatingObject": { "isPinned": false, @@ -1837,12 +1902,12 @@ "id": "7ac78464-92ee-470e-ba77-661071937ab5", "savedPayload": { "position": { - "x": 29068.641872134107, - "y": 23153.213551413908 + "x": 29347.53633410678, + "y": 22872.963267302082 }, "targetPosition": { - "x": 28959.03956482419, - "y": 23432.47567600717 + "x": 29112.98688936637, + "y": 23060.010207859705 }, "floatingObject": { "isPinned": false, @@ -1867,12 +1932,12 @@ "id": "f98086f7-1e41-4365-aa6c-4e4cccaf4ae6", "savedPayload": { "position": { - "x": 28959.03956482419, - "y": 23432.47567600717 + "x": 29112.98688936637, + "y": 23060.010207859705 }, "targetPosition": { - "x": 29146.086505381812, - "y": 23667.025120747578 + "x": 29157.69956921922, + "y": 23356.659455727244 }, "floatingObject": { "isPinned": false, @@ -1900,17 +1965,17 @@ "id": "e059f5c4-9132-4d76-9f3e-1060658fa704", "savedPayload": { "position": { - "x": 29146.086505381812, - "y": 23667.025120747578 + "x": 29151.893037300517, + "y": 23511.84228823741 }, "targetPosition": { - "x": 29438.56487903636, - "y": 23600.268840560682 + "x": 29444.371410955064, + "y": 23445.086008050515 }, "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 @@ -1928,13 +1993,45 @@ ], "poolWeightVotes": [], "assetWeightVotes": [], - "featureWeightVotes": [], + "featureWeightVotes": [ + { + "type": "Feature Weight Vote", + "name": "Superalgos Data Mining Feature X", + "config": "{}", + "project": "Governance", + "id": "7607658c-f3ad-42de-a316-35dd052e0477", + "savedPayload": { + "position": { + "x": 29240.31958962379, + "y": 23225.17044650157 + }, + "targetPosition": { + "x": 29444.371410955064, + "y": 23445.086008050515 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": {}, + "referenceParent": { + "type": "Feature", + "name": "Feature X", + "id": "1b9dd977-f388-4434-a3f9-2e7a10726848" + } + } + } + ], "positionWeightVotes": [], "id": "1d398124-3f36-40a1-8b3b-6c77ad489b92", "savedPayload": { "position": { - "x": 29438.56487903636, - "y": 23600.268840560682 + "x": 29444.371410955064, + "y": 23445.086008050515 }, "targetPosition": { "x": 29731.043252690906, diff --git a/Projects/Governance/Schemas/App-Schema/governance-project.json b/Projects/Governance/Schemas/App-Schema/governance-project.json index 03d3ba270..4849e91c3 100644 --- a/Projects/Governance/Schemas/App-Schema/governance-project.json +++ b/Projects/Governance/Schemas/App-Schema/governance-project.json @@ -68,5 +68,5 @@ "autoAdd": true } ], - "icon": "Governance Project" + "icon": "governance-project" } \ No newline at end of file diff --git a/Projects/Governance/UI/Function-Libraries/Claims.js b/Projects/Governance/UI/Function-Libraries/Claims.js index 37968011e..162132af7 100644 --- a/Projects/Governance/UI/Function-Libraries/Claims.js +++ b/Projects/Governance/UI/Function-Libraries/Claims.js @@ -33,21 +33,26 @@ function newGovernanceFunctionLibraryClaims() { /* Claim Count Follows */ for (let i = 0; i < userProfiles.length; i++) { - let userProfilesNode = userProfiles[i] - if (userProfilesNode.payload === undefined) { continue } - userProfilesNode.payload.claims = { + let userProfile = userProfiles[i] + if (userProfile.payload === undefined) { continue } + if (userProfile.tokenPowerSwitch === undefined) { continue } + if (userProfile.tokenPowerSwitch.claimsProgram === undefined) { continue } + userProfile.payload.claims = { awarded: { tokens: 0 }, count: 0 } - countForNode(userProfilesNode.claimsProgram) + countForNode(userProfile.tokenPowerSwitch.claimsProgram) } /* Claim Calculation Follows */ for (let i = 0; i < userProfiles.length; i++) { - let userProfilesNode = userProfiles[i] - calculateForNode(userProfilesNode.claimsProgram, userProfilesNode) + let userProfile = userProfiles[i] + if (userProfile.payload === undefined) { continue } + if (userProfile.tokenPowerSwitch === undefined) { continue } + if (userProfile.tokenPowerSwitch.claimsProgram === undefined) { continue } + calculateForNode(userProfile.tokenPowerSwitch.claimsProgram, userProfile) } function resetClaims(node) { @@ -162,7 +167,7 @@ function newGovernanceFunctionLibraryClaims() { } } - function calculateForNode(node, userProfilesNode) { + function calculateForNode(node, userProfile) { if (node === undefined) { return } if (node.payload === undefined) { return } @@ -205,10 +210,10 @@ function newGovernanceFunctionLibraryClaims() { ) node.payload.claims.awarded.percentage = node.payload.claims.awarded.tokens / node.payload.referenceParent.payload.tokens * 100 - userProfilesNode.payload.claims.awarded.tokens = userProfilesNode.payload.claims.awarded.tokens + node.payload.claims.awarded.tokens - userProfilesNode.payload.claims.count++ + userProfile.payload.claims.awarded.tokens = userProfile.payload.claims.awarded.tokens + node.payload.claims.awarded.tokens + userProfile.payload.claims.count++ - drawClaims(node, userProfilesNode) + drawClaims(node, userProfile) } } @@ -221,7 +226,7 @@ function newGovernanceFunctionLibraryClaims() { switch (property.type) { case 'node': { let childNode = node[property.name] - calculateForNode(childNode, userProfilesNode) + calculateForNode(childNode, userProfile) } break case 'array': { @@ -229,7 +234,7 @@ function newGovernanceFunctionLibraryClaims() { if (propertyArray !== undefined) { for (let m = 0; m < propertyArray.length; m++) { let childNode = propertyArray[m] - calculateForNode(childNode, userProfilesNode) + calculateForNode(childNode, userProfile) } } break @@ -239,7 +244,7 @@ function newGovernanceFunctionLibraryClaims() { } } - function drawClaims(node, userProfilesNode) { + function drawClaims(node, userProfile) { let satatus = new Intl.NumberFormat().format(node.payload.claims.awarded.tokens) + ' ' + 'SA Tokens Awarded' + ' - ' + @@ -249,11 +254,11 @@ function newGovernanceFunctionLibraryClaims() { node.payload.uiObject.setStatus(satatus) - satatus = new Intl.NumberFormat().format(userProfilesNode.payload.claims.awarded.tokens) + + satatus = new Intl.NumberFormat().format(userProfile.payload.claims.awarded.tokens) + ' ' + 'SA Tokens Awarded' + - ' from ' + userProfilesNode.payload.claims.count + ' Claims' + ' from ' + userProfile.payload.claims.count + ' Claims' - userProfilesNode.payload.uiObject.setValue(satatus) + userProfile.payload.uiObject.setValue(satatus) } }