@tonconnect/ui 2.4.0-beta.4 → 2.4.0-beta.6

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/lib/index.cjs CHANGED
@@ -1727,7 +1727,7 @@ function openLinkBlank(href) {
1727
1727
  }
1728
1728
  function openDeeplinkWithFallback(href, fallback) {
1729
1729
  const doFallback = () => {
1730
- if (isBrowser("safari") || isOS("android") && isBrowser("firefox")) {
1730
+ if (isBrowser("safari") || isOS("android") && isBrowser("firefox") || isOS("windows")) {
1731
1731
  return;
1732
1732
  }
1733
1733
  fallback();
@@ -2429,6 +2429,18 @@ try {
2429
2429
  initParams = urlParseHashParams(locationHash);
2430
2430
  } catch (e2) {
2431
2431
  }
2432
+ try {
2433
+ const launchParamsStorageKey = "ton-connect-session_storage_launchParams";
2434
+ if (Object.entries(initParams).length > 0) {
2435
+ sessionStorage.setItem(launchParamsStorageKey, JSON.stringify(initParams));
2436
+ } else {
2437
+ const savedInitParams = sessionStorage.getItem(launchParamsStorageKey);
2438
+ if (savedInitParams) {
2439
+ initParams = JSON.parse(savedInitParams);
2440
+ }
2441
+ }
2442
+ } catch (e2) {
2443
+ }
2432
2444
  let tmaPlatform = "unknown";
2433
2445
  if (initParams == null ? void 0 : initParams.tgWebAppPlatform) {
2434
2446
  tmaPlatform = (_a = initParams.tgWebAppPlatform) != null ? _a : "unknown";
@@ -12772,7 +12784,7 @@ class TonConnectUITracker {
12772
12784
  }
12773
12785
  }
12774
12786
  }
12775
- const tonConnectUiVersion = "2.4.0-beta.2";
12787
+ const tonConnectUiVersion = "2.4.0-beta.6";
12776
12788
  class TonConnectEnvironment {
12777
12789
  constructor() {
12778
12790
  this.userAgent = getUserAgent();
@@ -12813,7 +12825,8 @@ class TonConnectUI {
12813
12825
  manifestUrl: options.manifestUrl,
12814
12826
  eventDispatcher,
12815
12827
  walletsRequiredFeatures: options.walletsRequiredFeatures,
12816
- environment: new TonConnectEnvironment()
12828
+ environment: new TonConnectEnvironment(),
12829
+ analytics: options.analytics
12817
12830
  });
12818
12831
  } else {
12819
12832
  throw new TonConnectUIError(