@matchain/matchid-sdk-react 0.1.56-alpha.9 → 0.1.57

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.
Files changed (42) hide show
  1. package/dist/api.js +44 -3
  2. package/dist/api.js.map +1 -1
  3. package/dist/api.mjs +3 -3
  4. package/dist/{chunk-FQ6PYZPD.mjs → chunk-7SUDHG7S.mjs} +1 -1
  5. package/dist/chunk-7SUDHG7S.mjs.map +1 -0
  6. package/dist/{chunk-JCMQBWWW.mjs → chunk-EUG3QRAG.mjs} +2 -2
  7. package/dist/{chunk-LOZCAT7A.mjs → chunk-QMV4FDUH.mjs} +283 -216
  8. package/dist/chunk-QMV4FDUH.mjs.map +1 -0
  9. package/dist/components.d.mts +1 -1
  10. package/dist/components.d.ts +1 -1
  11. package/dist/components.js +306 -261
  12. package/dist/components.js.map +1 -1
  13. package/dist/components.mjs +2 -2
  14. package/dist/hooks.d.mts +1 -1
  15. package/dist/hooks.d.ts +1 -1
  16. package/dist/hooks.js +81 -42
  17. package/dist/hooks.js.map +1 -1
  18. package/dist/hooks.mjs +2 -2
  19. package/dist/icon.js.map +1 -1
  20. package/dist/icon.mjs +1 -1
  21. package/dist/{index-DwmrgZa2.d.ts → index-B70k4Jpk.d.ts} +4 -0
  22. package/dist/{index-D2E53ZMV.d.mts → index-BJJ0Gb6v.d.mts} +4 -0
  23. package/dist/{index-qmC4zt6V.d.ts → index-C2hr7zlN.d.ts} +3 -1
  24. package/dist/{index-DVlulZhE.d.mts → index-CTHpnEoB.d.mts} +3 -1
  25. package/dist/index.d.mts +2 -2
  26. package/dist/index.d.ts +2 -2
  27. package/dist/index.js +87 -20
  28. package/dist/index.js.map +1 -1
  29. package/dist/index.mjs +3 -3
  30. package/dist/ui.js +81 -70
  31. package/dist/ui.js.map +1 -1
  32. package/dist/ui.mjs +2 -2
  33. package/example/package-lock.json +2965 -0
  34. package/example/package.json +2 -1
  35. package/example/src/App.tsx +65 -60
  36. package/example/src/config/index.ts +8 -6
  37. package/example/src/pages/Wallet/index.tsx +2 -4
  38. package/example/yarn.lock +27 -2251
  39. package/package.json +3 -6
  40. package/dist/chunk-FQ6PYZPD.mjs.map +0 -1
  41. package/dist/chunk-LOZCAT7A.mjs.map +0 -1
  42. /package/dist/{chunk-JCMQBWWW.mjs.map → chunk-EUG3QRAG.mjs.map} +0 -0
@@ -3284,6 +3284,12 @@ var useWalletModalStore = (0, import_zustand5.create)((set) => ({
3284
3284
  open: (type, methods = DEFAULT_WALLET_METHODS) => set({ isOpen: true, type, methods }),
3285
3285
  close: () => set({ isOpen: false })
3286
3286
  }));
3287
+ var useEmailModalStore = (0, import_zustand5.create)((set) => ({
3288
+ isOpen: false,
3289
+ type: "",
3290
+ open: (type) => set({ isOpen: true, type }),
3291
+ close: () => set({ isOpen: false })
3292
+ }));
3287
3293
 
3288
3294
  // src/components/CEXBindModal/index.tsx
3289
3295
  var import_react19 = require("react");
@@ -3292,11 +3298,16 @@ var import_jsx_runtime80 = require("react/jsx-runtime");
3292
3298
 
3293
3299
  // src/context/BusinessProvider.tsx
3294
3300
  var import_react_query8 = require("@tanstack/react-query");
3301
+
3302
+ // src/components/BindEmailModal/index.tsx
3295
3303
  var import_jsx_runtime81 = require("react/jsx-runtime");
3296
3304
 
3297
- // src/context/index.tsx
3305
+ // src/context/BusinessProvider.tsx
3298
3306
  var import_jsx_runtime82 = require("react/jsx-runtime");
3299
3307
 
3308
+ // src/context/index.tsx
3309
+ var import_jsx_runtime83 = require("react/jsx-runtime");
3310
+
3300
3311
  // src/hooks/useWalletInit.ts
3301
3312
  var import_react20 = require("react");
3302
3313
  var AppClientId2 = getAppClientId();
@@ -3375,7 +3386,7 @@ var matchTest = /* @__PURE__ */ (0, import_viem12.defineChain)({
3375
3386
 
3376
3387
  // src/MatchContext.tsx
3377
3388
  var import_wagmi = require("wagmi");
3378
- var import_jsx_runtime83 = require("react/jsx-runtime");
3389
+ var import_jsx_runtime84 = require("react/jsx-runtime");
3379
3390
  var queryClient = new import_react_query9.QueryClient();
3380
3391
  var wagmiConfig = (0, import_rainbowkit.getDefaultConfig)({
3381
3392
  appName: "MatchID",
@@ -3427,6 +3438,7 @@ function useUserInfo() {
3427
3438
  const { open: BTCOpen } = useBTCModalStore();
3428
3439
  const { open: CEXBindOpen } = useCEXBindModalStore();
3429
3440
  const walletModalStore = useWalletModalStore();
3441
+ const emailModalStore = useEmailModalStore();
3430
3442
  const getRedirectUri = () => {
3431
3443
  return encodeURIComponent(window.location.href);
3432
3444
  };
@@ -3519,8 +3531,8 @@ function useUserInfo() {
3519
3531
  case "discord":
3520
3532
  case "github":
3521
3533
  case "linkedin":
3522
- case "kakao":
3523
3534
  case "facebook":
3535
+ case "kakao":
3524
3536
  return await loginByMethod(method);
3525
3537
  default:
3526
3538
  throw new Error("unsupported method");
@@ -3605,6 +3617,8 @@ function useUserInfo() {
3605
3617
  return TONOpen("bind");
3606
3618
  case "btc":
3607
3619
  return BTCOpen("bind");
3620
+ case "email":
3621
+ return emailModalStore.open("bind");
3608
3622
  case "telegram":
3609
3623
  return await bindTelegram();
3610
3624
  case "twitter":
@@ -3614,6 +3628,7 @@ function useUserInfo() {
3614
3628
  case "linkedin":
3615
3629
  case "facebook":
3616
3630
  case "youtube":
3631
+ case "kakao":
3617
3632
  const link = `${endpoints.back}api/v1/auth/${method == "youtube" ? "google" : method}?appid=${appid}&provider=${method == "youtube" ? "google" : method}&redirect=${encodeURIComponent(endpoints.auth + "bind/" + method)}&authorization=${token.includes("Bearer ") ? token.split(" ")[1] : token}${method == "youtube" ? "&auth_type=youtube" : ""}`;
3618
3633
  matchlog_default.log("link", link);
3619
3634
  return window.open(
@@ -3628,6 +3643,31 @@ function useUserInfo() {
3628
3643
  const bindCex = (type) => {
3629
3644
  return CEXBindOpen(type);
3630
3645
  };
3646
+ const bindByEmail = async ({ email, code }) => {
3647
+ try {
3648
+ const obj = {
3649
+ email,
3650
+ verification_key: emailLoginKey,
3651
+ verification_code: code
3652
+ };
3653
+ const res = await verifyEmailCodeApi(obj);
3654
+ if (res && res.data && isSuccess(res)) {
3655
+ events.onBind && events.onBind({
3656
+ type: "email"
3657
+ });
3658
+ eventManager_default.emit("onBind", {
3659
+ type: "email"
3660
+ });
3661
+ return true;
3662
+ } else {
3663
+ throw new Error(res.message);
3664
+ }
3665
+ } catch (error) {
3666
+ console.error("bindByEmail", error);
3667
+ throw error;
3668
+ }
3669
+ return false;
3670
+ };
3631
3671
  const getAuthInfo = async (method) => {
3632
3672
  const element_id = "auth_iframe";
3633
3673
  if (document.getElementById(element_id)) {
@@ -3696,6 +3736,7 @@ function useUserInfo() {
3696
3736
  auth,
3697
3737
  login: loginMethod,
3698
3738
  bind,
3739
+ bindByEmail,
3699
3740
  getAuthInfo,
3700
3741
  invite
3701
3742
  };
@@ -3704,10 +3745,10 @@ function useUserInfo() {
3704
3745
  // src/components/EmailModal/StepVerify.tsx
3705
3746
  var import_react24 = require("react");
3706
3747
  var import_react_intl8 = require("react-intl");
3707
- var import_jsx_runtime84 = require("react/jsx-runtime");
3748
+ var import_jsx_runtime85 = require("react/jsx-runtime");
3708
3749
  function StepVerify(props) {
3709
3750
  const intl = (0, import_react_intl8.useIntl)();
3710
- const { getLoginEmailCode, loginByEmail } = useUserInfo();
3751
+ const { getLoginEmailCode, loginByEmail, bindByEmail } = useUserInfo();
3711
3752
  const [error, setError] = (0, import_react24.useState)("");
3712
3753
  const [code, setCode] = (0, import_react24.useState)("");
3713
3754
  const [sending, setSending] = (0, import_react24.useState)(false);
@@ -3767,7 +3808,10 @@ function StepVerify(props) {
3767
3808
  try {
3768
3809
  setError("");
3769
3810
  setSubmitting(true);
3770
- const res = await loginByEmail({
3811
+ const res = props.type === "bind" ? await bindByEmail({
3812
+ email: props.email,
3813
+ code
3814
+ }) : await loginByEmail({
3771
3815
  email: props.email,
3772
3816
  code
3773
3817
  });
@@ -3781,17 +3825,17 @@ function StepVerify(props) {
3781
3825
  setSubmitting(false);
3782
3826
  }
3783
3827
  };
3784
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-email-verify-box", children: [
3785
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-email-verify-header", children: [
3786
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
3787
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-email-verify-header-content", children: [
3788
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-email-verify-header-value", children: props.email }),
3789
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_intl8.FormattedMessage, { id: "sendEmailTips" }) })
3828
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-email-verify-box", children: [
3829
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-email-verify-header", children: [
3830
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
3831
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-email-verify-header-content", children: [
3832
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-email-verify-header-value", children: props.email }),
3833
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl8.FormattedMessage, { id: "sendEmailTips" }) })
3790
3834
  ] })
3791
3835
  ] }),
3792
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Field, { label: intl.formatMessage({
3836
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Field, { label: intl.formatMessage({
3793
3837
  id: "verificationCode"
3794
- }), error, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
3838
+ }), error, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
3795
3839
  Input,
3796
3840
  {
3797
3841
  placeholder: intl.formatMessage({
@@ -3801,7 +3845,7 @@ function StepVerify(props) {
3801
3845
  maxLength: codeLength,
3802
3846
  onChange: (e) => setCode(e.target.value),
3803
3847
  value: code,
3804
- after: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
3848
+ after: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
3805
3849
  Button,
3806
3850
  {
3807
3851
  highlight: true,
@@ -3820,19 +3864,20 @@ function StepVerify(props) {
3820
3864
  )
3821
3865
  }
3822
3866
  ) }),
3823
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Button, { disabled: !canContinue, loading: submitting, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_intl8.FormattedMessage, { id: "continue" }) })
3867
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Button, { disabled: !canContinue, loading: submitting, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl8.FormattedMessage, { id: "continue" }) })
3824
3868
  ] });
3825
3869
  }
