@kalamba/sdk 0.48.0 → 0.48.1

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.
@@ -457,7 +457,7 @@ function getCurrencyNumberFormatOptions(currency) {
457
457
  }
458
458
  function formatCurrencyAsCurrency(number, currencyFormatter, currency) {
459
459
  const formattedNumber = currencyFormatter.format(+number);
460
- if (isCustomCurrency(currency)) return formattedNumber.replace(CUSTOM_CURRENCY_CODE, CUSTOM_CURRENCIES[currency].displayAs ?? currency);
460
+ if (isCustomCurrency(currency)) return formattedNumber.replace(CUSTOM_CURRENCY_CODE, CUSTOM_CURRENCIES[currency]?.displayAs ?? currency);
461
461
  return formattedNumber;
462
462
  }
463
463
  function formatCurrencyAsNumberPure(config, number, currencyFormatter) {
@@ -456,7 +456,7 @@ function getCurrencyNumberFormatOptions(currency) {
456
456
  }
457
457
  function formatCurrencyAsCurrency(number, currencyFormatter, currency) {
458
458
  const formattedNumber = currencyFormatter.format(+number);
459
- if (isCustomCurrency(currency)) return formattedNumber.replace(CUSTOM_CURRENCY_CODE, CUSTOM_CURRENCIES[currency].displayAs ?? currency);
459
+ if (isCustomCurrency(currency)) return formattedNumber.replace(CUSTOM_CURRENCY_CODE, CUSTOM_CURRENCIES[currency]?.displayAs ?? currency);
460
460
  return formattedNumber;
461
461
  }
462
462
  function formatCurrencyAsNumberPure(config, number, currencyFormatter) {
package/dist/index.cjs CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
6
6
  const require_errors = require('./errors-DXZbBm5R.cjs');
7
- const require_i18n = require('./i18n-CV3tQcqY.cjs');
7
+ const require_i18n = require('./i18n-C_kZhl3l.cjs');
8
8
  let lodash_es = require("lodash-es");
9
9
 
10
10
  //#region src/sdk/KalambaSdk.ts
@@ -80,7 +80,7 @@ var KalambaSdk = class {
80
80
  this.on("wrapperConfigured", () => resolve(), { once: true });
81
81
  this.send("configure", {
82
82
  ...payload,
83
- sdkVersion: "0.48.0"
83
+ sdkVersion: "0.48.1"
84
84
  });
85
85
  });
86
86
  }
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
5
  import { i as TimeoutError, r as RgsErrorCode, t as RgsError } from "./errors-DpQKmNNj.js";
6
- import { t as I18n } from "./i18n-DnUnXoF3.js";
6
+ import { t as I18n } from "./i18n-DBjvMtNi.js";
7
7
  import { merge } from "lodash-es";
8
8
 
9
9
  //#region src/sdk/KalambaSdk.ts
@@ -79,7 +79,7 @@ var KalambaSdk = class {
79
79
  this.on("wrapperConfigured", () => resolve(), { once: true });
80
80
  this.send("configure", {
81
81
  ...payload,
82
- sdkVersion: "0.48.0"
82
+ sdkVersion: "0.48.1"
83
83
  });
84
84
  });
85
85
  }
package/dist/plugins.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
5
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
6
- const require_i18n = require('./i18n-CV3tQcqY.cjs');
6
+ const require_i18n = require('./i18n-C_kZhl3l.cjs');
7
7
  const require_logger = require('./logger-BR4jdx4T.cjs');
8
8
 
9
9
  //#region src/plugins/CasinoPlugin.ts
package/dist/plugins.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2026, Kalamba Games Limited
4
4
  */
5
- import { t as I18n } from "./i18n-DnUnXoF3.js";
5
+ import { t as I18n } from "./i18n-DBjvMtNi.js";
6
6
  import { t as WithLogger } from "./logger-f0OQvO5X.js";
7
7
 
8
8
  //#region src/plugins/CasinoPlugin.ts
package/dist/wrapper.cjs CHANGED
@@ -368,16 +368,17 @@ var KalambaSdkConfigManager = class extends SdkConfigManager {
368
368
  };
369
369
  }
370
370
  async fetchOperatorConfig() {
371
- const rootUrl = "https://awscdn.kalamba.net/games/games/build/";
371
+ const hostname = typeof window !== "undefined" ? window.location?.hostname ?? "" : "";
372
+ const rootUrl = hostname.includes(".dev.") ? "https://games.dev.kl.luckycdn.net/games/kalamba/" : hostname.includes(".submissions.") ? "https://games.submissions.kl.luckycdn.net/games/kalamba/" : hostname.includes(".test.") ? "https://awscdn.test.kalamba.net/games/games/" : "https://awscdn.kalamba.net/games/games/";
372
373
  const integration = this.mappedIntegration;
373
374
  const brand = this.mappedBrand;
374
375
  let config = {};
375
376
  try {
376
377
  config = await fetch(`${rootUrl}config/${integration}/cage/${brand}.json`).then((r) => r.json());
377
- } catch (e) {
378
+ } catch {
378
379
  try {
379
380
  config = await fetch(`${rootUrl}config/${integration}/operator.json`).then((r) => r.json());
380
- } catch (e) {
381
+ } catch {
381
382
  config = await fetch(`${rootUrl}config/fun/operator.json`).then((r) => r.json());
382
383
  }
383
384
  }
package/dist/wrapper.js CHANGED
@@ -367,16 +367,17 @@ var KalambaSdkConfigManager = class extends SdkConfigManager {
367
367
  };
368
368
  }
369
369
  async fetchOperatorConfig() {
370
- const rootUrl = "https://awscdn.kalamba.net/games/games/build/";
370
+ const hostname = typeof window !== "undefined" ? window.location?.hostname ?? "" : "";
371
+ const rootUrl = hostname.includes(".dev.") ? "https://games.dev.kl.luckycdn.net/games/kalamba/" : hostname.includes(".submissions.") ? "https://games.submissions.kl.luckycdn.net/games/kalamba/" : hostname.includes(".test.") ? "https://awscdn.test.kalamba.net/games/games/" : "https://awscdn.kalamba.net/games/games/";
371
372
  const integration = this.mappedIntegration;
372
373
  const brand = this.mappedBrand;
373
374
  let config = {};
374
375
  try {
375
376
  config = await fetch(`${rootUrl}config/${integration}/cage/${brand}.json`).then((r) => r.json());
376
- } catch (e) {
377
+ } catch {
377
378
  try {
378
379
  config = await fetch(`${rootUrl}config/${integration}/operator.json`).then((r) => r.json());
379
- } catch (e) {
380
+ } catch {
380
381
  config = await fetch(`${rootUrl}config/fun/operator.json`).then((r) => r.json());
381
382
  }
382
383
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kalamba/sdk",
3
- "version": "0.48.0",
3
+ "version": "0.48.1",
4
4
  "license": "BSD-3-Clause",
5
5
  "type": "module",
6
6
  "files": [