@matchain/matchid-sdk-react 0.1.50-alpha.0 → 0.1.50

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.
@@ -11,7 +11,7 @@ import {
11
11
  useUserInfo,
12
12
  verifyPohApi,
13
13
  wallet_exports
14
- } from "./chunk-P3WHQUXO.mjs";
14
+ } from "./chunk-JLQVDNWZ.mjs";
15
15
  import {
16
16
  __export
17
17
  } from "./chunk-J5LGTIGS.mjs";
@@ -94,4 +94,4 @@ export {
94
94
  user_exports,
95
95
  api_exports
96
96
  };
97
- //# sourceMappingURL=chunk-ZM2P5GEL.mjs.map
97
+ //# sourceMappingURL=chunk-6KB4RLTC.mjs.map
@@ -2579,7 +2579,7 @@ var AppClientId2 = getAppClientId();
2579
2579
  function useWalletInit({
2580
2580
  config
2581
2581
  }) {
2582
- const { endpoints, token, overview, setWallet, wallet, appid, locale, refreshOverview } = useLocalStore_default();
2582
+ const { endpoints, token, setWallet, appid, refreshOverview } = useLocalStore_default();
2583
2583
  const { setWalletReady, walletReady } = useStore_default();
2584
2584
  const iframeReadyRef = useRef2(walletReady);
2585
2585
  useEffect11(() => {
@@ -2614,7 +2614,6 @@ function useWalletInit({
2614
2614
  const existingIframe = getWalletIframe();
2615
2615
  const query = {
2616
2616
  appid,
2617
- locale,
2618
2617
  appClientId: AppClientId2,
2619
2618
  initParams: encodeBase64(JSON.stringify({
2620
2619
  access_token: token,
@@ -2653,7 +2652,8 @@ function useWalletInit({
2653
2652
  data,
2654
2653
  messageId,
2655
2654
  source: "matchid",
2656
- version: 1
2655
+ version: 1,
2656
+ locale: getLocale()
2657
2657
  };
2658
2658
  try {
2659
2659
  matchlog_default.log("sdk.mpc.send", message, endpoints.auth);
@@ -3658,13 +3658,15 @@ var MatchProvider = ({
3658
3658
  config: wallet
3659
3659
  });
3660
3660
  useEffect13(() => {
3661
- const script = document.createElement("script");
3662
- script.src = "https://telegram.org/js/telegram-web-app.js?56";
3663
- script.async = true;
3664
- document.body.appendChild(script);
3665
- return () => {
3666
- document.body.removeChild(script);
3667
- };
3661
+ if (!window.Telegram) {
3662
+ const script = document.createElement("script");
3663
+ script.src = "https://telegram.org/js/telegram-web-app.js?56";
3664
+ script.async = true;
3665
+ document.body.appendChild(script);
3666
+ return () => {
3667
+ document.body.removeChild(script);
3668
+ };
3669
+ }
3668
3670
  }, []);
3669
3671
  return /* @__PURE__ */ jsx12(IntlProvider, { locale: realLocale, messages: messages[realLocale], children: /* @__PURE__ */ jsx12(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx12(
3670
3672
  MatchContext.Provider,
@@ -6458,4 +6460,4 @@ export {
6458
6460
  MatchProvider,
6459
6461
  useMatch
6460
6462
  };
6461
- //# sourceMappingURL=chunk-P3WHQUXO.mjs.map
6463
+ //# sourceMappingURL=chunk-JLQVDNWZ.mjs.map