3826
3870
 
3827
3871
  // src/components/EmailModal/index.tsx
3828
3872
  var import_react_intl9 = require("react-intl");
3829
- var import_jsx_runtime85 = require("react/jsx-runtime");
3873
+ var import_jsx_runtime86 = require("react/jsx-runtime");
3830
3874
  function EmailModal({
3831
3875
  isOpen = false,
3832
3876
  width = 480,
3833
3877
  onClose,
3834
3878
  onBack,
3835
- onLogin
3879
+ onLogin,
3880
+ type = "login"
3836
3881
  }) {
3837
3882
  const [step, setStep] = (0, import_react25.useState)("input");
3838
3883
  const [emailVal, setEmailVal] = (0, import_react25.useState)("");
@@ -3843,7 +3888,7 @@ function EmailModal({
3843
3888
  setEmailVal("");
3844
3889
  }
3845
3890
  }, [isOpen]);
3846
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
3891
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
3847
3892
  ModalWithHeader,
3848
3893
  {
3849
3894
  isOpen,
@@ -3853,10 +3898,10 @@ function EmailModal({
3853
3898
  id: "email"
3854
3899
  }),
3855
3900
  onBack: step == "verify" ? () => setStep("input") : onBack,
3856
- children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
3901
+ children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
3857
3902
  setEmailVal(email);
3858
3903
  setStep("verify");
3859
- } }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(StepVerify, { email: emailVal, onSuccess: onLogin })
3904
+ } }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(StepVerify, { type, email: emailVal, onSuccess: onLogin })
3860
3905
  }
3861
3906
  );
3862
3907
  }
@@ -3886,7 +3931,7 @@ function useAppConfig() {
3886
3931
  }
3887
3932
 
3888
3933
  // src/components/LoginBox/index.tsx
3889
- var import_jsx_runtime86 = require("react/jsx-runtime");
3934
+ var import_jsx_runtime87 = require("react/jsx-runtime");
3890
3935
  var RecommendItem = ({
3891
3936
  icon,
3892
3937
  name,
@@ -3895,20 +3940,20 @@ var RecommendItem = ({
3895
3940
  children,
3896
3941
  footer
3897
3942
  }) => {
3898
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-recommend-method", children: [
3899
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-recommend-method-item", onClick, children: [
3900
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-recommend-method-content", children: [
3901
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-recommend-method-icon", children: icon }),
3902
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "matchid-login-recommend-method-name", children: name })
3943
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-recommend-method", children: [
3944
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-recommend-method-item", onClick, children: [
3945
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-recommend-method-content", children: [
3946
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-recommend-method-icon", children: icon }),
3947
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "matchid-login-recommend-method-name", children: name })
3903
3948
  ] }),
3904
- footer ? footer : children ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
3949
+ footer ? footer : children ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
3905
3950
  ArrowDownIcon,
3906
3951
  {
3907
3952
  className: `matchid-login-recommend-method-arrow ${showChildren ? "matchid-login-recommend-method-arrow-active" : ""}`,
3908
3953
  size: 20,
3909
3954
  color: "var(--matchid-arrow-color)"
3910
3955
  }
3911
- ) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
3956
+ ) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
3912
3957
  ArrowRightIcon,
3913
3958
  {
3914
3959
  className: "matchid-login-recommend-method-arrow",
@@ -3917,7 +3962,7 @@ var RecommendItem = ({
3917
3962
  }
3918
3963
  )
3919
3964
  ] }),
3920
- children && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
3965
+ children && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
3921
3966
  "div",
3922
3967
  {
3923
3968
  className: `matchid-login-recommend-method-popover ${showChildren ? "matchid-login-recommend-method-popover-active" : ""}`,
@@ -3954,7 +3999,7 @@ function LoginBox({
3954
3999
  }
3955
4000
  return p.toLowerCase();
3956
4001
  });
3957
- console.log("platform2", platform);
4002
+ console.log("platform", platform);
3958
4003
  const walletMethodList = WALLET_METHODS.filter((m) => platform.includes(m));
3959
4004
  let recommendMethodList = walletMethodList.length > 0 ? ["wallet"] : [];
3960
4005
  let methodList = [];
@@ -3982,80 +4027,80 @@ function LoginBox({
3982
4027
  const isDownMd = useDownMd();
3983
4028
  const methodMap = {
3984
4029
  wallet: {
3985
- icon: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(WalletIcon, { size: isDownMd ? 36 : 40 }),
4030
+ icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(WalletIcon, { size: isDownMd ? 36 : 40 }),
3986
4031
  name: intl.formatMessage({ id: "wallet" }),
3987
4032
  onClick: () => setShowWallet(!showWallet),
3988
4033
  type: "wallet"
3989
4034
  },
3990
4035
  email: {
3991
- icon: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
4036
+ icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
3992
4037
  name: intl.formatMessage({ id: "email" }),
3993
4038
  onClick: () => {
3994
4039
  setEmailOpen(true);
3995
4040
  }
3996
4041
  },
3997
4042
  google: {
3998
- icon: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(GoogleIcon, { size: isDownMd ? 36 : 40 }),
4043
+ icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(GoogleIcon, { size: isDownMd ? 36 : 40 }),
3999
4044
  name: "Google",
4000
4045
  onClick: () => login("google")
4001
4046
  },
4002
4047
  twitter: {
4003
- icon: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(XIcon, { size: isDownMd ? 36 : 40 }),
4048
+ icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(XIcon, { size: isDownMd ? 36 : 40 }),
4004
4049
  name: "X",
4005
4050
  onClick: () => login("twitter")
4006
4051
  },
4007
4052
  telegram: {
4008
- icon: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TelegramIcon, { size: isDownMd ? 36 : 40 }),
4053
+ icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TelegramIcon, { size: isDownMd ? 36 : 40 }),
4009
4054
  name: "Telegram",
4010
4055
  onClick: () => login("telegram")
4011
4056
  },
4012
4057
  github: {
4013
- icon: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(GithubIcon, { size: isDownMd ? 36 : 40 }),
4058
+ icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(GithubIcon, { size: isDownMd ? 36 : 40 }),
4014
4059
  name: "Github",
4015
4060
  onClick: () => login("github")
4016
4061
  },
4017
4062
  discord: {
4018
- icon: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(DiscordIcon, { size: isDownMd ? 36 : 40 }),
4063
+ icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(DiscordIcon, { size: isDownMd ? 36 : 40 }),
4019
4064
  name: "Discord",
4020
4065
  onClick: () => login("discord")
4021
4066
  },
4022
4067
  linkedin: {
4023
- icon: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
4068
+ icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
4024
4069
  name: "LinkedIn",
4025
4070
  onClick: () => login("linkedin")
4026
4071
  },
4027
4072
  facebook: {
4028
- icon: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(FacebookIcon, { size: isDownMd ? 36 : 40 }),
4073
+ icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FacebookIcon, { size: isDownMd ? 36 : 40 }),
4029
4074
  name: "Facebook",
4030
4075
  onClick: () => login("facebook")
4031
4076
  },
4032
4077
  youtube: {
4033
- icon: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
4078
+ icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
4034
4079
  name: "Youtube",
4035
4080
  onClick: () => login("youtube")
4036
4081
  },
4037
4082
  kakao: {
4038
- icon: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(KakaoIcon, { size: isDownMd ? 36 : 40 }),
4083
+ icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(KakaoIcon, { size: isDownMd ? 36 : 40 }),
4039
4084
  name: "Kakao",
4040
4085
  onClick: () => login("kakao")
4041
4086
  }
4042
4087
  };
4043
4088
  const { walletMap } = useWalletConfig();
4044
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
4045
- (!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-box", children: [
4046
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
4047
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4089
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
4090
+ (!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-box", children: [
4091
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
4092
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4048
4093
  RecommendItem,
4049
4094
  {
4050
4095
  icon: methodMap[m]?.icon,
4051
4096
  name: methodMap[m]?.name,
4052
4097
  onClick: methodMap[m]?.onClick,
4053
4098
  showChildren: m == "wallet" && showWallet,
4054
- children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
4055
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
4056
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
4099
+ children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
4100
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
4101
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
4057
4102
  const m2 = walletMap[n];
4058
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
4103
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
4059
4104
  "div",
4060
4105
  {
4061
4106
  className: "matchid-login-recommend-wallet-item",
@@ -4063,16 +4108,16 @@ function LoginBox({
4063
4108
  login(m2.method);
4064
4109
  },
4065
4110
  children: [
4066
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
4067
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
4068
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4111
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
4112
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
4113
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4069
4114
  "div",
4070
4115
  {
4071
4116
  className: "matchid-login-recommend-wallet-item-hover-icon",
4072
4117
  children: m2.activeIcon
4073
4118
  }
4074
4119
  ),
4075
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4120
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4076
4121
  "span",
4077
4122
  {
4078
4123
  className: "matchid-login-recommend-wallet-item-name",
@@ -4080,7 +4125,7 @@ function LoginBox({
4080
4125
  }
4081
4126
  )
4082
4127
  ] }),
4083
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4128
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4084
4129
  ArrowRightIcon,
4085
4130
  {
4086
4131
  className: "matchid-login-recommend-wallet-item-arrow",
@@ -4098,13 +4143,13 @@ function LoginBox({
4098
4143
  m
4099
4144
  );
4100
4145
  }) }),
4101
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-privacy-policy", children: [
4102
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-privacy-policy-content", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4146
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-privacy-policy", children: [
4147
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-privacy-policy-content", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4103
4148
  import_react_intl10.FormattedMessage,
4104
4149
  {
4105
4150
  id: "loginAgreement",
4106
4151
  values: {
4107
- termsLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4152
+ termsLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4108
4153
  "a",
4109
4154
  {
4110
4155
  href: TERMS_OF_SERVICE_URL,
@@ -4114,7 +4159,7 @@ function LoginBox({
4114
4159
  children: chunks
4115
4160
  }
4116
4161
  ),
4117
- privacyLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4162
+ privacyLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4118
4163
  "a",
4119
4164
  {
4120
4165
  href: PRIVACY_POLICY_URL,
@@ -4127,19 +4172,19 @@ function LoginBox({
4127
4172
  }
4128
4173
  }
4129
4174
  ) }),
4130
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-privacy-policy-powered-by", children: [
4131
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl10.FormattedMessage, { id: "poweredBy" }),
4132
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(MatchIdIcon_default, {})
4175
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-privacy-policy-powered-by", children: [
4176
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react_intl10.FormattedMessage, { id: "poweredBy" }),
4177
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(MatchIdIcon_default, {})
4133
4178
  ] })
4134
4179
  ] }),
4135
- methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-other", children: [
4136
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-other-line-box", children: [
4137
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-other-line" }),
4138
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl10.FormattedMessage, { id: "otherLoginMethods" }) }),
4139
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-other-line" })
4180
+ methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-other", children: [
4181
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-other-line-box", children: [
4182
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-other-line" }),
4183
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react_intl10.FormattedMessage, { id: "otherLoginMethods" }) }),
4184
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-other-line" })
4140
4185
  ] }),
4141
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
4142
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4186
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
4187
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4143
4188
  "div",
4144
4189
  {
4145
4190
  className: "matchid-login-method-item",
@@ -4152,7 +4197,7 @@ function LoginBox({
4152
4197
  }) })
4153
4198
  ] })
4154
4199
  ] }),
4155
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4200
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4156
4201
  EmailModal,
4157
4202
  {
4158
4203
  isOpen: emailOpen,
@@ -4172,40 +4217,40 @@ var import_react28 = require("react");
4172
4217
 
4173
4218
  // src/components/LoginPanel/index.tsx
4174
4219
  var import_react_intl11 = require("react-intl");
4175
- var import_jsx_runtime87 = require("react/jsx-runtime");
4220
+ var import_jsx_runtime88 = require("react/jsx-runtime");
4176
4221
  function LoginPanel({
4177
4222
  header,
4178
4223
  onClose,
4179
4224
  ...props
4180
4225
  }) {
4181
4226
  const isDownMd = useDownMd();
4182
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-panel", children: [
4183
- header ? header : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-panel-header", children: [
4184
- /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-panel-header-content", children: [
4185
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react_intl11.FormattedMessage, { id: "loginTitle" }) }),
4186
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react_intl11.FormattedMessage, { id: "loginTips" }) })
4227
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-login-panel", children: [
4228
+ header ? header : /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-login-panel-header", children: [
4229
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-login-panel-header-content", children: [
4230
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react_intl11.FormattedMessage, { id: "loginTitle" }) }),
4231
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react_intl11.FormattedMessage, { id: "loginTips" }) })
4187
4232
  ] }),
4188
- onClose && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
4233
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
4189
4234
  ] }),
4190
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-panel-divide" }),
4191
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(LoginBox, { ...props }) })
4235
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-login-panel-divide" }),
4236
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(LoginBox, { ...props }) })
4192
4237
  ] });
4193
4238
  }
4194
4239
 
4195
4240
  // src/components/LoginModal/index.tsx
