From ce0125a302bf5f16e857afd222ee8a0d7cb2c0dc Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 21 Jun 2021 08:09:32 +0200 Subject: [PATCH] programNodeType --- .../UI/Function-Libraries/MentorshipProgram.js | 3 ++- Projects/Governance/UI/Utilities/MandatoryProgram.js | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Projects/Governance/UI/Function-Libraries/MentorshipProgram.js b/Projects/Governance/UI/Function-Libraries/MentorshipProgram.js index e01f373ba..07c577899 100644 --- a/Projects/Governance/UI/Function-Libraries/MentorshipProgram.js +++ b/Projects/Governance/UI/Function-Libraries/MentorshipProgram.js @@ -13,7 +13,8 @@ function newGovernanceFunctionLibraryMentorshipProgram() { pools, userProfiles, "mentorshipProgram", - "Mentorship-Program" + "Mentorship-Program", + "Mentorship Program" ) } } \ No newline at end of file diff --git a/Projects/Governance/UI/Utilities/MandatoryProgram.js b/Projects/Governance/UI/Utilities/MandatoryProgram.js index 88dd28250..8e803e846 100644 --- a/Projects/Governance/UI/Utilities/MandatoryProgram.js +++ b/Projects/Governance/UI/Utilities/MandatoryProgram.js @@ -9,7 +9,8 @@ function newFoundationsUtilitiesMandatoryProgram() { pools, userProfiles, programPropertyName, - programName + programName, + programNodeType ) { /* Here we will store the total amount of tokens that is going to be distributed among all participants @@ -18,7 +19,7 @@ function newFoundationsUtilitiesMandatoryProgram() { */ let mentorshipProgramPoolTokenReward /* - In order to be able to calculate the share of the Mentorships Program Pool for each User Profile, + In order to be able to calculate the share of the Program Pool for each User Profile, we need to accumulate all the Icomming Mentorship Power that each User Profile at their Mentorship Program node has, because with that Incoming Power is that each Mentorship Program node gets a share of the pool. @@ -101,7 +102,7 @@ function newFoundationsUtilitiesMandatoryProgram() { return } if ( - node.type === 'Mentorship Program' && + node.type === programNodeType && node.userMentors !== undefined ) { for (let i = 0; i < node.userMentors.length; i++) { @@ -185,7 +186,7 @@ function newFoundationsUtilitiesMandatoryProgram() { if (node.payload[programPropertyName] === undefined) { return } switch (node.type) { - case 'Mentorship Program': { + case programNodeType: { /* This is the point where we increase to our local count of mentorships whatever it comes at the count parameters. If we are processing the User Profile of this Mentorship Program