@tonconnect/ui 2.0.9-beta.0 → 2.0.9-beta.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.
package/lib/index.mjs CHANGED
@@ -8362,22 +8362,18 @@ function redirectToTelegram(universalLink, options) {
8362
8362
  }
8363
8363
  if (isInTelegramBrowser()) {
8364
8364
  options.returnStrategy = "back";
8365
- options.twaReturnUrl = void 0;
8366
- const linkWitStrategy = addReturnStrategy(directLinkUrl.toString(), options);
8365
+ const linkWitStrategy = addReturnStrategy(directLinkUrl.toString(), options.returnStrategy);
8367
8366
  openLinkBlank(linkWitStrategy);
8368
8367
  } else if (isInTMA()) {
8369
- if (isTmaPlatform("ios", "android", "macos")) {
8368
+ if (isTmaPlatform("ios", "android", "macos", "tdesktop", "web")) {
8370
8369
  options.returnStrategy = "back";
8371
- options.twaReturnUrl = void 0;
8372
- sendOpenTelegramLink(addReturnStrategy(directLinkUrl.toString(), options));
8373
- } else if (isTmaPlatform("tdesktop")) {
8374
- sendOpenTelegramLink(addReturnStrategy(directLinkUrl.toString(), options));
8370
+ const linkWitStrategy = addReturnStrategy(
8371
+ directLinkUrl.toString(),
8372
+ options.returnStrategy
8373
+ );
8374
+ sendOpenTelegramLink(linkWitStrategy);
8375
8375
  } else if (isTmaPlatform("weba")) {
8376
8376
  sendOpenTelegramLink(addReturnStrategy(directLinkUrl.toString(), options));
8377
- } else if (isTmaPlatform("web")) {
8378
- options.returnStrategy = "back";
8379
- options.twaReturnUrl = void 0;
8380
- sendOpenTelegramLink(addReturnStrategy(directLinkUrl.toString(), options));
8381
8377
  } else {
8382
8378
  openLinkBlank(addReturnStrategy(directLinkUrl.toString(), options));
8383
8379
  }
@@ -8728,16 +8724,20 @@ const DesktopConnectionModal = (props) => {
8728
8724
  generateUniversalLink();
8729
8725
  }
8730
8726
  setMode("desktop");
8731
- const forceRedirect = !firstClick();
8732
- setFirstClick(false);
8733
- redirectToWallet(universalLink(), props.wallet.deepLink, {
8734
- returnStrategy: appState.returnStrategy,
8735
- forceRedirect
8736
- }, (method) => {
8737
- setLastSelectedWalletInfo(__spreadProps(__spreadValues({}, props.wallet), {
8738
- openMethod: method
8739
- }));
8740
- });
8727
+ if (isTelegramUrl(universalLink())) {
8728
+ onClickTelegram();
8729
+ } else {
8730
+ const forceRedirect = !firstClick();
8731
+ setFirstClick(false);
8732
+ redirectToWallet(universalLink(), props.wallet.deepLink, {
8733
+ returnStrategy: appState.returnStrategy,
8734
+ forceRedirect
8735
+ }, (method) => {
8736
+ setLastSelectedWalletInfo(__spreadProps(__spreadValues({}, props.wallet), {
8737
+ openMethod: method
8738
+ }));
8739
+ });
8740
+ }
8741
8741
  };
8742
8742
  const onClickTelegram = () => {
8743
8743
  const forceRedirect = !firstClick();
@@ -10960,7 +10960,7 @@ class TonConnectUITracker {
10960
10960
  }
10961
10961
  }
10962
10962
  }
10963
- const tonConnectUiVersion = "2.0.9-beta.0";
10963
+ const tonConnectUiVersion = "2.0.9-beta.1";
10964
10964
  class TonConnectUI {
10965
10965
  constructor(options) {
10966
10966
  __publicField(this, "walletInfoStorage", new WalletInfoStorage());