4196
- var import_jsx_runtime88 = require("react/jsx-runtime");
4241
+ var import_jsx_runtime89 = require("react/jsx-runtime");
4197
4242
  function LoginModal({
4198
4243
  isOpen = false,
4199
4244
  width = 480,
4200
4245
  ...props
4201
4246
  }) {
4202
4247
  const { isLogin } = useUserInfo();
4203
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
4248
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
4204
4249
  Modal,
4205
4250
  {
4206
4251
  isOpen: isOpen && !isLogin,
4207
4252
  width,
4208
- children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(LoginPanel, { ...props, inModal: true })
4253
+ children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(LoginPanel, { ...props, inModal: true })
4209
4254
  }
4210
4255
  );
4211
4256
  }
@@ -4214,10 +4259,10 @@ function LoginModal({
4214
4259
  var import_react27 = require("react");
4215
4260
 
4216
4261
  // src/assets/icon/ProfileIcon.tsx
4217
- var import_jsx_runtime89 = require("react/jsx-runtime");
4262
+ var import_jsx_runtime90 = require("react/jsx-runtime");
4218
4263
  function ProfileIcon({ size = 24, color = "black", ...props }) {
4219
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
4220
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
4264
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
4265
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
4221
4266
  "path",
4222
4267
  {
4223
4268
  fillRule: "evenodd",
@@ -4226,7 +4271,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
4226
4271
  fill: color
4227
4272
  }
4228
4273
  ),
4229
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
4274
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
4230
4275
  "path",
4231
4276
  {
4232
4277
  fillRule: "evenodd",
@@ -4240,7 +4285,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
4240
4285
 
4241
4286
  // src/components/UserPopover/index.tsx
4242
4287
  var import_react_intl12 = require("react-intl");
4243
- var import_jsx_runtime90 = require("react/jsx-runtime");
4288
+ var import_jsx_runtime91 = require("react/jsx-runtime");
4244
4289
  function UserContent() {
4245
4290
  const { logout, address, username } = useUserInfo();
4246
4291
  const [logouting, setLogouting] = (0, import_react27.useState)(false);
@@ -4261,34 +4306,34 @@ function UserContent() {
4261
4306
  rightIcon,
4262
4307
  onClick
4263
4308
  }) => {
4264
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "matchid-user-popover-item", onClick, children: [
4265
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `matchid-user-popover-item-content`, children: [
4309
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-user-popover-item", onClick, children: [
4310
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-user-popover-item-content`, children: [
4266
4311
  icon,
4267
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "matchid-user-popover-item-text", children })
4312
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "matchid-user-popover-item-text", children })
4268
4313
  ] }),
4269
4314
  rightIcon
4270
4315
  ] });
4271
4316
  };
4272
4317
  const UserDivider = () => {
4273
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: `matchid-user-popover-divider` });
4318
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-user-popover-divider` });
4274
4319
  };
4275
4320
  const [usernameOpen, setUsernameOpen] = (0, import_react27.useState)(false);
4276
4321
  const [copied, setCopied] = useCopyClipboard();
4277
4322
  const intl = (0, import_react_intl12.useIntl)();
4278
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "matchid-user-popover-content", children: [
4279
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "matchid-user-popover-list", children: [
4280
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(UserItem, { onClick: () => {
4323
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-user-popover-content", children: [
4324
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-user-popover-list", children: [
4325
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UserItem, { onClick: () => {
4281
4326
  setCopied(address);
4282
- }, icon: copied ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(CheckIcon, { size: 20, color: "#0ecb81" }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(CopyIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(CheckIcon, { size: 20, color: "var(--icon-color)" }), children: truncateAddress(address) }),
4283
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(UserDivider, {}),
4284
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(UserItem, { onClick: () => {
4327
+ }, icon: copied ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CheckIcon, { size: 20, color: "#0ecb81" }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CopyIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CheckIcon, { size: 20, color: "var(--icon-color)" }), children: truncateAddress(address) }),
4328
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UserDivider, {}),
4329
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UserItem, { onClick: () => {
4285
4330
  setUsernameOpen(true);
4286
- }, icon: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ProfileIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ArrowRightIcon, { size: 20, color: "var(--icon-color)" }), children: username || intl.formatMessage({
4331
+ }, icon: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ProfileIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ArrowRightIcon, { size: 20, color: "var(--icon-color)" }), children: username || intl.formatMessage({
4287
4332
  id: "setUsername"
4288
4333
  }) })
4289
4334
  ] }),
4290
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react_intl12.FormattedMessage, { id: "disconnect" }) }),
4291
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(UsernameModal, { isOpen: usernameOpen, onClose: () => {
4335
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl12.FormattedMessage, { id: "disconnect" }) }),
4336
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UsernameModal, { isOpen: usernameOpen, onClose: () => {
4292
4337
  setUsernameOpen(false);
4293
4338
  }, onSuccess: () => {
4294
4339
  setUsernameOpen(false);
@@ -4299,12 +4344,12 @@ function UserPopover({
4299
4344
  children,
4300
4345
  ...props
4301
4346
  }) {
4302
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Popover, { ...props, content: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(UserContent, {}), children });
4347
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Popover, { ...props, content: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UserContent, {}), children });
4303
4348
  }
4304
4349
 
4305
4350
  // src/components/LoginButton/index.tsx
4306
4351
  var import_react_intl13 = require("react-intl");
4307
- var import_jsx_runtime91 = require("react/jsx-runtime");
4352
+ var import_jsx_runtime92 = require("react/jsx-runtime");
4308
4353
  function LoginButton({
4309
4354
  loginRender,
4310
4355
  methods,
@@ -4320,8 +4365,8 @@ function LoginButton({
4320
4365
  const { isLogin, username } = useUserInfo();
4321
4366
  const [loginOpen, setLoginOpen] = (0, import_react28.useState)(false);
4322
4367
  if (!isLogin) {
4323
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
4324
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4368
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
4369
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4325
4370
  LoginModal,
4326
4371
  {
4327
4372
  methods,
@@ -4331,15 +4376,15 @@ function LoginButton({
4331
4376
  onClose: () => setLoginOpen(false)
4332
4377
  }
4333
4378
  ),
4334
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
4335
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UnLoginIcon_default, {}),
4336
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl13.FormattedMessage, { id: "login" }) })
4379
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
4380
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(UnLoginIcon_default, {}),
4381
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl13.FormattedMessage, { id: "login" }) })
4337
4382
  ] })
4338
4383
  ] });
4339
4384
  }
4340
- return loginRender ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_jsx_runtime91.Fragment, { children: loginRender }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UserPopover, { position: popoverPosition, type: popoverType, gap: popoverGap, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Button, { onClick: onLoginClick, className: "matchid-login-btn", ...props, children: [
4341
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(LoginIcon_default, {}),
4342
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { children: username ? truncateAddress(username) : "MatchID " + intl.formatMessage({
4385
+ return loginRender ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_jsx_runtime92.Fragment, { children: loginRender }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(UserPopover, { position: popoverPosition, type: popoverType, gap: popoverGap, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Button, { onClick: onLoginClick, className: "matchid-login-btn", ...props, children: [
4386
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(LoginIcon_default, {}),
4387
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: username ? truncateAddress(username) : "MatchID " + intl.formatMessage({
4343
4388
  id: "user"
4344
4389
  }) })
4345
4390
  ] }) });
@@ -4348,15 +4393,15 @@ function LoginButton({
4348
4393
  // src/components/UsernameModal/index.tsx
4349
4394
  var import_react29 = require("react");
4350
4395
  var import_react_intl14 = require("react-intl");
4351
- var import_jsx_runtime92 = require("react/jsx-runtime");
4396
+ var import_jsx_runtime93 = require("react/jsx-runtime");
4352
4397
  var ValidItem = ({
4353
4398
  success = false,
4354
4399
  text
4355
4400
  }) => {
4356
4401
  const isDownMd = useDownMd();
4357
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
4358
- success ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
4359
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: text })
4402
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
4403
+ success ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
4404
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { children: text })
4360
4405
  ] });
4361
4406
  };
