MCPcopy Create free account
hub / github.com/dfinity/orbit / fetchCompatFile

Function fetchCompatFile

apps/wallet/src/core/compatibility.core.ts:99–106  ·  view source on GitHub ↗

* Fetch the compatibility file for the UI, if a version is provided, then fetch the versioned file.

(versionPath?: string)

Source from the content-addressed store, hash-verified

97 * Fetch the compatibility file for the UI, if a version is provided, then fetch the versioned file.
98 */
99async function fetchCompatFile(versionPath?: string): Promise<ApiCompatibilityInfo> {
100 const fileUrl = versionPath
101 ? `${appInitConfig.baseUrl}${versionPath}/compat.json`
102 : `${appInitConfig.baseUrl}compat.json`;
103
104 const response = await fetch(fileUrl);
105 return await response.json();
106}
107
108/**
109 * Get the currently loaded UI version from the meta tag or the import.meta.env

Callers 1

createCompatibilityLayerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected