From bd15139d1a9dcd796c233681621e65e4d2c4dcc2 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 25 Aug 2021 12:37:17 +0200 Subject: [PATCH 1/2] Bug Fixed with Trading Engine Values not at angle --- Client/httpInterface.js | 1 + .../UI/Spaces/Charting-Space/Plotting/RecordValues.js | 1 + 2 files changed, 2 insertions(+) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index 9653a19d9..4736c28c0 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -744,6 +744,7 @@ exports.newHttpInterface = function newHttpInterface() { console.log('1. Make sure that you have set up your Github Username and Token at the APIs -> Github API node at the workspace.') console.log('2. Make sure you are running the latest version of Git available for your OS.') console.log('3. Make sure that you have cloned your Superalgos repository fork, and not the main Superalgos repository.') + console.log('4. If your fork is old, you might need to do an app.update and also a node setup at every branch. If you just reforked all is good.') error = err } } diff --git a/Projects/Foundations/UI/Spaces/Charting-Space/Plotting/RecordValues.js b/Projects/Foundations/UI/Spaces/Charting-Space/Plotting/RecordValues.js index 4b1112861..e68cf7c0a 100644 --- a/Projects/Foundations/UI/Spaces/Charting-Space/Plotting/RecordValues.js +++ b/Projects/Foundations/UI/Spaces/Charting-Space/Plotting/RecordValues.js @@ -133,6 +133,7 @@ function newRecordValues() { if (node.payload.uiObject === undefined) { return } if (value === true) { value = 'true' } if (value === false) { value = 'false' } + node.payload.uiObject.valueAtAngle = true node.payload.uiObject.setValue(value, 1, minDecimals) } } From 1aad11a3207c7e32b5a5ef58c1c41ef29a6c4795 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 25 Aug 2021 13:54:58 +0200 Subject: [PATCH 2/2] Bug Fixed Reading Balance from Blockchain - Retrying until get it --- .../Spaces/User-Profile-Space/UserProfile.js | 20 ++++++++++--------- 1 file changed, 11 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 ab1e3cda9..c5914e797 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -15,8 +15,7 @@ function newGovernanceUserProfileSpace() { } let waitingForResponses = 0 - let timer = 0 - const BSC_SCAN_RATE_LIMIT_DELAY = 7000 + const BSC_SCAN_RATE_LIMIT_DELAY = 6000 let reputationByAddress = new Map() return thisObject @@ -51,7 +50,7 @@ function newGovernanceUserProfileSpace() { /* Here we will setup the Reputation for each profile. */ - timer = timer + BSC_SCAN_RATE_LIMIT_DELAY + waitingForResponses++ getTreasuryAccountTransactions() @@ -294,10 +293,10 @@ function newGovernanceUserProfileSpace() { if (userProfile.payload.blockchainTokens === undefined) { getBlockchainAccount(userProfile) + return } } - function getBlockchainAccount(userProfile) { let signature = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(userProfile.payload, 'signature') if (signature === undefined || signature === "") { return } @@ -337,8 +336,7 @@ function newGovernanceUserProfileSpace() { ) { waitingForResponses++ userProfile.payload.blockchainTokens = 0 // We need to set this value here so that the next call to BSCSCAN is not done more than once. - setTimeout(getBlockchainTokens, timer, userProfile, blockchainAccount) - timer = timer + BSC_SCAN_RATE_LIMIT_DELAY + setTimeout(getBlockchainTokens, BSC_SCAN_RATE_LIMIT_DELAY, userProfile, blockchainAccount) } } } @@ -351,9 +349,13 @@ function newGovernanceUserProfileSpace() { return response.json(); }).then(function (data) { console.log(data) - userProfile.payload.uiObject.setInfoMessage(data) - userProfile.payload.blockchainTokens = Number(data.result) / 1000000000000000000 - userProfile.payload.reputation = Math.min(reputationByAddress.get(blockchainAccount.toLowerCase()) | 0, userProfile.payload.blockchainTokens) + if (data.result === "Max rate limit reached, please use API Key for higher rate limit") { + userProfile.payload.blockchainTokens = undefined // This enables this profile to query the blockchain again. + } else { + userProfile.payload.uiObject.setInfoMessage(data) + userProfile.payload.blockchainTokens = Number(data.result) / 1000000000000000000 + userProfile.payload.reputation = Math.min(reputationByAddress.get(blockchainAccount.toLowerCase()) | 0, userProfile.payload.blockchainTokens) + } waitingForResponses-- }).catch(function (err) { const message = err.message + ' - ' + 'Can not access BSC SCAN servers.'