4362
4407
  function UsernameModal({
@@ -4404,12 +4449,12 @@ function UsernameModal({
4404
4449
  }
4405
4450
  };
4406
4451
  const intl = (0, import_react_intl14.useIntl)();
4407
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
4452
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
4408
4453
  id: username ? "editUsernameTitle" : "setUsernameTitle"
4409
- }), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "matchid-username-box", children: [
4410
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Field, { label: intl.formatMessage({
4454
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-username-box", children: [
4455
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Field, { label: intl.formatMessage({
4411
4456
  id: "username"
4412
- }), error, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4457
+ }), error, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4413
4458
  Input,
4414
4459
  {
4415
4460
  placeholder: intl.formatMessage({
@@ -4422,8 +4467,8 @@ function UsernameModal({
4422
4467
  value: val
4423
4468
  }
4424
4469
  ) }),
4425
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "matchid-valid", children: [
4426
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4470
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-valid", children: [
4471
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4427
4472
  ValidItem,
4428
4473
  {
4429
4474
  success: isValid,
@@ -4432,16 +4477,16 @@ function UsernameModal({
4432
4477
  })
4433
4478
  }
4434
4479
  ),
4435
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ValidItem, { success: isLength, text: intl.formatMessage({
4480
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ValidItem, { success: isLength, text: intl.formatMessage({
4436
4481
  id: "usernameLengthError"
4437
4482
  }) })
4438
4483
  ] }),
4439
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Button, { disabled: !isSafe, loading: isSubmitting, style: {
4484
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { disabled: !isSafe, loading: isSubmitting, style: {
4440
4485
  marginTop: isDownMd ? "36px" : "64px"
4441
- }, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl14.FormattedMessage, { id: "confirm" }) }),
4442
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Button, { style: {
4486
+ }, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl14.FormattedMessage, { id: "confirm" }) }),
4487
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { style: {
4443
4488
  marginTop: isDownMd ? "12px" : "24px"
4444
- }, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl14.FormattedMessage, { id: "cancel" }) })
4489
+ }, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl14.FormattedMessage, { id: "cancel" }) })
4445
4490
  ] }) });
4446
4491
  }
4447
4492
 
@@ -4460,7 +4505,7 @@ var walletConnectImage = wallet_default;
4460
4505
  var walletSigningImage = signing_default;
4461
4506
 
4462
4507
  // src/components/WalletModalContent/index.tsx
4463
- var import_jsx_runtime93 = require("react/jsx-runtime");
4508
+ var import_jsx_runtime94 = require("react/jsx-runtime");
4464
4509
  function WalletModalContent({
4465
4510
  status,
4466
4511
  error,
@@ -4530,15 +4575,15 @@ function WalletModalContent({
4530
4575
  statusImage: walletConnectImage
4531
4576
  };
4532
4577
  }, [visible, connected, status, error, address]);
4533
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-wallet-box`, children: [
4534
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-wallet-content`, children: [
4535
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
4578
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-box`, children: [
4579
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-content`, children: [
4580
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
4536
4581
  width: 128,
4537
4582
  height: 128
4538
4583
  } }),
4539
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: pageData.isError ? "matchid-error" : "", children: pageData.text })
4584
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: pageData.isError ? "matchid-error" : "", children: pageData.text })
4540
4585
  ] }),
4541
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4586
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
4542
4587
  Button,
4543
4588
  {
4544
4589
  block: true,
@@ -4614,15 +4659,15 @@ function WalletModalContentV2(props) {
4614
4659
  statusImage: walletConnectImage
4615
4660
  };
4616
4661
  }, [props, submitting]);
4617
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-wallet-box`, children: [
4618
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-wallet-content`, children: [
4619
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
4662
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-box`, children: [
4663
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-content`, children: [
4664
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
4620
4665
  width: 128,
4621
4666
  height: 128
4622
4667
  } }),
4623
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: props.status == "error" ? "matchid-error" : "", children: pageData.text })
4668
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: props.status == "error" ? "matchid-error" : "", children: pageData.text })
4624
4669
  ] }),
4625
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4670
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
4626
4671
  Button,
4627
4672
  {
4628
4673
  block: true,
@@ -4904,7 +4949,7 @@ async function getEthersSigner(config, { chainId } = {}) {
4904
4949
  // src/components/EVMModal/index.tsx
4905
4950
  var import_siwe = require("siwe");
4906
4951
  var import_styles = require("@rainbow-me/rainbowkit/styles.css");
4907
- var import_jsx_runtime94 = require("react/jsx-runtime");
4952
+ var import_jsx_runtime95 = require("react/jsx-runtime");
4908
4953
  function WalletContent({
4909
4954
  onSuccess,
4910
4955
  type
@@ -5062,7 +5107,7 @@ function WalletContent({
5062
5107
  setNonce(void 0);
5063
5108
  setStatus("start");
5064
5109
  };
5065
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
5110
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5066
5111
  WalletModalContentV2,
5067
5112
  {
5068
5113
  status,
@@ -5080,14 +5125,14 @@ function EVMConnectModal({
5080
5125
  ...props
5081
5126
  }) {
5082
5127
  const intl = (0, import_react_intl15.useIntl)();
5083
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
5128
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
5084
5129
  id: type == "bind" ? "bindWith" : "loginWith"
5085
5130
  }, {
5086
5131
  name: "EVM"
5087
- }), children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(WalletContent, { onSuccess, type }) });
5132
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(WalletContent, { onSuccess, type }) });
5088
5133
  }
5089
5134
  function EVMModal(props) {
5090
- return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_rainbowkit2.RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(EVMConnectModal, { ...props }) });
5135
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_rainbowkit2.RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(EVMConnectModal, { ...props }) });
5091
5136
  }
5092
5137
 
5093
5138
  // src/components/TRONModal/index.tsx
@@ -5202,7 +5247,7 @@ var useTRONWallet = () => {
5202
5247
  };
5203
5248
 
5204
5249
  // src/components/TRONModal/index.tsx
5205
- var import_jsx_runtime95 = require("react/jsx-runtime");
5250
+ var import_jsx_runtime96 = require("react/jsx-runtime");
5206
5251
  function TRONConnectModal({
5207
5252
  type = "login",
5208
5253
  onSuccess,
@@ -5212,9 +5257,9 @@ function TRONConnectModal({
5212
5257
  const intl = (0, import_react_intl16.useIntl)();
5213
5258
  const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
5214
5259
  const iconMaps = {
5215
- tronlink: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
5216
- bitget: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(BitgetIcon, { size: isDownMd ? 36 : 40 }),
5217
- okx: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(OKXIcon, { size: isDownMd ? 36 : 40 })
5260
+ tronlink: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
5261
+ bitget: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(BitgetIcon, { size: isDownMd ? 36 : 40 }),
5262
+ okx: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(OKXIcon, { size: isDownMd ? 36 : 40 })
5218
5263
  };
5219
5264
  const { events, login } = useMatch();
5220
5265
  const [status, setStatus] = (0, import_react34.useState)("");
@@ -5306,11 +5351,11 @@ function TRONConnectModal({
5306
5351
  disconnect();
5307
5352
  }
5308
5353
  }, [props.isOpen]);
5309
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
5354
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
5310
5355
  id: type == "bind" ? "bindWith" : "loginWith"
5311
5356
  }, {
5312
5357
  name: "TRON"
5313
- }), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5358
+ }), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
5314
5359
  WalletModalContent,
5315
5360
  {
5316
5361
  error,
@@ -5323,9 +5368,9 @@ function TRONConnectModal({
5323
5368
  setVisible: () => {
5324
5369
  }
5325
5370
  }
5326
- ) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "matchid-login-recommend-list", children: [
5371
+ ) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "matchid-login-recommend-list", children: [
5327
5372
  installedWallets.map((wallet2) => {
5328
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5373
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
5329
5374
  RecommendItem,
5330
5375
  {
5331
5376
  icon: iconMaps[wallet2.walletKey],
@@ -5338,14 +5383,14 @@ function TRONConnectModal({
5338
5383
  );
5339
5384
  }),
5340
5385
  wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
5341
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5386
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
5342
5387
  RecommendItem,
5343
5388
  {
5344
5389
  icon: iconMaps[wallet2.walletKey],
5345
5390
  name: wallet2.name,
5346
5391
  onClick: () => {
5347
5392
  },
5348
- footer: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Button, { size: "sm", onClick: () => {
5393
+ footer: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Button, { size: "sm", onClick: () => {
5349
5394
  window.open(wallet2.website);
5350
5395
  }, children: "Install" })
5351
5396
  },
@@ -5355,14 +5400,14 @@ function TRONConnectModal({
5355
5400
  ] }) }) });
