MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getCachedRemainingPasses

Function getCachedRemainingPasses

src/services/api/referral.ts:162–168  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160 * Returns the number of remaining passes, or null if not available
161 */
162export function getCachedRemainingPasses(): number | null {
163 const orgId = getOauthAccountInfo()?.organizationUuid
164 if (!orgId) return null
165 const config = getGlobalConfig()
166 const cachedEntry = config.passesEligibilityCache?.[orgId]
167 return cachedEntry?.remaining_passes ?? null
168}
169
170/**
171 * Fetch passes eligibility and store in GlobalConfig

Callers 2

resetIfPassesRefreshedFunction · 0.85
callFunction · 0.85

Calls 2

getGlobalConfigFunction · 0.85
getOauthAccountInfoFunction · 0.50

Tested by

no test coverage detected