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

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.
@@ -11,7 +11,7 @@ import {
11
11
  useUserInfo,
12
12
  verifyPohApi,
13
13
  wallet_exports
14
- } from "./chunk-OWEJPD4R.mjs";
14
+ } from "./chunk-VIJ4FUT3.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-5W2S6QMI.mjs.map
97
+ //# sourceMappingURL=chunk-UXFJALFG.mjs.map
@@ -3808,11 +3808,11 @@ function useUserInfo() {
3808
3808
  };
3809
3809
  const getLoginEmailCode = async (email) => {
3810
3810
  const res = await getEmailCodeApi(email);
3811
- if (res && res.data && isSuccess(res)) {
3811
+ if (isSuccess(res)) {
3812
3812
  window.sessionStorage.setItem("loginkey", res.data.key);
3813
3813
  return res.data.key;
3814
3814
  }
3815
- return "";
3815
+ throw new Error(res.message);
3816
3816
  };
3817
3817
  const loginByEmail = async ({
3818
3818
  email,
@@ -3997,8 +3997,8 @@ function StepVerify(props) {
3997
3997
  try {
3998
3998
  setError("");
3999
3999
  setSending(true);
4000
- sendTimeRef.current = intervalTime;
4001
4000
  await getLoginEmailCode(props.email);
4001
+ sendTimeRef.current = intervalTime;
4002
4002
  setSendBtnText(`${sendTimeRef.current}s`);
4003
4003
  intervalRef.current = setInterval(() => {
4004
4004
  sendTimeRef.current--;
@@ -6462,4 +6462,4 @@ export {
6462
6462
  MatchProvider,
6463
6463
  useMatch
6464
6464
  };
6465
- //# sourceMappingURL=chunk-OWEJPD4R.mjs.map
6465
+ //# sourceMappingURL=chunk-VIJ4FUT3.mjs.map