()
| 160 | * Returns the number of remaining passes, or null if not available |
| 161 | */ |
| 162 | export 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 |
no test coverage detected