@opexa/portal-sdk 0.59.13 → 0.59.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6359,20 +6359,19 @@ async function getFingerprint(environment) {
6359
6359
  if (typeof window === "undefined") return null;
6360
6360
  if (!thumbmark_instance) {
6361
6361
  thumbmark_instance = new Thumbmark({
6362
- logging: true,
6363
- ...environment === "production" && {
6364
- api_key: "8294c227c5194f96e4deb022e8e76293",
6365
- logging: false,
6366
- timeout: 3e4,
6367
- cache_lifetime_in_ms: 24 * 60 * 60 * 1e3
6368
- }
6362
+ api_key: environment === "production" ? "8294c227c5194f96e4deb022e8e76293" : void 0,
6363
+ logging: false,
6364
+ timeout: 3e4,
6365
+ cache_lifetime_in_ms: 1 * 60 * 60 * 1e3
6369
6366
  });
6370
6367
  }
6371
6368
  try {
6369
+ const cached = sessionStorage.getItem("fingerprint");
6370
+ if (cached) return cached;
6372
6371
  const result = await thumbmark_instance.get();
6372
+ sessionStorage.setItem("fingerprint", result.thumbmark);
6373
6373
  return result.thumbmark;
6374
- } catch (e) {
6375
- console.warn(e);
6374
+ } catch {
6376
6375
  return null;
6377
6376
  }
6378
6377
  }