From 2495bbd97f8401588f836eaf9b5690154ef8cf50 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 17 Jun 2021 19:20:27 +0200 Subject: [PATCH 1/2] bug fixed with requests to BSC SCAN --- .../Spaces/User-Profile-Space/UserProfile.js | 4 +-- UI/Utilities.js | 36 ++++++++++--------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index 1a5425677..0dce00174 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -14,7 +14,8 @@ function newGovernanceUserProfileSpace() { thisObject.container.initialize(MODULE_NAME) thisObject.container.isDraggeable = false - waitingForResponses = 0 + let waitingForResponses = 0 + let timer = 0 return thisObject @@ -47,7 +48,6 @@ function newGovernanceUserProfileSpace() { 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. */ - let timer = 0 for (let i = 0; i < userProfiles.length; i++) { let userProfile = userProfiles[i] if (userProfile.payload === undefined) { continue } diff --git a/UI/Utilities.js b/UI/Utilities.js index eab199c2a..77231f851 100644 --- a/UI/Utilities.js +++ b/UI/Utilities.js @@ -107,27 +107,31 @@ function newUniqueId() { } function splitTextIntoPhrases(text, wordsPerLine) { - let splittedLabel = text.split(' ') - let phrases = [] - let phrase = '' - let wordCount = 0 - for (let i = 0; i < splittedLabel.length; i++) { - phrase = phrase + splittedLabel[i] - wordCount++ + try { + let splittedLabel = text.split(' ') + let phrases = [] + let phrase = '' + let wordCount = 0 + for (let i = 0; i < splittedLabel.length; i++) { + phrase = phrase + splittedLabel[i] + wordCount++ - if (i < splittedLabel.length - 1 && wordCount < wordsPerLine) { - phrase = phrase + ' ' + if (i < splittedLabel.length - 1 && wordCount < wordsPerLine) { + phrase = phrase + ' ' + } + if (wordCount >= wordsPerLine) { + phrases.push(phrase) + phrase = '' + wordCount = 0 + } } - if (wordCount >= wordsPerLine) { + if (wordCount > 0) { phrases.push(phrase) - phrase = '' - wordCount = 0 } + return phrases + } catch (err) { + console.log(err.stack) } - if (wordCount > 0) { - phrases.push(phrase) - } - return phrases } function getTextWidth(text) { From 7fc57c4ada33c7b1a861e91d027e6351baf401d3 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 23 Jun 2021 18:11:12 +0200 Subject: [PATCH 2/2] typos found at PR 1186 that could not be merged because of branch changes --- .../Education/UI/Spaces/Docs-Space/DocumentPage.js | 12 ++++++------ .../Backtesting-Session/backtesting-session.json | 2 +- ...017-problems-saving-the-workspace-or-plugins.json | 2 +- ...rket-020-tutorial-step-charts-verification-2.json | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Projects/Education/UI/Spaces/Docs-Space/DocumentPage.js b/Projects/Education/UI/Spaces/Docs-Space/DocumentPage.js index 77fc64bb4..15d64e845 100644 --- a/Projects/Education/UI/Spaces/Docs-Space/DocumentPage.js +++ b/Projects/Education/UI/Spaces/Docs-Space/DocumentPage.js @@ -536,7 +536,7 @@ function newFoundationsDocsDocumentPage() { let includedSchemaDocument if (SCHEMAS_BY_PROJECT.get(project) === undefined) { - return 'Include paragraph style Syntax Error. The Project ' + project + ' could not be found. Check the Docs Include Style Syntax to learn how to include blocks from a page. This error message will dissapear as soon as you fix the problem.' + return 'Include paragraph style Syntax Error. The Project ' + project + ' could not be found. Check the Docs Include Style Syntax to learn how to include blocks from a page. This error message will disappear as soon as you fix the problem.' } switch (category) { case 'Node': { @@ -644,11 +644,11 @@ function newFoundationsDocsDocumentPage() { if (project === undefined || category === undefined || chapterNumber === undefined || chapterName === undefined) { - return 'Chapter paragraph style Syntax Error. Some of the required parameters are undefined. Check the Docs Chapter Style Syntax. This error message will dissapear as soon as you fix the problem.' + return 'Chapter paragraph style Syntax Error. Some of the required parameters are undefined. Check the Docs Chapter Style Syntax. This error message will disappear as soon as you fix the problem.' } if (SCHEMAS_BY_PROJECT.get(project) === undefined) { - return 'Chapter paragraph style Syntax Error. The Project ' + project + ' could not be found. Check the Docs Chapter Style Syntax. This error message will dissapear as soon as you fix the problem.' + return 'Chapter paragraph style Syntax Error. The Project ' + project + ' could not be found. Check the Docs Chapter Style Syntax. This error message will disappear as soon as you fix the problem.' } if (category !== 'Topic' && category !== 'Tutorial' && category !== 'Review') { @@ -664,7 +664,7 @@ function newFoundationsDocsDocumentPage() { ) if (orderedTopicPageIndexArray.length === 0) { - return 'Chapter paragraph style Syntax Error. The Topic ' + chapterName + ' could not be found. Check the Docs Chapter Style Syntax. This error message will dissapear as soon as you fix the problem.' + return 'Chapter paragraph style Syntax Error. The Topic ' + chapterName + ' could not be found. Check the Docs Chapter Style Syntax. This error message will disappear as soon as you fix the problem.' } break } @@ -676,7 +676,7 @@ function newFoundationsDocsDocumentPage() { ) if (orderedTutorialPageIndexArray.length === 0) { - return 'Chapter paragraph style Syntax Error. The Tutorial ' + chapterName + ' could not be found. Check the Docs Chapter Style Syntax. This error message will dissapear as soon as you fix the problem.' + return 'Chapter paragraph style Syntax Error. The Tutorial ' + chapterName + ' could not be found. Check the Docs Chapter Style Syntax. This error message will disappear as soon as you fix the problem.' } break } @@ -688,7 +688,7 @@ function newFoundationsDocsDocumentPage() { ) if (orderedReviewPageIndexArray.length === 0) { - return 'Chapter paragraph style Syntax Error. The Review ' + chapterName + ' could not be found. Check the Docs Chapter Style Syntax. This error message will dissapear as soon as you fix the problem.' + return 'Chapter paragraph style Syntax Error. The Review ' + chapterName + ' could not be found. Check the Docs Chapter Style Syntax. This error message will disappear as soon as you fix the problem.' } break } diff --git a/Projects/Foundations/Schemas/Docs-Nodes/B/Backtesting/Backtesting-Session/backtesting-session.json b/Projects/Foundations/Schemas/Docs-Nodes/B/Backtesting/Backtesting-Session/backtesting-session.json index d7a67e4e7..ba2872f40 100644 --- a/Projects/Foundations/Schemas/Docs-Nodes/B/Backtesting/Backtesting-Session/backtesting-session.json +++ b/Projects/Foundations/Schemas/Docs-Nodes/B/Backtesting/Backtesting-Session/backtesting-session.json @@ -27,7 +27,7 @@ }, { "style": "Text", - "text": "After a few seconds, a literal indication of the progress of the calculations appears below the session node, displaying the date that is currently being processed. Once the calculation is finished, the session stops and the date below the session node dissapears." + "text": "After a few seconds, a literal indication of the progress of the calculations appears below the session node, displaying the date that is currently being processed. Once the calculation is finished, the session stops and the date below the session node disappears." }, { "style": "Text", diff --git a/Projects/Foundations/Schemas/Docs-Topics/T/Troubleshooting/Troubleshooting/troubleshooting-017-problems-saving-the-workspace-or-plugins.json b/Projects/Foundations/Schemas/Docs-Topics/T/Troubleshooting/Troubleshooting/troubleshooting-017-problems-saving-the-workspace-or-plugins.json index 4ca968770..8d9819301 100644 --- a/Projects/Foundations/Schemas/Docs-Topics/T/Troubleshooting/Troubleshooting/troubleshooting-017-problems-saving-the-workspace-or-plugins.json +++ b/Projects/Foundations/Schemas/Docs-Topics/T/Troubleshooting/Troubleshooting/troubleshooting-017-problems-saving-the-workspace-or-plugins.json @@ -3,7 +3,7 @@ "pageNumber": "17", "type": "Problems Saving The Workspace or Plugins", "definition": { - "text": "Are you having problems saving your Workspace? Did your changes in the workspace dissapear? Was the workspace reset? Or you believe the changes were lost? Are you confused on how the system handles the persistance of changes? Is your Workspace not saving your changes?", + "text": "Are you having problems saving your Workspace? Did your changes in the workspace disappear? Was the workspace reset? Or you believe the changes were lost? Are you confused on how the system handles the persistance of changes? Is your Workspace not saving your changes?", "updated": 1620849519292 }, "paragraphs": [ diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-020-tutorial-step-charts-verification-2.json b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-020-tutorial-step-charts-verification-2.json index 75fed8c5c..8e4142965 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-020-tutorial-step-charts-verification-2.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/I/Install/Install-a-New-Market/install-a-new-market-020-tutorial-step-charts-verification-2.json @@ -7,7 +7,7 @@ "project": "Foundations", "name": "time-machine" }, - "text": "Verify that the time machines created show up on the chartsing space... you should find..." + "text": "Verify that the time machines created show up on the charting space... you should find..." }, "paragraphs": [ {