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

Function getCurrentlyLoadedUIVersion

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

* Get the currently loaded UI version from the meta tag or the import.meta.env

()

Source from the content-addressed store, hash-verified

109 * Get the currently loaded UI version from the meta tag or the import.meta.env
110 */
111function getCurrentlyLoadedUIVersion(): string {
112 // first try to get from the index.html meta tag
113 const versionMeta = document
114 .querySelector('meta[name="app:build-version"]')
115 ?.getAttribute('content');
116
117 if (versionMeta && isSemanticVersion(versionMeta)) {
118 return versionMeta;
119 }
120
121 return import.meta.env.APP_BUILD_VERSION;
122}
123
124/**
125 * Use the compatibility layer to check if the station API version is compatible with the UI.

Callers 1

checkCompatibilityFunction · 0.85

Calls 1

isSemanticVersionFunction · 0.90

Tested by

no test coverage detected