5356
5401
  }
5357
5402
  function TRONModal(props) {
5358
- return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(TRONConnectModal, { ...props, type: props.type });
5403
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TRONConnectModal, { ...props, type: props.type });
5359
5404
  }
5360
5405
 
5361
5406
  // src/components/TONModal/index.tsx
5362
5407
  var import_react35 = __toESM(require("react"));
5363
5408
  var import_react_intl17 = require("react-intl");
5364
5409
  var import_ui_react = require("@tonconnect/ui-react");
5365
- var import_jsx_runtime96 = require("react/jsx-runtime");
5410
+ var import_jsx_runtime97 = require("react/jsx-runtime");
5366
5411
  function WalletContent2({
5367
5412
  onSuccess,
5368
5413
  type
@@ -5489,7 +5534,7 @@ function WalletContent2({
5489
5534
  }
5490
5535
  }
5491
5536
  }, [state]);
5492
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
5537
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5493
5538
  WalletModalContent,
5494
5539
  {
5495
5540
  connected,
@@ -5523,20 +5568,20 @@ function TONConnectModal({
5523
5568
  const intl = (0, import_react_intl17.useIntl)();
5524
5569
  const { endpoints, appid } = useLocalStore_default();
5525
5570
  const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
5526
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
5571
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
5527
5572
  id: type == "bind" ? "bindWith" : "loginWith"
5528
5573
  }, {
5529
5574
  name: "TON"
5530
- }), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
5575
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5531
5576
  import_ui_react.TonConnectUIProvider,
5532
5577
  {
5533
5578
  manifestUrl,
5534
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(WalletContent2, { onSuccess, type })
5579
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(WalletContent2, { onSuccess, type })
5535
5580
  }
5536
5581
  ) });
5537
5582
  }
5538
5583
  function TONModal(props) {
5539
- return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TONConnectModal, { ...props });
5584
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(TONConnectModal, { ...props });
5540
5585
  }
5541
5586
 
5542
5587
  // src/components/BTCModal/index.tsx
@@ -5759,7 +5804,7 @@ var useBTCWallet = () => {
5759
5804
  };
5760
5805
 
5761
5806
  // src/components/BTCModal/index.tsx
5762
- var import_jsx_runtime97 = require("react/jsx-runtime");
5807
+ var import_jsx_runtime98 = require("react/jsx-runtime");
5763
5808
  function BTCConnectModal({
5764
5809
  type = "login",
5765
5810
  onSuccess,
@@ -5769,10 +5814,10 @@ function BTCConnectModal({
5769
5814
  const intl = (0, import_react_intl18.useIntl)();
5770
5815
  const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
5771
5816
  const iconMaps = {
5772
- leather: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(LeatherIcon, { size: isDownMd ? 36 : 40 }),
5773
- unisat: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(UnisatIcon, { size: isDownMd ? 36 : 40 }),
5774
- xverse: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(XverseIcon, { size: isDownMd ? 36 : 40 }),
5775
- phantom: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(PhantomIcon, { size: isDownMd ? 36 : 40 })
5817
+ leather: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(LeatherIcon, { size: isDownMd ? 36 : 40 }),
5818
+ unisat: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(UnisatIcon, { size: isDownMd ? 36 : 40 }),
5819
+ xverse: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(XverseIcon, { size: isDownMd ? 36 : 40 }),
5820
+ phantom: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(PhantomIcon, { size: isDownMd ? 36 : 40 })
5776
5821
  };
5777
5822
  const { events, login } = useMatch();
5778
5823
  const [status, setStatus] = (0, import_react37.useState)("");
@@ -5872,11 +5917,11 @@ function BTCConnectModal({
5872
5917
  statusRef.current = "";
5873
5918
  setError("");
5874
5919
  };
5875
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
5920
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
5876
5921
  id: type == "bind" ? "bindWith" : "loginWith"
5877
5922
  }, {
5878
5923
  name: "BTC"
5879
- }), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5924
+ }), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5880
5925
  WalletModalContent,
5881
5926
  {
5882
5927
  error,
@@ -5889,9 +5934,9 @@ function BTCConnectModal({
5889
5934
  setVisible: () => {
5890
5935
  }
5891
5936
  }
5892
- ) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "matchid-login-recommend-list", children: [
5937
+ ) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "matchid-login-recommend-list", children: [
5893
5938
  installedWallets.map((wallet2) => {
5894
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5939
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5895
5940
  RecommendItem,
5896
5941
  {
5897
5942
  icon: iconMaps[wallet2.walletKey],
@@ -5904,14 +5949,14 @@ function BTCConnectModal({
5904
5949
  );
5905
5950
  }),
5906
5951
  wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
5907
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5952
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5908
5953
  RecommendItem,
5909
5954
  {
5910
5955
  icon: iconMaps[wallet2.walletKey],
5911
5956
  name: wallet2.name,
5912
5957
  onClick: () => {
5913
5958
  },
5914
- footer: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Button, { size: "sm", onClick: () => {
5959
+ footer: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Button, { size: "sm", onClick: () => {
5915
5960
  window.open(wallet2.website);
5916
5961
  }, children: "Install" })
5917
5962
  },
@@ -5921,13 +5966,13 @@ function BTCConnectModal({
5921
5966
  ] }) }) });
5922
5967
  }
5923
5968
  function BTCModal(props) {
5924
- return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(BTCConnectModal, { ...props });
5969
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(BTCConnectModal, { ...props });
5925
5970
  }
5926
5971
 
5927
5972
  // src/components/WalletModal/index.tsx
5928
5973
  var import_react38 = require("react");
5929
5974
  var import_react_intl19 = require("react-intl");
5930
- var import_jsx_runtime98 = require("react/jsx-runtime");
5975
+ var import_jsx_runtime99 = require("react/jsx-runtime");
5931
5976
  function WalletConnectModal({
5932
5977
  type,
5933
5978
  methods: _methods,
@@ -5945,13 +5990,13 @@ function WalletConnectModal({
5945
5990
  const platform = config.platform.map((p) => p.toLowerCase());
5946
5991
  return WALLET_METHODS.filter((m) => platform.includes(m));
5947
5992
  }, [config.platform, _methods]);
5948
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
5993
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
5949
5994
  id: type == "bind" ? "bindWith" : "loginWith"
5950
5995
  }, {
5951
5996
  name: ""
5952
- }), children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "matchid-login-recommend-list", children: methods.map((method, index) => {
5997
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-login-recommend-list", children: methods.map((method, index) => {
5953
5998
  const m = walletMap[method];
5954
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5999
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5955
6000
  RecommendItem,
5956
6001
  {
5957
6002
  icon: m?.icon,
@@ -5965,12 +6010,12 @@ function WalletConnectModal({
5965
6010
  }) }) }) });
5966
6011
  }
5967
6012
  function WalletModal(props) {
5968
- return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(WalletConnectModal, { ...props });
6013
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(WalletConnectModal, { ...props });
5969
6014
  }
5970
6015
 
5971
6016
  // src/components/AlphaAvatar/index.tsx
5972
6017
  var import_react39 = require("react");
5973
- var import_jsx_runtime99 = require("react/jsx-runtime");
6018
+ var import_jsx_runtime100 = require("react/jsx-runtime");
5974
6019
  function AlphaAvatar2({ name, size = 40, className = "" }) {
5975
6020
  const [avatar, setAvatar] = (0, import_react39.useState)(void 0);
5976
6021
  (0, import_react39.useEffect)(() => {
@@ -5979,7 +6024,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
5979
6024
  setAvatar(char);
5980
6025
  }
5981
6026
  }, [name]);
5982
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
6027
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
5983
6028
  width: size,
5984
6029
  height: size,
5985
6030
  fontSize: Math.ceil(size / 2)
@@ -5987,7 +6032,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
5987
6032
  }
5988
6033
 
5989
6034
  // src/components/WalletAsset/index.tsx
