@matchain/matchid-sdk-react 0.1.50-alpha.0 → 0.1.51-alpha.0
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/assets/icon/index.d.mts +1 -1
- package/dist/assets/icon/index.d.ts +1 -1
- package/dist/{chunk-P3WHQUXO.mjs → chunk-5P2AOB6Q.mjs} +14 -12
- package/dist/chunk-5P2AOB6Q.mjs.map +1 -0
- package/dist/{chunk-ZM2P5GEL.mjs → chunk-JJGSJGWC.mjs} +2 -2
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/hooks/api/index.d.mts +2 -2
- package/dist/hooks/api/index.d.ts +2 -2
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +2 -2
- package/dist/hooks/index.d.mts +2 -3
- package/dist/hooks/index.d.ts +2 -3
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/{index-Bvc8cjpN.d.ts → index-BDoEk1EK.d.ts} +2 -2
- package/dist/{index-Cx2Lx_mh.d.ts → index-BU0r26-N.d.mts} +2 -3
- package/dist/{index-BcEreCxd.d.ts → index-BUj9mOrS.d.ts} +1 -1
- package/dist/{index-Cou96DpL.d.mts → index-B_o9HBS1.d.mts} +1 -1
- package/dist/{index-Bpmrd7mh.d.ts → index-Bmir-Wor.d.mts} +1 -2
- package/dist/{index-C_TiXUOB.d.mts → index-C3aFwrd4.d.ts} +2 -3
- package/dist/{index-D4ju2J_e.d.mts → index-CDqIk5k2.d.mts} +1 -1
- package/dist/{index-C9F6f2iz.d.mts → index-D5OzNRfu.d.mts} +2 -2
- package/dist/{index-BMsj8hJv.d.ts → index-DMUZQqNB.d.ts} +2 -2
- package/dist/{index-Cy3K-Yao.d.ts → index-DvM6x6e6.d.ts} +1 -1
- package/dist/{index-C9qYyRgt.d.mts → index-XzSw1Bym.d.mts} +2 -2
- package/dist/{index-BMfaixEx.d.mts → index-k2Uf0F94.d.ts} +1 -2
- package/dist/index.d.mts +7 -8
- package/dist/index.d.ts +7 -8
- package/dist/index.js +13 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/types/index.d.mts +1 -2
- package/dist/types/index.d.ts +1 -2
- package/dist/{types-DzVVzMYU.d.mts → types-Dd_ExpLx.d.mts} +21 -1
- package/dist/{types-DzVVzMYU.d.ts → types-Dd_ExpLx.d.ts} +21 -1
- package/dist/ui/index.d.mts +3 -3
- package/dist/ui/index.d.ts +3 -3
- package/dist/utils/index.d.mts +1 -2
- package/dist/utils/index.d.ts +1 -2
- package/example/package.json +2 -1
- package/example/src/App.tsx +19 -4
- package/example/src/main.tsx +2 -0
- package/example/src/pages/TgApp/index.tsx +44 -0
- package/example/src/pages/User/index.tsx +3 -1
- package/example/src/pages/Wallet/index.tsx +1 -1
- package/example/src/store/useLocalStore.ts +4 -0
- package/example/yarn.lock +5 -0
- package/package.json +1 -1
- package/dist/chunk-P3WHQUXO.mjs.map +0 -1
- package/dist/mpc-CTbBWHld.d.mts +0 -20
- package/dist/mpc-CTbBWHld.d.ts +0 -20
- /package/dist/{chunk-ZM2P5GEL.mjs.map → chunk-JJGSJGWC.mjs.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React, { CSSProperties } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { z as IconProps$1 } from '../../types-Dd_ExpLx.mjs';
|
|
4
4
|
import '@tanstack/react-query/src/types';
|
|
5
5
|
|
|
6
6
|
declare function BackIcon({ color, size, className, style }: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React, { CSSProperties } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { z as IconProps$1 } from '../../types-Dd_ExpLx.js';
|
|
4
4
|
import '@tanstack/react-query/src/types';
|
|
5
5
|
|
|
6
6
|
declare function BackIcon({ color, size, className, style }: {
|
|
@@ -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,
|
|
@@ -4002,7 +4004,7 @@ function StepVerify(props) {
|
|
|
4002
4004
|
setSendBtnText(`${sendTimeRef.current}s`);
|
|
4003
4005
|
if (sendTimeRef.current <= 0) {
|
|
4004
4006
|
setSendBtnText(intl.formatMessage({
|
|
4005
|
-
id: "
|
|
4007
|
+
id: "resend"
|
|
4006
4008
|
}));
|
|
4007
4009
|
clearInterval(intervalRef.current);
|
|
4008
4010
|
setSending(false);
|
|
@@ -6458,4 +6460,4 @@ export {
|
|
|
6458
6460
|
MatchProvider,
|
|
6459
6461
|
useMatch
|
|
6460
6462
|
};
|
|
6461
|
-
//# sourceMappingURL=chunk-
|
|
6463
|
+
//# sourceMappingURL=chunk-5P2AOB6Q.mjs.map
|