bug fixed with requests to BSC SCAN
This commit is contained in:
1 parent
0caf35299a
commit
2495bbd97f
2 files changed
+22
-18
No files matched your search
@@ -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 }
|
||||
|
||||
+20
-16
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user