@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.
@@ -12,7 +12,7 @@ import {
12
12
  useTransaction,
13
13
  useUserInfo,
14
14
  useWallet
15
- } from "../chunk-P3WHQUXO.mjs";
15
+ } from "../chunk-JLQVDNWZ.mjs";
16
16
  import "../chunk-UA6XHZHX.mjs";
17
17
  import {
18
18
  useLayout_exports
package/dist/index.js CHANGED
@@ -6989,7 +6989,7 @@ var AppClientId2 = getAppClientId();
6989
6989
  function useWalletInit({
6990
6990
  config
6991
6991
  }) {
6992
- const { endpoints, token, overview, setWallet, wallet, appid, locale, refreshOverview } = useLocalStore_default();
6992
+ const { endpoints, token, setWallet, appid, refreshOverview } = useLocalStore_default();
6993
6993
  const { setWalletReady, walletReady } = useStore_default();
6994
6994
  const iframeReadyRef = (0, import_react38.useRef)(walletReady);
6995
6995
  (0, import_react38.useEffect)(() => {
@@ -7024,7 +7024,6 @@ function useWalletInit({
7024
7024
  const existingIframe = getWalletIframe();
7025
7025
  const query = {
7026
7026
  appid,
7027
- locale,
7028
7027
  appClientId: AppClientId2,
7029
7028
  initParams: encodeBase64(JSON.stringify({
7030
7029
  access_token: token,
@@ -7063,7 +7062,8 @@ function useWalletInit({
7063
7062
  data,
7064
7063
  messageId,
7065
7064
  source: "matchid",
7066
- version: 1
7065
+ version: 1,
7066
+ locale: getLocale()
7067
7067
  };
7068
7068
  try {
7069
7069
  matchlog_default.log("sdk.mpc.send", message, endpoints.auth);
@@ -8068,13 +8068,15 @@ var MatchProvider = ({
8068
8068
  config: wallet
8069
8069
  });
8070
8070
  (0, import_react40.useEffect)(() => {
8071
- const script = document.createElement("script");
8072
- script.src = "https://telegram.org/js/telegram-web-app.js?56";
8073
- script.async = true;
8074
- document.body.appendChild(script);
8075
- return () => {
8076
- document.body.removeChild(script);
8077
- };
8071
+ if (!window.Telegram) {
8072
+ const script = document.createElement("script");
8073
+ script.src = "https://telegram.org/js/telegram-web-app.js?56";
8074
+ script.async = true;
8075
+ document.body.appendChild(script);
8076
+ return () => {
8077
+ document.body.removeChild(script);
8078
+ };
8079
+ }
8078
8080
  }, []);
8079
8081
  return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl21.IntlProvider, { locale: realLocale, messages: messages[realLocale], children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_query10.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
8080
8082
  MatchContext.Provider,