@matchain/matchid-sdk-react 0.1.51-alpha.2 → 0.1.52

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,12 +12,12 @@ import {
12
12
  useTransaction,
13
13
  useUserInfo,
14
14
  useWallet
15
- } from "../chunk-OWEJPD4R.mjs";
15
+ } from "../chunk-OL4R4SZU.mjs";
16
16
  import "../chunk-UA6XHZHX.mjs";
17
- import "../chunk-HLUFAIFV.mjs";
18
17
  import {
19
18
  useLayout_exports
20
19
  } from "../chunk-FB5MHLWX.mjs";
20
+ import "../chunk-HLUFAIFV.mjs";
21
21
  import "../chunk-LHNKZISB.mjs";
22
22
  import "../chunk-J5LGTIGS.mjs";
23
23
  export {
package/dist/index.js CHANGED
@@ -2051,11 +2051,11 @@ function useUserInfo() {
2051
2051
  };
2052
2052
  const getLoginEmailCode = async (email) => {
2053
2053
  const res = await getEmailCodeApi(email);
2054
- if (res && res.data && isSuccess(res)) {
2054
+ if (isSuccess(res)) {
2055
2055
  window.sessionStorage.setItem("loginkey", res.data.key);
2056
2056
  return res.data.key;
2057
2057
  }
2058
- return "";
2058
+ throw new Error(res.message);
2059
2059
  };
2060
2060
  const loginByEmail = async ({
2061
2061
  email,
@@ -3440,8 +3440,8 @@ function StepVerify(props) {
3440
3440
  try {
3441
3441
  setError("");
3442
3442
  setSending(true);
3443
- sendTimeRef.current = intervalTime;
3444
3443
  await getLoginEmailCode(props.email);
3444
+ sendTimeRef.current = intervalTime;
3445
3445
  setSendBtnText(`${sendTimeRef.current}s`);
3446
3446
  intervalRef.current = setInterval(() => {
3447
3447
  sendTimeRef.current--;
@@ -8069,17 +8069,6 @@ var MatchProvider = ({
8069
8069
  useWalletInit({
8070
8070
  config: wallet
8071
8071
  });
8072
- (0, import_react40.useEffect)(() => {
8073
- if (!window.Telegram) {
8074
- const script = document.createElement("script");
8075
- script.src = "https://telegram.org/js/telegram-web-app.js?56";
8076
- script.async = true;
8077
- document.body.appendChild(script);
8078
- return () => {
8079
- document.body.removeChild(script);
8080
- };
8081
- }
8082
- }, []);
8083
8072
  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)(
8084
8073
  MatchContext.Provider,
8085
8074
  {