@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
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
useUserInfo,
|
|
12
12
|
verifyPohApi,
|
|
13
13
|
wallet_exports
|
|
14
|
-
} from "./chunk-
|
|
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-
|
|
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,
|
|
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
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
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-
|
|
6463
|
+
//# sourceMappingURL=chunk-JLQVDNWZ.mjs.map
|