userNodeType refactoring

This commit is contained in:
Luis Fernando Molina committed 2021-06-21 08:33:55 +02:00
1 parent 8b9a34d5b6
commit b6ca4ae39d
2 files changed
+6 -4

No files matched your search

@@ -16,7 +16,8 @@ function newGovernanceFunctionLibraryMentorshipProgram() {
"Mentorship-Program",
"Mentorship Program",
"Mentorship Power",
"userMentors"
"userMentors",
"User Mentor"
)
}
}
@@ -12,7 +12,8 @@ function newFoundationsUtilitiesMandatoryProgram() {
programName,
programNodeType,
programPowerName,
usersArrayPropertyName
usersArrayPropertyName,
userNodeType
) {
/*
Here we will store the total amount of tokens that is going to be distributed among all participants
@@ -113,7 +114,7 @@ function newFoundationsUtilitiesMandatoryProgram() {
return
}
if (
node.type === 'User Mentor' &&
node.type === userNodeType &&
node.payload.referenceParent !== undefined
) {
reserProgram(node.payload.referenceParent)
@@ -227,7 +228,7 @@ function newFoundationsUtilitiesMandatoryProgram() {
}
break
}
case 'User Mentor': {
case userNodeType: {
node.payload[programPropertyName].outgoingPower = node.payload.parentNode.payload[programPropertyName].outgoingPower / node.payload.parentNode[usersArrayPropertyName].length
drawUserMentor(node)