@tonconnect/ui 2.0.4 → 2.0.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.mjs CHANGED
@@ -7165,7 +7165,7 @@ const computePosition$1 = (reference, floating, config) => __async(void 0, null,
7165
7165
  } = config;
7166
7166
  const validMiddleware = middleware.filter(Boolean);
7167
7167
  const rtl = yield platform2.isRTL == null ? void 0 : platform2.isRTL(floating);
7168
- if (process.env.NODE_ENV !== "production") {
7168
+ if ({}.NODE_ENV !== "production") {
7169
7169
  if (platform2 == null) {
7170
7170
  console.error(["Floating UI: `platform` property was not passed to config. If you", "want to use Floating UI on the web, install @floating-ui/dom", "instead of the /core package. Otherwise, you can create your own", "`platform`: https://floating-ui.com/docs/platform"].join(" "));
7171
7171
  }
@@ -7222,7 +7222,7 @@ const computePosition$1 = (reference, floating, config) => __async(void 0, null,
7222
7222
  middlewareData = __spreadProps(__spreadValues({}, middlewareData), {
7223
7223
  [name]: __spreadValues(__spreadValues({}, middlewareData[name]), data)
7224
7224
  });
7225
- if (process.env.NODE_ENV !== "production") {
7225
+ if ({}.NODE_ENV !== "production") {
7226
7226
  if (resetCount > 50) {
7227
7227
  console.warn(["Floating UI: The middleware lifecycle appears to be running in an", "infinite loop. This is usually caused by a `reset` continually", "being returned without a break condition."].join(" "));
7228
7228
  }
@@ -9651,13 +9651,19 @@ const _tmpl$$1 = /* @__PURE__ */ template$1(`<li></li>`), _tmpl$2 = /* @__PURE__
9651
9651
  const MobileUniversalModal = (props) => {
9652
9652
  const [showQR, setShowQR] = createSignal(false);
9653
9653
  const [firstClick, setFirstClick] = createSignal(true);
9654
+ const [universalLink, setUniversalLink] = createSignal(null);
9654
9655
  const connector = appState.connector;
9655
9656
  const walletsList = () => props.walletsList.filter((w) => supportsMobile(w) && w.appName !== AT_WALLET_APP_NAME);
9656
9657
  const shouldShowMoreButton = () => walletsList().length > 7;
9657
9658
  const walletsBridges = createMemo(() => getUniqueBridges(props.walletsList), null, {
9658
9659
  equals: bridgesIsEqual
9659
9660
  });
9660
- const getUniversalLink = createMemo(() => connector.connect(walletsBridges(), props.additionalRequest));
9661
+ const getUniversalLink = () => {
9662
+ if (!universalLink()) {
9663
+ setUniversalLink(connector.connect(walletsBridges(), props.additionalRequest));
9664
+ }
9665
+ return universalLink();
9666
+ };
9661
9667
  setLastSelectedWalletInfo({
9662
9668
  openMethod: "universal-link"
9663
9669
  });
@@ -9683,6 +9689,7 @@ const MobileUniversalModal = (props) => {
9683
9689
  });
9684
9690
  };
9685
9691
  const onSelectTelegram = () => {
9692
+ setUniversalLink(null);
9686
9693
  const atWallet = props.walletsList.find((wallet) => wallet.appName === AT_WALLET_APP_NAME);
9687
9694
  if (!atWallet || !isWalletInfoRemote(atWallet)) {
9688
9695
  throw new TonConnectUIError("@wallet bot not found in the wallets list");
@@ -10899,7 +10906,7 @@ class TonConnectUITracker {
10899
10906
  }
10900
10907
  }
10901
10908
  }
10902
- const tonConnectUiVersion = "2.0.4";
10909
+ const tonConnectUiVersion = "2.0.5";
10903
10910
  class TonConnectUI {
10904
10911
  constructor(options) {
10905
10912
  __publicField(this, "walletInfoStorage", new WalletInfoStorage());