From 01fe92eda62155be50bdcde2b07bc29a1b2cfe4d Mon Sep 17 00:00:00 2001 From: QuickMythril Date: Tue, 28 Jan 2025 04:52:28 -0500 Subject: [PATCH] fix rounding errors for signature count --- assets/js/ARBoard.js | 2 +- assets/js/AdminBoard.js | 2 +- assets/js/MinterBoard.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/ARBoard.js b/assets/js/ARBoard.js index 09fdc98..1ff1563 100644 --- a/assets/js/ARBoard.js +++ b/assets/js/ARBoard.js @@ -601,7 +601,7 @@ const checkAndDisplayActions = async (adminYes, name, cardIdentifier) => { } else if ((minterAdmins) && (minterAdmins.length > 1) && isBlockPassed){ const totalAdmins = minterAdmins.length const fortyPercent = totalAdmins * 0.40 - minAdminCount = Math.round(fortyPercent) + minAdminCount = Math.ceil(fortyPercent) console.warn(`this is another check to ensure minterAdmin group has more than 1 admin. IF so we will calculate the 40% needed for GROUP_APPROVAL, that number is: ${minAdminCount}`) } const addressInfo = await getNameInfo(name) diff --git a/assets/js/AdminBoard.js b/assets/js/AdminBoard.js index 4e2b13c..eb4f650 100644 --- a/assets/js/AdminBoard.js +++ b/assets/js/AdminBoard.js @@ -1067,7 +1067,7 @@ const checkAndDisplayRemoveActions = async (adminYes, name, cardIdentifier, name } else if ((minterAdmins) && (minterAdmins.length > 1) && isBlockPassed){ const totalAdmins = minterAdmins.length const fortyPercent = totalAdmins * 0.40 - minAdminCount = Math.round(fortyPercent) + minAdminCount = Math.ceil(fortyPercent) console.warn(`this is another check to ensure minterAdmin group has more than 1 admin. IF so we will calculate the 40% needed for GROUP_APPROVAL, that number is: ${minAdminCount}`) } if (isBlockPassed && (userState.isMinterAdmin || userState.isAdmin)) { diff --git a/assets/js/MinterBoard.js b/assets/js/MinterBoard.js index a25e726..315813d 100644 --- a/assets/js/MinterBoard.js +++ b/assets/js/MinterBoard.js @@ -1442,7 +1442,7 @@ const checkAndDisplayInviteButton = async (adminYes, creator, cardIdentifier) => let minAdminCount = 9 if (isBlockPassed) { - minAdminCount = Math.round(minterAdmins.length * 0.4) + minAdminCount = Math.ceil(minterAdmins.length * 0.4) console.warn(`Using 40% => ${minAdminCount}`) }