5990
- var import_jsx_runtime100 = require("react/jsx-runtime");
6035
+ var import_jsx_runtime101 = require("react/jsx-runtime");
5991
6036
  function WalletAsset({
5992
6037
  onAssetClick,
5993
6038
  matchWalletAssetsOptions
@@ -5997,7 +6042,7 @@ function WalletAsset({
5997
6042
  list: walletAssets.mergedAssets
5998
6043
  });
5999
6044
  const { list } = useMatchChain();
6000
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
6045
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
6001
6046
  const clickFunc = onAssetClick && onAssetClick(n);
6002
6047
  const chain = list?.find((m) => m.id.toString() === n.chain_id);
6003
6048
  const getFooterColor = () => {
@@ -6012,11 +6057,11 @@ function WalletAsset({
6012
6057
  }
6013
6058
  return "";
6014
6059
  };
6015
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: `matchid-wallet-asset-item`, onClick: clickFunc, style: {
6060
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-wallet-asset-item`, onClick: clickFunc, style: {
6016
6061
  cursor: clickFunc ? "pointer" : "default"
6017
6062
  }, children: [
6018
- /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
6019
- n.icon ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-wallet-asset-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
6063
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
6064
+ n.icon ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-wallet-asset-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6020
6065
  AlphaAvatar2,
6021
6066
  {
6022
6067
  className: `matchid-wallet-asset-icon`,
@@ -6024,12 +6069,12 @@ function WalletAsset({
6024
6069
  name: n.symbol || n.name || ""
6025
6070
  }
6026
6071
  ),
6027
- chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
6072
+ chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
6028
6073
  ] }),
6029
- /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: `matchid-wallet-asset-info`, children: [
6030
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
6031
- "price" in n && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: `matchid-wallet-asset-content`, children: [
6032
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
6074
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-wallet-asset-info`, children: [
6075
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
6076
+ "price" in n && /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-wallet-asset-content`, children: [
6077
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6033
6078
  NumberFormatter,
6034
6079
  {
6035
6080
  value: n.price,
@@ -6037,7 +6082,7 @@ function WalletAsset({
6037
6082
  tFixNum: 2
6038
6083
  }
6039
6084
  ) }),
6040
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
6085
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6041
6086
  NumberFormatter,
6042
6087
  {
6043
6088
  value: n.value,
@@ -6046,15 +6091,15 @@ function WalletAsset({
6046
6091
  }
6047
6092
  ) })
6048
6093
  ] }),
6049
- /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: `matchid-wallet-asset-footer`, children: [
6050
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
6094
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-wallet-asset-footer`, children: [
6095
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6051
6096
  NumberFormatter,
6052
6097
  {
6053
6098
  value: n.balance,
6054
6099
  tFixNum: 3
6055
6100
  }
6056
6101
  ) }),
6057
- "price_change_24h" in n && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: `matchid-wallet-asset-change ${getFooterColor()}`, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
6102
+ "price_change_24h" in n && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: `matchid-wallet-asset-change ${getFooterColor()}`, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6058
6103
  NumberFormatter,
6059
6104
  {
6060
6105
  prefix: `${(n?.price_change_24h || 0) < 0 ? "-" : "+"} `,
@@ -6073,7 +6118,7 @@ function WalletAsset({
6073
6118
  var import_react40 = require("react");
6074
6119
  var import_viem15 = require("viem");
6075
6120
  var import_react_intl20 = require("react-intl");
6076
- var import_jsx_runtime101 = require("react/jsx-runtime");
6121
+ var import_jsx_runtime102 = require("react/jsx-runtime");
6077
6122
  function Input2({
6078
6123
  onChange,
6079
6124
  placeholder,
@@ -6083,8 +6128,8 @@ function Input2({
6083
6128
  error,
6084
6129
  size = "df"
6085
6130
  }) {
6086
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
6087
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6131
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
6132
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
6088
6133
  "input",
6089
6134
  {
6090
6135
  placeholder,
@@ -6095,7 +6140,7 @@ function Input2({
6095
6140
  className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
6096
6141
  }
6097
6142
  ),
6098
- error && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "matchid-token-input-error-text", children: error })
6143
+ error && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "matchid-token-input-error-text", children: error })
6099
6144
  ] });
6100
6145
  }
6101
6146
  function TokenSend({
@@ -6223,24 +6268,24 @@ function TokenSend({
6223
6268
  window.removeEventListener("message", receiveMessage);
6224
6269
  };
6225
6270
  }, []);
6226
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react_intl20.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-token-send-box`, children: [
6227
- /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "matchid-token-send-content", children: [
6228
- /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-token-amount-content`, children: [
6229
- /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-token-amount-header`, children: [
6230
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react_intl20.FormattedMessage, { id: "amount" }) }),
6231
- /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
6232
- token.icon ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6271
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_intl20.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-send-box`, children: [
6272
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "matchid-token-send-content", children: [
6273
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-amount-content`, children: [
6274
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-amount-header`, children: [
6275
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_intl20.FormattedMessage, { id: "amount" }) }),
6276
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
6277
+ token.icon ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
6233
6278
  "img",
6234
6279
  {
6235
6280
  src: token?.icon,
6236
6281
  alt: token?.symbol,
6237
6282
  className: `matchid-token-amount-chain-icon`
6238
6283
  }
6239
- ) : /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
6240
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { children: token?.symbol })
6284
+ ) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
6285
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { children: token?.symbol })
6241
6286
  ] })
6242
6287
  ] }),
6243
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6288
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
6244
6289
  Input2,
6245
6290
  {
6246
6291
  type: "text",
@@ -6253,18 +6298,18 @@ function TokenSend({
6253
6298
  error: error.amount || txError
6254
6299
  }
6255
6300
  ),
6256
- /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
6257
- /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-token-amount-title`, children: [
6258
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react_intl20.FormattedMessage, { id: "balance" }),
6301
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
6302
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-amount-title`, children: [
6303
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_intl20.FormattedMessage, { id: "balance" }),
6259
6304
  ":"
6260
6305
  ] }),
6261
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
6306
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
6262
6307
  ] }),
6263
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
6308
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
6264
6309
  ] }),
6265
- /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-token-address-content`, children: [
6266
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react_intl20.FormattedMessage, { id: "receiveTitle" }) }) }),
6267
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6310
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-address-content`, children: [
6311
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_intl20.FormattedMessage, { id: "receiveTitle" }) }) }),
6312
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
6268
6313
  Input2,
6269
6314
  {
6270
6315
  type: "text",
@@ -6280,7 +6325,7 @@ function TokenSend({
6280
6325
  )
6281
6326
  ] })
6282
6327
  ] }),
6283
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6328
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
6284
6329
  Button,
6285
6330
  {
6286
6331
  size: "lg",
@@ -6289,7 +6334,7 @@ function TokenSend({
6289
6334
  disabled: !canSend || !!txError,
6290
6335
  onClick: onNext,
6291
6336
  loading: loading || sending,
6292
- children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react_intl20.FormattedMessage, { id: "next" })
6337
+ children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_intl20.FormattedMessage, { id: "next" })
6293
6338
  }
6294
6339
  )
6295
6340
  ] }) });
@@ -6297,7 +6342,7 @@ function TokenSend({
6297
6342
 
6298
6343
  // src/components/TokenDetail/index.tsx
6299
6344
  var import_react_intl21 = require("react-intl");
6300
- var import_jsx_runtime102 = require("react/jsx-runtime");
6345
+ var import_jsx_runtime103 = require("react/jsx-runtime");
6301
6346
  function TokenDetail({
6302
6347
  onClose,
6303
6348
  token
@@ -6307,41 +6352,41 @@ function TokenDetail({
6307
6352
  const chain = chainList?.find((m) => m.id.toString() === token.chain_id);
6308
6353
  const onSend = () => {
6309
6354
  modal.show((props) => {
6310
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(TokenSend, { onClose: () => {
6355
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(TokenSend, { onClose: () => {
6311
6356
  props.close();
6312
6357
  onClose();
6313
6358
  }, onBack: props.close, zIndex: props.zIndex, token });
6314
6359
  });
6315
6360
  };
6316
6361
  const intl = (0, import_react_intl21.useIntl)();
6317
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(ModalDrawer, { isOpen: true, title: intl.formatMessage({
6362
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(ModalDrawer, { isOpen: true, title: intl.formatMessage({
6318
6363
  id: "tokenDetails"
6319
- }), onClose, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-detail`, children: [
6320
- /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-main`, children: [
6321
- /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-info`, children: [
6322
- /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-logo`, children: [
6323
- token.icon ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("img", { src: token.icon, alt: token.symbol, className: `matchid-token-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(AlphaAvatar, { className: `matchid-token-icon`, size: 48, name: token.symbol || token.name || "" }),
6324
- chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-token-chain` })
6364
+ }), onClose, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-detail`, children: [
6365
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-main`, children: [
6366
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-info`, children: [
6367
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-logo`, children: [
6368
+ token.icon ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("img", { src: token.icon, alt: token.symbol, className: `matchid-token-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(AlphaAvatar, { className: `matchid-token-icon`, size: 48, name: token.symbol || token.name || "" }),
6369
+ chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-token-chain` })
6325
6370
  ] }),
6326
- /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-name`, children: [
6327
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10 }),
6371
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-name`, children: [
6372
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10 }),
6328
6373
  " ",
6329
6374
  token.symbol
6330
6375
  ] })
6331
6376
  ] }),
6332
- token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-contract`, children: [
6333
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "matchid-token-contract-title", children: "Contract address" }),
6334
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "matchid-token-contract-address", children: token.address })
6377
+ token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-contract`, children: [
6378
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "matchid-token-contract-title", children: "Contract address" }),
6379
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "matchid-token-contract-address", children: token.address })
6335
6380
  ] })
6336
6381
  ] }),
