@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.
- package/dist/{chunk-ZM2P5GEL.mjs → chunk-6KB4RLTC.mjs} +2 -2
- package/dist/{chunk-P3WHQUXO.mjs → chunk-JLQVDNWZ.mjs} +13 -11
- package/dist/chunk-JLQVDNWZ.mjs.map +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +2 -2
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.js +12 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/example/package.json +2 -1
- package/example/src/App.tsx +8 -1
- package/example/src/main.tsx +2 -0
- package/example/src/pages/TgApp/index.tsx +44 -0
- package/example/src/pages/Wallet/index.tsx +1 -1
- package/example/yarn.lock +5 -0
- package/package.json +1 -1
- package/dist/chunk-P3WHQUXO.mjs.map +0 -1
- /package/dist/{chunk-ZM2P5GEL.mjs.map → chunk-6KB4RLTC.mjs.map} +0 -0
package/dist/hooks/index.mjs
CHANGED
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,
|
|
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
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
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,
|