@matchain/matchid-sdk-react 0.1.33 → 0.1.34

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/index.mjs CHANGED
@@ -2043,6 +2043,7 @@ function LoginBox({
2043
2043
  "telegram",
2044
2044
  "twitter"
2045
2045
  ],
2046
+ walletMethods = ["evm"],
2046
2047
  inModal = false
2047
2048
  }) {
2048
2049
  const [emailOpen, setEmailOpen] = useState9(false);
@@ -2104,20 +2105,20 @@ function LoginBox({
2104
2105
  onClick: () => login("youtube")
2105
2106
  }
2106
2107
  };
2107
- const walletMethods = [
2108
- {
2108
+ const walletMap = {
2109
+ evm: {
2109
2110
  icon: /* @__PURE__ */ jsx46(EVMDarkIcon, {}),
2110
2111
  activeIcon: /* @__PURE__ */ jsx46(EVMLightIcon, {}),
2111
2112
  name: "EVM",
2112
2113
  onClick: () => login("evm")
2113
2114
  },
2114
- {
2115
+ sol: {
2115
2116
  icon: /* @__PURE__ */ jsx46(SOLDarkIcon, {}),
2116
2117
  activeIcon: /* @__PURE__ */ jsx46(SOLLightIcon, {}),
2117
2118
  name: "SOL",
2118
2119
  onClick: () => login("sol")
2119
2120
  }
2120
- ];
2121
+ };
2121
2122
  return /* @__PURE__ */ jsxs31(Fragment2, { children: [
2122
2123
  (!inModal || !emailOpen) && /* @__PURE__ */ jsxs31("div", { className: "matchid-login-box", children: [
2123
2124
  /* @__PURE__ */ jsx46("div", { className: "matchid-login-recommend-list", children: recommendMethods.map((m) => {
@@ -2130,7 +2131,8 @@ function LoginBox({
2130
2131
  showChildren: m == "wallet" && showWallet,
2131
2132
  children: m == "wallet" && /* @__PURE__ */ jsxs31(Fragment2, { children: [
2132
2133
  /* @__PURE__ */ jsx46("div", { className: "matchid-login-recommend-wallet-divider" }),
2133
- /* @__PURE__ */ jsx46("div", { className: "matchid-login-recommend-wallet-list", children: walletMethods.map((m2) => {
2134
+ /* @__PURE__ */ jsx46("div", { className: "matchid-login-recommend-wallet-list", children: walletMethods.map((n) => {
2135
+ const m2 = walletMap[n];
2134
2136
  return /* @__PURE__ */ jsxs31(
2135
2137
  "div",
2136
2138
  {
@@ -2348,6 +2350,7 @@ function LoginButton({
2348
2350
  popoverPosition = "right",
2349
2351
  popoverType = "hover",
2350
2352
  popoverGap = 20,
2353
+ walletMethods,
2351
2354
  ...props
2352
2355
  }) {
2353
2356
  const intl = useIntl8();
@@ -2355,7 +2358,16 @@ function LoginButton({
2355
2358
  const [loginOpen, setLoginOpen] = useState11(false);
2356
2359
  if (!isLogin) {
2357
2360
  return /* @__PURE__ */ jsxs35(Fragment3, { children: [
2358
- /* @__PURE__ */ jsx51(LoginModal, { methods, recommendMethods, isOpen: loginOpen, onClose: () => setLoginOpen(false) }),
2361
+ /* @__PURE__ */ jsx51(
2362
+ LoginModal,
2363
+ {
2364
+ methods,
2365
+ walletMethods,
2366
+ recommendMethods,
2367
+ isOpen: loginOpen,
2368
+ onClose: () => setLoginOpen(false)
2369
+ }
2370
+ ),
2359
2371
  /* @__PURE__ */ jsxs35(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
2360
2372
  /* @__PURE__ */ jsx51(UnLoginIcon_default, {}),
2361
2373
  /* @__PURE__ */ jsx51("span", { children: /* @__PURE__ */ jsx51(FormattedMessage8, { id: "login" }) })