From f0dc0e104621643e31051447d84e226290b0fa10 Mon Sep 17 00:00:00 2001 From: Tentacule23 Date: Mon, 20 Sep 2021 17:43:02 -0400 Subject: [PATCH 01/29] Node_move_fix Tentacule23 --- .../UI/Spaces/Floating-Space/FloatingSpace.js | 4 + package-lock.json | 170 ------------------ 2 files changed, 4 insertions(+), 170 deletions(-) diff --git a/Projects/Foundations/UI/Spaces/Floating-Space/FloatingSpace.js b/Projects/Foundations/UI/Spaces/Floating-Space/FloatingSpace.js index 3f932d114..db4054a1b 100644 --- a/Projects/Foundations/UI/Spaces/Floating-Space/FloatingSpace.js +++ b/Projects/Foundations/UI/Spaces/Floating-Space/FloatingSpace.js @@ -668,6 +668,10 @@ function newFoundationsFloatingSpace() { newVector.x = newPosition.x - thisObject.floatingObjetSaved.payload.position.x newVector.y = newPosition.y - thisObject.floatingObjetSaved.payload.position.y + thisObject.floatingObjetSaved.payload.position = {} + thisObject.floatingObjetSaved.payload.position.x = position.x + thisObject.floatingObjetSaved.payload.position.y = position.y + thisObject.floatingObjetSaved.container.displace(newVector) UI.projects.foundations.spaces.cockpitSpace.setStatus('Type : [' + UI.projects.foundations.spaces.floatingSpace.floatingObjetSaved.payload.node.type + '] , Name : [' + UI.projects.foundations.spaces.floatingSpace.floatingObjetSaved.payload.node.name + '] -> Snapped to new position', 100, UI.projects.foundations.spaces.cockpitSpace.statusTypes.ALL_GOOD) } diff --git a/package-lock.json b/package-lock.json index 7c7ed17e3..6f0bbb6b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,11 +4,6 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "@cryptography/aes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@cryptography/aes/-/aes-0.1.1.tgz", - "integrity": "sha512-PcYz4FDGblO6tM2kSC+VzhhK62vml6k6/YAkiWtyPvrgJVfnDRoHGDtKn5UiaRRUrvUTTocBpvc2rRgTCqxjsg==" - }, "@ethereumjs/common": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.4.0.tgz", @@ -675,14 +670,6 @@ "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" }, - "async-mutex": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.3.2.tgz", - "integrity": "sha512-HuTK7E7MT7jZEh1P9GtRW9+aTWiDWWi9InbZ5hjxrnRa39KS4BW04+xLBhYNS2aXhHUIKZSw3gj4Pn1pj+qGAA==", - "requires": { - "tslib": "^2.3.1" - } - }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -734,11 +721,6 @@ "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==" }, - "big-integer": { - "version": "1.6.48", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", - "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==" - }, "bignumber.js": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", @@ -781,11 +763,6 @@ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, - "browser-or-node": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/browser-or-node/-/browser-or-node-1.3.0.tgz", - "integrity": "sha512-0F2z/VSnLbmEeBcUrSuDH5l0HxTXdQQzLjkmBR4cYfvg1zJrKSlmIZFqyFR8oX0NrwPhy3c3HQ6i3OxMbew4Tg==" - }, "browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", @@ -1252,44 +1229,11 @@ "randombytes": "^2.0.0" } }, - "dom-serializer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", - "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", - "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - } - }, "dom-walk": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" }, - "domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==" - }, - "domhandler": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz", - "integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==", - "requires": { - "domelementtype": "^2.2.0" - } - }, - "domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "requires": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - } - }, "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", @@ -1336,11 +1280,6 @@ "once": "^1.4.0" } }, - "entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" - }, "es-abstract": { "version": "1.18.6", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.6.tgz", @@ -1943,17 +1882,6 @@ "minimalistic-crypto-utils": "^1.0.1" } }, - "htmlparser2": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", - "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", - "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "domutils": "^2.5.2", - "entities": "^2.0.0" - } - }, "http": { "version": "0.0.1-security", "resolved": "https://registry.npmjs.org/http/-/http-0.0.1-security.tgz", @@ -2031,11 +1959,6 @@ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -2495,14 +2418,6 @@ "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" }, - "node-localstorage": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/node-localstorage/-/node-localstorage-2.2.1.tgz", - "integrity": "sha512-vv8fJuOUCCvSPjDjBLlMqYMHob4aGjkmrkaE42/mZr0VT+ZAU10jRF8oTnX9+pgU9/vYJ8P7YT3Vd6ajkmzSCw==", - "requires": { - "write-file-atomic": "^1.1.4" - } - }, "normalize-url": { "version": "4.5.1", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", @@ -2589,11 +2504,6 @@ "is-wsl": "^2.2.0" } }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" - }, "p-cancelable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", @@ -2612,11 +2522,6 @@ "p-finally": "^1.0.0" } }, - "pako": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz", - "integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==" - }, "parse-asn1": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", @@ -2663,11 +2568,6 @@ } } }, - "path-browserify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" - }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -3020,11 +2920,6 @@ } } }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=" - }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", @@ -3046,11 +2941,6 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, - "store2": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/store2/-/store2-2.12.0.tgz", - "integrity": "sha512-7t+/wpKLanLzSnQPX8WAcuLCCeuSHoWdQuh9SB3xD0kNOM38DNf+0Oa+wmvxmYueRzkmh6IcdKFtvTa+ecgPDw==" - }, "strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", @@ -3226,41 +3116,6 @@ } } }, - "telegram": { - "version": "1.8.14", - "resolved": "https://registry.npmjs.org/telegram/-/telegram-1.8.14.tgz", - "integrity": "sha512-gOj6/Ebr0QMv3zufP3n3t2AwO+iJcBd4B+YbWBu9gHRm1OQkuUW+3cpDfLMBnFFGH2/dJGdB9n+uo4qrCRkxgQ==", - "requires": { - "@cryptography/aes": "^0.1.1", - "async-mutex": "^0.3.0", - "big-integer": "^1.6.48", - "browser-or-node": "^1.3.0", - "buffer": "^6.0.3", - "htmlparser2": "^6.1.0", - "mime-types": "^2.1.30", - "node-localstorage": "^2.1.6", - "os-browserify": "^0.3.0", - "pako": "^2.0.3", - "path-browserify": "^1.0.1", - "process": "^0.11.10", - "store2": "^2.12.0", - "ts-custom-error": "^3.2.0", - "ts-mixer": "^5.4.0", - "util": "^0.12.4", - "websocket": "^1.0.33" - }, - "dependencies": { - "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - } - } - }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", @@ -3285,21 +3140,6 @@ "punycode": "^2.1.1" } }, - "ts-custom-error": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ts-custom-error/-/ts-custom-error-3.2.0.tgz", - "integrity": "sha512-cBvC2QjtvJ9JfWLvstVnI45Y46Y5dMxIaG1TDMGAD/R87hpvqFL+7LhvUDhnRCfOnx/xitollFWWvUKKKhbN0A==" - }, - "ts-mixer": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-5.4.1.tgz", - "integrity": "sha512-Zo9HgPCtNouDgJ+LGtrzVOjSg8+7WGQktIKLwAfaNrlOK1mWGlz1ejsAF/YqUEqAGjUTeB5fEg8gH9Aui6w9xA==" - }, - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -3780,16 +3620,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, - "write-file-atomic": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", - "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" - } - }, "ws": { "version": "8.2.1", "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.1.tgz", From e1836ec8b46df287372a855c32298b4cf38dbfe8 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 13:31:16 +0200 Subject: [PATCH 02/29] Recognize Governance Project Node as trigger for the workspace to be considered a Governance Workspace --- .../Spaces/User-Profile-Space/UserProfile.js | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index d37d0f684..b851a6f82 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -23,6 +23,11 @@ function newGovernanceUserProfileSpace() { return thisObject function initialize() { + /* + If the workspace is not related to governance, then we exit the Intialize Function + */ + let governanceProject = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('Governance Project') + if (governanceProject === undefined) { return } /* Here we will run the distribution process, that in turn will run all the programs. */ @@ -40,11 +45,8 @@ function newGovernanceUserProfileSpace() { thisObject.container = newContainer() thisObject.container.initialize(MODULE_NAME) thisObject.container.isDraggeable = false - /* - If the workspace is not related to governance, then we exit the Intialize Function - */ + let userProfiles = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('User Profile') - if (userProfiles.length === 0) { return } /* We are going to collapse all User Profiles to save processing resources at the UI */ @@ -330,10 +332,14 @@ function newGovernanceUserProfileSpace() { function physics() { if (UI.projects.foundations.spaces.designSpace.workspace === undefined) { return } /* + If the workspace is not related to governance, then we exit the Intialize Function + */ + let governanceProject = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('Governance Project') + if (governanceProject === undefined) { return } + /* Load the user profiles with Token Power. */ let userProfiles = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('User Profile') - if (waitingForResponses !== 0) { return } /* We will get all the user Profiles tokens from the blockchain, making a call every 5 seconds so as not to exceed the rate limit. @@ -368,7 +374,7 @@ function newGovernanceUserProfileSpace() { userProfile.payload.uiObject.setErrorMessage( 'Call via HTTP Interface failed.', UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR - ) + ) return } @@ -379,7 +385,7 @@ function newGovernanceUserProfileSpace() { userProfile.payload.uiObject.setErrorMessage( 'Call to WEB3 Server failed. ' + response.error, UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR - ) + ) console.log('Call to WEB3 Server failed. ' + response.error) return } @@ -411,7 +417,7 @@ function newGovernanceUserProfileSpace() { } else { userProfile.payload.uiObject.setInfoMessage(data, UI.projects.governance.globals.designer.SET_INFO_COUNTER_FACTOR - ) + ) userProfile.payload.blockchainTokens = Number(data.result) / 1000000000000000000 userProfile.payload.reputation = Math.min(reputationByAddress.get(blockchainAccount.toLowerCase()) | 0, userProfile.payload.blockchainTokens) } @@ -422,7 +428,7 @@ function newGovernanceUserProfileSpace() { if (userProfile.payload !== undefined) { userProfile.payload.uiObject.setErrorMessage(message, UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR - ) + ) } waitingForResponses-- }); From 533cae9c2ec9864a05e44cb16c5075e6e0cd5533 Mon Sep 17 00:00:00 2001 From: Tentacule23 Date: Tue, 21 Sep 2021 09:16:24 -0400 Subject: [PATCH 03/29] Node_Move_Fix Tentacule23 --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 6f0bbb6b1..4d95025f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3682,4 +3682,4 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" } } -} +} \ No newline at end of file From 63eb66229006dd0a40e7e1cd6dd69cc0daca2c40 Mon Sep 17 00:00:00 2001 From: Tentacule23 Date: Tue, 21 Sep 2021 09:26:00 -0400 Subject: [PATCH 04/29] Node_Move_Fix2 Tentacule23 --- package-lock.json | 172 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 171 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 4d95025f1..7c7ed17e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,11 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@cryptography/aes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@cryptography/aes/-/aes-0.1.1.tgz", + "integrity": "sha512-PcYz4FDGblO6tM2kSC+VzhhK62vml6k6/YAkiWtyPvrgJVfnDRoHGDtKn5UiaRRUrvUTTocBpvc2rRgTCqxjsg==" + }, "@ethereumjs/common": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.4.0.tgz", @@ -670,6 +675,14 @@ "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" }, + "async-mutex": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.3.2.tgz", + "integrity": "sha512-HuTK7E7MT7jZEh1P9GtRW9+aTWiDWWi9InbZ5hjxrnRa39KS4BW04+xLBhYNS2aXhHUIKZSw3gj4Pn1pj+qGAA==", + "requires": { + "tslib": "^2.3.1" + } + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -721,6 +734,11 @@ "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==" }, + "big-integer": { + "version": "1.6.48", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", + "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==" + }, "bignumber.js": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", @@ -763,6 +781,11 @@ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, + "browser-or-node": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-or-node/-/browser-or-node-1.3.0.tgz", + "integrity": "sha512-0F2z/VSnLbmEeBcUrSuDH5l0HxTXdQQzLjkmBR4cYfvg1zJrKSlmIZFqyFR8oX0NrwPhy3c3HQ6i3OxMbew4Tg==" + }, "browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", @@ -1229,11 +1252,44 @@ "randombytes": "^2.0.0" } }, + "dom-serializer": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", + "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + } + }, "dom-walk": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" }, + "domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==" + }, + "domhandler": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz", + "integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==", + "requires": { + "domelementtype": "^2.2.0" + } + }, + "domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "requires": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + } + }, "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", @@ -1280,6 +1336,11 @@ "once": "^1.4.0" } }, + "entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" + }, "es-abstract": { "version": "1.18.6", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.6.tgz", @@ -1882,6 +1943,17 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "htmlparser2": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" + } + }, "http": { "version": "0.0.1-security", "resolved": "https://registry.npmjs.org/http/-/http-0.0.1-security.tgz", @@ -1959,6 +2031,11 @@ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -2418,6 +2495,14 @@ "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" }, + "node-localstorage": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-localstorage/-/node-localstorage-2.2.1.tgz", + "integrity": "sha512-vv8fJuOUCCvSPjDjBLlMqYMHob4aGjkmrkaE42/mZr0VT+ZAU10jRF8oTnX9+pgU9/vYJ8P7YT3Vd6ajkmzSCw==", + "requires": { + "write-file-atomic": "^1.1.4" + } + }, "normalize-url": { "version": "4.5.1", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", @@ -2504,6 +2589,11 @@ "is-wsl": "^2.2.0" } }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" + }, "p-cancelable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", @@ -2522,6 +2612,11 @@ "p-finally": "^1.0.0" } }, + "pako": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz", + "integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==" + }, "parse-asn1": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", @@ -2568,6 +2663,11 @@ } } }, + "path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -2920,6 +3020,11 @@ } } }, + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=" + }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", @@ -2941,6 +3046,11 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, + "store2": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/store2/-/store2-2.12.0.tgz", + "integrity": "sha512-7t+/wpKLanLzSnQPX8WAcuLCCeuSHoWdQuh9SB3xD0kNOM38DNf+0Oa+wmvxmYueRzkmh6IcdKFtvTa+ecgPDw==" + }, "strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", @@ -3116,6 +3226,41 @@ } } }, + "telegram": { + "version": "1.8.14", + "resolved": "https://registry.npmjs.org/telegram/-/telegram-1.8.14.tgz", + "integrity": "sha512-gOj6/Ebr0QMv3zufP3n3t2AwO+iJcBd4B+YbWBu9gHRm1OQkuUW+3cpDfLMBnFFGH2/dJGdB9n+uo4qrCRkxgQ==", + "requires": { + "@cryptography/aes": "^0.1.1", + "async-mutex": "^0.3.0", + "big-integer": "^1.6.48", + "browser-or-node": "^1.3.0", + "buffer": "^6.0.3", + "htmlparser2": "^6.1.0", + "mime-types": "^2.1.30", + "node-localstorage": "^2.1.6", + "os-browserify": "^0.3.0", + "pako": "^2.0.3", + "path-browserify": "^1.0.1", + "process": "^0.11.10", + "store2": "^2.12.0", + "ts-custom-error": "^3.2.0", + "ts-mixer": "^5.4.0", + "util": "^0.12.4", + "websocket": "^1.0.33" + }, + "dependencies": { + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + } + } + }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", @@ -3140,6 +3285,21 @@ "punycode": "^2.1.1" } }, + "ts-custom-error": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ts-custom-error/-/ts-custom-error-3.2.0.tgz", + "integrity": "sha512-cBvC2QjtvJ9JfWLvstVnI45Y46Y5dMxIaG1TDMGAD/R87hpvqFL+7LhvUDhnRCfOnx/xitollFWWvUKKKhbN0A==" + }, + "ts-mixer": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-5.4.1.tgz", + "integrity": "sha512-Zo9HgPCtNouDgJ+LGtrzVOjSg8+7WGQktIKLwAfaNrlOK1mWGlz1ejsAF/YqUEqAGjUTeB5fEg8gH9Aui6w9xA==" + }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -3620,6 +3780,16 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "write-file-atomic": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", + "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" + } + }, "ws": { "version": "8.2.1", "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.1.tgz", @@ -3682,4 +3852,4 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" } } -} \ No newline at end of file +} From f9ac2761d21ca1d3a47194a27401c9b53d5c846d Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 18:03:43 +0200 Subject: [PATCH 05/29] Signing Accounts Created --- Platform/UI/AppLoader.js | 2 +- Platform/UI/Utilities.js | 3 + .../UI/Spaces/Design-Space/Workspace.js | 12 ++ Projects/Governance/Icons/signing-account.png | Bin 0 -> 15217 bytes .../Governance/Icons/signing-accounts.png | Bin 0 -> 15217 bytes .../App-Schema/profile-constructor.json | 10 ++ .../Schemas/App-Schema/signing-account.json | 35 +++++ .../Schemas/App-Schema/signing-accounts.json | 29 ++++ .../Schemas/App-Schema/user-profile.json | 6 + .../UI/Function-Libraries/ActionSwitch.js | 5 + .../Function-Libraries/ProfileConstructor.js | 135 ++++++++++++++++-- .../UI/Function-Libraries/TokenMining.js | 4 + .../Spaces/User-Profile-Space/UserProfile.js | 5 +- 13 files changed, 234 insertions(+), 12 deletions(-) create mode 100644 Projects/Governance/Icons/signing-account.png create mode 100644 Projects/Governance/Icons/signing-accounts.png create mode 100644 Projects/Governance/Schemas/App-Schema/signing-account.json create mode 100644 Projects/Governance/Schemas/App-Schema/signing-accounts.json diff --git a/Platform/UI/AppLoader.js b/Platform/UI/AppLoader.js index eb8f87864..2e010babf 100644 --- a/Platform/UI/AppLoader.js +++ b/Platform/UI/AppLoader.js @@ -138,7 +138,7 @@ function newAppLoader() { for (let i = 0; i < modulesArray.length; i++) { let path = modulesArray[i] - console.log(path) + REQUIREJS([path], onRequired) if (INFO_LOG === true) { logger.write('[INFO] loadModules -> Module Requested.') } diff --git a/Platform/UI/Utilities.js b/Platform/UI/Utilities.js index 0c2cbee7a..6216d3d59 100644 --- a/Platform/UI/Utilities.js +++ b/Platform/UI/Utilities.js @@ -98,6 +98,9 @@ function newUniqueId () { function splitTextIntoPhrases (text, wordsPerLine) { try { + if (text.split === undefined) { + return [] + } let splittedLabel = text.split(' ') let phrases = [] let phrase = '' diff --git a/Projects/Foundations/UI/Spaces/Design-Space/Workspace.js b/Projects/Foundations/UI/Spaces/Design-Space/Workspace.js index 5f1fcc8bc..61a2b1335 100644 --- a/Projects/Foundations/UI/Spaces/Design-Space/Workspace.js +++ b/Projects/Foundations/UI/Spaces/Design-Space/Workspace.js @@ -18,6 +18,7 @@ function newWorkspace() { share: shareWorkspace, getNodesByTypeAndHierarchyHeadsType: getNodesByTypeAndHierarchyHeadsType, getProjectsHeads: getProjectsHeads, + getProjectHeadByNodeType: getProjectHeadByNodeType, getHierarchyHeads: getHierarchyHeads, getHierarchyHeadsById: getHierarchyHeadsById, getHierarchyHeadsByCodeNameAndNodeType: getHierarchyHeadsByCodeNameAndNodeType, @@ -547,6 +548,17 @@ function newWorkspace() { return nodes } + function getProjectHeadByNodeType(nodeType) { + let projectHeads = getProjectsHeads() + if (projectHeads === undefined) { return } + for (let i = 0; i < projectHeads.length; i++) { + let hierarchyHead = projectHeads[i] + if (hierarchyHead.type === nodeType) { + return hierarchyHead + } + } + } + function getHierarchyHeadsById(nodeId) { let hierarchyHeads = getHierarchyHeads() if (hierarchyHeads === undefined) { return } diff --git a/Projects/Governance/Icons/signing-account.png b/Projects/Governance/Icons/signing-account.png new file mode 100644 index 0000000000000000000000000000000000000000..a4ee2a209ae5922e1d49d3686dfabf910a979d02 GIT binary patch literal 15217 zcmYj&c|4Tg7yo@`h8g?5WSc=Dglq|!5tT|vKB5%Ln!PNkm}jV@5=9}&Xj4%{*$N{q z%388lrq#Y=UuNd{UEkm9^?UvLr|~@ZIrrRi?>)==oRjS2utP*pK@b2SveVAi82}vo zi322l_}}cwFU#=1HIdugBKL*)MaFm^_XXBIVMlx^J43wveVu*1ePSa%_*w#BA+^)i z+T~>5Sni?A9)Ge22SQ^?1WJdSi&P1g`_6du1U(B3utpU>HXQhQEYQjLVurwTeKj>B z3Dcm!y{>{Sb~%f$FQrHxl!~xEI)6lZo6X7<34G{4R?*dbo1f41Q5PRciE9B07PQm# zBU`W;@64vo@yF(#lkX=rb6xs3M$esgn46*V+GeaK(-2U&xgzdW?|jpJvTHMc)qa-UE^YlNQ>zze?lPvz)szUk9Mf!~Rr z3xIq^^pEg+d(7S>s7eY7S&9G>00RkUWE;z9^spVQ;_DX)G<}~0wp~to`^7ibmkLM# z0qm{JuYd5>?-Hha-1VF{%gaq-$ zoWOSjJ|^P8X>-{l@hsoN&rVx1$Ovd9F+yfZaAni{ z@zu)`fUVJS-p?AYD39TJdSPLeHakVU=YtYlCF>84ia#R`*koa890BMma;}dXmCC{O zbr@cj=O=)BjJiO{m-Ne>@Oy*i?0dQfP0kcRc?EgLQwwHP0m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": "signingAccount" +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/signing-accounts.json b/Projects/Governance/Schemas/App-Schema/signing-accounts.json new file mode 100644 index 000000000..8a8b2dba4 --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/signing-accounts.json @@ -0,0 +1,29 @@ +{ + "type": "Signing Accounts", + "menuItems": [ + { + "action": "Delete UI Object", + "actionProject": "Foundations", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->User Profile->" + }, + "propertyNameAtParent": "signingAccounts", + "childrenNodesProperties": [ + { + "name": "signingAccounts", + "type": "array", + "childType": "Signing Account", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/user-profile.json b/Projects/Governance/Schemas/App-Schema/user-profile.json index a3e31924e..4fe356ae4 100644 --- a/Projects/Governance/Schemas/App-Schema/user-profile.json +++ b/Projects/Governance/Schemas/App-Schema/user-profile.json @@ -69,6 +69,12 @@ "type": "node", "childType": "Tokens Mined", "autoAdd": true + }, + { + "name": "signingAccounts", + "type": "node", + "childType": "Signing Accounts", + "autoAdd": false } ] } \ No newline at end of file diff --git a/Projects/Governance/UI/Function-Libraries/ActionSwitch.js b/Projects/Governance/UI/Function-Libraries/ActionSwitch.js index b9ac27c78..da9022ebe 100644 --- a/Projects/Governance/UI/Function-Libraries/ActionSwitch.js +++ b/Projects/Governance/UI/Function-Libraries/ActionSwitch.js @@ -38,6 +38,11 @@ function newGovernanceActionSwitch() { UI.projects.governance.functionLibraries.profileConstructor.buildProfile(action.node, action.rootNodes) break } + case 'Add Signing Account': + { + UI.projects.governance.functionLibraries.profileConstructor.addSigningAccount(action.node, action.rootNodes) + break + } case 'Add Missing Plugin User Profiles': { UI.projects.governance.functionLibraries.pluginsFunctions.addMissingPluginUserProfiles(action.node, action.rootNodes) diff --git a/Projects/Governance/UI/Function-Libraries/ProfileConstructor.js b/Projects/Governance/UI/Function-Libraries/ProfileConstructor.js index eb09d4f6f..679d69743 100644 --- a/Projects/Governance/UI/Function-Libraries/ProfileConstructor.js +++ b/Projects/Governance/UI/Function-Libraries/ProfileConstructor.js @@ -1,6 +1,7 @@ function newGovernanceFunctionLibraryProfileConstructor() { let thisObject = { - buildProfile: buildProfile + buildProfile: buildProfile, + addSigningAccount: addSigningAccount } return thisObject @@ -18,7 +19,7 @@ function newGovernanceFunctionLibraryProfileConstructor() { if (githubUsername === undefined || githubUsername === "") { node.payload.uiObject.setErrorMessage( "githubUsername config property missing.", - UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR + UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR ) return } @@ -53,7 +54,7 @@ function newGovernanceFunctionLibraryProfileConstructor() { if (err.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) { node.payload.uiObject.setErrorMessage( 'Call via HTTP Interface failed.', - UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR + UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR ) return } @@ -67,14 +68,14 @@ function newGovernanceFunctionLibraryProfileConstructor() { node.payload.uiObject.setErrorMessage( 'Call to WEB3 Server failed. ' + response.error, UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR - ) + ) console.log('Call to WEB3 Server failed. ' + response.error) return } else { node.payload.uiObject.setErrorMessage( 'Call to WEB3 Server failed. Most likely the Mnemonic provided is not correct or you need to run node setup because a dependency is missing. ' + response.error, UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR - ) + ) console.log('Call to WEB3 Server failed. Most likely the Mnemonic provided is not correct or you need to run node setup because a dependency is missing. ' + response.error) return } @@ -103,7 +104,7 @@ function newGovernanceFunctionLibraryProfileConstructor() { node.payload.uiObject.setErrorMessage( 'Call via HTTP Interface failed.', UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR - ) + ) return } @@ -114,7 +115,7 @@ function newGovernanceFunctionLibraryProfileConstructor() { node.payload.uiObject.setErrorMessage( 'Call to WEB3 Server failed. ' + response.error, UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR - ) + ) console.log('Call to WEB3 Server failed. ' + response.error) return } @@ -145,14 +146,130 @@ function newGovernanceFunctionLibraryProfileConstructor() { node.payload.uiObject.setInfoMessage( "Profile Private Key has been successfully created. User Profile installed as a plugin and saved. Use the Private Key at a crypto wallet and delete this node once done.", UI.projects.governance.globals.designer.SET_INFO_COUNTER_FACTOR - ) + ) } else { node.payload.uiObject.setInfoMessage( "Mnemonic successfully imported. User Profile installed as a plugin and saved. Your external wallet was sucessfully linked to your profile.", UI.projects.governance.globals.designer.SET_INFO_COUNTER_FACTOR - ) + ) } } } } + + function addSigningAccount( + node, + rootNodes + ) { + let mnemonic = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(node.payload, 'mnemonic') + let signingAccounts + /* + Some validations first... + */ + if (node.payload.referenceParent === undefined) { + node.payload.uiObject.setErrorMessage( + "The Profile Contstructor needs to reference your User Profile.", + UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR + ) + return + } + + if (node.payload.referenceParent.signingAccounts === undefined) { + signingAccounts = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject( + node.payload.referenceParent, + 'Signing Accounts', + UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes + ) + } else { + signingAccounts = node.payload.referenceParent.signingAccounts + } + + createWallet() + + function createWallet() { + let params + /* + If the user provides a mnemonic then we will get the private key and address from it, + otherwise, we will create a new private key and address. + */ + if (mnemonic === undefined || mnemonic === "") { + params = { + method: 'createWalletAccount', + entropy: node.id + (new Date()).valueOf() + } + } else { + params = { + method: 'mnemonicToPrivateKey', + mnemonic: mnemonic + } + } + + let url = 'WEB3' // We will access the default Client WEB3 endpoint. + + httpRequest(JSON.stringify(params), url, onResponse) + + function onResponse(err, data) { + /* Lets check the result of the call through the http interface */ + if (err.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) { + node.payload.uiObject.setErrorMessage( + 'Call via HTTP Interface failed.', + UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR + ) + return + } + + let response = JSON.parse(data) + + /* Lets check the result of the method call */ + if (response.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) { + + if (mnemonic === undefined || mnemonic === "") { + node.payload.uiObject.setErrorMessage( + 'Call to WEB3 Server failed. ' + response.error, + UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR + ) + console.log('Call to WEB3 Server failed. ' + response.error) + return + } else { + node.payload.uiObject.setErrorMessage( + 'Call to WEB3 Server failed. Most likely the Mnemonic provided is not correct or you need to run node setup because a dependency is missing. ' + response.error, + UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR + ) + console.log('Call to WEB3 Server failed. Most likely the Mnemonic provided is not correct or you need to run node setup because a dependency is missing. ' + response.error) + return + } + } + + createSigningAccount(response.address, response.privateKey) + } + } + + function createSigningAccount(address, privateKey) { + + let signingAccount = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject( + signingAccounts, + 'Signing Account', + UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes + ) + /* + We store at the User Profile the Signed githubUsername + */ + UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(signingAccount.payload, 'address', address) + UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'privateKey', privateKey) + /* + Show nice message. + */ + if (mnemonic === undefined || mnemonic === "") { + node.payload.uiObject.setInfoMessage( + "Signing Account has been successfully created.", + UI.projects.governance.globals.designer.SET_INFO_COUNTER_FACTOR + ) + } else { + node.payload.uiObject.setInfoMessage( + "Mnemonic successfully imported. Signing Account has been successfully created.", + UI.projects.governance.globals.designer.SET_INFO_COUNTER_FACTOR + ) + } + } + } } diff --git a/Projects/Governance/UI/Function-Libraries/TokenMining.js b/Projects/Governance/UI/Function-Libraries/TokenMining.js index 68abe13c7..4ad90ec87 100644 --- a/Projects/Governance/UI/Function-Libraries/TokenMining.js +++ b/Projects/Governance/UI/Function-Libraries/TokenMining.js @@ -126,6 +126,7 @@ function newGovernanceFunctionLibraryTokenMining() { if (userProfile === undefined) { return } if (userProfile.payload === undefined) { return } if (userProfile.tokensMined === undefined) { return } + if (userProfile.tokensMined.payload === undefined) { return } if (userProfile.tokensMined.payload.tokensMined === undefined) { userProfile.tokensMined.payload.tokensMined = { awarded: 0, @@ -147,6 +148,8 @@ function newGovernanceFunctionLibraryTokenMining() { if (userProfile === undefined) { return } if (userProfile.payload === undefined) { return } if (userProfile.tokensMined === undefined) { return } + if (userProfile.tokensMined.payload === undefined) { return } + if (programNode.payload === undefined) { return } if (programNode.payload[programPropertyName] === undefined) { return } @@ -165,6 +168,7 @@ function newGovernanceFunctionLibraryTokenMining() { if (userProfile === undefined) { return } if (userProfile.payload === undefined) { return } if (userProfile.tokensMined === undefined) { return } + if (userProfile.tokensMined.payload === undefined) { return } const awarded = parseFloat(userProfile.tokensMined.payload.tokensMined.awarded.toFixed(0)).toLocaleString('en') const bonus = parseFloat(userProfile.tokensMined.payload.tokensMined.bonus.toFixed(0)).toLocaleString('en') diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index b851a6f82..d38898d0e 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -26,7 +26,7 @@ function newGovernanceUserProfileSpace() { /* If the workspace is not related to governance, then we exit the Intialize Function */ - let governanceProject = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('Governance Project') + let governanceProject = UI.projects.foundations.spaces.designSpace.workspace.getProjectHeadByNodeType('Governance Project') if (governanceProject === undefined) { return } /* Here we will run the distribution process, that in turn will run all the programs. @@ -334,12 +334,13 @@ function newGovernanceUserProfileSpace() { /* If the workspace is not related to governance, then we exit the Intialize Function */ - let governanceProject = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('Governance Project') + let governanceProject = UI.projects.foundations.spaces.designSpace.workspace.getProjectHeadByNodeType('Governance Project') if (governanceProject === undefined) { return } /* Load the user profiles with Token Power. */ let userProfiles = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('User Profile') + if (waitingForResponses !== 0) { return } /* We will get all the user Profiles tokens from the blockchain, making a call every 5 seconds so as not to exceed the rate limit. From e3f8d25328b400b714adb90e9e8f2e1b3783f0b5 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 19:09:12 +0200 Subject: [PATCH 06/29] My profile with signing accounts for each Superalgos product --- .gitignore | 1 + .../User-Profiles/Luis-Fernando-Molina.json | 285 ++++++++++++++---- .../Test-Network-Client-Profile.json | 8 +- .../Test-Network-Node-Profile.json | 4 +- .../Schemas/App-Schema/signing-account.json | 4 +- .../Function-Libraries/ProfileConstructor.js | 104 +++++-- .../UI/Function-Libraries/TokenPower.js | 4 + 7 files changed, 320 insertions(+), 90 deletions(-) diff --git a/.gitignore b/.gitignore index 07cadad8b..9705d9e62 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ Log-Files My-Workspaces My-Social-Trading-Data My-Network-Nodes-Data +My-Secrets debug.log .DS_Store *.db diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index d20244250..98c9a8ce9 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -127,12 +127,12 @@ "id": "f4d39b02-4324-438d-9f74-2bea2b7272ef", "savedPayload": { "position": { - "x": 10242.705098312485, - "y": 21727.335575687743 + "x": 10476.335575687743, + "y": 24007.294901687517 }, "targetPosition": { - "x": 10000, - "y": 21551 + "x": 10300, + "y": 24250 }, "floatingObject": { "isPinned": false, @@ -516,12 +516,12 @@ "id": "b6e3c87d-a11b-4b2a-b6a6-edc96375f5da", "savedPayload": { "position": { - "x": 10092.705098312485, - "y": 21836.316954888545 + "x": 10585.316954888545, + "y": 24157.294901687517 }, "targetPosition": { - "x": 10000, - "y": 21551 + "x": 10300, + "y": 24250 }, "floatingObject": { "isPinned": false, @@ -12448,12 +12448,12 @@ "id": "bb390957-b8a2-4a8a-9fbf-963ea20f6eaf", "savedPayload": { "position": { - "x": 9907.294901687515, - "y": 21836.316954888545 + "x": 10585.316954888545, + "y": 24342.705098312483 }, "targetPosition": { - "x": 10000, - "y": 21551 + "x": 10300, + "y": 24250 }, "floatingObject": { "isPinned": false, @@ -12508,12 +12508,12 @@ "id": "b046f4e4-40b1-4e47-8fed-75a6a5c6029d", "savedPayload": { "position": { - "x": 9635.273908764775, - "y": 22001.399212980523 + "x": 10750.399212980523, + "y": 24614.72609123522 }, "targetPosition": { - "x": 9757.294901687515, - "y": 21727.335575687743 + "x": 10476.335575687743, + "y": 24492.705098312483 }, "floatingObject": { "isPinned": false, @@ -12549,7 +12549,7 @@ "userDelegates": [ { "type": "User Delegate", - "name": "PLuv", + "name": "", "config": "{}", "project": "Governance", "id": "a2bbd553-e24c-44b8-a199-83114476ce24", @@ -12621,7 +12621,7 @@ "userDelegates": [ { "type": "User Delegate", - "name": "harrellbm", + "name": "", "config": "{}", "project": "Governance", "id": "2c79cd42-28a7-4a4b-ad3b-a8a29e993697", @@ -12693,7 +12693,7 @@ "userDelegates": [ { "type": "User Delegate", - "name": "Raplh2502", + "name": "", "config": "{}", "project": "Governance", "id": "94f99114-fc01-450e-9d9d-0b62c8ea393f", @@ -12765,7 +12765,7 @@ "userDelegates": [ { "type": "User Delegate", - "name": "cozed-gh", + "name": "", "config": "{}", "project": "Governance", "id": "ee1b374b-d4af-494c-93b8-3f83849d85f2", @@ -12837,7 +12837,7 @@ "userDelegates": [ { "type": "User Delegate", - "name": "Smidy13", + "name": "", "config": "{}", "project": "Governance", "id": "6a843bed-6392-4981-9e27-eff22f0f9fb1", @@ -12909,7 +12909,7 @@ "userDelegates": [ { "type": "User Delegate", - "name": "ssplatt", + "name": "", "config": "{}", "project": "Governance", "id": "b053ef35-1efe-46f4-81b2-d0c2e8ad0732", @@ -13007,12 +13007,12 @@ "id": "681ff42a-d5af-4fed-971e-935398dac2aa", "savedPayload": { "position": { - "x": 9270.142215762084, - "y": 21991.83790310513 + "x": 10740.83790310513, + "y": 24979.857784237916 }, "targetPosition": { - "x": 9458.938333077034, - "y": 21758.69411466804 + "x": 10507.694114668038, + "y": 24791.061666922964 }, "floatingObject": { "isPinned": false, @@ -13042,12 +13042,12 @@ "id": "ff3bc7ad-6051-4246-99fa-1210a3378a29", "savedPayload": { "position": { - "x": 8862.225195856072, - "y": 21821.411192628635 + "x": 10570.41119262863, + "y": 25387.774804143926 }, "targetPosition": { - "x": 9160.581764466553, - "y": 21790.052653648338 + "x": 10539.052653648334, + "y": 25089.418235533445 }, "floatingObject": { "isPinned": false, @@ -13066,12 +13066,12 @@ "id": "7f642170-d60b-41bc-85ae-dc64fbfc8b4c", "savedPayload": { "position": { - "x": 9160.581764466553, - "y": 21790.052653648338 + "x": 10539.052653648334, + "y": 25089.418235533445 }, "targetPosition": { - "x": 9458.938333077034, - "y": 21758.69411466804 + "x": 10507.694114668038, + "y": 24791.061666922964 }, "floatingObject": { "isPinned": false, @@ -13094,12 +13094,12 @@ "id": "e4be3ce4-3569-4d97-8d54-95bb4cfcb0c5", "savedPayload": { "position": { - "x": 9225.794544639943, - "y": 21569.897997353088 + "x": 10318.897997353088, + "y": 25024.205455360054 }, "targetPosition": { - "x": 9458.938333077034, - "y": 21758.69411466804 + "x": 10507.694114668038, + "y": 24791.061666922964 }, "floatingObject": { "isPinned": false, @@ -13117,12 +13117,12 @@ "id": "3ff7f410-911d-4cb8-9094-d816dee4dccb", "savedPayload": { "position": { - "x": 9458.938333077034, - "y": 21758.69411466804 + "x": 10507.694114668038, + "y": 24791.061666922964 }, "targetPosition": { - "x": 9757.294901687515, - "y": 21727.335575687743 + "x": 10476.335575687743, + "y": 24492.705098312483 }, "floatingObject": { "isPinned": false, @@ -13140,12 +13140,12 @@ "id": "4f35322c-3e7d-49f8-9706-10bf71f0d420", "savedPayload": { "position": { - "x": 9757.294901687515, - "y": 21727.335575687743 + "x": 10476.335575687743, + "y": 24492.705098312483 }, "targetPosition": { - "x": 10000, - "y": 21551 + "x": 10300, + "y": 24250 }, "floatingObject": { "isPinned": false, @@ -13163,18 +13163,18 @@ "id": "f8182a9c-f830-4ec1-a238-ac3a5efd69e6", "savedPayload": { "position": { - "x": 10000, - "y": 21551 + "x": 10300, + "y": 24250 }, "targetPosition": { "x": 10000, - "y": 21251 + "y": 24250 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 2, + "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -13190,12 +13190,181 @@ "id": "9870ca2a-cefc-484b-b7fc-206d62782ebc", "savedPayload": { "position": { - "x": 9700, - "y": 21251 + "x": 9850, + "y": 24509.807621135333 }, "targetPosition": { "x": 10000, - "y": 21251 + "y": 24250 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "signingAccounts": { + "type": "Signing Accounts", + "name": "New Signing Accounts", + "project": "Governance", + "signingAccounts": [ + { + "type": "Signing Account", + "name": "Social Trading Desktop", + "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x44cba4eeebb7f8bfb0d9fedb8b3c5c34ecd75b69969766435ae641547a8158c4\",\n \"s\": \"0x144b9076038085fa5fa51c381e76377cd2bcc87c835698eeb5195cceefb63ead\",\n \"signature\": \"0x44cba4eeebb7f8bfb0d9fedb8b3c5c34ecd75b69969766435ae641547a8158c4144b9076038085fa5fa51c381e76377cd2bcc87c835698eeb5195cceefb63ead1c\"\n }\n}", + "project": "Governance", + "id": "30858b11-5b8d-46c6-97f8-765e3676fc2f", + "savedPayload": { + "position": { + "x": 9550, + "y": 23990.192378864667 + }, + "targetPosition": { + "x": 9850, + "y": 23990.192378864667 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + { + "type": "Signing Account", + "name": "Social Trading Server", + "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0xc56bbcd7a99f47e20c5d83b1d4c102e1c7a223267b76f53200ff87fea7964e95\",\n \"s\": \"0x3e730a7d40a13199ef59f7a2a06a9d43da8f918e37afd6f706eceaea1fa8ed2d\",\n \"signature\": \"0xc56bbcd7a99f47e20c5d83b1d4c102e1c7a223267b76f53200ff87fea7964e953e730a7d40a13199ef59f7a2a06a9d43da8f918e37afd6f706eceaea1fa8ed2d1b\"\n }\n}", + "project": "Governance", + "id": "beff2691-f55f-401c-87a7-f6f7e59ebfb0", + "savedPayload": { + "position": { + "x": 9590.192378864669, + "y": 23840.192378864667 + }, + "targetPosition": { + "x": 9850, + "y": 23990.192378864667 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + { + "type": "Signing Account", + "name": "Social Trading Mobile", + "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x502693fda93e9331e1eb1f5f6bd2896f6175d86816d11437ab8f4c51bdb95c5c\",\n \"s\": \"0x3c901bdb9f56f97cf558159c0f57c94dcade020a992be74a955a2cddf88047e1\",\n \"signature\": \"0x502693fda93e9331e1eb1f5f6bd2896f6175d86816d11437ab8f4c51bdb95c5c3c901bdb9f56f97cf558159c0f57c94dcade020a992be74a955a2cddf88047e11c\"\n }\n}", + "project": "Governance", + "id": "5828093e-65e1-4b18-9cbc-9ff33c98acc1", + "savedPayload": { + "position": { + "x": 9700, + "y": 23730.384757729335 + }, + "targetPosition": { + "x": 9850, + "y": 23990.192378864667 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + { + "type": "Signing Account", + "name": "Social Trading Platform", + "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x363cd2c23617b65f0314a6b1b34c515e0fed9b2da62d53f2cf2609c1bc25e7fb\",\n \"s\": \"0x5e72414fcfe8a1308d7d82f275b3922cfe738374ed74e67086c59cfe7b6c0a24\",\n \"signature\": \"0x363cd2c23617b65f0314a6b1b34c515e0fed9b2da62d53f2cf2609c1bc25e7fb5e72414fcfe8a1308d7d82f275b3922cfe738374ed74e67086c59cfe7b6c0a241c\"\n }\n}", + "project": "Governance", + "id": "fa5647f8-42bc-4d7b-8137-401ac8b5433c", + "savedPayload": { + "position": { + "x": 9850, + "y": 23690.192378864667 + }, + "targetPosition": { + "x": 9850, + "y": 23990.192378864667 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + { + "type": "Signing Account", + "name": "P2P Network Node", + "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x1df7b43b26e14a886b0702f3a43bfa7e078a3603a54d5befeb83ae451e423267\",\n \"s\": \"0x19cb2e7ba38cf49e5baa6ea20cbf895e86c9e010217a3f42e4df46b7b4e0bf36\",\n \"signature\": \"0x1df7b43b26e14a886b0702f3a43bfa7e078a3603a54d5befeb83ae451e42326719cb2e7ba38cf49e5baa6ea20cbf895e86c9e010217a3f42e4df46b7b4e0bf361b\"\n }\n}", + "project": "Governance", + "id": "e7066d66-9e36-4f38-963e-76b915b38c43", + "savedPayload": { + "position": { + "x": 10000, + "y": 23730.384757729335 + }, + "targetPosition": { + "x": 9850, + "y": 23990.192378864667 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], + "id": "1aae1fa4-e5cf-48de-a25e-20001523da70", + "savedPayload": { + "position": { + "x": 9850, + "y": 23990.192378864667 + }, + "targetPosition": { + "x": 10000, + "y": 24250 }, "floatingObject": { "isPinned": false, @@ -13213,17 +13382,17 @@ "id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "savedPayload": { "position": { - "x": 39655.1724137931, - "y": 18250 + "x": 10000, + "y": 24250 }, "targetPosition": { - "x": 39655.1724137931, - "y": 18250 + "x": 10000, + "y": 24250 }, "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": true, + "isCollapsed": false, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 diff --git a/Projects/Governance/Plugins/User-Profiles/Test-Network-Client-Profile.json b/Projects/Governance/Plugins/User-Profiles/Test-Network-Client-Profile.json index c690c8490..bbd0152d0 100644 --- a/Projects/Governance/Plugins/User-Profiles/Test-Network-Client-Profile.json +++ b/Projects/Governance/Plugins/User-Profiles/Test-Network-Client-Profile.json @@ -62,12 +62,12 @@ "id": "baa2f02c-2920-4edb-a103-d452fc61d82f", "savedPayload": { "position": { - "x": 29310.344827586196, - "y": 24250 + "x": 30000, + "y": 18250 }, "targetPosition": { - "x": 29310.344827586196, - "y": 24250 + "x": 30000, + "y": 18250 }, "floatingObject": { "isPinned": false, diff --git a/Projects/Governance/Plugins/User-Profiles/Test-Network-Node-Profile.json b/Projects/Governance/Plugins/User-Profiles/Test-Network-Node-Profile.json index 8a2bcd5c7..03377a20e 100644 --- a/Projects/Governance/Plugins/User-Profiles/Test-Network-Node-Profile.json +++ b/Projects/Governance/Plugins/User-Profiles/Test-Network-Node-Profile.json @@ -62,11 +62,11 @@ "id": "36c2b050-631f-4291-987c-418adc94317d", "savedPayload": { "position": { - "x": 27586.206896551714, + "x": 40000, "y": 21250 }, "targetPosition": { - "x": 27586.206896551714, + "x": 40000, "y": 21250 }, "floatingObject": { diff --git a/Projects/Governance/Schemas/App-Schema/signing-account.json b/Projects/Governance/Schemas/App-Schema/signing-account.json index 34aef0869..3b73941f1 100644 --- a/Projects/Governance/Schemas/App-Schema/signing-account.json +++ b/Projects/Governance/Schemas/App-Schema/signing-account.json @@ -23,7 +23,7 @@ "addLeftIcons": true, "level": 2, "attachingRules": { - "compatibleTypes": "->User Profile->" + "compatibleTypes": "->Signing Accounts->" }, "editors": { "config": true @@ -31,5 +31,5 @@ "initialValues": { "config": "{}" }, - "propertyNameAtParent": "signingAccount" + "propertyNameAtParent": "signingAccounts" } \ No newline at end of file diff --git a/Projects/Governance/UI/Function-Libraries/ProfileConstructor.js b/Projects/Governance/UI/Function-Libraries/ProfileConstructor.js index 679d69743..b772610c8 100644 --- a/Projects/Governance/UI/Function-Libraries/ProfileConstructor.js +++ b/Projects/Governance/UI/Function-Libraries/ProfileConstructor.js @@ -161,8 +161,18 @@ function newGovernanceFunctionLibraryProfileConstructor() { node, rootNodes ) { + let githubUsername = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(node.payload, 'githubUsername') let mnemonic = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(node.payload, 'mnemonic') let signingAccounts + + if (githubUsername === undefined || githubUsername === "") { + node.payload.uiObject.setErrorMessage( + "githubUsername config property missing.", + UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR + ) + return + } + /* Some validations first... */ @@ -240,35 +250,81 @@ function newGovernanceFunctionLibraryProfileConstructor() { } } - createSigningAccount(response.address, response.privateKey) + signUserProfileData(response.address, response.privateKey) } } - function createSigningAccount(address, privateKey) { + function signUserProfileData(address, privateKey) { - let signingAccount = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject( - signingAccounts, - 'Signing Account', - UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes - ) - /* - We store at the User Profile the Signed githubUsername - */ - UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(signingAccount.payload, 'address', address) - UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'privateKey', privateKey) - /* - Show nice message. - */ - if (mnemonic === undefined || mnemonic === "") { - node.payload.uiObject.setInfoMessage( - "Signing Account has been successfully created.", - UI.projects.governance.globals.designer.SET_INFO_COUNTER_FACTOR - ) - } else { - node.payload.uiObject.setInfoMessage( - "Mnemonic successfully imported. Signing Account has been successfully created.", - UI.projects.governance.globals.designer.SET_INFO_COUNTER_FACTOR + let request = { + url: 'WEB3', + params: { + method: "signData", + privateKey: privateKey, + data: githubUsername + } + } + + httpRequest(JSON.stringify(request.params), request.url, onResponse) + + function onResponse(err, data) { + /* Lets check the result of the call through the http interface */ + if (err.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) { + node.payload.uiObject.setErrorMessage( + 'Call via HTTP Interface failed.', + UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR + ) + return + } + + let response = JSON.parse(data) + + /* Lets check the result of the method call */ + if (response.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) { + node.payload.uiObject.setErrorMessage( + 'Call to WEB3 Server failed. ' + response.error, + UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR + ) + console.log('Call to WEB3 Server failed. ' + response.error) + return + } + + createSigningAccount(response.signature) + } + + function createSigningAccount(signature) { + + let signingAccount = UI.projects.foundations.functionLibraries.uiObjectsFromNodes.addUIObject( + signingAccounts, + 'Signing Account', + UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes ) + /* + We store at the User Profile the Signed githubUsername + */ + UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(signingAccount.payload, 'signature', signature) + + node.config = "{}" + UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'nodeName', signingAccount.name) + UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'nodeType', signingAccount.type) + UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'nodeId', signingAccount.id) + UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'address', address) + UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'privateKey', privateKey) + UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'githubUsername', githubUsername) + /* + Show nice message. + */ + if (mnemonic === undefined || mnemonic === "") { + node.payload.uiObject.setInfoMessage( + "Signing Account has been successfully created.", + UI.projects.governance.globals.designer.SET_INFO_COUNTER_FACTOR + ) + } else { + node.payload.uiObject.setInfoMessage( + "Mnemonic successfully imported. Signing Account has been successfully created.", + UI.projects.governance.globals.designer.SET_INFO_COUNTER_FACTOR + ) + } } } } diff --git a/Projects/Governance/UI/Function-Libraries/TokenPower.js b/Projects/Governance/UI/Function-Libraries/TokenPower.js index d588bc777..e2217ceab 100644 --- a/Projects/Governance/UI/Function-Libraries/TokenPower.js +++ b/Projects/Governance/UI/Function-Libraries/TokenPower.js @@ -187,6 +187,7 @@ function newGovernanceFunctionLibraryTokenPower() { if (childNode === undefined) { continue } if (childNode.type === "Delegation Program" && excludeDelegationProgram === true) { continue } if (childNode.type === "Tokens Mined") { continue } + if (childNode.type === "Signing Accounts") { continue } let percentage = getPercentage(childNode) @@ -205,6 +206,7 @@ function newGovernanceFunctionLibraryTokenPower() { if (childNode === undefined) { continue } if (childNode.type === "Delegation Program" && excludeDelegationProgram === true) { continue } if (childNode.type === "Tokens Mined") { continue } + if (childNode.type === "Signing Accounts") { continue } let percentage = getPercentage(childNode) if (percentage !== undefined && isNaN(percentage) !== true) { @@ -241,6 +243,7 @@ function newGovernanceFunctionLibraryTokenPower() { if (childNode === undefined) { continue } if (childNode.type === "Delegation Program" && excludeDelegationProgram === true) { continue } if (childNode.type === "Tokens Mined") { continue } + if (childNode.type === "Signing Accounts") { continue } let percentage = getPercentage(childNode) if (percentage === undefined || isNaN(percentage) === true) { @@ -262,6 +265,7 @@ function newGovernanceFunctionLibraryTokenPower() { if (childNode === undefined) { continue } if (childNode.type === "Delegation Program" && excludeDelegationProgram === true) { continue } if (childNode.type === "Tokens Mined") { continue } + if (childNode.type === "Signing Accounts") { continue } let percentage = getPercentage(childNode) if (percentage === undefined || isNaN(percentage) === true) { From e38b6bc9527cdc05b63c777436d7f95be183c0cb Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 20:37:40 +0200 Subject: [PATCH 07/29] Governance: Signing Accounts implementation --- Platform/Client/githubServer.js | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/Platform/Client/githubServer.js b/Platform/Client/githubServer.js index 4c0521a8b..47823b677 100644 --- a/Platform/Client/githubServer.js +++ b/Platform/Client/githubServer.js @@ -304,6 +304,7 @@ exports.newGithubServer = function newGithubServer() { if (await validateUserProfileNodeNameEqualsGithubUsername() === false) { continue } if (await validateUserProfileIdDoesNotBelongtoAnotherUserProfile() === false) { continue } if (await validateUserProfileBlockchainAccountDoesNotBelongtoAnotherUserProfile() === false) { continue } + if (await validateUserProfileSigningAccountsDoesNotBelongtoAnotherUserProfile() === false) { continue } if (await mergePullRequest() === false) { console.log('[WARN] Github Server -> mergeGithubPullRequests -> Merge Failed -> Pull Request "' + pullRequest.title + '" not merged because Github could not merge it. -> mergeResponse.message = ' + mergeResponse.data.message) @@ -578,6 +579,47 @@ exports.newGithubServer = function newGithubServer() { } } + async function validateUserProfileSigningAccountsDoesNotBelongtoAnotherUserProfile() { + try { + /* + Validation #8 Signing accounts of the User Profile + must have a signature of the same Github username of the User Profile. + */ + + if (userProfile.signingAccounts === undefined) { return true } + + for (let i = 0; i < userProfile.signingAccounts.length; i++) { + let signingAccount = userProfile.signingAccounts[i] + let config = JSON.parse(signingAccount.config) + + if (config.signature.message !== githubUsername) { + console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #8 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Signing Account ' + signingAccount.name + ' has not signed the current Github User Account, but something else. -> config.signature.message = ' + config.signature.message + '-> githubUsername = ' + githubUsername) + + await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) + await octokit.rest.issues.createComment({ + owner: owner, + repo: repo, + issue_number: pullRequest.number, + body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the Signing Account ' + signingAccount.name + ' has not signed the current Github User Account, but something else. \n\nconfig.signature.message = ' + config.signature.message + '" \n\n githubUsername = ' + githubUsername + '"' + }); + + await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) + await octokit.rest.pulls.update({ + owner: owner, + repo: repo, + pull_number: pullRequest.number, + state: 'closed' + }); + return false + } + } + + return true + } catch (err) { + console.log(err.stack) + } + } + async function mergePullRequest() { /* All validations passed, we will proceed an merge this Pull Request. From fa7f16360e7d5a762a8d9c311480ec1e0246ceb6 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 20:41:01 +0200 Subject: [PATCH 08/29] Governance: Signing Accounts implementation - Fix --- Platform/Client/githubServer.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Platform/Client/githubServer.js b/Platform/Client/githubServer.js index 47823b677..b40fa153d 100644 --- a/Platform/Client/githubServer.js +++ b/Platform/Client/githubServer.js @@ -591,16 +591,17 @@ exports.newGithubServer = function newGithubServer() { for (let i = 0; i < userProfile.signingAccounts.length; i++) { let signingAccount = userProfile.signingAccounts[i] let config = JSON.parse(signingAccount.config) + let messageSigned = config.signature.message - if (config.signature.message !== githubUsername) { - console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #8 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Signing Account ' + signingAccount.name + ' has not signed the current Github User Account, but something else. -> config.signature.message = ' + config.signature.message + '-> githubUsername = ' + githubUsername) + if (messageSigned !== githubUsername) { + console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #8 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Signing Account ' + signingAccount.name + ' has not signed the current Github User Account, but something else. -> messageSigned = ' + messageSigned + '-> githubUsername = ' + githubUsername) await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) await octokit.rest.issues.createComment({ owner: owner, repo: repo, issue_number: pullRequest.number, - body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the Signing Account ' + signingAccount.name + ' has not signed the current Github User Account, but something else. \n\nconfig.signature.message = ' + config.signature.message + '" \n\n githubUsername = ' + githubUsername + '"' + body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the Signing Account ' + signingAccount.name + ' has not signed the current Github User Account, but something else. \n\n messageSigned = ' + messageSigned + '" \n\n githubUsername = ' + githubUsername + '"' }); await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) From 587f97e3b52cf0555770d5ff5d91b5205de4d539 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 20:43:10 +0200 Subject: [PATCH 09/29] Governance: Signing Accounts implementation - Test 1 --- .../User-Profiles/Luis-Fernando-Molina.json | 152 +++++++++--------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 98c9a8ce9..25ff6680a 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -127,12 +127,12 @@ "id": "f4d39b02-4324-438d-9f74-2bea2b7272ef", "savedPayload": { "position": { - "x": 10476.335575687743, - "y": 24007.294901687517 + "x": 10441.335575687743, + "y": 24008.294901687517 }, "targetPosition": { - "x": 10300, - "y": 24250 + "x": 10265, + "y": 24251 }, "floatingObject": { "isPinned": false, @@ -516,12 +516,12 @@ "id": "b6e3c87d-a11b-4b2a-b6a6-edc96375f5da", "savedPayload": { "position": { - "x": 10585.316954888545, - "y": 24157.294901687517 + "x": 10550.316954888545, + "y": 24158.294901687517 }, "targetPosition": { - "x": 10300, - "y": 24250 + "x": 10265, + "y": 24251 }, "floatingObject": { "isPinned": false, @@ -12448,12 +12448,12 @@ "id": "bb390957-b8a2-4a8a-9fbf-963ea20f6eaf", "savedPayload": { "position": { - "x": 10585.316954888545, - "y": 24342.705098312483 + "x": 10550.316954888545, + "y": 24343.705098312483 }, "targetPosition": { - "x": 10300, - "y": 24250 + "x": 10265, + "y": 24251 }, "floatingObject": { "isPinned": false, @@ -12508,12 +12508,12 @@ "id": "b046f4e4-40b1-4e47-8fed-75a6a5c6029d", "savedPayload": { "position": { - "x": 10750.399212980523, - "y": 24614.72609123522 + "x": 10715.399212980523, + "y": 24615.72609123522 }, "targetPosition": { - "x": 10476.335575687743, - "y": 24492.705098312483 + "x": 10441.335575687743, + "y": 24493.705098312483 }, "floatingObject": { "isPinned": false, @@ -13007,12 +13007,12 @@ "id": "681ff42a-d5af-4fed-971e-935398dac2aa", "savedPayload": { "position": { - "x": 10740.83790310513, - "y": 24979.857784237916 + "x": 10705.83790310513, + "y": 24980.857784237916 }, "targetPosition": { - "x": 10507.694114668038, - "y": 24791.061666922964 + "x": 10472.694114668038, + "y": 24792.061666922964 }, "floatingObject": { "isPinned": false, @@ -13042,12 +13042,12 @@ "id": "ff3bc7ad-6051-4246-99fa-1210a3378a29", "savedPayload": { "position": { - "x": 10570.41119262863, - "y": 25387.774804143926 + "x": 10535.41119262863, + "y": 25388.774804143926 }, "targetPosition": { - "x": 10539.052653648334, - "y": 25089.418235533445 + "x": 10504.052653648334, + "y": 25090.418235533445 }, "floatingObject": { "isPinned": false, @@ -13066,12 +13066,12 @@ "id": "7f642170-d60b-41bc-85ae-dc64fbfc8b4c", "savedPayload": { "position": { - "x": 10539.052653648334, - "y": 25089.418235533445 + "x": 10504.052653648334, + "y": 25090.418235533445 }, "targetPosition": { - "x": 10507.694114668038, - "y": 24791.061666922964 + "x": 10472.694114668038, + "y": 24792.061666922964 }, "floatingObject": { "isPinned": false, @@ -13094,12 +13094,12 @@ "id": "e4be3ce4-3569-4d97-8d54-95bb4cfcb0c5", "savedPayload": { "position": { - "x": 10318.897997353088, - "y": 25024.205455360054 + "x": 10283.897997353088, + "y": 25025.205455360054 }, "targetPosition": { - "x": 10507.694114668038, - "y": 24791.061666922964 + "x": 10472.694114668038, + "y": 24792.061666922964 }, "floatingObject": { "isPinned": false, @@ -13117,12 +13117,12 @@ "id": "3ff7f410-911d-4cb8-9094-d816dee4dccb", "savedPayload": { "position": { - "x": 10507.694114668038, - "y": 24791.061666922964 + "x": 10472.694114668038, + "y": 24792.061666922964 }, "targetPosition": { - "x": 10476.335575687743, - "y": 24492.705098312483 + "x": 10441.335575687743, + "y": 24493.705098312483 }, "floatingObject": { "isPinned": false, @@ -13140,12 +13140,12 @@ "id": "4f35322c-3e7d-49f8-9706-10bf71f0d420", "savedPayload": { "position": { - "x": 10476.335575687743, - "y": 24492.705098312483 + "x": 10441.335575687743, + "y": 24493.705098312483 }, "targetPosition": { - "x": 10300, - "y": 24250 + "x": 10265, + "y": 24251 }, "floatingObject": { "isPinned": false, @@ -13163,12 +13163,12 @@ "id": "f8182a9c-f830-4ec1-a238-ac3a5efd69e6", "savedPayload": { "position": { - "x": 10300, - "y": 24250 + "x": 10265, + "y": 24251 }, "targetPosition": { - "x": 10000, - "y": 24250 + "x": 9965, + "y": 24251 }, "floatingObject": { "isPinned": false, @@ -13190,12 +13190,12 @@ "id": "9870ca2a-cefc-484b-b7fc-206d62782ebc", "savedPayload": { "position": { - "x": 9850, - "y": 24509.807621135333 + "x": 9815, + "y": 24510.807621135333 }, "targetPosition": { - "x": 10000, - "y": 24250 + "x": 9965, + "y": 24251 }, "floatingObject": { "isPinned": false, @@ -13223,12 +13223,12 @@ "id": "30858b11-5b8d-46c6-97f8-765e3676fc2f", "savedPayload": { "position": { - "x": 9550, - "y": 23990.192378864667 + "x": 9515, + "y": 23991.192378864667 }, "targetPosition": { - "x": 9850, - "y": 23990.192378864667 + "x": 9815, + "y": 23991.192378864667 }, "floatingObject": { "isPinned": false, @@ -13251,12 +13251,12 @@ "id": "beff2691-f55f-401c-87a7-f6f7e59ebfb0", "savedPayload": { "position": { - "x": 9590.192378864669, - "y": 23840.192378864667 + "x": 9555.192378864669, + "y": 23841.192378864667 }, "targetPosition": { - "x": 9850, - "y": 23990.192378864667 + "x": 9815, + "y": 23991.192378864667 }, "floatingObject": { "isPinned": false, @@ -13279,12 +13279,12 @@ "id": "5828093e-65e1-4b18-9cbc-9ff33c98acc1", "savedPayload": { "position": { - "x": 9700, - "y": 23730.384757729335 + "x": 9665, + "y": 23731.384757729335 }, "targetPosition": { - "x": 9850, - "y": 23990.192378864667 + "x": 9815, + "y": 23991.192378864667 }, "floatingObject": { "isPinned": false, @@ -13307,12 +13307,12 @@ "id": "fa5647f8-42bc-4d7b-8137-401ac8b5433c", "savedPayload": { "position": { - "x": 9850, - "y": 23690.192378864667 + "x": 9815, + "y": 23691.192378864667 }, "targetPosition": { - "x": 9850, - "y": 23990.192378864667 + "x": 9815, + "y": 23991.192378864667 }, "floatingObject": { "isPinned": false, @@ -13335,12 +13335,12 @@ "id": "e7066d66-9e36-4f38-963e-76b915b38c43", "savedPayload": { "position": { - "x": 10000, - "y": 23730.384757729335 + "x": 9965, + "y": 23731.384757729335 }, "targetPosition": { - "x": 9850, - "y": 23990.192378864667 + "x": 9815, + "y": 23991.192378864667 }, "floatingObject": { "isPinned": false, @@ -13359,12 +13359,12 @@ "id": "1aae1fa4-e5cf-48de-a25e-20001523da70", "savedPayload": { "position": { - "x": 9850, - "y": 23990.192378864667 + "x": 9815, + "y": 23991.192378864667 }, "targetPosition": { - "x": 10000, - "y": 24250 + "x": 9965, + "y": 24251 }, "floatingObject": { "isPinned": false, @@ -13382,12 +13382,12 @@ "id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "savedPayload": { "position": { - "x": 10000, - "y": 24250 + "x": 9965, + "y": 24251 }, "targetPosition": { - "x": 10000, - "y": 24250 + "x": 9965, + "y": 24251 }, "floatingObject": { "isPinned": false, From 0e73d7c7f4d8d1aa5c972e27fed438e5ad52cbd4 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 20:44:26 +0200 Subject: [PATCH 10/29] Governance: Signing Accounts implementation - Test 2 --- .../Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 25ff6680a..95df2b721 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -13218,7 +13218,7 @@ { "type": "Signing Account", "name": "Social Trading Desktop", - "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x44cba4eeebb7f8bfb0d9fedb8b3c5c34ecd75b69969766435ae641547a8158c4\",\n \"s\": \"0x144b9076038085fa5fa51c381e76377cd2bcc87c835698eeb5195cceefb63ead\",\n \"signature\": \"0x44cba4eeebb7f8bfb0d9fedb8b3c5c34ecd75b69969766435ae641547a8158c4144b9076038085fa5fa51c381e76377cd2bcc87c835698eeb5195cceefb63ead1c\"\n }\n}", + "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-MolinaX\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x44cba4eeebb7f8bfb0d9fedb8b3c5c34ecd75b69969766435ae641547a8158c4\",\n \"s\": \"0x144b9076038085fa5fa51c381e76377cd2bcc87c835698eeb5195cceefb63ead\",\n \"signature\": \"0x44cba4eeebb7f8bfb0d9fedb8b3c5c34ecd75b69969766435ae641547a8158c4144b9076038085fa5fa51c381e76377cd2bcc87c835698eeb5195cceefb63ead1c\"\n }\n}", "project": "Governance", "id": "30858b11-5b8d-46c6-97f8-765e3676fc2f", "savedPayload": { From 440321ee2183bb69b00466fc4d5925153b4407b5 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 20:51:38 +0200 Subject: [PATCH 11/29] Governance Signing Accounts Test 3 --- Platform/Client/githubServer.js | 1 + .../Plugins/User-Profiles/Luis-Fernando-Molina.json | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Platform/Client/githubServer.js b/Platform/Client/githubServer.js index b40fa153d..d9f2d469e 100644 --- a/Platform/Client/githubServer.js +++ b/Platform/Client/githubServer.js @@ -592,6 +592,7 @@ exports.newGithubServer = function newGithubServer() { let signingAccount = userProfile.signingAccounts[i] let config = JSON.parse(signingAccount.config) let messageSigned = config.signature.message + console.log(signingAccount.name, messageSigned, config.signature.message) if (messageSigned !== githubUsername) { console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #8 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Signing Account ' + signingAccount.name + ' has not signed the current Github User Account, but something else. -> messageSigned = ' + messageSigned + '-> githubUsername = ' + githubUsername) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 95df2b721..e5a1f3eb4 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -13382,17 +13382,17 @@ "id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "savedPayload": { "position": { - "x": 9965, - "y": 24251 + "x": 9980, + "y": 24288 }, "targetPosition": { - "x": 9965, - "y": 24251 + "x": 9980, + "y": 24288 }, "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 From 99ce5971dc71114d194deabde5eba341064678ca Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 20:52:45 +0200 Subject: [PATCH 12/29] Governance Signing Accounts Test 4 --- .../Plugins/User-Profiles/Luis-Fernando-Molina.json | 8 ++++---- .../User-Profiles/Test-Network-Client-Profile.json | 8 ++++---- .../Plugins/User-Profiles/Test-Network-Node-Profile.json | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index e5a1f3eb4..b4fbbe927 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -13382,12 +13382,12 @@ "id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "savedPayload": { "position": { - "x": 9980, - "y": 24288 + "x": 9804, + "y": 24282 }, "targetPosition": { - "x": 9980, - "y": 24288 + "x": 9804, + "y": 24282 }, "floatingObject": { "isPinned": false, diff --git a/Projects/Governance/Plugins/User-Profiles/Test-Network-Client-Profile.json b/Projects/Governance/Plugins/User-Profiles/Test-Network-Client-Profile.json index bbd0152d0..095621cc9 100644 --- a/Projects/Governance/Plugins/User-Profiles/Test-Network-Client-Profile.json +++ b/Projects/Governance/Plugins/User-Profiles/Test-Network-Client-Profile.json @@ -62,12 +62,12 @@ "id": "baa2f02c-2920-4edb-a103-d452fc61d82f", "savedPayload": { "position": { - "x": 30000, - "y": 18250 + "x": 40000, + "y": 21250 }, "targetPosition": { - "x": 30000, - "y": 18250 + "x": 40000, + "y": 21250 }, "floatingObject": { "isPinned": false, diff --git a/Projects/Governance/Plugins/User-Profiles/Test-Network-Node-Profile.json b/Projects/Governance/Plugins/User-Profiles/Test-Network-Node-Profile.json index 03377a20e..465460e28 100644 --- a/Projects/Governance/Plugins/User-Profiles/Test-Network-Node-Profile.json +++ b/Projects/Governance/Plugins/User-Profiles/Test-Network-Node-Profile.json @@ -62,12 +62,12 @@ "id": "36c2b050-631f-4291-987c-418adc94317d", "savedPayload": { "position": { - "x": 40000, - "y": 21250 + "x": 30000, + "y": 18250 }, "targetPosition": { - "x": 40000, - "y": 21250 + "x": 30000, + "y": 18250 }, "floatingObject": { "isPinned": false, From 0443fd2ea22d3ecf377514bf65326df9ceb70942 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 20:54:35 +0200 Subject: [PATCH 13/29] Governance Signing Accounts Test 5 --- .../Plugins/User-Profiles/Luis-Fernando-Molina.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index b4fbbe927..ea9228300 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -13382,12 +13382,12 @@ "id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "savedPayload": { "position": { - "x": 9804, - "y": 24282 + "x": 9723, + "y": 24281 }, "targetPosition": { - "x": 9804, - "y": 24282 + "x": 9723, + "y": 24281 }, "floatingObject": { "isPinned": false, From 3612143d68402864746c215635b9110980b5ff01 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 21:00:20 +0200 Subject: [PATCH 14/29] Governance Signing Accounts Test 7 --- Platform/Client/githubServer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Platform/Client/githubServer.js b/Platform/Client/githubServer.js index d9f2d469e..e024c15fc 100644 --- a/Platform/Client/githubServer.js +++ b/Platform/Client/githubServer.js @@ -586,6 +586,7 @@ exports.newGithubServer = function newGithubServer() { must have a signature of the same Github username of the User Profile. */ + console.log('userProfile.signingAccounts ', userProfile.signingAccounts) if (userProfile.signingAccounts === undefined) { return true } for (let i = 0; i < userProfile.signingAccounts.length; i++) { From 392322a4329266761fc8e9a69d62f789775c3d44 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 21:00:51 +0200 Subject: [PATCH 15/29] Governance Signing Accounts Test 8 --- .../Plugins/User-Profiles/Luis-Fernando-Molina.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index ea9228300..aaaec4849 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -13382,12 +13382,12 @@ "id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "savedPayload": { "position": { - "x": 9723, - "y": 24281 + "x": 9901, + "y": 24261 }, "targetPosition": { - "x": 9723, - "y": 24281 + "x": 9901, + "y": 24261 }, "floatingObject": { "isPinned": false, From 87514fed5fb032b35ba9ff00d85a8b1b5e03e6f8 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 21:03:04 +0200 Subject: [PATCH 16/29] Governance Signing Account Test 8 --- Platform/Client/githubServer.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Platform/Client/githubServer.js b/Platform/Client/githubServer.js index e024c15fc..83afc484f 100644 --- a/Platform/Client/githubServer.js +++ b/Platform/Client/githubServer.js @@ -586,11 +586,10 @@ exports.newGithubServer = function newGithubServer() { must have a signature of the same Github username of the User Profile. */ - console.log('userProfile.signingAccounts ', userProfile.signingAccounts) if (userProfile.signingAccounts === undefined) { return true } - for (let i = 0; i < userProfile.signingAccounts.length; i++) { - let signingAccount = userProfile.signingAccounts[i] + for (let i = 0; i < userProfile.signingAccounts.signingAccounts.length; i++) { + let signingAccount = userProfile.signingAccounts.signingAccounts[i] let config = JSON.parse(signingAccount.config) let messageSigned = config.signature.message console.log(signingAccount.name, messageSigned, config.signature.message) From dda088346178287de653604c3a54f49be604e08d Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 21:03:41 +0200 Subject: [PATCH 17/29] Governance Signing Account Test 9 --- .../Plugins/User-Profiles/Luis-Fernando-Molina.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index aaaec4849..000199b2a 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -13383,11 +13383,11 @@ "savedPayload": { "position": { "x": 9901, - "y": 24261 + "y": 24265 }, "targetPosition": { "x": 9901, - "y": 24261 + "y": 24265 }, "floatingObject": { "isPinned": false, From 64a35b279887a24d46d78e44bb04be1bf63af74e Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 21:06:21 +0200 Subject: [PATCH 18/29] Governance Signing Account Test 10 --- Platform/Client/githubServer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Platform/Client/githubServer.js b/Platform/Client/githubServer.js index 83afc484f..b5722e156 100644 --- a/Platform/Client/githubServer.js +++ b/Platform/Client/githubServer.js @@ -592,7 +592,6 @@ exports.newGithubServer = function newGithubServer() { let signingAccount = userProfile.signingAccounts.signingAccounts[i] let config = JSON.parse(signingAccount.config) let messageSigned = config.signature.message - console.log(signingAccount.name, messageSigned, config.signature.message) if (messageSigned !== githubUsername) { console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #8 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Signing Account ' + signingAccount.name + ' has not signed the current Github User Account, but something else. -> messageSigned = ' + messageSigned + '-> githubUsername = ' + githubUsername) @@ -602,7 +601,7 @@ exports.newGithubServer = function newGithubServer() { owner: owner, repo: repo, issue_number: pullRequest.number, - body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the Signing Account ' + signingAccount.name + ' has not signed the current Github User Account, but something else. \n\n messageSigned = ' + messageSigned + '" \n\n githubUsername = ' + githubUsername + '"' + body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the Signing Account "' + signingAccount.name + '" has not signed the current Github User Account, but something else. \n\n messageSigned = "' + messageSigned + '" \n\n githubUsername = "' + githubUsername + '"' }); await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) From 60b46413c77169e7d9d89c643f5882c42489e4f5 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 21:07:40 +0200 Subject: [PATCH 19/29] Governance Signing Account Test 11 --- .../User-Profiles/Luis-Fernando-Molina.json | 154 +++++++++--------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 000199b2a..fe5f1b599 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -127,12 +127,12 @@ "id": "f4d39b02-4324-438d-9f74-2bea2b7272ef", "savedPayload": { "position": { - "x": 10441.335575687743, - "y": 24008.294901687517 + "x": 10476.335575687743, + "y": 24007.294901687517 }, "targetPosition": { - "x": 10265, - "y": 24251 + "x": 10300, + "y": 24250 }, "floatingObject": { "isPinned": false, @@ -516,12 +516,12 @@ "id": "b6e3c87d-a11b-4b2a-b6a6-edc96375f5da", "savedPayload": { "position": { - "x": 10550.316954888545, - "y": 24158.294901687517 + "x": 10585.316954888545, + "y": 24157.294901687517 }, "targetPosition": { - "x": 10265, - "y": 24251 + "x": 10300, + "y": 24250 }, "floatingObject": { "isPinned": false, @@ -12448,12 +12448,12 @@ "id": "bb390957-b8a2-4a8a-9fbf-963ea20f6eaf", "savedPayload": { "position": { - "x": 10550.316954888545, - "y": 24343.705098312483 + "x": 10585.316954888545, + "y": 24342.705098312483 }, "targetPosition": { - "x": 10265, - "y": 24251 + "x": 10300, + "y": 24250 }, "floatingObject": { "isPinned": false, @@ -12508,12 +12508,12 @@ "id": "b046f4e4-40b1-4e47-8fed-75a6a5c6029d", "savedPayload": { "position": { - "x": 10715.399212980523, - "y": 24615.72609123522 + "x": 10750.399212980523, + "y": 24614.72609123522 }, "targetPosition": { - "x": 10441.335575687743, - "y": 24493.705098312483 + "x": 10476.335575687743, + "y": 24492.705098312483 }, "floatingObject": { "isPinned": false, @@ -13007,12 +13007,12 @@ "id": "681ff42a-d5af-4fed-971e-935398dac2aa", "savedPayload": { "position": { - "x": 10705.83790310513, - "y": 24980.857784237916 + "x": 10740.83790310513, + "y": 24979.857784237916 }, "targetPosition": { - "x": 10472.694114668038, - "y": 24792.061666922964 + "x": 10507.694114668038, + "y": 24791.061666922964 }, "floatingObject": { "isPinned": false, @@ -13042,12 +13042,12 @@ "id": "ff3bc7ad-6051-4246-99fa-1210a3378a29", "savedPayload": { "position": { - "x": 10535.41119262863, - "y": 25388.774804143926 + "x": 10570.41119262863, + "y": 25387.774804143926 }, "targetPosition": { - "x": 10504.052653648334, - "y": 25090.418235533445 + "x": 10539.052653648334, + "y": 25089.418235533445 }, "floatingObject": { "isPinned": false, @@ -13066,12 +13066,12 @@ "id": "7f642170-d60b-41bc-85ae-dc64fbfc8b4c", "savedPayload": { "position": { - "x": 10504.052653648334, - "y": 25090.418235533445 + "x": 10539.052653648334, + "y": 25089.418235533445 }, "targetPosition": { - "x": 10472.694114668038, - "y": 24792.061666922964 + "x": 10507.694114668038, + "y": 24791.061666922964 }, "floatingObject": { "isPinned": false, @@ -13094,12 +13094,12 @@ "id": "e4be3ce4-3569-4d97-8d54-95bb4cfcb0c5", "savedPayload": { "position": { - "x": 10283.897997353088, - "y": 25025.205455360054 + "x": 10318.897997353088, + "y": 25024.205455360054 }, "targetPosition": { - "x": 10472.694114668038, - "y": 24792.061666922964 + "x": 10507.694114668038, + "y": 24791.061666922964 }, "floatingObject": { "isPinned": false, @@ -13117,12 +13117,12 @@ "id": "3ff7f410-911d-4cb8-9094-d816dee4dccb", "savedPayload": { "position": { - "x": 10472.694114668038, - "y": 24792.061666922964 + "x": 10507.694114668038, + "y": 24791.061666922964 }, "targetPosition": { - "x": 10441.335575687743, - "y": 24493.705098312483 + "x": 10476.335575687743, + "y": 24492.705098312483 }, "floatingObject": { "isPinned": false, @@ -13140,12 +13140,12 @@ "id": "4f35322c-3e7d-49f8-9706-10bf71f0d420", "savedPayload": { "position": { - "x": 10441.335575687743, - "y": 24493.705098312483 + "x": 10476.335575687743, + "y": 24492.705098312483 }, "targetPosition": { - "x": 10265, - "y": 24251 + "x": 10300, + "y": 24250 }, "floatingObject": { "isPinned": false, @@ -13163,12 +13163,12 @@ "id": "f8182a9c-f830-4ec1-a238-ac3a5efd69e6", "savedPayload": { "position": { - "x": 10265, - "y": 24251 + "x": 10300, + "y": 24250 }, "targetPosition": { - "x": 9965, - "y": 24251 + "x": 10000, + "y": 24250 }, "floatingObject": { "isPinned": false, @@ -13190,12 +13190,12 @@ "id": "9870ca2a-cefc-484b-b7fc-206d62782ebc", "savedPayload": { "position": { - "x": 9815, - "y": 24510.807621135333 + "x": 9850, + "y": 24509.807621135333 }, "targetPosition": { - "x": 9965, - "y": 24251 + "x": 10000, + "y": 24250 }, "floatingObject": { "isPinned": false, @@ -13218,17 +13218,17 @@ { "type": "Signing Account", "name": "Social Trading Desktop", - "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-MolinaX\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x44cba4eeebb7f8bfb0d9fedb8b3c5c34ecd75b69969766435ae641547a8158c4\",\n \"s\": \"0x144b9076038085fa5fa51c381e76377cd2bcc87c835698eeb5195cceefb63ead\",\n \"signature\": \"0x44cba4eeebb7f8bfb0d9fedb8b3c5c34ecd75b69969766435ae641547a8158c4144b9076038085fa5fa51c381e76377cd2bcc87c835698eeb5195cceefb63ead1c\"\n }\n}", + "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x44cba4eeebb7f8bfb0d9fedb8b3c5c34ecd75b69969766435ae641547a8158c4\",\n \"s\": \"0x144b9076038085fa5fa51c381e76377cd2bcc87c835698eeb5195cceefb63ead\",\n \"signature\": \"0x44cba4eeebb7f8bfb0d9fedb8b3c5c34ecd75b69969766435ae641547a8158c4144b9076038085fa5fa51c381e76377cd2bcc87c835698eeb5195cceefb63ead1c\"\n }\n}", "project": "Governance", "id": "30858b11-5b8d-46c6-97f8-765e3676fc2f", "savedPayload": { "position": { - "x": 9515, - "y": 23991.192378864667 + "x": 9550, + "y": 23990.192378864667 }, "targetPosition": { - "x": 9815, - "y": 23991.192378864667 + "x": 9850, + "y": 23990.192378864667 }, "floatingObject": { "isPinned": false, @@ -13251,12 +13251,12 @@ "id": "beff2691-f55f-401c-87a7-f6f7e59ebfb0", "savedPayload": { "position": { - "x": 9555.192378864669, - "y": 23841.192378864667 + "x": 9590.192378864669, + "y": 23840.192378864667 }, "targetPosition": { - "x": 9815, - "y": 23991.192378864667 + "x": 9850, + "y": 23990.192378864667 }, "floatingObject": { "isPinned": false, @@ -13279,12 +13279,12 @@ "id": "5828093e-65e1-4b18-9cbc-9ff33c98acc1", "savedPayload": { "position": { - "x": 9665, - "y": 23731.384757729335 + "x": 9700, + "y": 23730.384757729335 }, "targetPosition": { - "x": 9815, - "y": 23991.192378864667 + "x": 9850, + "y": 23990.192378864667 }, "floatingObject": { "isPinned": false, @@ -13307,12 +13307,12 @@ "id": "fa5647f8-42bc-4d7b-8137-401ac8b5433c", "savedPayload": { "position": { - "x": 9815, - "y": 23691.192378864667 + "x": 9850, + "y": 23690.192378864667 }, "targetPosition": { - "x": 9815, - "y": 23991.192378864667 + "x": 9850, + "y": 23990.192378864667 }, "floatingObject": { "isPinned": false, @@ -13335,12 +13335,12 @@ "id": "e7066d66-9e36-4f38-963e-76b915b38c43", "savedPayload": { "position": { - "x": 9965, - "y": 23731.384757729335 + "x": 10000, + "y": 23730.384757729335 }, "targetPosition": { - "x": 9815, - "y": 23991.192378864667 + "x": 9850, + "y": 23990.192378864667 }, "floatingObject": { "isPinned": false, @@ -13359,12 +13359,12 @@ "id": "1aae1fa4-e5cf-48de-a25e-20001523da70", "savedPayload": { "position": { - "x": 9815, - "y": 23991.192378864667 + "x": 9850, + "y": 23990.192378864667 }, "targetPosition": { - "x": 9965, - "y": 24251 + "x": 10000, + "y": 24250 }, "floatingObject": { "isPinned": false, @@ -13382,12 +13382,12 @@ "id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "savedPayload": { "position": { - "x": 9901, - "y": 24265 + "x": 10000, + "y": 24250 }, "targetPosition": { - "x": 9901, - "y": 24265 + "x": 10000, + "y": 24250 }, "floatingObject": { "isPinned": false, From a4239311bbe46454340a6dd0b84a16ac580c531f Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 22:31:49 +0200 Subject: [PATCH 20/29] Governance: Signature Hash Validation --- Platform/Client/githubServer.js | 88 +++++++++++++++++++++++++++----- Platform/Client/httpInterface.js | 9 ++++ Platform/Client/web3Server.js | 17 ++++++ 3 files changed, 102 insertions(+), 12 deletions(-) diff --git a/Platform/Client/githubServer.js b/Platform/Client/githubServer.js index b5722e156..004811b2f 100644 --- a/Platform/Client/githubServer.js +++ b/Platform/Client/githubServer.js @@ -301,6 +301,7 @@ exports.newGithubServer = function newGithubServer() { if (await validateFileNameEqualsGithubUsername() === false) { continue } if (await validateFileChangedIsUserProfile() === false) { continue } if (await validateMessageSignedIsGithubUsername() === false) { continue } + if (await validateMessageSignedHashIsSignatureHash() === false) { continue } if (await validateUserProfileNodeNameEqualsGithubUsername() === false) { continue } if (await validateUserProfileIdDoesNotBelongtoAnotherUserProfile() === false) { continue } if (await validateUserProfileBlockchainAccountDoesNotBelongtoAnotherUserProfile() === false) { continue } @@ -441,12 +442,46 @@ exports.newGithubServer = function newGithubServer() { } } + async function validateMessageSignedHashIsSignatureHash() { + /* + Validation #5: The message signed has is equal to the signature messageHash. + */ + let config = JSON.parse(userProfile.config) + + let serverResponse = await PL.servers.WEB3_SERVER.hashData( + config.signature.message + ) + let messageSignedHash = serverResponse.hash + let signatureHash = config.signature.messageHash + + if (messageSignedHash !== signatureHash) { + console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #5 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Message Signed Hash is not equal to the the Signature Hash. -> messageSignedHash = ' + messageSignedHash + '-> signatureHash = ' + signatureHash) + + await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) + await octokit.rest.issues.createComment({ + owner: owner, + repo: repo, + issue_number: pullRequest.number, + body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the Message Signed Hash is not equal to the the Signature Hash.\n\n messageSignedHash = "' + messageSignedHash + '"\n\n signatureHash = "' + signatureHash + '"' + }); + + await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) + await octokit.rest.pulls.update({ + owner: owner, + repo: repo, + pull_number: pullRequest.number, + state: 'closed' + }); + return false + } + } + async function validateUserProfileNodeNameEqualsGithubUsername() { /* - Validation #5: The name of the User Profile node is not the Github Username. + Validation #6: The name of the User Profile node is not the Github Username. */ if (userProfile.name !== githubUsername) { - console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #5 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the User Profile node\'s name. -> Github Username = ' + githubUsername + '-> userProfile.name = ' + userProfile.name) + console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #6 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the User Profile node\'s name. -> Github Username = ' + githubUsername + '-> userProfile.name = ' + userProfile.name) await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) await octokit.rest.issues.createComment({ @@ -469,7 +504,7 @@ exports.newGithubServer = function newGithubServer() { async function validateUserProfileIdDoesNotBelongtoAnotherUserProfile() { /* - Validation #6: The id of the User Profile can not be the id of an already existing User Profile + Validation #7: The id of the User Profile can not be the id of an already existing User Profile unless the existing one belongs to the same Github username. */ let userProfileIdMap = new Map() @@ -494,7 +529,7 @@ exports.newGithubServer = function newGithubServer() { if (testUserProfile === undefined) { return true } if (testUserProfile !== userProfile.name) { - console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #6 Failed -> Pull Request "' + pullRequest.title + '" not merged because the User Profile Id already exists and belongs to another User Profile on record. -> Profile Id = ' + userProfile.id + '-> User Profile with the same Id = ' + testUserProfile) + console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #7 Failed -> Pull Request "' + pullRequest.title + '" not merged because the User Profile Id already exists and belongs to another User Profile on record. -> Profile Id = ' + userProfile.id + '-> User Profile with the same Id = ' + testUserProfile) await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) await octokit.rest.issues.createComment({ @@ -518,7 +553,7 @@ exports.newGithubServer = function newGithubServer() { async function validateUserProfileBlockchainAccountDoesNotBelongtoAnotherUserProfile() { try { /* - Validation #7 The blockchain account of the User Profile can not be the + Validation #8 The blockchain account of the User Profile can not be the blockchain account of an already existing User Profile unless the existing one belongs to the same Github username. */ @@ -555,7 +590,7 @@ exports.newGithubServer = function newGithubServer() { if (testUserProfile === undefined) { return true } if (testUserProfile !== userProfile.name) { - console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #7 Failed -> Pull Request "' + pullRequest.title + '" not merged because the User Profile Blockchain Account already exists and belongs to another User Profile on record. -> Profile Blockchain Account = ' + serverResponse.address + '-> User Profile with the same Blockchain Account = ' + testUserProfile) + console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #8 Failed -> Pull Request "' + pullRequest.title + '" not merged because the User Profile Blockchain Account already exists and belongs to another User Profile on record. -> Profile Blockchain Account = ' + serverResponse.address + '-> User Profile with the same Blockchain Account = ' + testUserProfile) await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) await octokit.rest.issues.createComment({ @@ -581,20 +616,20 @@ exports.newGithubServer = function newGithubServer() { async function validateUserProfileSigningAccountsDoesNotBelongtoAnotherUserProfile() { try { - /* - Validation #8 Signing accounts of the User Profile - must have a signature of the same Github username of the User Profile. - */ if (userProfile.signingAccounts === undefined) { return true } for (let i = 0; i < userProfile.signingAccounts.signingAccounts.length; i++) { let signingAccount = userProfile.signingAccounts.signingAccounts[i] let config = JSON.parse(signingAccount.config) + /* + Validation #9 Signing accounts of the User Profile + must have a signature of the same Github username of the User Profile. + */ let messageSigned = config.signature.message if (messageSigned !== githubUsername) { - console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #8 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Signing Account ' + signingAccount.name + ' has not signed the current Github User Account, but something else. -> messageSigned = ' + messageSigned + '-> githubUsername = ' + githubUsername) + console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #9 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Signing Account ' + signingAccount.name + ' has not signed the current Github User Account, but something else. -> messageSigned = ' + messageSigned + '-> githubUsername = ' + githubUsername) await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) await octokit.rest.issues.createComment({ @@ -603,7 +638,36 @@ exports.newGithubServer = function newGithubServer() { issue_number: pullRequest.number, body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the Signing Account "' + signingAccount.name + '" has not signed the current Github User Account, but something else. \n\n messageSigned = "' + messageSigned + '" \n\n githubUsername = "' + githubUsername + '"' }); - + + await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) + await octokit.rest.pulls.update({ + owner: owner, + repo: repo, + pull_number: pullRequest.number, + state: 'closed' + }); + return false + } + /* + Validation #10: The message signed has is equal to the signature messageHash. + */ + let serverResponse = await PL.servers.WEB3_SERVER.hashData( + config.signature.message + ) + let messageSignedHash = serverResponse.hash + let signatureHash = config.signature.messageHash + + if (messageSignedHash !== signatureHash) { + console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #10 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Message Signed Hash is not equal to the the Signature Hash. -> messageSignedHash = ' + messageSignedHash + '-> signatureHash = ' + signatureHash) + + await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) + await octokit.rest.issues.createComment({ + owner: owner, + repo: repo, + issue_number: pullRequest.number, + body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the Message Signed Hash is not equal to the the Signature Hash.\n\n messageSignedHash = "' + messageSignedHash + '"\n\n signatureHash = "' + signatureHash + '"' + }); + await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) await octokit.rest.pulls.update({ owner: owner, diff --git a/Platform/Client/httpInterface.js b/Platform/Client/httpInterface.js index e4e8cdef5..0ff9a8061 100644 --- a/Platform/Client/httpInterface.js +++ b/Platform/Client/httpInterface.js @@ -93,6 +93,15 @@ exports.newHttpInterface = function newHttpInterface() { SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(serverResponse), httpResponse) return } + case 'hashData': { + + let serverResponse = await PL.servers.WEB3_SERVER.hashData( + params.data + ) + + SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(serverResponse), httpResponse) + return + } case 'recoverAddress': { let serverResponse = await PL.servers.WEB3_SERVER.recoverAddress( diff --git a/Platform/Client/web3Server.js b/Platform/Client/web3Server.js index 321c2c10b..354853cc7 100644 --- a/Platform/Client/web3Server.js +++ b/Platform/Client/web3Server.js @@ -7,6 +7,7 @@ exports.newWeb3Server = function newWeb3Server() { createWalletAccount: createWalletAccount, getWalletBalances: getWalletBalances, signData: signData, + hashData: hashData, recoverAddress: recoverAddress, mnemonicToPrivateKey: mnemonicToPrivateKey, payContributors: payContributors, @@ -223,6 +224,22 @@ exports.newWeb3Server = function newWeb3Server() { } } + async function hashData(data) { + try { + + let web3 = new Web3() + let hash = web3.eth.accounts.hashMessage(data) + + return { + hash: hash, + result: 'Ok' + } + + } catch (err) { + return { error: 'Could not hash the data. ' + err.stack } + } + } + async function recoverAddress(signature) { try { let signatureObject = JSON.parse(signature) From c2fcf04369b073a5a7cab2993e2f7d9d8b019b72 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 22:36:20 +0200 Subject: [PATCH 21/29] Governance Hash Validation Test 1 --- .../Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index fe5f1b599..8e09aecf5 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -1,7 +1,7 @@ { "type": "User Profile", "name": "Luis-Fernando-Molina", - "config": "{\"signature\":{\"message\":\"Luis-Fernando-Molina\",\"messageHash\":\"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\"v\":\"0x1c\",\"r\":\"0x8645be85fd4b053c9102194be4d007b79d971ca27acd38a7f6abe2588cb2b1a3\",\"s\":\"0x55c5bff8b6d0a038ef53287fb5feffca4eb7002f521472091a0a0014dea4d23e\",\"signature\":\"0x8645be85fd4b053c9102194be4d007b79d971ca27acd38a7f6abe2588cb2b1a355c5bff8b6d0a038ef53287fb5feffca4eb7002f521472091a0a0014dea4d23e1c\"},\"codeName\":\"Luis-Fernando-Molina\"}", + "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb8\",\n \"v\": \"0x1c\",\n \"r\": \"0x8645be85fd4b053c9102194be4d007b79d971ca27acd38a7f6abe2588cb2b1a3\",\n \"s\": \"0x55c5bff8b6d0a038ef53287fb5feffca4eb7002f521472091a0a0014dea4d23e\",\n \"signature\": \"0x8645be85fd4b053c9102194be4d007b79d971ca27acd38a7f6abe2588cb2b1a355c5bff8b6d0a038ef53287fb5feffca4eb7002f521472091a0a0014dea4d23e1c\"\n },\n \"codeName\": \"Luis-Fernando-Molina\"\n}", "project": "Governance", "tokenPowerSwitch": { "type": "Token Power Switch", From 488261dbd4a6f6306f0630b238b6684122a95a4b Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 22:40:53 +0200 Subject: [PATCH 22/29] Governance Hash Validation Test 2 --- .../Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- .../User-Profiles/Test-Network-Client-Profile.json | 8 ++++---- .../Plugins/User-Profiles/Test-Network-Node-Profile.json | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 8e09aecf5..02b4623b1 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -13392,7 +13392,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": true, + "isCollapsed": false, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 diff --git a/Projects/Governance/Plugins/User-Profiles/Test-Network-Client-Profile.json b/Projects/Governance/Plugins/User-Profiles/Test-Network-Client-Profile.json index 095621cc9..bbd0152d0 100644 --- a/Projects/Governance/Plugins/User-Profiles/Test-Network-Client-Profile.json +++ b/Projects/Governance/Plugins/User-Profiles/Test-Network-Client-Profile.json @@ -62,12 +62,12 @@ "id": "baa2f02c-2920-4edb-a103-d452fc61d82f", "savedPayload": { "position": { - "x": 40000, - "y": 21250 + "x": 30000, + "y": 18250 }, "targetPosition": { - "x": 40000, - "y": 21250 + "x": 30000, + "y": 18250 }, "floatingObject": { "isPinned": false, diff --git a/Projects/Governance/Plugins/User-Profiles/Test-Network-Node-Profile.json b/Projects/Governance/Plugins/User-Profiles/Test-Network-Node-Profile.json index 465460e28..03377a20e 100644 --- a/Projects/Governance/Plugins/User-Profiles/Test-Network-Node-Profile.json +++ b/Projects/Governance/Plugins/User-Profiles/Test-Network-Node-Profile.json @@ -62,12 +62,12 @@ "id": "36c2b050-631f-4291-987c-418adc94317d", "savedPayload": { "position": { - "x": 30000, - "y": 18250 + "x": 40000, + "y": 21250 }, "targetPosition": { - "x": 30000, - "y": 18250 + "x": 40000, + "y": 21250 }, "floatingObject": { "isPinned": false, From 525822b3d3667e6f9507833505b862885edd7468 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 22:44:02 +0200 Subject: [PATCH 23/29] Governance Hash Validation Test 3 --- .../User-Profiles/Luis-Fernando-Molina.json | 154 +++++++++--------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 02b4623b1..8898c9c0a 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -1,7 +1,7 @@ { "type": "User Profile", "name": "Luis-Fernando-Molina", - "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb8\",\n \"v\": \"0x1c\",\n \"r\": \"0x8645be85fd4b053c9102194be4d007b79d971ca27acd38a7f6abe2588cb2b1a3\",\n \"s\": \"0x55c5bff8b6d0a038ef53287fb5feffca4eb7002f521472091a0a0014dea4d23e\",\n \"signature\": \"0x8645be85fd4b053c9102194be4d007b79d971ca27acd38a7f6abe2588cb2b1a355c5bff8b6d0a038ef53287fb5feffca4eb7002f521472091a0a0014dea4d23e1c\"\n },\n \"codeName\": \"Luis-Fernando-Molina\"\n}", + "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x8645be85fd4b053c9102194be4d007b79d971ca27acd38a7f6abe2588cb2b1a3\",\n \"s\": \"0x55c5bff8b6d0a038ef53287fb5feffca4eb7002f521472091a0a0014dea4d23e\",\n \"signature\": \"0x8645be85fd4b053c9102194be4d007b79d971ca27acd38a7f6abe2588cb2b1a355c5bff8b6d0a038ef53287fb5feffca4eb7002f521472091a0a0014dea4d23e1c\"\n },\n \"codeName\": \"Luis-Fernando-Molina\"\n}", "project": "Governance", "tokenPowerSwitch": { "type": "Token Power Switch", @@ -127,12 +127,12 @@ "id": "f4d39b02-4324-438d-9f74-2bea2b7272ef", "savedPayload": { "position": { - "x": 10476.335575687743, - "y": 24007.294901687517 + "x": 10503.335575687743, + "y": 23997.294901687517 }, "targetPosition": { - "x": 10300, - "y": 24250 + "x": 10327, + "y": 24240 }, "floatingObject": { "isPinned": false, @@ -516,12 +516,12 @@ "id": "b6e3c87d-a11b-4b2a-b6a6-edc96375f5da", "savedPayload": { "position": { - "x": 10585.316954888545, - "y": 24157.294901687517 + "x": 10612.316954888545, + "y": 24147.294901687517 }, "targetPosition": { - "x": 10300, - "y": 24250 + "x": 10327, + "y": 24240 }, "floatingObject": { "isPinned": false, @@ -12448,12 +12448,12 @@ "id": "bb390957-b8a2-4a8a-9fbf-963ea20f6eaf", "savedPayload": { "position": { - "x": 10585.316954888545, - "y": 24342.705098312483 + "x": 10612.316954888545, + "y": 24332.705098312483 }, "targetPosition": { - "x": 10300, - "y": 24250 + "x": 10327, + "y": 24240 }, "floatingObject": { "isPinned": false, @@ -12508,12 +12508,12 @@ "id": "b046f4e4-40b1-4e47-8fed-75a6a5c6029d", "savedPayload": { "position": { - "x": 10750.399212980523, - "y": 24614.72609123522 + "x": 10777.399212980523, + "y": 24604.72609123522 }, "targetPosition": { - "x": 10476.335575687743, - "y": 24492.705098312483 + "x": 10503.335575687743, + "y": 24482.705098312483 }, "floatingObject": { "isPinned": false, @@ -13007,12 +13007,12 @@ "id": "681ff42a-d5af-4fed-971e-935398dac2aa", "savedPayload": { "position": { - "x": 10740.83790310513, - "y": 24979.857784237916 + "x": 10767.83790310513, + "y": 24969.857784237916 }, "targetPosition": { - "x": 10507.694114668038, - "y": 24791.061666922964 + "x": 10534.694114668038, + "y": 24781.061666922964 }, "floatingObject": { "isPinned": false, @@ -13042,12 +13042,12 @@ "id": "ff3bc7ad-6051-4246-99fa-1210a3378a29", "savedPayload": { "position": { - "x": 10570.41119262863, - "y": 25387.774804143926 + "x": 10597.41119262863, + "y": 25377.774804143926 }, "targetPosition": { - "x": 10539.052653648334, - "y": 25089.418235533445 + "x": 10566.052653648334, + "y": 25079.418235533445 }, "floatingObject": { "isPinned": false, @@ -13066,12 +13066,12 @@ "id": "7f642170-d60b-41bc-85ae-dc64fbfc8b4c", "savedPayload": { "position": { - "x": 10539.052653648334, - "y": 25089.418235533445 + "x": 10566.052653648334, + "y": 25079.418235533445 }, "targetPosition": { - "x": 10507.694114668038, - "y": 24791.061666922964 + "x": 10534.694114668038, + "y": 24781.061666922964 }, "floatingObject": { "isPinned": false, @@ -13094,12 +13094,12 @@ "id": "e4be3ce4-3569-4d97-8d54-95bb4cfcb0c5", "savedPayload": { "position": { - "x": 10318.897997353088, - "y": 25024.205455360054 + "x": 10345.897997353088, + "y": 25014.205455360054 }, "targetPosition": { - "x": 10507.694114668038, - "y": 24791.061666922964 + "x": 10534.694114668038, + "y": 24781.061666922964 }, "floatingObject": { "isPinned": false, @@ -13117,12 +13117,12 @@ "id": "3ff7f410-911d-4cb8-9094-d816dee4dccb", "savedPayload": { "position": { - "x": 10507.694114668038, - "y": 24791.061666922964 + "x": 10534.694114668038, + "y": 24781.061666922964 }, "targetPosition": { - "x": 10476.335575687743, - "y": 24492.705098312483 + "x": 10503.335575687743, + "y": 24482.705098312483 }, "floatingObject": { "isPinned": false, @@ -13140,12 +13140,12 @@ "id": "4f35322c-3e7d-49f8-9706-10bf71f0d420", "savedPayload": { "position": { - "x": 10476.335575687743, - "y": 24492.705098312483 + "x": 10503.335575687743, + "y": 24482.705098312483 }, "targetPosition": { - "x": 10300, - "y": 24250 + "x": 10327, + "y": 24240 }, "floatingObject": { "isPinned": false, @@ -13163,12 +13163,12 @@ "id": "f8182a9c-f830-4ec1-a238-ac3a5efd69e6", "savedPayload": { "position": { - "x": 10300, - "y": 24250 + "x": 10327, + "y": 24240 }, "targetPosition": { - "x": 10000, - "y": 24250 + "x": 10027, + "y": 24240 }, "floatingObject": { "isPinned": false, @@ -13190,12 +13190,12 @@ "id": "9870ca2a-cefc-484b-b7fc-206d62782ebc", "savedPayload": { "position": { - "x": 9850, - "y": 24509.807621135333 + "x": 9877, + "y": 24499.807621135333 }, "targetPosition": { - "x": 10000, - "y": 24250 + "x": 10027, + "y": 24240 }, "floatingObject": { "isPinned": false, @@ -13223,12 +13223,12 @@ "id": "30858b11-5b8d-46c6-97f8-765e3676fc2f", "savedPayload": { "position": { - "x": 9550, - "y": 23990.192378864667 + "x": 9577, + "y": 23980.192378864667 }, "targetPosition": { - "x": 9850, - "y": 23990.192378864667 + "x": 9877, + "y": 23980.192378864667 }, "floatingObject": { "isPinned": false, @@ -13251,12 +13251,12 @@ "id": "beff2691-f55f-401c-87a7-f6f7e59ebfb0", "savedPayload": { "position": { - "x": 9590.192378864669, - "y": 23840.192378864667 + "x": 9617.192378864669, + "y": 23830.192378864667 }, "targetPosition": { - "x": 9850, - "y": 23990.192378864667 + "x": 9877, + "y": 23980.192378864667 }, "floatingObject": { "isPinned": false, @@ -13279,12 +13279,12 @@ "id": "5828093e-65e1-4b18-9cbc-9ff33c98acc1", "savedPayload": { "position": { - "x": 9700, - "y": 23730.384757729335 + "x": 9727, + "y": 23720.384757729335 }, "targetPosition": { - "x": 9850, - "y": 23990.192378864667 + "x": 9877, + "y": 23980.192378864667 }, "floatingObject": { "isPinned": false, @@ -13307,12 +13307,12 @@ "id": "fa5647f8-42bc-4d7b-8137-401ac8b5433c", "savedPayload": { "position": { - "x": 9850, - "y": 23690.192378864667 + "x": 9877, + "y": 23680.192378864667 }, "targetPosition": { - "x": 9850, - "y": 23990.192378864667 + "x": 9877, + "y": 23980.192378864667 }, "floatingObject": { "isPinned": false, @@ -13335,12 +13335,12 @@ "id": "e7066d66-9e36-4f38-963e-76b915b38c43", "savedPayload": { "position": { - "x": 10000, - "y": 23730.384757729335 + "x": 10027, + "y": 23720.384757729335 }, "targetPosition": { - "x": 9850, - "y": 23990.192378864667 + "x": 9877, + "y": 23980.192378864667 }, "floatingObject": { "isPinned": false, @@ -13359,12 +13359,12 @@ "id": "1aae1fa4-e5cf-48de-a25e-20001523da70", "savedPayload": { "position": { - "x": 9850, - "y": 23990.192378864667 + "x": 9877, + "y": 23980.192378864667 }, "targetPosition": { - "x": 10000, - "y": 24250 + "x": 10027, + "y": 24240 }, "floatingObject": { "isPinned": false, @@ -13382,12 +13382,12 @@ "id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "savedPayload": { "position": { - "x": 10000, - "y": 24250 + "x": 10027, + "y": 24240 }, "targetPosition": { - "x": 10000, - "y": 24250 + "x": 10027, + "y": 24240 }, "floatingObject": { "isPinned": false, From 18a0a471368fe1020f844ea1c1cf0c29d125b7e7 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 22:45:42 +0200 Subject: [PATCH 24/29] Governance Hash Validation Test 4 --- .../Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 8898c9c0a..daef1fe0e 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -13274,7 +13274,7 @@ { "type": "Signing Account", "name": "Social Trading Mobile", - "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x502693fda93e9331e1eb1f5f6bd2896f6175d86816d11437ab8f4c51bdb95c5c\",\n \"s\": \"0x3c901bdb9f56f97cf558159c0f57c94dcade020a992be74a955a2cddf88047e1\",\n \"signature\": \"0x502693fda93e9331e1eb1f5f6bd2896f6175d86816d11437ab8f4c51bdb95c5c3c901bdb9f56f97cf558159c0f57c94dcade020a992be74a955a2cddf88047e11c\"\n }\n}", + "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb8\",\n \"v\": \"0x1c\",\n \"r\": \"0x502693fda93e9331e1eb1f5f6bd2896f6175d86816d11437ab8f4c51bdb95c5c\",\n \"s\": \"0x3c901bdb9f56f97cf558159c0f57c94dcade020a992be74a955a2cddf88047e1\",\n \"signature\": \"0x502693fda93e9331e1eb1f5f6bd2896f6175d86816d11437ab8f4c51bdb95c5c3c901bdb9f56f97cf558159c0f57c94dcade020a992be74a955a2cddf88047e11c\"\n }\n}", "project": "Governance", "id": "5828093e-65e1-4b18-9cbc-9ff33c98acc1", "savedPayload": { From d4c9d647d87fe7d952414d07c186f738f190539c Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 22:46:51 +0200 Subject: [PATCH 25/29] Governance Hash Validation Test 5 --- .../Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index daef1fe0e..8898c9c0a 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -13274,7 +13274,7 @@ { "type": "Signing Account", "name": "Social Trading Mobile", - "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb8\",\n \"v\": \"0x1c\",\n \"r\": \"0x502693fda93e9331e1eb1f5f6bd2896f6175d86816d11437ab8f4c51bdb95c5c\",\n \"s\": \"0x3c901bdb9f56f97cf558159c0f57c94dcade020a992be74a955a2cddf88047e1\",\n \"signature\": \"0x502693fda93e9331e1eb1f5f6bd2896f6175d86816d11437ab8f4c51bdb95c5c3c901bdb9f56f97cf558159c0f57c94dcade020a992be74a955a2cddf88047e11c\"\n }\n}", + "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x502693fda93e9331e1eb1f5f6bd2896f6175d86816d11437ab8f4c51bdb95c5c\",\n \"s\": \"0x3c901bdb9f56f97cf558159c0f57c94dcade020a992be74a955a2cddf88047e1\",\n \"signature\": \"0x502693fda93e9331e1eb1f5f6bd2896f6175d86816d11437ab8f4c51bdb95c5c3c901bdb9f56f97cf558159c0f57c94dcade020a992be74a955a2cddf88047e11c\"\n }\n}", "project": "Governance", "id": "5828093e-65e1-4b18-9cbc-9ff33c98acc1", "savedPayload": { From b298a69c5f54b77d98cd9964f1ce3af02d98077b Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Sep 2021 22:47:48 +0200 Subject: [PATCH 26/29] Governance Hash Validation Test 6 --- .../Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 8898c9c0a..3ab0494ad 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -13392,7 +13392,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 From dcaffe7aee4092fb53713cce54f9d46da9cd3708 Mon Sep 17 00:00:00 2001 From: Tentacule23 Date: Tue, 21 Sep 2021 22:44:32 -0400 Subject: [PATCH 27/29] Profile_update Tentacule23 --- .../Plugins/User-Profiles/Tentacule23.json | 740 ++++++++++++++++-- 1 file changed, 666 insertions(+), 74 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Tentacule23.json b/Projects/Governance/Plugins/User-Profiles/Tentacule23.json index 8575568f6..c83799030 100644 --- a/Projects/Governance/Plugins/User-Profiles/Tentacule23.json +++ b/Projects/Governance/Plugins/User-Profiles/Tentacule23.json @@ -26,12 +26,12 @@ "id": "deaea400-fa7f-48fd-a3fe-653b1bd18650", "savedPayload": { "position": { - "x": 9240.90909090909, - "y": 20471.577136594 + "x": 25000, + "y": 20430.384757729335 }, "targetPosition": { - "x": 9390.90909090909, - "y": 20731.384757729335 + "x": 25150, + "y": 20690.192378864667 }, "floatingObject": { "isPinned": false, @@ -49,18 +49,18 @@ "id": "97ae26ad-542d-4373-806a-593e979e1a1b", "savedPayload": { "position": { - "x": 9390.90909090909, - "y": 20731.384757729335 + "x": 25150, + "y": 20690.192378864667 }, "targetPosition": { - "x": 9540.90909090909, - "y": 20991.192378864667 + "x": 25300, + "y": 20950 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -81,12 +81,12 @@ "id": "54a2fcd6-e80c-4a30-84c0-d80ae9d197e9", "savedPayload": { "position": { - "x": 10140.90909090909, - "y": 20991.192378864667 + "x": 25600, + "y": 20430.384757729335 }, "targetPosition": { - "x": 9840.90909090909, - "y": 20991.192378864667 + "x": 25450, + "y": 20690.192378864667 }, "floatingObject": { "isPinned": false, @@ -104,18 +104,18 @@ "id": "786e62d1-6b32-49d9-8046-9c8577dbcd87", "savedPayload": { "position": { - "x": 9840.90909090909, - "y": 20991.192378864667 + "x": 25450, + "y": 20690.192378864667 }, "targetPosition": { - "x": 9540.90909090909, - "y": 20991.192378864667 + "x": 25300, + "y": 20950 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -127,12 +127,12 @@ "id": "7e7f3e6e-30f4-400d-a1f6-b3611498b7bf", "savedPayload": { "position": { - "x": 9540.90909090909, - "y": 20991.192378864667 + "x": 25300, + "y": 20950 }, "targetPosition": { - "x": 9390.90909090909, - "y": 21251 + "x": 25300, + "y": 21250 }, "floatingObject": { "isPinned": false, @@ -150,7 +150,7 @@ "communityBuildingPrograms": { "type": "Community Building Programs", "name": "New Community Building Programs", - "config": "{}", + "config": "{\n \"percentage\": 20\n}", "project": "Governance", "referralProgram": { "type": "Referral Program", @@ -166,12 +166,12 @@ "id": "bdf5f1d1-8441-4171-859f-d6e13f56ebd5", "savedPayload": { "position": { - "x": 9990.070230063444, - "y": 21748.196214194737 + "x": 26137.388593059404, + "y": 20800.838860845644 }, "targetPosition": { - "x": 9690.90909090909, - "y": 21770.615242270665 + "x": 26159.807621135333, + "y": 21100 }, "floatingObject": { "isPinned": false, @@ -207,12 +207,12 @@ "id": "67c981c9-f18b-4476-911e-9761b375386a", "savedPayload": { "position": { - "x": 9970.17121550235, - "y": 21880.217549580582 + "x": 26269.409928445253, + "y": 20820.73787540674 }, "targetPosition": { - "x": 9690.90909090909, - "y": 21770.615242270665 + "x": 26159.807621135333, + "y": 21100 }, "floatingObject": { "isPinned": false, @@ -233,7 +233,9 @@ "referenceParentCombinedNodePath": [ [ "harrellbm", - "User Profile" + "User Profile", + "Governance", + "3af73d3b-7c0e-4de7-a1e1-a72238081740" ] ] } @@ -246,12 +248,12 @@ "id": "2ca043e2-2332-4d61-b950-1e66fd360914", "savedPayload": { "position": { - "x": 9894.960912240365, - "y": 21990.530803819613 + "x": 26379.72318268428, + "y": 20895.948178668725 }, "targetPosition": { - "x": 9690.90909090909, - "y": 21770.615242270665 + "x": 26159.807621135333, + "y": 21100 }, "floatingObject": { "isPinned": false, @@ -272,7 +274,9 @@ "referenceParentCombinedNodePath": [ [ "Luis-Fernando-Molina", - "User Profile" + "User Profile", + "Governance", + "a8de78f0-c3e4-4a2a-b7e8-f659073969db" ] ] } @@ -285,18 +289,18 @@ "id": "b53f989c-8771-4000-81f3-aef821170101", "savedPayload": { "position": { - "x": 9713.328118985017, - "y": 22069.77638142502 + "x": 26446.479462871175, + "y": 21011.57344767673 }, "targetPosition": { - "x": 9690.90909090909, - "y": 21770.615242270665 + "x": 26159.807621135333, + "y": 21100 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -311,7 +315,9 @@ "referenceParentCombinedNodePath": [ [ "Julian-Molina", - "User Profile" + "User Profile", + "Governance", + "1fd95e41-4b22-48d5-be3a-904c37afcb11" ] ] } @@ -324,18 +330,18 @@ "id": "4f6ba6d0-501c-40ec-be81-806d505ca60f", "savedPayload": { "position": { - "x": 9470.993529360143, - "y": 21974.66706360194 + "x": 26456.456869002872, + "y": 21144.71267985285 }, "targetPosition": { - "x": 9690.90909090909, - "y": 21770.615242270665 + "x": 26159.807621135333, + "y": 21100 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -351,18 +357,18 @@ "id": "a364c990-fdaa-4b29-9c66-bd365d857532", "savedPayload": { "position": { - "x": 9394.259843041551, - "y": 21725.902562417814 + "x": 26407.67925343013, + "y": 21268.996017419086 }, "targetPosition": { - "x": 9690.90909090909, - "y": 21770.615242270665 + "x": 26159.807621135333, + "y": 21100 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -374,12 +380,137 @@ "id": "4894f190-0535-4e91-b61f-9f74cbc273fb", "savedPayload": { "position": { - "x": 9690.90909090909, - "y": 21770.615242270665 + "x": 26159.807621135333, + "y": 21100 }, "targetPosition": { - "x": 9540.90909090909, - "y": 21510.807621135333 + "x": 25900, + "y": 21250 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 2, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "mentorshipProgram": { + "type": "Mentorship Program", + "name": "New Mentorship Program", + "config": "{}", + "project": "Governance", + "userMentors": [ + { + "type": "User Mentor", + "name": "harrellbm", + "config": "{}", + "project": "Governance", + "id": "41d5d8d6-8562-4fb6-a56d-4953ec7ba2db", + "savedPayload": { + "position": { + "x": 26709.392990157383, + "y": 21472.354286469243 + }, + "targetPosition": { + "x": 26419.615242270662, + "y": 21550 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 2, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "User Profile", + "name": "harrellbm", + "id": "3af73d3b-7c0e-4de7-a1e1-a72238081740" + }, + "referenceParentCombinedNodePath": [ + [ + "harrellbm", + "User Profile", + "Governance", + "3af73d3b-7c0e-4de7-a1e1-a72238081740" + ] + ] + } + } + ], + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "6bbd1e87-1691-4a35-9a4d-13f0637185f2", + "savedPayload": { + "position": { + "x": 26679.422863405995, + "y": 21700 + }, + "targetPosition": { + "x": 26419.615242270662, + "y": 21550 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 2, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "tokensBonus": { + "type": "Tokens Bonus", + "name": "New Tokens Bonus", + "project": "Governance", + "id": "9d0b1f9c-2c43-4692-9f9d-0e11acb24448", + "savedPayload": { + "position": { + "x": 26497.26095580142, + "y": 21839.77774788672 + }, + "targetPosition": { + "x": 26419.615242270662, + "y": 21550 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 2, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "1cf64e4d-89cd-434a-b2b1-2d845d569271", + "savedPayload": { + "position": { + "x": 26419.615242270662, + "y": 21550 + }, + "targetPosition": { + "x": 25900, + "y": 21250 }, "floatingObject": { "isPinned": false, @@ -397,18 +528,479 @@ "id": "db99bd94-cded-4ef0-bfb2-979cac295f7f", "savedPayload": { "position": { - "x": 9540.90909090909, - "y": 21510.807621135333 + "x": 25900, + "y": 21250 }, "targetPosition": { - "x": 9390.90909090909, - "y": 21251 + "x": 25300, + "y": 21250 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": true, + "angleToParent": 2, + "distanceToParent": 5, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "votesAndClaimsPrograms": { + "type": "Votes And Claims Programs", + "name": "New Votes And Claims Programs", + "config": "{}", + "project": "Governance", + "votingProgram": { + "type": "Voting Program", + "name": "New Voting Program", + "config": "{\n\"percentage\": 10\n}", + "project": "Governance", + "votesSwitch": [ + { + "type": "Votes Switch", + "name": "New Votes Switch", + "config": "{}", + "project": "Governance", + "votesSwitch": [], + "claimVotesSwitch": [ + { + "type": "Claim Votes Switch", + "name": "New Claim Votes Switch", + "config": "{}", + "project": "Governance", + "claimVotesSwitch": [], + "positionClaimVotes": [], + "assetClaimVotes": [], + "featureClaimVotes": [ + { + "type": "Feature Claim Vote", + "name": "Tentacule23 Tutorial Tab Feature Visual Designer", + "config": "{}", + "project": "Governance", + "id": "48a23c6d-51fa-4049-bb51-b37c9881a711", + "savedPayload": { + "position": { + "x": 26593.59731237209, + "y": 21172.354286469243 + }, + "targetPosition": { + "x": 26381.465278016127, + "y": 21384.486320825206 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Feature Contribution Claim", + "name": "Tutorial Tab Feature Visual Designer", + "id": "5d6b30bc-4f05-4001-87ba-45cba35fe1ce" + }, + "referenceParentCombinedNodePath": [ + [ + "Tentacule23", + "User Profile" + ], + [ + "New Token Power Switch", + "Token Power Switch" + ], + [ + "New Votes And Claims Programs", + "Votes And Claims Programs" + ], + [ + "New Claims Program", + "Claims Program" + ], + [ + "New Feature Claims Folder", + "Feature Claims Folder" + ], + [ + "Tutorial Tab Feature Visual Designer", + "Feature Contribution Claim" + ] + ] + } + }, + { + "type": "Feature Claim Vote", + "name": "Tentacule23 Quick Position Node Feature Visual Designer", + "config": "{}", + "project": "Governance", + "id": "6a6f2a21-930b-4403-bcee-80ea71022927", + "savedPayload": { + "position": { + "x": 26671.243025902848, + "y": 21462.132034355964 + }, + "targetPosition": { + "x": 26381.465278016127, + "y": 21384.486320825206 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Feature Contribution Claim", + "name": "Quick Position Node Feature Visual Designer", + "id": "d7c5da08-3757-46b4-8175-bc9a7b02359f" + }, + "referenceParentCombinedNodePath": [ + [ + "Tentacule23", + "User Profile" + ], + [ + "New Token Power Switch", + "Token Power Switch" + ], + [ + "New Votes And Claims Programs", + "Votes And Claims Programs" + ], + [ + "New Claims Program", + "Claims Program" + ], + [ + "New Feature Claims Folder", + "Feature Claims Folder" + ], + [ + "Quick Position Node Feature Visual Designer", + "Feature Contribution Claim" + ] + ] + } + } + ], + "id": "008b3b69-cc01-4e09-9122-ec885a882d76", + "savedPayload": { + "position": { + "x": 26381.465278016127, + "y": 21384.486320825206 + }, + "targetPosition": { + "x": 26091.687530129406, + "y": 21462.132034355964 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], + "weightVotesSwitch": [], + "userProfileVotesSwitch": [], + "id": "fb7f7b7e-a2fb-421f-8158-faa5006f4636", + "savedPayload": { + "position": { + "x": 26091.687530129406, + "y": 21462.132034355964 + }, + "targetPosition": { + "x": 25801.909782242685, + "y": 21539.77774788672 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], + "tokensBonus": { + "type": "Tokens Bonus", + "name": "New Tokens Bonus", + "project": "Governance", + "id": "2bc7d2be-bd4a-47b8-966f-349202f799bf", + "savedPayload": { + "position": { + "x": 26014.04181659865, + "y": 21751.909782242685 + }, + "targetPosition": { + "x": 25801.909782242685, + "y": 21539.77774788672 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "f16e524c-4e32-4a6e-840b-bfdd6080f20c", + "savedPayload": { + "position": { + "x": 25801.909782242685, + "y": 21539.77774788672 + }, + "targetPosition": { + "x": 25512.132034355964, + "y": 21462.132034355964 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "claimsProgram": { + "type": "Claims Program", + "name": "New Claims Program", + "config": "{}", + "project": "Governance", + "assetClaimsFolders": [], + "featureClaimsFolders": [ + { + "type": "Feature Claims Folder", + "name": "New Feature Claims Folder", + "config": "{}", + "project": "Governance", + "featureClaimsFolders": [], + "featureContributionClaims": [ + { + "type": "Feature Contribution Claim", + "name": "Quick Position Node Feature Visual Designer", + "config": "{}", + "project": "Governance", + "id": "d7c5da08-3757-46b4-8175-bc9a7b02359f", + "savedPayload": { + "position": { + "x": 26091.687530129406, + "y": 22041.687530129406 + }, + "targetPosition": { + "x": 25801.909782242685, + "y": 21964.04181659865 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Feature", + "name": "Quick Position Node Feature", + "id": "98b5642a-faba-4a04-bf72-6efec86de56a" + }, + "referenceParentCombinedNodePath": [ + [ + "Foundations-Project", + "Features" + ], + [ + "Foundations Project", + "Feature Class" + ], + [ + "Visual Designer", + "Feature Class" + ], + [ + "Quick Position Node Feature", + "Feature" + ] + ] + } + }, + { + "type": "Feature Contribution Claim", + "name": "Tutorial Tab Feature Visual Designer", + "config": "{}", + "project": "Governance", + "id": "5d6b30bc-4f05-4001-87ba-45cba35fe1ce", + "savedPayload": { + "position": { + "x": 25879.555495773442, + "y": 22253.81956448537 + }, + "targetPosition": { + "x": 25801.909782242685, + "y": 21964.04181659865 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Feature", + "name": "Tutorial Tab Feature", + "id": "5ac7a46b-f462-4dc4-a627-2c7588a67e7a" + }, + "referenceParentCombinedNodePath": [ + [ + "Foundations-Project", + "Features" + ], + [ + "Foundations Project", + "Feature Class" + ], + [ + "Visual Designer", + "Feature Class" + ], + [ + "Tutorial Tab Feature", + "Feature" + ] + ] + } + } + ], + "id": "eb425c2c-6b7c-460d-a74e-650691f52fc7", + "savedPayload": { + "position": { + "x": 25801.909782242685, + "y": 21964.04181659865 + }, + "targetPosition": { + "x": 25589.77774788672, + "y": 21751.909782242685 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], + "positionClaimsFolders": [], + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "9673136d-ac9a-40b7-bd6f-6c8c3fbbb384", + "savedPayload": { + "position": { + "x": 25512.132034355964, + "y": 22041.687530129406 + }, + "targetPosition": { + "x": 25589.77774788672, + "y": 21751.909782242685 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "cce1f59a-bb5d-4700-abf8-ab8d2932ff6a", + "savedPayload": { + "position": { + "x": 25589.77774788672, + "y": 21751.909782242685 + }, + "targetPosition": { + "x": 25512.132034355964, + "y": 21462.132034355964 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "705bfab3-e851-4469-ab70-ac972950de6c", + "savedPayload": { + "position": { + "x": 25512.132034355964, + "y": 21462.132034355964 + }, + "targetPosition": { + "x": 25300, + "y": 21250 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -420,12 +1012,12 @@ "id": "5683e2bf-45ca-4dd6-9ade-53b4cad76ed0", "savedPayload": { "position": { - "x": 9390.90909090909, - "y": 21251 + "x": 25300, + "y": 21250 }, "targetPosition": { - "x": 9090.90909090909, - "y": 21251 + "x": 25000, + "y": 21250 }, "floatingObject": { "isPinned": false, @@ -447,12 +1039,12 @@ "id": "96f1c595-f94e-4207-9828-4199c74c4bfd", "savedPayload": { "position": { - "x": 8790.90909090909, - "y": 21251 + "x": 24700, + "y": 21250 }, "targetPosition": { - "x": 9090.90909090909, - "y": 21251 + "x": 25000, + "y": 21250 }, "floatingObject": { "isPinned": false, @@ -470,12 +1062,12 @@ "id": "7af21baa-ebc0-436f-94a7-a1746209418e", "savedPayload": { "position": { - "x": 9090.90909090909, - "y": 21251 + "x": 25000, + "y": 21250 }, "targetPosition": { - "x": 9090.90909090909, - "y": 21251 + "x": 25000, + "y": 21250 }, "floatingObject": { "isPinned": false, From edc3f86ad828858e5369a686bcbd9321b6b9ad46 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 22 Sep 2021 12:01:05 +0200 Subject: [PATCH 28/29] Governance: Auto processing of PRs --- Platform/Client/httpInterface.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Platform/Client/httpInterface.js b/Platform/Client/httpInterface.js index 0ff9a8061..cbe0d20aa 100644 --- a/Platform/Client/httpInterface.js +++ b/Platform/Client/httpInterface.js @@ -1067,6 +1067,15 @@ exports.newHttpInterface = function newHttpInterface() { ) SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(serverResponse), httpResponse) + + setInterval( + PL.servers.GITHUB_SERVER.mergePullRequests, + 60000, + params.commitMessage, + params.username, + params.token + ) + return } case 'payContributors': { From 325163e5facd356c70c0de8121c103a3f9e13411 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 22 Sep 2021 13:12:54 +0200 Subject: [PATCH 29/29] Desktop & Network working with Secrets --- Desktop/DesktopApp.js | 8 ++++---- DesktopRoot.js | 19 +++++++++---------- NetworkRoot.js | 18 +++++++++--------- .../Function-Libraries/ProfileConstructor.js | 2 ++ .../Network/NT/Modules/WebSocketsInterface.js | 6 +++--- .../Network/SA/Modules/WebSocketsClient.js | 15 ++++++--------- .../DK/modules/WebAppInterface.js | 7 ++----- .../Social-Trading/NT/Modules/Bootstrap.js | 15 ++++++++++++++- 8 files changed, 49 insertions(+), 41 deletions(-) diff --git a/Desktop/DesktopApp.js b/Desktop/DesktopApp.js index 66838c3fe..77cf0f03d 100644 --- a/Desktop/DesktopApp.js +++ b/Desktop/DesktopApp.js @@ -45,7 +45,7 @@ exports.newDesktopApp = function newDesktopApp() { */ queryMessage = { queryType: SA.projects.socialTrading.globals.queryTypes.USER_PROFILES, - emitterUserProfileId: DK.TEST_NETWORK_CLIENT_USER_PROFILE_ID, + emitterUserProfileId: SA.secrets.map.get('Social Trading Desktop').userProfileId, initialIndex: 'Last', amountRequested: 10, direction: 'Past' @@ -74,7 +74,7 @@ exports.newDesktopApp = function newDesktopApp() { let eventMessage = { eventId: SA.projects.foundations.utilities.miscellaneousFunctions.genereteUniqueId(), eventType: SA.projects.socialTrading.globals.eventTypes.FOLLOW_USER_PROFILE, - emitterUserProfileId: DK.TEST_NETWORK_CLIENT_USER_PROFILE_ID, + emitterUserProfileId: SA.secrets.map.get('Social Trading Desktop').userProfileId, targetUserProfileId: profile.userProfileId } @@ -99,8 +99,8 @@ exports.newDesktopApp = function newDesktopApp() { */ queryMessage = { queryType: SA.projects.socialTrading.globals.queryTypes.USER_PROFILE_STATS, - emitterUserProfileId: DK.TEST_NETWORK_CLIENT_USER_PROFILE_ID, - targetUserProfileId: DK.TEST_NETWORK_CLIENT_USER_PROFILE_ID + emitterUserProfileId: SA.secrets.map.get('Social Trading Desktop').userProfileId, + targetUserProfileId: SA.secrets.map.get('Social Trading Desktop').userProfileId } query = { diff --git a/DesktopRoot.js b/DesktopRoot.js index 87b9e57f9..ee357f8e2 100644 --- a/DesktopRoot.js +++ b/DesktopRoot.js @@ -53,17 +53,16 @@ exports.newDesktopRoot = function newDesktopRoot() { } /* - We will use this User Profile for Testing Purposes. - { - "githubUsername": "Test-Network-Client-Profile", - "address": "0xA0dCDA81b42C5EBDc45EC2875C72274B67560246", - "privateKey": "0x5fed4817a87431c8a328d0936561e63f45b6db289adac6125b9306ded644dfe9" - } + Setting up Secrets. */ - - DK.TEST_NETWORK_CLIENT_USER_PROFILE_ID = "baa2f02c-2920-4edb-a103-d452fc61d82f" - DK.TEST_NETWORK_CLIENT_USER_PROFILE_HANDLE = "Test-Network-Client-Profile" - DK.TEST_NETWORK_CLIENT_USER_PROFILE_PRIVATE_KEY = "0x5fed4817a87431c8a328d0936561e63f45b6db289adac6125b9306ded644dfe9" + SA.secrets = { + array: require('./My-Secrets/Secrets.json'), + map: new Map() + } + for (let i = 0; i < SA.secrets.array.length; i++) { + let secret = SA.secrets.array[i] + SA.secrets.map.set (secret.codeName, secret) + } run() diff --git a/NetworkRoot.js b/NetworkRoot.js index a0e5bbebf..d4bbf0c46 100644 --- a/NetworkRoot.js +++ b/NetworkRoot.js @@ -48,17 +48,17 @@ exports.newNetworkRoot = function newNetworkRoot() { ws: require('ws'), simpleGit: require('simple-git') } - /* - We will use this User Profile for testing purposes. - { - "githubUsername": "Test-Network-Node-Profile", - "address": "0xa153469c57A91F5a59Fc6c45A37aD8dbad85e417", - "privateKey": "0xac498ae59407e6b68429a814f64da2339550f93a767578e28c161ff119159271" - } + Setting up Secrets. */ - NT.NETWORK_NODE_USER_PROFILE_HANDLE = "Test-Network-Node-Profile" - NT.NETWORK_NODE_USER_PROFILE_PRIVATE_KEY = "0xac498ae59407e6b68429a814f64da2339550f93a767578e28c161ff119159271" + SA.secrets = { + array: require('./My-Secrets/Secrets.json'), + map: new Map() + } + for (let i = 0; i < SA.secrets.array.length; i++) { + let secret = SA.secrets.array[i] + SA.secrets.map.set(secret.codeName, secret) + } NT.app = require('./Network/NetwokNode.js').newNetworkNode() NT.app.run() diff --git a/Projects/Governance/UI/Function-Libraries/ProfileConstructor.js b/Projects/Governance/UI/Function-Libraries/ProfileConstructor.js index b772610c8..09562d135 100644 --- a/Projects/Governance/UI/Function-Libraries/ProfileConstructor.js +++ b/Projects/Governance/UI/Function-Libraries/ProfileConstructor.js @@ -306,11 +306,13 @@ function newGovernanceFunctionLibraryProfileConstructor() { node.config = "{}" UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'nodeName', signingAccount.name) + UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'codeName', signingAccount.name) UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'nodeType', signingAccount.type) UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'nodeId', signingAccount.id) UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'address', address) UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'privateKey', privateKey) UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'githubUsername', githubUsername) + UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(node.payload, 'userProfileId', node.payload.referenceParent.id) /* Show nice message. */ diff --git a/Projects/Network/NT/Modules/WebSocketsInterface.js b/Projects/Network/NT/Modules/WebSocketsInterface.js index 07bb3e0c3..72d0bb8c3 100644 --- a/Projects/Network/NT/Modules/WebSocketsInterface.js +++ b/Projects/Network/NT/Modules/WebSocketsInterface.js @@ -242,11 +242,11 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock */ let signedMessage = { callerProfileHandle: messageHeader.callerProfileHandle, - calledProfileHandle: NT.NETWORK_NODE_USER_PROFILE_HANDLE, + calledProfileHandle: SA.secrets.map.get('P2P Network Node').githubUsername, callerTimestamp: messageHeader.callerTimestamp, calledTimestamp: calledTimestamp } - let signature = web3.eth.accounts.sign(JSON.stringify(signedMessage), NT.NETWORK_NODE_USER_PROFILE_PRIVATE_KEY) + let signature = web3.eth.accounts.sign(JSON.stringify(signedMessage), SA.secrets.map.get('P2P Network Node').privateKey) let response = { result: 'Ok', @@ -322,7 +322,7 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock We will check that the signature includes this Network Node handle, to avoid man in the middle attackts. */ - if (signedMessage.calledProfileHandle !== NT.NETWORK_NODE_USER_PROFILE_HANDLE) { + if (signedMessage.calledProfileHandle !== SA.secrets.map.get('P2P Network Node').githubUsername) { let response = { result: 'Error', message: 'calledProfileHandle Does Not Match This Network Node Handle.' diff --git a/Projects/Network/SA/Modules/WebSocketsClient.js b/Projects/Network/SA/Modules/WebSocketsClient.js index b78a9d58b..04807076d 100644 --- a/Projects/Network/SA/Modules/WebSocketsClient.js +++ b/Projects/Network/SA/Modules/WebSocketsClient.js @@ -30,16 +30,13 @@ exports.newNetworkModulesWebSocketsClient = function newNetworkModulesWebSockets /* Here we will pick a Network Node from all users profiles available that do have a Network Node running. // TODO In the meantime, we will assume that we have chosen the following Network Node to connect to. - { - "githubUsername": "Test-Network-Node-Profile", - "address": "0xa153469c57A91F5a59Fc6c45A37aD8dbad85e417" - } + */ web3 = new SA.nodeModules.web3() selectedNetworkNode = { - userProfileHandle: "Test-Network-Node-Profile", - blockchainAccount: "0xa153469c57A91F5a59Fc6c45A37aD8dbad85e417", + userProfileHandle: "Luis-Fernando-Molina", + blockchainAccount: "0xeBDCB7a73c4796ca9F025d005630eCe773dd9e54", ranking: 0, host: "localhost", port: global.env.NETWORK_WEB_SOCKETS_INTERFACE_PORT @@ -90,7 +87,7 @@ exports.newNetworkModulesWebSocketsClient = function newNetworkModulesWebSockets let message = { messageType: 'Handshake', callerRole: 'Network Client', - callerProfileHandle: DK.TEST_NETWORK_CLIENT_USER_PROFILE_HANDLE, + callerProfileHandle: SA.secrets.map.get('Social Trading Desktop').githubUsername, callerTimestamp: callerTimestamp, step: 'One' } @@ -141,7 +138,7 @@ exports.newNetworkModulesWebSocketsClient = function newNetworkModulesWebSockets We will check that the profile handle we sent to the Network Node, is returned at the signed message, to avoid man in the middle attackts. */ - if (signedMessage.callerProfileHandle !== DK.TEST_NETWORK_CLIENT_USER_PROFILE_HANDLE) { + if (signedMessage.callerProfileHandle !== SA.secrets.map.get('Social Trading Desktop').githubUsername) { console.log('[ERROR] Web Sockets Client -> stepOneResponse -> The Network Node callerProfileHandle does not match my own userProfileHandle.') reject() return @@ -171,7 +168,7 @@ exports.newNetworkModulesWebSocketsClient = function newNetworkModulesWebSockets */ socketClient.onmessage = socketMessage => { stepTwoResponse(socketMessage) } - let signature = web3.eth.accounts.sign(JSON.stringify(signedMessage), DK.TEST_NETWORK_CLIENT_USER_PROFILE_PRIVATE_KEY) + let signature = web3.eth.accounts.sign(JSON.stringify(signedMessage), SA.secrets.map.get('Social Trading Desktop').privateKey) let message = { messageType: 'Handshake', diff --git a/Projects/Social-Trading/DK/modules/WebAppInterface.js b/Projects/Social-Trading/DK/modules/WebAppInterface.js index 609cb33c5..eb232bc70 100644 --- a/Projects/Social-Trading/DK/modules/WebAppInterface.js +++ b/Projects/Social-Trading/DK/modules/WebAppInterface.js @@ -44,7 +44,7 @@ exports.newSocialTradingModulesWebAppInterface = function newSocialTradingModule } return JSON.stringify(response) } - queryMessage.emitterUserProfileId = DK.TEST_NETWORK_CLIENT_USER_PROFILE_ID + queryMessage.emitterUserProfileId = SA.secrets.map.get('Social Trading Desktop').userProfileId messageHeader.queryMessage = JSON.stringify(queryMessage) let response @@ -123,7 +123,7 @@ exports.newSocialTradingModulesWebAppInterface = function newSocialTradingModule eventMessage.postText = undefined } - eventMessage.emitterUserProfileId = DK.TEST_NETWORK_CLIENT_USER_PROFILE_ID + eventMessage.emitterUserProfileId = SA.secrets.map.get('Social Trading Desktop').userProfileId messageHeader.eventMessage = JSON.stringify(eventMessage) let response = { @@ -175,9 +175,6 @@ exports.newSocialTradingModulesWebAppInterface = function newSocialTradingModule async function getPostText(userProfileHandle, postHash, timestamp) { let promise = new Promise((resolve, reject) => { -//https://raw.githubusercontent.com/Luis-Fernando-Molina/My-Social-Trading-Data/main/User-Posts/2021/09/17/0608070d8d2aab12e63cf3aa871918a04e237edff4fc0f886d158311811cf7c9.json - - const userProfileHandle = "Luis-Fernando-Molina" /// TODO Delete this line const fileName = postHash + ".json" const filePath = 'My-Social-Trading-Data/main/User-Posts/' + SA.projects.foundations.utilities.filesAndDirectories.pathFromDate(timestamp) diff --git a/Projects/Social-Trading/NT/Modules/Bootstrap.js b/Projects/Social-Trading/NT/Modules/Bootstrap.js index 58ab6bbe1..f46a016b7 100644 --- a/Projects/Social-Trading/NT/Modules/Bootstrap.js +++ b/Projects/Social-Trading/NT/Modules/Bootstrap.js @@ -52,7 +52,20 @@ exports.newBootstrap = function newBootstrap() { NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.set(userProfileId, userProfile) NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_HANDLE.set(userHandle, userProfile) NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_BLOCHAIN_ACCOUNT.set(blockchainAccount, userProfile) - + /* + Each User Profile might have Signing Accounts, meaning + accounts that can be siging on behalf of the User Profile. + */ + if (userProfilePlugin.signingAccounts !== undefined) { + for (let j = 0; j < userProfilePlugin.signingAccounts.signingAccounts.length; j++) { + let signingAccount = userProfilePlugin.signingAccounts.signingAccounts[j] + let config = JSON.parse(signingAccount.config) + let signatureObject = config.signature + let web3 = new SA.nodeModules.web3() + let blockchainAccount = web3.eth.accounts.recover(signatureObject) + NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_BLOCHAIN_ACCOUNT.set(blockchainAccount, userProfile) + } + } } } } \ No newline at end of file