@matchain/matchid-sdk-react 0.1.56-alpha.13 → 0.1.56-alpha.15

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-RPATABCS.mjs";
14
+ } from "./chunk-A47WTLYD.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-7K4E64WH.mjs.map
97
+ //# sourceMappingURL=chunk-FZHJNSAP.mjs.map
@@ -3670,6 +3670,7 @@ function useUserInfo() {
3670
3670
  auth,
3671
3671
  login: loginMethod,
3672
3672
  bind,
3673
+ getBindEmailCode: getLoginEmailCode,
3673
3674
  bindByEmail,
3674
3675
  getAuthInfo,
3675
3676
  invite
@@ -3822,6 +3823,13 @@ function EmailModal({
3822
3823
  setEmailVal("");
3823
3824
  }
3824
3825
  }, [isOpen]);
3826
+ const verifySuccess = () => {
3827
+ if (onLogin) {
3828
+ onLogin();
3829
+ } else {
3830
+ onClose && onClose();
3831
+ }
3832
+ };
3825
3833
  return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
3826
3834
  ModalWithHeader,
3827
3835
  {
@@ -3835,7 +3843,7 @@ function EmailModal({
3835
3843
  children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
3836
3844
  setEmailVal(email);
3837
3845
  setStep("verify");
3838
- } }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(StepVerify, { email: emailVal, type, onSuccess: onLogin })
3846
+ } }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(StepVerify, { email: emailVal, type, onSuccess: verifySuccess })
3839
3847
  }
3840
3848
  );
3841
3849
  }
@@ -3954,7 +3962,7 @@ function LoginBox({
3954
3962
  walletMethods: walletMethodList
3955
3963
  };
3956
3964
  }, [config.platform, recommendMethods, methods, walletMethods]);
3957
- const { open: emailOpen } = useEmailModalStore();
3965
+ const { isOpen: emailIsOpen, open: emailOpen } = useEmailModalStore();
3958
3966
  const { login } = useUserInfo();
3959
3967
  const [showWallet, setShowWallet] = (0, import_react26.useState)(false);
3960
3968
  const intl = (0, import_react_intl10.useIntl)();
@@ -4020,7 +4028,7 @@ function LoginBox({
4020
4028
  }
4021
4029
  };
4022
4030
  const { walletMap } = useWalletConfig();
4023
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_jsx_runtime86.Fragment, { children: (!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-box", children: [
4031
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_jsx_runtime86.Fragment, { children: (!inModal || !emailIsOpen) && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-box", children: [
4024
4032
  /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
4025
4033
  return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4026
4034
  RecommendItem,