6337
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_intl21.FormattedMessage, { id: "send" }) })
6382
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react_intl21.FormattedMessage, { id: "send" }) })
6338
6383
  ] }) });
6339
6384
  }
6340
6385
 
6341
6386
  // src/components/TokenSendList/index.tsx
6342
6387
  var import_react41 = require("react");
6343
6388
  var import_react_intl22 = require("react-intl");
6344
- var import_jsx_runtime103 = require("react/jsx-runtime");
6389
+ var import_jsx_runtime104 = require("react/jsx-runtime");
6345
6390
  function TokenSendList({ close }) {
6346
6391
  const isDownMd = useDownMd();
6347
6392
  const walletAssets = useMatchWalletAssets();
@@ -6353,16 +6398,16 @@ function TokenSendList({ close }) {
6353
6398
  const modal = useModal();
6354
6399
  const onNext = () => {
6355
6400
  checked && modal.show((props) => {
6356
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(TokenSend, { onClose: () => {
6401
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(TokenSend, { onClose: () => {
6357
6402
  props.close();
6358
6403
  close();
6359
6404
  }, onBack: props.close, zIndex: props.zIndex, token: checked });
6360
6405
  });
6361
6406
  };
6362
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "matchid-token-send-list-box", children: [
6363
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
6407
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "matchid-token-send-list-box", children: [
6408
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
6364
6409
  const chain = list?.find((m) => m.id.toString() === n.chain_id);
6365
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
6410
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
6366
6411
  "div",
6367
6412
  {
6368
6413
  className: `matchid-token-send-item ${checked?.address == n.address ? "matchid-token-send-chekced" : ""}`,
@@ -6370,10 +6415,10 @@ function TokenSendList({ close }) {
6370
6415
  setChecked(n);
6371
6416
  },
6372
6417
  children: [
6373
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
6374
- /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "matchid-token-send-content", children: [
6375
- /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "matchid-token-send-logo", children: [
6376
- n.icon ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
6418
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
6419
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "matchid-token-send-content", children: [
6420
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "matchid-token-send-logo", children: [
6421
+ n.icon ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
6377
6422
  AlphaAvatar2,
6378
6423
  {
6379
6424
  className: `matchid-token-send-icon`,
@@ -6381,7 +6426,7 @@ function TokenSendList({ close }) {
6381
6426
  name: n.symbol || n.name || ""
6382
6427
  }
6383
6428
  ),
6384
- chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
6429
+ chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
6385
6430
  "img",
6386
6431
  {
6387
6432
  src: chain.iconUrl,
@@ -6390,9 +6435,9 @@ function TokenSendList({ close }) {
6390
6435
  }
6391
6436
  )
6392
6437
  ] }),
6393
- /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-send-info`, children: [
6394
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
6395
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
6438
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: `matchid-token-send-info`, children: [
6439
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
6440
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
6396
6441
  ] })
6397
6442
  ] })
6398
6443
  ]
@@ -6400,7 +6445,7 @@ function TokenSendList({ close }) {
6400
6445
  index
6401
6446
  );
6402
6447
  }) }),
6403
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react_intl22.FormattedMessage, { id: "next" }) })
6448
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl22.FormattedMessage, { id: "next" }) })
6404
6449
  ] });
6405
6450
  }
6406
6451
 
@@ -6410,7 +6455,7 @@ var import_react42 = require("react");
6410
6455
  var import_viem16 = require("viem");
6411
6456
  var import_viem17 = require("viem");
6412
6457
  var import_react_intl23 = require("react-intl");
6413
- var import_jsx_runtime104 = require("react/jsx-runtime");
6458
+ var import_jsx_runtime105 = require("react/jsx-runtime");
6414
6459
  var Item = ({ data }) => {
6415
6460
  const { address } = useWallet();
6416
6461
  const isOut = data.from.toLowerCase() == address.toLowerCase();
@@ -6497,18 +6542,18 @@ var Item = ({ data }) => {
6497
6542
  }
6498
6543
  return chain?.nativeCurrency.symbol || chain?.nativeCurrency.name;
6499
6544
  }, [transferType, chain, contracts, chainId, data.to]);
6500
- return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
6545
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
6501
6546
  "a",
6502
6547
  {
6503
6548
  href: explorerLink(`tx/${data.hash}`),
6504
6549
  target: "_blank",
6505
6550
  className: `matchid-transaction-item`,
6506
6551
  children: [
6507
- /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: `matchid-transacton-item-container`, children: [
6508
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
6509
- /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: `matchid-transaction-item-details`, children: [
6510
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
6511
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
6552
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: `matchid-transacton-item-container`, children: [
6553
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
6554
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: `matchid-transaction-item-details`, children: [
6555
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
6556
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
6512
6557
  "div",
6513
6558
  {
6514
6559
  className: `matchid-transaction-item-timestamp`,
@@ -6517,11 +6562,11 @@ var Item = ({ data }) => {
6517
6562
  )
6518
6563
  ] })
6519
6564
  ] }),
6520
- /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
6521
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(NumberFormatter, { value: amount, tFixNum: 6, prefix: isOut ? "-" : "+", suffix: " " + symbol }),
6522
- status == "loading" && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(LoadingIcon_default, { color: "#000000", size: 16, rotate: true }),
6523
- status == "success" && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(CheckRoundIcon, { size: 16 }),
6524
- status == "error" && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(InfoRoundIcon, { size: 16 })
6565
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
6566
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(NumberFormatter, { value: amount, tFixNum: 6, prefix: isOut ? "-" : "+", suffix: " " + symbol }),
6567
+ status == "loading" && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(LoadingIcon_default, { color: "#000000", size: 16, rotate: true }),
6568
+ status == "success" && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(CheckRoundIcon, { size: 16 }),
6569
+ status == "error" && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(InfoRoundIcon, { size: 16 })
6525
6570
  ] })
6526
6571
  ]
6527
6572
  }
@@ -6531,19 +6576,19 @@ function TransactionList({
6531
6576
  scrollableTarget
6532
6577
  }) {
6533
6578
  const { fetchMoreData, hasMore, items } = useMatchWalletRecords();
6534
- return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
6579
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
6535
6580
  import_react_infinite_scroll_component.default,
6536
6581
  {
6537
6582
  scrollableTarget,
6538
6583
  dataLength: items.length,
6539
6584
  next: fetchMoreData,
6540
6585
  hasMore,
6541
- loader: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "matchid-list-nomore", children: [
6542
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
6586
+ loader: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "matchid-list-nomore", children: [
6587
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
6543
6588
  "Loading..."
6544
6589
  ] }),
6545
- endMessage: items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl23.FormattedMessage, { id: "noMoreRecords" }) }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl23.FormattedMessage, { id: "noRecords" }) }),
6546
- children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "mt-[150px]" }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Item, { data: item }, index)) })
6590
+ endMessage: items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react_intl23.FormattedMessage, { id: "noMoreRecords" }) }) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react_intl23.FormattedMessage, { id: "noRecords" }) }),
6591
+ children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "mt-[150px]" }) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Item, { data: item }, index)) })
6547
6592
  }
6548
6593
  );
6549
6594
  }