@tonconnect/ui 2.0.0-beta.1 → 2.0.0-beta.2

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.umd.js CHANGED
@@ -1899,9 +1899,12 @@ var __async = (__this, __arguments, generator) => {
1899
1899
  }
1900
1900
  }
1901
1901
  const [walletsModalOpen, setWalletsModalOpen] = createSignal(false);
1902
- const lastSelectedWalletInfoStorage = new LastSelectedWalletInfoStorage();
1903
- const [lastSelectedWalletInfo, _setLastSelectedWalletInfo] = createSignal(lastSelectedWalletInfoStorage.getLastSelectedWalletInfo());
1902
+ let lastSelectedWalletInfoStorage = typeof window !== "undefined" ? new LastSelectedWalletInfoStorage() : void 0;
1903
+ const [lastSelectedWalletInfo, _setLastSelectedWalletInfo] = createSignal((lastSelectedWalletInfoStorage == null ? void 0 : lastSelectedWalletInfoStorage.getLastSelectedWalletInfo()) || null);
1904
1904
  const setLastSelectedWalletInfo = (walletInfo) => {
1905
+ if (!lastSelectedWalletInfoStorage) {
1906
+ lastSelectedWalletInfoStorage = new LastSelectedWalletInfoStorage();
1907
+ }
1905
1908
  if (walletInfo) {
1906
1909
  lastSelectedWalletInfoStorage.setLastSelectedWalletInfo(walletInfo);
1907
1910
  } else {