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

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