MCPcopy Create free account
hub / github.com/Noumena-Network/code / resolveFastModeStatusFromCache

Function resolveFastModeStatusFromCache

src/utils/fastMode.ts:393–406  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

391 * while still making fast mode availability checks work.
392 */
393export function resolveFastModeStatusFromCache(): void {
394 if (!isFastModeEnabled()) {
395 return
396 }
397 if (orgStatus.status !== 'pending') {
398 return
399 }
400 const isAnt = isInternalBuild()
401 const cachedEnabled = getGlobalConfig().penguinModeOrgEnabled === true
402 orgStatus =
403 isAnt || cachedEnabled
404 ? { status: 'enabled' }
405 : { status: 'disabled', reason: 'unknown' }
406}
407
408export async function prefetchFastModeStatus(): Promise<void> {
409 // Skip network requests if nonessential traffic is disabled

Callers 1

runStartupPrefetchesFunction · 0.85

Calls 3

isFastModeEnabledFunction · 0.85
isInternalBuildFunction · 0.85
getGlobalConfigFunction · 0.70

Tested by

no test coverage detected