fix rounding errors for signature count

This commit is contained in:
QuickMythril 2025-01-28 04:52:28 -05:00
parent 136a6458c8
commit 01fe92eda6
3 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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)) {

View File

@ -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}`)
}