Rotation queue: reconcile against live chain directs in normalizeStatuses - never activate a sponsor the chain says is already 2/2 qualified (also syncs stale direct counts upward)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -667,6 +667,13 @@ function getOrgShare(rootId) {
|
||||
};
|
||||
}
|
||||
|
||||
// Live direct count from the index (null when unknown) — used by the rotation
|
||||
// queue to reconcile against chain reality before activating a sponsor.
|
||||
function liveDirects(id) {
|
||||
if (!state || !state.members[id]) return null;
|
||||
return state.members[id].directCount || 0;
|
||||
}
|
||||
|
||||
// Wallet address -> position id (for wallet-verified messaging sign-in).
|
||||
// One position per address by contract design.
|
||||
function memberIdByAccount(address) {
|
||||
@@ -744,4 +751,4 @@ async function getIncome(id) {
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = { startIndexer, getPayoutsPublic, verifyMember, memberLookup, memberPublic, getIncome, getOwnerUpgradeNeeds, getOrgRouting, getOrgShare, getCoachingScan, getMatrixTree, isInTeam, nextOpenPosition, memberIdByAccount, balanceOf, CONTRACT };
|
||||
module.exports = { startIndexer, getPayoutsPublic, verifyMember, memberLookup, memberPublic, getIncome, getOwnerUpgradeNeeds, getOrgRouting, getOrgShare, getCoachingScan, getMatrixTree, isInTeam, nextOpenPosition, memberIdByAccount, liveDirects, balanceOf, CONTRACT };
|
||||
|
||||
Reference in New Issue
Block a user