@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.
@@ -15,7 +15,7 @@ import {
15
15
  UsernameModal,
16
16
  WalletAsset,
17
17
  WalletModal
18
- } from "../chunk-OWEJPD4R.mjs";
18
+ } from "../chunk-VIJ4FUT3.mjs";
19
19
  import "../chunk-UA6XHZHX.mjs";
20
20
  import "../chunk-HLUFAIFV.mjs";
21
21
  import {
@@ -1378,11 +1378,11 @@ function useUserInfo() {
1378
1378
  };
1379
1379
  const getLoginEmailCode = async (email) => {
1380
1380
  const res = await getEmailCodeApi(email);
1381
- if (res && res.data && isSuccess(res)) {
1381
+ if (isSuccess(res)) {
1382
1382
  window.sessionStorage.setItem("loginkey", res.data.key);
1383
1383
  return res.data.key;
1384
1384
  }
1385
- return "";
1385
+ throw new Error(res.message);
1386
1386
  };
1387
1387
  const loginByEmail = async ({
1388
1388
  email,