@matchain/matchid-sdk-react 0.1.53-alpha.2 → 0.1.53-alpha.20

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 (189) hide show
  1. package/dist/assets/icon/index.d.mts +4 -144
  2. package/dist/assets/icon/index.d.ts +4 -144
  3. package/dist/assets/icon/index.js +54 -0
  4. package/dist/assets/icon/index.js.map +1 -1
  5. package/dist/assets/icon/index.mjs +5 -1
  6. package/dist/chunk-3CR66BEX.mjs +19 -0
  7. package/dist/chunk-3CR66BEX.mjs.map +1 -0
  8. package/dist/{chunk-W5A6WY7Y.mjs → chunk-CLMSEFOV.mjs} +5808 -4749
  9. package/dist/chunk-CLMSEFOV.mjs.map +1 -0
  10. package/dist/{chunk-LHNKZISB.mjs → chunk-FKXS2XRG.mjs} +114 -2
  11. package/dist/chunk-FKXS2XRG.mjs.map +1 -0
  12. package/dist/{chunk-MX7N57AH.mjs → chunk-IZOOVZAD.mjs} +11 -6
  13. package/dist/chunk-IZOOVZAD.mjs.map +1 -0
  14. package/dist/{chunk-HYQ3T6WW.mjs → chunk-JX73EY6V.mjs} +2 -14
  15. package/dist/chunk-JX73EY6V.mjs.map +1 -0
  16. package/dist/{chunk-FB5MHLWX.mjs → chunk-X5HGL3ZX.mjs} +45 -3
  17. package/dist/chunk-X5HGL3ZX.mjs.map +1 -0
  18. package/dist/components/index.d.mts +3 -3
  19. package/dist/components/index.d.ts +3 -3
  20. package/dist/components/index.js +1568 -504
  21. package/dist/components/index.js.map +1 -1
  22. package/dist/components/index.mjs +11 -4
  23. package/dist/config/chains/index.mjs +2 -1
  24. package/dist/hooks/api/index.d.mts +3 -2
  25. package/dist/hooks/api/index.d.ts +3 -2
  26. package/dist/hooks/api/index.js +393 -82
  27. package/dist/hooks/api/index.js.map +1 -1
  28. package/dist/hooks/api/index.mjs +9 -8
  29. package/dist/hooks/index.d.mts +3 -2
  30. package/dist/hooks/index.d.ts +3 -2
  31. package/dist/hooks/index.js +620 -463
  32. package/dist/hooks/index.js.map +1 -1
  33. package/dist/hooks/index.mjs +5 -4
  34. package/dist/index-B1T3lcwo.d.mts +203 -0
  35. package/dist/{index-Df-WlkXq.d.ts → index-B6Tmp2HR.d.ts} +25 -5
  36. package/dist/index-B6pp5UQe.d.ts +203 -0
  37. package/dist/{index-IwwXQ_QV.d.ts → index-BR3CyOOn.d.ts} +5 -2
  38. package/dist/{index-CZqdmQu1.d.mts → index-BeTS09HM.d.mts} +41 -17
  39. package/dist/{index-iWHaT8HV.d.mts → index-BxHKPC5n.d.mts} +1 -1
  40. package/dist/{index-B8cUP7cH.d.ts → index-CA7lhjpa.d.mts} +25 -5
  41. package/dist/{index-yy3VTdFU.d.mts → index-CRoZ0p2b.d.ts} +25 -5
  42. package/dist/{index-BCGJczpk.d.mts → index-CXPCmoIu.d.mts} +5 -2
  43. package/dist/{index-Bil_db2f.d.mts → index-Ce3oCu6-.d.mts} +19 -16
  44. package/dist/{index-DNJuiNdz.d.mts → index-Ci_ub_5y.d.mts} +25 -5
  45. package/dist/{index-BsL6zo6a.d.ts → index-DKV8v6s_.d.ts} +1 -1
  46. package/dist/{index-K5vXmiRX.d.ts → index-Dnjr-WPp.d.ts} +41 -17
  47. package/dist/{index-BS-NO8Y2.d.ts → index-IHigYscw.d.ts} +19 -16
  48. package/dist/index.css +132 -13
  49. package/dist/index.d.mts +9 -7
  50. package/dist/index.d.ts +9 -7
  51. package/dist/index.js +1956 -793
  52. package/dist/index.js.map +1 -1
  53. package/dist/index.mjs +10 -8
  54. package/dist/request-B0CyrGFT.d.mts +15 -0
  55. package/dist/request-B0CyrGFT.d.ts +15 -0
  56. package/dist/types/index.d.mts +1 -1
  57. package/dist/types/index.d.ts +1 -1
  58. package/dist/{types-CZbR7ERa.d.mts → types-mRkAnXBf.d.mts} +17 -1
  59. package/dist/{types-CZbR7ERa.d.ts → types-mRkAnXBf.d.ts} +17 -1
  60. package/dist/ui/index.d.mts +3 -3
  61. package/dist/ui/index.d.ts +3 -3
  62. package/dist/ui/index.js +109 -61
  63. package/dist/ui/index.js.map +1 -1
  64. package/dist/ui/index.mjs +8 -4
  65. package/dist/utils/index.d.mts +3 -2
  66. package/dist/utils/index.d.ts +3 -2
  67. package/dist/utils/index.js +10 -4
  68. package/dist/utils/index.js.map +1 -1
  69. package/dist/utils/index.mjs +3 -1
  70. package/example/dist/assets/Arc-R3PUWRPJ-CUdEQO8X.js +1 -0
  71. package/example/dist/assets/Brave-24BM36UM-C6C5mkTK.js +1 -0
  72. package/example/dist/assets/Browser-4R4QKTV2-D3ON1q-S.js +1 -0
  73. package/example/dist/assets/Chrome-TLI42HDP-BgiVz-ma.js +1 -0
  74. package/example/dist/assets/Edge-AZ34LAFM-EBh9cG_z.js +1 -0
  75. package/example/dist/assets/Firefox-ZDK7RHKK-5nyhB0sj.js +1 -0
  76. package/example/dist/assets/Linux-VYP66PDO--MOvpQUa.js +1 -0
  77. package/example/dist/assets/Macos-5QL4JBJE-DLNYPiln.js +1 -0
  78. package/example/dist/assets/Opera-BKMCKUXC-CCypmVaM.js +1 -0
  79. package/example/dist/assets/Safari-PXQIVS6N-B-Lfxb9r.js +1 -0
  80. package/example/dist/assets/Windows-GTAT3OTE-K9Pt3pUF.js +1 -0
  81. package/example/dist/assets/apechain-COEQ5RUI-0TDoXOYf.js +1 -0
  82. package/example/dist/assets/ar_AR-ZRPPM56D-d2WEfzQ_.js +1349 -0
  83. package/example/dist/assets/arbitrum-HW44W6XR-hPA5bMPt.js +1 -0
  84. package/example/dist/assets/assets-NU2OP443-COMs-Mo6.js +1 -0
  85. package/example/dist/assets/avalanche-MXEFEDSW-DcC5FNt3.js +1 -0
  86. package/example/dist/assets/base-Z4LFBE5D-DHfqMzJC.js +1 -0
  87. package/example/dist/assets/berachain-ZN3U5LDZ-CAvW_8ws.js +1 -0
  88. package/example/dist/assets/bitgetWallet-CLYTW54T-Wwn2QYd0.js +1 -0
  89. package/example/dist/assets/blast-46UQLYYY-BV_Xlsq4.js +1 -0
  90. package/example/dist/assets/bsc-RVE67I5L-DVYEF0vl.js +1 -0
  91. package/example/dist/assets/ccip-BhIcA6Sl.js +1 -0
  92. package/example/dist/assets/celo-E6XU57FO-C5IguUgF.js +1 -0
  93. package/example/dist/assets/coinbaseWallet-WWX6LF36-BMRj6mTC.js +1 -0
  94. package/example/dist/assets/connect-MR6XDLIE-BET5HMNk.js +1 -0
  95. package/example/dist/assets/create-X4WFHLCW-De9pC3ym.js +1 -0
  96. package/example/dist/assets/cronos-ROYR77VZ-Prn3LRPZ.js +1 -0
  97. package/example/dist/assets/de_DE-GYZFZXWH-CYZf24IR.js +1349 -0
  98. package/example/dist/assets/degen-7ROC3GCY-9HqAkHtZ.js +1 -0
  99. package/example/dist/assets/es_419-OGVOQEFZ-D6BJPTeQ.js +1349 -0
  100. package/example/dist/assets/ethereum-RFBAMUVK-WsW8NXqo.js +1 -0
  101. package/example/dist/assets/events-CkdpRqBF.js +1 -0
  102. package/example/dist/assets/flow-NBCRNYVF-D2XasjKk.js +1 -0
  103. package/example/dist/assets/fr_FR-Q5QBQBX2-lQoTmpTH.js +1349 -0
  104. package/example/dist/assets/gnosis-Y56LN66M-D4_J-ZQH.js +1 -0
  105. package/example/dist/assets/gravity-LMEBVSFN-DLxWpxhy.js +1 -0
  106. package/example/dist/assets/hardhat-NEEC6JX7-DzuWQYyS.js +1 -0
  107. package/example/dist/assets/hi_IN-7I7LRHGW-CTQjmeYe.js +1349 -0
  108. package/example/dist/assets/hooks.module-C5ONEBEq.js +1 -0
  109. package/example/dist/assets/hyperevm-J6CONVCX-C6oeYIAP.js +1 -0
  110. package/example/dist/assets/id_ID-ZMGZ2JFV-CgKQKAmU.js +1349 -0
  111. package/example/dist/assets/index-BG5XIZpE.js +3 -0
  112. package/example/dist/assets/index-BsarjAeg.js +1 -0
  113. package/example/dist/assets/index-DK7UFFe7.js +7 -0
  114. package/example/dist/assets/index-DPb8sz1C.js +54 -0
  115. package/example/dist/assets/index-JbpWt42F.js +1 -0
  116. package/example/dist/assets/index-YsGNa18R.css +1 -0
  117. package/example/dist/assets/index-kAjO6hfy.js +2 -0
  118. package/example/dist/assets/index-qgo91dsq.js +3942 -0
  119. package/example/dist/assets/index.es-D44wzsQe.js +71 -0
  120. package/example/dist/assets/injectedWallet-H7LYKTQS-CAHJNGc-.js +1 -0
  121. package/example/dist/assets/ink-4U4ZVNAB-AlM1MLfQ.js +1 -0
  122. package/example/dist/assets/ja_JP-NYBCHQTZ-CMaBl8Za.js +1349 -0
  123. package/example/dist/assets/kaia-A33DVQBT-Fgclbhio.js +1 -0
  124. package/example/dist/assets/ko_KR-67WE736M-DHWhIjcm.js +1349 -0
  125. package/example/dist/assets/linea-IALBSJQC-Cmyd7vgA.js +1 -0
  126. package/example/dist/assets/login-CWDTIDNK-DhDUYE4b.js +1 -0
  127. package/example/dist/assets/manta-5V6W5D7G-BnjsGzeJ.js +1 -0
  128. package/example/dist/assets/mantle-KBL3OIYT-DIpe0poV.js +1 -0
  129. package/example/dist/assets/metaMaskWallet-YFHEHW7V-BggUDXad.js +1 -0
  130. package/example/dist/assets/metaMaskWallet-YFHEHW7V-DBxkXEyI.js +1 -0
  131. package/example/dist/assets/ms_MY-65AJIBUS-BLlUrxe6.js +1349 -0
  132. package/example/dist/assets/okxWallet-GJMKZIND-Ctk5JsJ6.js +1 -0
  133. package/example/dist/assets/optimism-YWJ3IQHA-DYER-OR5.js +1 -0
  134. package/example/dist/assets/polygon-WWEUOMKW-CNBYSB1T.js +1 -0
  135. package/example/dist/assets/pt_BR-DMJANC65-DMs4DrlC.js +1349 -0
  136. package/example/dist/assets/rainbowWallet-2SR6TVBF-kimcGeuf.js +1 -0
  137. package/example/dist/assets/refresh-HJGJRASX-D0rkc63_.js +1 -0
  138. package/example/dist/assets/ronin-PNHX5V6H-BS-WPXjQ.js +1 -0
  139. package/example/dist/assets/ru_RU-WER7RQ6A-DsJK55uv.js +1349 -0
  140. package/example/dist/assets/safeWallet-VUYZPLY4-CXnodgMs.js +1 -0
  141. package/example/dist/assets/sanko-RHQYXGM5-OX010CbN.js +1 -0
  142. package/example/dist/assets/scan-DEOT2M37-1-mJ5OyF.js +1 -0
  143. package/example/dist/assets/scroll-MCKFTBRS-C2gqZSab.js +1 -0
  144. package/example/dist/assets/sign-A7IJEUT5-CGsRnPrd.js +1 -0
  145. package/example/dist/assets/th_TH-JOSHEZ6D-Cp87mIRZ.js +1349 -0
  146. package/example/dist/assets/tr_TR-EAMG2YPO-C52_xfsf.js +1349 -0
  147. package/example/dist/assets/uk_UA-GO2TRVWA-C1C1400t.js +1349 -0
  148. package/example/dist/assets/unichain-OQ3BZUDH-CyMLDmFg.js +1 -0
  149. package/example/dist/assets/vi_VN-5HLLSOJA-Dj7ferOp.js +1349 -0
  150. package/example/dist/assets/walletConnectWallet-FNSU4KNU-B0ci71fU.js +1 -0
  151. package/example/dist/assets/walletConnectWallet-FNSU4KNU-CBpCuHbd.js +1 -0
  152. package/example/dist/assets/xdc-X7V4QFNF-CSGs0o6M.js +1 -0
  153. package/example/dist/assets/zetachain-BMJKVYBN-IK2CZBr3.js +1 -0
  154. package/example/dist/assets/zh_CN-THPIFVWJ-Cbp71xMR.js +1349 -0
  155. package/example/dist/assets/zh_HK-R7XP4TGF-CyJtfKGw.js +1349 -0
  156. package/example/dist/assets/zh_TW-F5LD752V-AHFgsYw-.js +1349 -0
  157. package/example/dist/assets/zksync-UWUXFL74-Bt0brpXu.js +1 -0
  158. package/example/dist/assets/zora-YZH32HP3-CY3tp3EJ.js +1 -0
  159. package/example/dist/index.html +2 -2
  160. package/example/package.json +3 -1
  161. package/example/src/App.tsx +30 -7
  162. package/example/src/pages/Contact/index.tsx +90 -0
  163. package/example/src/pages/UI/components/Tabs.tsx +18 -0
  164. package/example/src/pages/UI/index.tsx +2 -0
  165. package/example/src/pages/User/index.tsx +7 -1
  166. package/package.json +5 -1
  167. package/dist/chunk-4A2YPGO3.mjs +0 -97
  168. package/dist/chunk-4A2YPGO3.mjs.map +0 -1
  169. package/dist/chunk-FB5MHLWX.mjs.map +0 -1
  170. package/dist/chunk-HYQ3T6WW.mjs.map +0 -1
  171. package/dist/chunk-LHNKZISB.mjs.map +0 -1
  172. package/dist/chunk-MX7N57AH.mjs.map +0 -1
  173. package/dist/chunk-W5A6WY7Y.mjs.map +0 -1
  174. package/example/dist/assets/TransportWebHID-BEu7tC0r.js +0 -1
  175. package/example/dist/assets/bignumber-iG7K-qxw.js +0 -10
  176. package/example/dist/assets/ccip-a6wQ1Vcb.js +0 -1
  177. package/example/dist/assets/draggabilly-CRYR_S0q.js +0 -14
  178. package/example/dist/assets/index--dp9m9Ep.js +0 -1
  179. package/example/dist/assets/index-BDTHolFv.js +0 -569
  180. package/example/dist/assets/index-BZl59qLb.js +0 -179
  181. package/example/dist/assets/index-BmMbYNHO.js +0 -303
  182. package/example/dist/assets/index-C7cxVRDF.js +0 -1677
  183. package/example/dist/assets/index-CJk171Yb.js +0 -1
  184. package/example/dist/assets/index-CQiBesAa.js +0 -3
  185. package/example/dist/assets/index-D62loNA9.js +0 -3
  186. package/example/dist/assets/index-DqyX3FG6.js +0 -1
  187. package/example/dist/assets/index-Gy3FXGhr.css +0 -1
  188. package/example/dist/assets/inherits_browser-BlmhoU4v.js +0 -1
  189. package/example/dist/assets/solanaEmbed.esm-Djn-u4Vn.js +0 -38
@@ -293,6 +293,13 @@ var tgAppLoginInitApi = () => {
293
293
  method: "GET"
294
294
  });
295
295
  };
296
+ var userInviteApi = (data) => {
297
+ return request_default({
298
+ url: `/api/v1/user/invite`,
299
+ method: "POST",
300
+ data
301
+ });
302
+ };
296
303
 
297
304
  // src/store/useLocalStore.ts
298
305
  var persistedState = (0, import_middleware.persist)(
@@ -349,10 +356,10 @@ var localStore = useLocalStore;
349
356
  var useLocalStore_default = useLocalStore;
350
357
 
351
358
  // src/hooks/useUserInfo.tsx
352
- var import_react31 = require("react");
359
+ var import_react35 = require("react");
353
360
 
354
361
  // src/MatchContext.tsx
355
- var import_react30 = require("react");
362
+ var import_react34 = require("react");
356
363
 
357
364
  // src/store/useModalStore.ts
358
365
  var import_zustand2 = require("zustand");
@@ -614,6 +621,12 @@ function TransferIcon({ size = 40, ...props }) {
614
621
  // src/assets/icon/ArrowSendIcon.tsx
615
622
  var import_jsx_runtime48 = require("react/jsx-runtime");
616
623
 
624
+ // src/assets/icon/PhantomIcon.tsx
625
+ var import_jsx_runtime49 = require("react/jsx-runtime");
626
+
627
+ // src/assets/icon/MoreIcon.tsx
628
+ var import_jsx_runtime50 = require("react/jsx-runtime");
629
+
617
630
  // src/hooks/useLayout.tsx
618
631
  var useLayout_exports = {};
619
632
  __export(useLayout_exports, {
@@ -635,7 +648,7 @@ function useDownMd() {
635
648
  }
636
649
 
637
650
  // src/hooks/useConfig.tsx
638
- var import_jsx_runtime49 = require("react/jsx-runtime");
651
+ var import_jsx_runtime51 = require("react/jsx-runtime");
639
652
  var DEFAULT_WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
640
653
 
641
654
  // src/store/useModalStore.ts
@@ -657,6 +670,12 @@ var useBTCModalStore = (0, import_zustand2.create)((set) => ({
657
670
  open: (type) => set({ isOpen: true, type }),
658
671
  close: () => set({ isOpen: false })
659
672
  }));
673
+ var useEVMModalStore = (0, import_zustand2.create)((set) => ({
674
+ isOpen: false,
675
+ type: "",
676
+ open: (type) => set({ isOpen: true, type }),
677
+ close: () => set({ isOpen: false })
678
+ }));
660
679
  var useCEXBindModalStore = (0, import_zustand2.create)((set) => ({
661
680
  type: "",
662
681
  isOpen: false,
@@ -676,7 +695,7 @@ var import_react6 = require("react");
676
695
 
677
696
  // src/ui/Overlay/index.tsx
678
697
  var import_react2 = require("react");
679
- var import_jsx_runtime50 = require("react/jsx-runtime");
698
+ var import_jsx_runtime52 = require("react/jsx-runtime");
680
699
  function Overlay({
681
700
  isOpen = false,
682
701
  children,
@@ -692,7 +711,7 @@ function Overlay({
692
711
  document.body.style.overflow = "";
693
712
  };
694
713
  }, [isOpen]);
695
- return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
714
+ return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
696
715
  "div",
697
716
  {
698
717
  className: "matchid-overlay",
@@ -701,11 +720,11 @@ function Overlay({
701
720
  },
702
721
  children
703
722
  }
704
- ) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, {});
723
+ ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx_runtime52.Fragment, {});
705
724
  }
706
725
 
707
726
  // src/ui/Modal/index.tsx
708
- var import_jsx_runtime51 = require("react/jsx-runtime");
727
+ var import_jsx_runtime53 = require("react/jsx-runtime");
709
728
  function Modal({
710
729
  children,
711
730
  isOpen,
@@ -713,10 +732,10 @@ function Modal({
713
732
  zIndex = 100,
714
733
  className = ""
715
734
  }) {
716
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: `matchid-modal ${className}`, style: {
735
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: `matchid-modal ${className}`, style: {
717
736
  width
718
737
  }, children: [
719
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "matchid-modal-mobile-header" }),
738
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "matchid-modal-mobile-header" }),
720
739
  children
721
740
  ] }) });
722
741
  }
@@ -730,13 +749,13 @@ function ModalWithHeader({
730
749
  ...props
731
750
  }) {
732
751
  const isDownMd = useDownMd();
733
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Modal, { ...props, children: [
734
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
735
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "matchid-modal-header-content", children: [
736
- onBack && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
737
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "matchid-modal-header-title", children: title })
752
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Modal, { ...props, children: [
753
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
754
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "matchid-modal-header-content", children: [
755
+ onBack && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
756
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "matchid-modal-header-title", children: title })
738
757
  ] }),
739
- onClose && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
758
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
740
759
  ] }),
741
760
  children
742
761
  ] });
@@ -747,7 +766,7 @@ var import_react4 = require("react");
747
766
 
748
767
  // src/utils/index.tsx
749
768
  var import_moment = __toESM(require("moment"));
750
- var import_jsx_runtime52 = require("react/jsx-runtime");
769
+ var import_jsx_runtime54 = require("react/jsx-runtime");
751
770
  var getVersion = () => {
752
771
  return "0.0.2";
753
772
  };
@@ -779,10 +798,10 @@ var NumberFormatter = ({
779
798
  const [intPart, decimalPart] = numberValue.toString().split(".");
780
799
  const intFormat = separator ? intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : intPart;
781
800
  if (Math.abs(parseFloat(numberValue)) >= 1) {
782
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className, children: [
783
- prefix && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: prefixClassName, children: prefix }),
784
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: intClassName, children: intFormat }),
785
- decimalPart ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: decimalClassName, children: [
801
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className, children: [
802
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: prefixClassName, children: prefix }),
803
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: intClassName, children: intFormat }),
804
+ decimalPart ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className: decimalClassName, children: [
786
805
  ".",
787
806
  decimalPart.substring(0, fixNum)
788
807
  ] }) : "",
@@ -799,30 +818,30 @@ var NumberFormatter = ({
799
818
  }
800
819
  }
801
820
  if (zeroCount < tFixNum) {
802
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className, children: [
803
- prefix && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: prefixClassName, children: prefix }),
804
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: intClassName, children: intFormat }),
805
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: decimalClassName, children: [
821
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className, children: [
822
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: prefixClassName, children: prefix }),
823
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: intClassName, children: intFormat }),
824
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className: decimalClassName, children: [
806
825
  ".",
807
826
  decimalPart.substring(0, tFixNum)
808
827
  ] }),
809
828
  suffix
810
829
  ] });
811
830
  }
812
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className, children: [
813
- prefix && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: prefixClassName, children: prefix }),
814
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: intClassName, children: intFormat }),
815
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: decimalClassName, children: [
831
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className, children: [
832
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: prefixClassName, children: prefix }),
833
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: intClassName, children: intFormat }),
834
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className: decimalClassName, children: [
816
835
  ".0",
817
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("sub", { children: zeroCount }),
836
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("sub", { children: zeroCount }),
818
837
  decimalPart?.substring(zeroCount, zeroCount + tFixNum - 2)
819
838
  ] }),
820
839
  suffix
821
840
  ] });
822
841
  }
823
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className, children: [
824
- prefix && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: prefixClassName, children: prefix }),
825
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: intClassName, children: intPart }),
842
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className, children: [
843
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: prefixClassName, children: prefix }),
844
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: intClassName, children: intPart }),
826
845
  suffix
827
846
  ] });
828
847
  };
@@ -831,7 +850,7 @@ var isInTgApp = () => {
831
850
  };
832
851
 
833
852
  // src/ui/Button/index.tsx
834
- var import_jsx_runtime53 = require("react/jsx-runtime");
853
+ var import_jsx_runtime55 = require("react/jsx-runtime");
835
854
  function Button({
836
855
  size = "df",
837
856
  disabled = false,
@@ -850,7 +869,7 @@ function Button({
850
869
  onClick && onClick();
851
870
  }
852
871
  };
853
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
872
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
854
873
  "button",
855
874
  {
856
875
  type,
@@ -860,14 +879,14 @@ function Button({
860
879
  ...style
861
880
  },
862
881
  onClick: onAction,
863
- children: loading ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
882
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
864
883
  }
865
884
  );
866
885
  }
867
886
 
868
887
  // src/ui/Input/index.tsx
869
888
  var import_react3 = require("react");
870
- var import_jsx_runtime54 = require("react/jsx-runtime");
889
+ var import_jsx_runtime56 = require("react/jsx-runtime");
871
890
  function Input({
872
891
  onChange,
873
892
  type,
@@ -877,17 +896,17 @@ function Input({
877
896
  }) {
878
897
  const [inputType, setInputType] = (0, import_react3.useState)(type);
879
898
  const isDownMd = useDownMd();
880
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
899
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
881
900
  "div",
882
901
  {
883
902
  className: `matchid-input-box ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
884
903
  children: [
885
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" }),
886
- props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
904
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" }),
905
+ props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
887
906
  if (onChange) {
888
907
  onChange({ target: { value: "" } });
889
908
  }
890
- }, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
909
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
891
910
  DeleteRoundIcon,
892
911
  {
893
912
  height: isDownMd ? 16 : 21,
@@ -895,9 +914,9 @@ function Input({
895
914
  color: "var(--matchid-input-delete-icon-color)"
896
915
  }
897
916
  ) }),
898
- type === "password" && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
917
+ type === "password" && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
899
918
  setInputType(inputType === "password" ? "text" : "password");
900
- }, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
919
+ }, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
901
920
  after
902
921
  ]
903
922
  }
@@ -905,7 +924,7 @@ function Input({
905
924
  }
906
925
 
907
926
  // src/ui/Field/index.tsx
908
- var import_jsx_runtime55 = require("react/jsx-runtime");
927
+ var import_jsx_runtime57 = require("react/jsx-runtime");
909
928
  function Field({
910
929
  label,
911
930
  children,
@@ -913,19 +932,19 @@ function Field({
913
932
  required,
914
933
  className = ""
915
934
  }) {
916
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
917
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "matchid-field-label", children: [
918
- required && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "matchid-field-required", children: "*" }),
935
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
936
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "matchid-field-label", children: [
937
+ required && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "matchid-field-required", children: "*" }),
919
938
  label
920
939
  ] }),
921
940
  children,
922
- error && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "matchid-field-error", children: error })
941
+ error && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "matchid-field-error", children: error })
923
942
  ] });
924
943
  }
925
944
 
926
945
  // src/components/EmailModal/StepEmail.tsx
927
946
  var import_react_intl = require("react-intl");
928
- var import_jsx_runtime56 = require("react/jsx-runtime");
947
+ var import_jsx_runtime58 = require("react/jsx-runtime");
929
948
 
930
949
  // src/components/EmailModal/StepVerify.tsx
931
950
  var import_react5 = require("react");
@@ -935,15 +954,15 @@ var NATIVE_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
935
954
 
936
955
  // src/components/EmailModal/StepVerify.tsx
937
956
  var import_react_intl2 = require("react-intl");
938
- var import_jsx_runtime57 = require("react/jsx-runtime");
957
+ var import_jsx_runtime59 = require("react/jsx-runtime");
939
958
 
940
959
  // src/components/EmailModal/index.tsx
941
960
  var import_react_intl3 = require("react-intl");
942
- var import_jsx_runtime58 = require("react/jsx-runtime");
961
+ var import_jsx_runtime60 = require("react/jsx-runtime");
943
962
 
944
963
  // src/ui/Popover/index.tsx
945
964
  var import_react7 = require("react");
946
- var import_jsx_runtime59 = require("react/jsx-runtime");
965
+ var import_jsx_runtime61 = require("react/jsx-runtime");
947
966
 
948
967
  // src/components/LoginBox/index.tsx
949
968
  var import_react8 = require("react");
@@ -953,128 +972,39 @@ var import_react_intl4 = require("react-intl");
953
972
  var import_react_query = require("@tanstack/react-query");
954
973
 
955
974
  // src/components/LoginBox/index.tsx
956
- var import_jsx_runtime60 = require("react/jsx-runtime");
975
+ var import_jsx_runtime62 = require("react/jsx-runtime");
957
976
 
958
977
  // src/components/LoginButton/index.tsx
959
978
  var import_react10 = require("react");
960
979
 
961
980
  // src/components/LoginPanel/index.tsx
962
981
  var import_react_intl5 = require("react-intl");
963
- var import_jsx_runtime61 = require("react/jsx-runtime");
982
+ var import_jsx_runtime63 = require("react/jsx-runtime");
964
983
 
965
984
  // src/components/LoginModal/index.tsx
966
- var import_jsx_runtime62 = require("react/jsx-runtime");
985
+ var import_jsx_runtime64 = require("react/jsx-runtime");
967
986
 
968
987
  // src/components/UserPopover/index.tsx
969
988
  var import_react9 = require("react");
970
989
 
971
990
  // src/assets/icon/ProfileIcon.tsx
972
- var import_jsx_runtime63 = require("react/jsx-runtime");
991
+ var import_jsx_runtime65 = require("react/jsx-runtime");
973
992
 
974
993
  // src/components/UserPopover/index.tsx
975
994
  var import_react_intl6 = require("react-intl");
976
- var import_jsx_runtime64 = require("react/jsx-runtime");
995
+ var import_jsx_runtime66 = require("react/jsx-runtime");
977
996
 
978
997
  // src/components/LoginButton/index.tsx
979
998
  var import_react_intl7 = require("react-intl");
980
- var import_jsx_runtime65 = require("react/jsx-runtime");
999
+ var import_jsx_runtime67 = require("react/jsx-runtime");
981
1000
 
982
1001
  // src/components/UsernameModal/index.tsx
983
1002
  var import_react11 = require("react");
984
1003
  var import_react_intl8 = require("react-intl");
985
- var import_jsx_runtime66 = require("react/jsx-runtime");
986
-
987
- // src/components/TRONModal/index.tsx
988
- var import_react14 = __toESM(require("react"));
989
-
990
- // src/hooks/eventManager.ts
991
- var EventManager = class {
992
- constructor() {
993
- this.listeners = {};
994
- }
995
- on(event, callback) {
996
- if (!this.listeners[event]) {
997
- this.listeners[event] = /* @__PURE__ */ new Set();
998
- }
999
- this.listeners[event].add(callback);
1000
- }
1001
- off(event, callback) {
1002
- if (this.listeners[event]) {
1003
- this.listeners[event].delete(callback);
1004
- if (this.listeners[event].size === 0) {
1005
- delete this.listeners[event];
1006
- }
1007
- }
1008
- }
1009
- emit(event, ...args) {
1010
- if (this.listeners[event]) {
1011
- this.listeners[event].forEach((callback) => callback(...args));
1012
- }
1013
- }
1014
- };
1015
- var eventManager = new EventManager();
1016
- var eventManager_default = eventManager;
1017
-
1018
- // src/components/TRONModal/index.tsx
1019
- var import_react_intl9 = require("react-intl");
1020
-
1021
- // src/components/WalletModalContent/index.tsx
1022
- var import_react12 = require("react");
1023
- var import_jsx_runtime67 = require("react/jsx-runtime");
1024
-
1025
- // src/hooks/useTRONWallet.ts
1026
- var import_react13 = require("react");
1027
-
1028
- // src/components/TRONModal/index.tsx
1029
1004
  var import_jsx_runtime68 = require("react/jsx-runtime");
1030
1005
 
1031
- // src/components/TONModal/index.tsx
1032
- var import_react15 = __toESM(require("react"));
1033
- var import_react_intl10 = require("react-intl");
1034
- var import_ui_react = require("@tonconnect/ui-react");
1035
- var import_jsx_runtime69 = require("react/jsx-runtime");
1036
-
1037
- // src/components/BTCModal/index.tsx
1038
- var import_react17 = __toESM(require("react"));
1039
- var import_react_intl11 = require("react-intl");
1040
-
1041
- // src/lib/btc/XverseAdapter.ts
1042
- var import_sats_connect = require("sats-connect");
1043
-
1044
- // src/hooks/useBTCWallet.ts
1045
- var import_react16 = require("react");
1046
-
1047
- // src/components/BTCModal/index.tsx
1048
- var import_jsx_runtime70 = require("react/jsx-runtime");
1049
-
1050
- // src/components/WalletModal/index.tsx
1051
- var import_react18 = require("react");
1052
- var import_react_intl12 = require("react-intl");
1053
- var import_jsx_runtime71 = require("react/jsx-runtime");
1054
-
1055
- // src/components/AlphaAvatar/index.tsx
1056
- var import_react19 = require("react");
1057
- var import_jsx_runtime72 = require("react/jsx-runtime");
1058
- function AlphaAvatar({ name, size = 40, className = "" }) {
1059
- const [avatar, setAvatar] = (0, import_react19.useState)(void 0);
1060
- (0, import_react19.useEffect)(() => {
1061
- if (name) {
1062
- const char = name[0].toUpperCase();
1063
- setAvatar(char);
1064
- }
1065
- }, [name]);
1066
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
1067
- width: size,
1068
- height: size,
1069
- fontSize: Math.ceil(size / 2)
1070
- }, children: avatar });
1071
- }
1072
-
1073
- // src/components/WalletAsset/index.tsx
1074
- var import_jsx_runtime73 = require("react/jsx-runtime");
1075
-
1076
1006
  // src/ui/Drawer/index.tsx
1077
- var import_jsx_runtime74 = require("react/jsx-runtime");
1007
+ var import_jsx_runtime69 = require("react/jsx-runtime");
1078
1008
  function Drawer({
1079
1009
  children,
1080
1010
  showClose = true,
@@ -1085,25 +1015,25 @@ function Drawer({
1085
1015
  onBack
1086
1016
  }) {
1087
1017
  if (!isOpen) {
1088
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_jsx_runtime74.Fragment, {});
1018
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, {});
1089
1019
  }
1090
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "matchid-drawer", children: [
1091
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: `matchid-drawer-header matchid-flex`, children: [
1092
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: `matchid-drawer-header-content matchid-flex`, children: [
1093
- onBack && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(ArrowLeftIcon, { height: 25, width: 24, className: "matchid-drawer-header-back", onClick: onBack }),
1020
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "matchid-drawer", children: [
1021
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: `matchid-drawer-header matchid-flex`, children: [
1022
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: `matchid-drawer-header-content matchid-flex`, children: [
1023
+ onBack && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ArrowLeftIcon, { height: 25, width: 24, className: "matchid-drawer-header-back", onClick: onBack }),
1094
1024
  title
1095
1025
  ] }),
1096
- showClose && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
1026
+ showClose && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
1097
1027
  ] }),
1098
1028
  children
1099
1029
  ] }) });
1100
1030
  }
1101
1031
 
1102
1032
  // src/ui/HashPanel/index.tsx
1103
- var import_react20 = require("react");
1033
+ var import_react12 = require("react");
1104
1034
 
1105
1035
  // src/ui/ModalDrawer/index.tsx
1106
- var import_jsx_runtime75 = require("react/jsx-runtime");
1036
+ var import_jsx_runtime70 = require("react/jsx-runtime");
1107
1037
  function ModalDrawer({
1108
1038
  title,
1109
1039
  drawerTitleVisible = true,
@@ -1111,9 +1041,9 @@ function ModalDrawer({
1111
1041
  }) {
1112
1042
  const isDownMd = useDownMd();
1113
1043
  if (isDownMd) {
1114
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ModalWithHeader, { ...props, title });
1044
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(ModalWithHeader, { ...props, title });
1115
1045
  }
1116
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
1046
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
1117
1047
  }
1118
1048
 
1119
1049
  // src/assets/img/confirm.gif
@@ -1169,7 +1099,7 @@ function useHash({
1169
1099
  }
1170
1100
 
1171
1101
  // src/ui/HashPanel/index.tsx
1172
- var import_jsx_runtime76 = require("react/jsx-runtime");
1102
+ var import_jsx_runtime71 = require("react/jsx-runtime");
1173
1103
  function HashPanel({
1174
1104
  hash,
1175
1105
  chain,
@@ -1177,7 +1107,7 @@ function HashPanel({
1177
1107
  onClose,
1178
1108
  zIndex
1179
1109
  }) {
1180
- const [status, setStatus] = (0, import_react20.useState)("confirm");
1110
+ const [status, setStatus] = (0, import_react12.useState)("confirm");
1181
1111
  const statusMaps = {
1182
1112
  "confirm": {
1183
1113
  icon: confirm_default,
@@ -1201,8 +1131,8 @@ function HashPanel({
1201
1131
  }
1202
1132
  };
1203
1133
  const statusValue = statusMaps[status];
1204
- const [shouldRefetch, setShouldRefetch] = (0, import_react20.useState)(true);
1205
- (0, import_react20.useEffect)(() => {
1134
+ const [shouldRefetch, setShouldRefetch] = (0, import_react12.useState)(true);
1135
+ (0, import_react12.useEffect)(() => {
1206
1136
  if (hash) {
1207
1137
  setShouldRefetch(true);
1208
1138
  setStatus("pending");
@@ -1215,7 +1145,7 @@ function HashPanel({
1215
1145
  chain,
1216
1146
  refetchInterval: shouldRefetch ? 3e3 : false
1217
1147
  });
1218
- (0, import_react20.useEffect)(() => {
1148
+ (0, import_react12.useEffect)(() => {
1219
1149
  if (hashQuery.data == 1 || hashQuery.data == -1) {
1220
1150
  setShouldRefetch(false);
1221
1151
  }
@@ -1228,14 +1158,14 @@ function HashPanel({
1228
1158
  }
1229
1159
  }, [hashQuery.data]);
1230
1160
  const link = chain ? `${chain?.blockExplorers?.default.url}/tx/${hash}` : "";
1231
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
1161
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
1232
1162
  ModalDrawer,
1233
1163
  {
1234
1164
  isOpen,
1235
1165
  showClose: true,
1236
1166
  onClose,
1237
1167
  zIndex,
1238
- title: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
1168
+ title: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
1239
1169
  "div",
1240
1170
  {
1241
1171
  className: "matchid-hashpanel-header",
@@ -1245,39 +1175,39 @@ function HashPanel({
1245
1175
  children: statusValue.text
1246
1176
  }
1247
1177
  ),
1248
- children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "matchid-hashpanel-box", children: [
1249
- /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "matchid-hashpanel-content", children: [
1250
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: `matchid-hashpanel-status`, style: {
1178
+ children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "matchid-hashpanel-box", children: [
1179
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "matchid-hashpanel-content", children: [
1180
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: `matchid-hashpanel-status`, style: {
1251
1181
  color: statusValue.color
1252
1182
  }, children: statusValue.text }),
1253
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("img", { src: statusValue.icon, alt: statusValue.text, className: `matchid-hashpanel-img` }),
1254
- hash && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
1183
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("img", { src: statusValue.icon, alt: statusValue.text, className: `matchid-hashpanel-img` }),
1184
+ hash && /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
1255
1185
  "Hash:",
1256
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("a", { href: link, target: "_blank", children: hash })
1186
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("a", { href: link, target: "_blank", children: hash })
1257
1187
  ] })
1258
1188
  ] }),
1259
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
1189
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
1260
1190
  ] })
1261
1191
  }
1262
1192
  );
1263
1193
  }
1264
1194
  function HashPanel_default(props) {
1265
- return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(HashPanel, { ...props });
1195
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(HashPanel, { ...props });
1266
1196
  }
1267
1197
 
1268
1198
  // src/ui/Switch/index.tsx
1269
- var import_jsx_runtime77 = require("react/jsx-runtime");
1199
+ var import_jsx_runtime72 = require("react/jsx-runtime");
1270
1200
 
1271
1201
  // src/ui/AlphaAvatar/index.tsx
1272
- var import_react21 = require("react");
1273
- var import_jsx_runtime78 = require("react/jsx-runtime");
1274
- function AlphaAvatar2({
1202
+ var import_react13 = require("react");
1203
+ var import_jsx_runtime73 = require("react/jsx-runtime");
1204
+ function AlphaAvatar({
1275
1205
  name,
1276
1206
  size = "default",
1277
1207
  className = "",
1278
1208
  style
1279
1209
  }) {
1280
- const avatar = (0, import_react21.useMemo)(() => {
1210
+ const avatar = (0, import_react13.useMemo)(() => {
1281
1211
  if (name) {
1282
1212
  const char = name[0].toUpperCase();
1283
1213
  if (char.match(/[a-zA-Z0-9]/)) {
@@ -1287,7 +1217,7 @@ function AlphaAvatar2({
1287
1217
  return "";
1288
1218
  }, [name]);
1289
1219
  const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
1290
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
1220
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
1291
1221
  width: numberSize,
1292
1222
  height: numberSize,
1293
1223
  fontSize: Math.ceil(numberSize / 2),
@@ -1296,7 +1226,7 @@ function AlphaAvatar2({
1296
1226
  }
1297
1227
 
1298
1228
  // src/ui/Radio/index.tsx
1299
- var import_jsx_runtime79 = require("react/jsx-runtime");
1229
+ var import_jsx_runtime74 = require("react/jsx-runtime");
1300
1230
  function Radio({
1301
1231
  checked = false,
1302
1232
  onChange,
@@ -1305,23 +1235,139 @@ function Radio({
1305
1235
  className = "",
1306
1236
  style = {}
1307
1237
  }) {
1308
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
1238
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
1309
1239
  width: size,
1310
1240
  height: size,
1311
1241
  ...style,
1312
1242
  // @ts-ignore
1313
1243
  "--matchid-radio-checked": color
1314
- }, children: checked && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: `matchid-radio-content`, style: {
1244
+ }, children: checked && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: `matchid-radio-content`, style: {
1315
1245
  width: Math.floor(size * 0.7),
1316
1246
  height: Math.floor(size * 0.7)
1317
1247
  } }) });
1318
1248
  }
1319
1249
 
1320
- // src/components/TokenSend/index.tsx
1250
+ // src/ui/Skeleton/index.tsx
1251
+ var import_jsx_runtime75 = require("react/jsx-runtime");
1252
+
1253
+ // src/ui/Tabs/index.tsx
1254
+ var import_jsx_runtime76 = require("react/jsx-runtime");
1255
+
1256
+ // src/components/EVMModal/index.tsx
1257
+ var import_react16 = require("react");
1258
+
1259
+ // src/hooks/eventManager.ts
1260
+ var EventManager = class {
1261
+ constructor() {
1262
+ this.listeners = {};
1263
+ }
1264
+ on(event, callback) {
1265
+ if (!this.listeners[event]) {
1266
+ this.listeners[event] = /* @__PURE__ */ new Set();
1267
+ }
1268
+ this.listeners[event].add(callback);
1269
+ }
1270
+ off(event, callback) {
1271
+ if (this.listeners[event]) {
1272
+ this.listeners[event].delete(callback);
1273
+ if (this.listeners[event].size === 0) {
1274
+ delete this.listeners[event];
1275
+ }
1276
+ }
1277
+ }
1278
+ emit(event, ...args) {
1279
+ if (this.listeners[event]) {
1280
+ this.listeners[event].forEach((callback) => callback(...args));
1281
+ }
1282
+ }
1283
+ };
1284
+ var eventManager = new EventManager();
1285
+ var eventManager_default = eventManager;
1286
+
1287
+ // src/components/EVMModal/index.tsx
1288
+ var import_react_intl9 = require("react-intl");
1289
+
1290
+ // src/components/WalletModalContent/index.tsx
1291
+ var import_react14 = require("react");
1292
+ var import_jsx_runtime77 = require("react/jsx-runtime");
1293
+
1294
+ // src/components/EVMModal/index.tsx
1295
+ var import_rainbowkit = require("@rainbow-me/rainbowkit");
1296
+ var import_wagmi2 = require("wagmi");
1297
+
1298
+ // src/hooks/useWalletBox.ts
1299
+ var import_react15 = require("react");
1300
+
1301
+ // src/hooks/useEthersSigner.ts
1302
+ var React4 = __toESM(require("react"));
1303
+ var import_wagmi = require("wagmi");
1304
+ var import_ethers = require("ethers");
1305
+
1306
+ // src/components/EVMModal/index.tsx
1307
+ var import_siwe = require("siwe");
1308
+ var import_styles = require("@rainbow-me/rainbowkit/styles.css");
1309
+ var import_jsx_runtime78 = require("react/jsx-runtime");
1310
+
1311
+ // src/components/TRONModal/index.tsx
1312
+ var import_react18 = __toESM(require("react"));
1313
+ var import_react_intl10 = require("react-intl");
1314
+
1315
+ // src/hooks/useTRONWallet.ts
1316
+ var import_react17 = require("react");
1317
+
1318
+ // src/components/TRONModal/index.tsx
1319
+ var import_jsx_runtime79 = require("react/jsx-runtime");
1320
+
1321
+ // src/components/TONModal/index.tsx
1322
+ var import_react19 = __toESM(require("react"));
1323
+ var import_react_intl11 = require("react-intl");
1324
+ var import_ui_react = require("@tonconnect/ui-react");
1325
+ var import_jsx_runtime80 = require("react/jsx-runtime");
1326
+
1327
+ // src/components/BTCModal/index.tsx
1328
+ var import_react21 = __toESM(require("react"));
1329
+ var import_react_intl12 = require("react-intl");
1330
+
1331
+ // src/lib/btc/XverseAdapter.ts
1332
+ var import_sats_connect = require("sats-connect");
1333
+
1334
+ // src/hooks/useBTCWallet.ts
1335
+ var import_react20 = require("react");
1336
+
1337
+ // src/components/BTCModal/index.tsx
1338
+ var import_jsx_runtime81 = require("react/jsx-runtime");
1339
+
1340
+ // src/components/WalletModal/index.tsx
1321
1341
  var import_react22 = require("react");
1322
- var import_viem2 = require("viem");
1323
1342
  var import_react_intl13 = require("react-intl");
1324
- var import_jsx_runtime80 = require("react/jsx-runtime");
1343
+ var import_jsx_runtime82 = require("react/jsx-runtime");
1344
+
1345
+ // src/components/AlphaAvatar/index.tsx
1346
+ var import_react23 = require("react");
1347
+ var import_jsx_runtime83 = require("react/jsx-runtime");
1348
+ function AlphaAvatar2({ name, size = 40, className = "" }) {
1349
+ const [avatar, setAvatar] = (0, import_react23.useState)(void 0);
1350
+ (0, import_react23.useEffect)(() => {
1351
+ if (name) {
1352
+ const char = name[0].toUpperCase();
1353
+ setAvatar(char);
1354
+ }
1355
+ }, [name]);
1356
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
1357
+ width: size,
1358
+ height: size,
1359
+ fontSize: Math.ceil(size / 2)
1360
+ }, children: avatar });
1361
+ }
1362
+
1363
+ // src/components/WalletAsset/index.tsx
1364
+ var import_jsx_runtime84 = require("react/jsx-runtime");
1365
+
1366
+ // src/components/TokenSend/index.tsx
1367
+ var import_react24 = require("react");
1368
+ var import_viem2 = require("viem");
1369
+ var import_react_intl14 = require("react-intl");
1370
+ var import_jsx_runtime85 = require("react/jsx-runtime");
1325
1371
  function Input2({
1326
1372
  onChange,
1327
1373
  placeholder,
@@ -1331,8 +1377,8 @@ function Input2({
1331
1377
  error,
1332
1378
  size = "df"
1333
1379
  }) {
1334
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
1335
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
1380
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
1381
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
1336
1382
  "input",
1337
1383
  {
1338
1384
  placeholder,
@@ -1343,7 +1389,7 @@ function Input2({
1343
1389
  className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
1344
1390
  }
1345
1391
  ),
1346
- error && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-token-input-error-text", children: error })
1392
+ error && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-token-input-error-text", children: error })
1347
1393
  ] });
1348
1394
  }
1349
1395
  function TokenSend({
@@ -1353,25 +1399,25 @@ function TokenSend({
1353
1399
  onBack
1354
1400
  }) {
1355
1401
  const { list: chainList } = useMatchChain();
1356
- const intl = (0, import_react_intl13.useIntl)();
1402
+ const intl = (0, import_react_intl14.useIntl)();
1357
1403
  const { createWalletClient: createWalletClient2 } = useWallet();
1358
1404
  const isNative = token.address.toLowerCase() == NATIVE_TOKEN_ADDRESS;
1359
- const chain = (0, import_react22.useMemo)(() => {
1405
+ const chain = (0, import_react24.useMemo)(() => {
1360
1406
  return chainList?.find((m) => m.id.toString() === token.chain_id);
1361
1407
  }, [chainList, token.chain_id]);
1362
- const walletClient = (0, import_react22.useMemo)(() => {
1408
+ const walletClient = (0, import_react24.useMemo)(() => {
1363
1409
  return createWalletClient2({
1364
1410
  // @ts-ignore
1365
1411
  chain: (0, import_viem2.defineChain)(chain),
1366
1412
  transport: (0, import_viem2.http)()
1367
1413
  });
1368
1414
  }, [chain]);
1369
- const [amount, setAmount] = (0, import_react22.useState)("");
1370
- const [address, setAddress] = (0, import_react22.useState)("");
1371
- const [loading, setLoading] = (0, import_react22.useState)(false);
1372
- const [sending, setSending] = (0, import_react22.useState)(false);
1373
- const [txError, setTxError] = (0, import_react22.useState)("");
1374
- const transaction = (0, import_react22.useMemo)(() => {
1415
+ const [amount, setAmount] = (0, import_react24.useState)("");
1416
+ const [address, setAddress] = (0, import_react24.useState)("");
1417
+ const [loading, setLoading] = (0, import_react24.useState)(false);
1418
+ const [sending, setSending] = (0, import_react24.useState)(false);
1419
+ const [txError, setTxError] = (0, import_react24.useState)("");
1420
+ const transaction = (0, import_react24.useMemo)(() => {
1375
1421
  const reg = /^0x[a-fA-F0-9]{40}$/;
1376
1422
  if (!amount || !address || !reg.test(address)) {
1377
1423
  return;
@@ -1402,7 +1448,7 @@ function TokenSend({
1402
1448
  setLoading(false);
1403
1449
  }
1404
1450
  };
1405
- const error = (0, import_react22.useMemo)(() => {
1451
+ const error = (0, import_react24.useMemo)(() => {
1406
1452
  setTxError("");
1407
1453
  let amountError = "";
1408
1454
  let addressError = "";
@@ -1445,7 +1491,7 @@ function TokenSend({
1445
1491
  setAmount(value);
1446
1492
  }
1447
1493
  };
1448
- const canSend = (0, import_react22.useMemo)(() => {
1494
+ const canSend = (0, import_react24.useMemo)(() => {
1449
1495
  return !error.amount && !error.address && amount && address;
1450
1496
  }, [error]);
1451
1497
  const onNext = async () => {
@@ -1455,7 +1501,7 @@ function TokenSend({
1455
1501
  }
1456
1502
  onClose();
1457
1503
  };
1458
- (0, import_react22.useEffect)(() => {
1504
+ (0, import_react24.useEffect)(() => {
1459
1505
  const receiveMessage = (event) => {
1460
1506
  if (event.data) {
1461
1507
  if (event.data.source == "match-wallet") {
@@ -1471,24 +1517,24 @@ function TokenSend({
1471
1517
  window.removeEventListener("message", receiveMessage);
1472
1518
  };
1473
1519
  }, []);
1474
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl13.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-send-box`, children: [
1475
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-token-send-content", children: [
1476
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-amount-content`, children: [
1477
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-amount-header`, children: [
1478
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl13.FormattedMessage, { id: "amount" }) }),
1479
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
1480
- token.icon ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
1520
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl14.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-token-send-box`, children: [
1521
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-token-send-content", children: [
1522
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-token-amount-content`, children: [
1523
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-token-amount-header`, children: [
1524
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl14.FormattedMessage, { id: "amount" }) }),
1525
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
1526
+ token.icon ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
1481
1527
  "img",
1482
1528
  {
1483
1529
  src: token?.icon,
1484
1530
  alt: token?.symbol,
1485
1531
  className: `matchid-token-amount-chain-icon`
1486
1532
  }
1487
- ) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(AlphaAvatar2, { name: token.symbol || token.name || "", size: 16 }),
1488
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: token?.symbol })
1533
+ ) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
1534
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: token?.symbol })
1489
1535
  ] })
1490
1536
  ] }),
1491
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
1537
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
1492
1538
  Input2,
1493
1539
  {
1494
1540
  type: "text",
@@ -1501,18 +1547,18 @@ function TokenSend({
1501
1547
  error: error.amount || txError
1502
1548
  }
1503
1549
  ),
1504
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
1505
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-amount-title`, children: [
1506
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl13.FormattedMessage, { id: "balance" }),
1550
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
1551
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-token-amount-title`, children: [
1552
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl14.FormattedMessage, { id: "balance" }),
1507
1553
  ":"
1508
1554
  ] }),
1509
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
1555
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
1510
1556
  ] }),
1511
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
1557
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
1512
1558
  ] }),
1513
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-address-content`, children: [
1514
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl13.FormattedMessage, { id: "receiveTitle" }) }) }),
1515
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
1559
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-token-address-content`, children: [
1560
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl14.FormattedMessage, { id: "receiveTitle" }) }) }),
1561
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
1516
1562
  Input2,
1517
1563
  {
1518
1564
  type: "text",
@@ -1528,7 +1574,7 @@ function TokenSend({
1528
1574
  )
1529
1575
  ] })
1530
1576
  ] }),
1531
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
1577
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
1532
1578
  Button,
1533
1579
  {
1534
1580
  size: "lg",
@@ -1537,20 +1583,20 @@ function TokenSend({
1537
1583
  disabled: !canSend || !!txError,
1538
1584
  onClick: onNext,
1539
1585
  loading: loading || sending,
1540
- children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl13.FormattedMessage, { id: "next" })
1586
+ children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl14.FormattedMessage, { id: "next" })
1541
1587
  }
1542
1588
  )
1543
1589
  ] }) });
1544
1590
  }
1545
1591
 
1546
1592
  // src/components/TokenDetail/index.tsx
1547
- var import_react_intl14 = require("react-intl");
1548
- var import_jsx_runtime81 = require("react/jsx-runtime");
1593
+ var import_react_intl15 = require("react-intl");
1594
+ var import_jsx_runtime86 = require("react/jsx-runtime");
1549
1595
 
1550
1596
  // src/components/TokenSendList/index.tsx
1551
- var import_react23 = require("react");
1552
- var import_react_intl15 = require("react-intl");
1553
- var import_jsx_runtime82 = require("react/jsx-runtime");
1597
+ var import_react25 = require("react");
1598
+ var import_react_intl16 = require("react-intl");
1599
+ var import_jsx_runtime87 = require("react/jsx-runtime");
1554
1600
  function TokenSendList({ close }) {
1555
1601
  const isDownMd = useDownMd();
1556
1602
  const walletAssets = useMatchWalletAssets();
@@ -1558,20 +1604,20 @@ function TokenSendList({ close }) {
1558
1604
  list: walletAssets.mergedAssets
1559
1605
  });
1560
1606
  const { list } = useMatchChain();
1561
- const [checked, setChecked] = (0, import_react23.useState)();
1607
+ const [checked, setChecked] = (0, import_react25.useState)();
1562
1608
  const modal = useModal();
1563
1609
  const onNext = () => {
1564
1610
  checked && modal.show((props) => {
1565
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TokenSend, { onClose: () => {
1611
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TokenSend, { onClose: () => {
1566
1612
  props.close();
1567
1613
  close();
1568
1614
  }, onBack: props.close, zIndex: props.zIndex, token: checked });
1569
1615
  });
1570
1616
  };
1571
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "matchid-token-send-list-box", children: [
1572
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
1617
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-token-send-list-box", children: [
1618
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
1573
1619
  const chain = list?.find((m) => m.id.toString() === n.chain_id);
1574
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
1620
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
1575
1621
  "div",
1576
1622
  {
1577
1623
  className: `matchid-token-send-item ${checked?.address == n.address ? "matchid-token-send-chekced" : ""}`,
@@ -1579,18 +1625,18 @@ function TokenSendList({ close }) {
1579
1625
  setChecked(n);
1580
1626
  },
1581
1627
  children: [
1582
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
1583
- /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "matchid-token-send-content", children: [
1584
- /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "matchid-token-send-logo", children: [
1585
- n.icon ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
1586
- AlphaAvatar,
1628
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
1629
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-token-send-content", children: [
1630
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-token-send-logo", children: [
1631
+ n.icon ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
1632
+ AlphaAvatar2,
1587
1633
  {
1588
1634
  className: `matchid-token-send-icon`,
1589
1635
  size: isDownMd ? 28 : 40,
1590
1636
  name: n.symbol || n.name || ""
1591
1637
  }
1592
1638
  ),
1593
- chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
1639
+ chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
1594
1640
  "img",
1595
1641
  {
1596
1642
  src: chain.iconUrl,
@@ -1599,9 +1645,9 @@ function TokenSendList({ close }) {
1599
1645
  }
1600
1646
  )
1601
1647
  ] }),
1602
- /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: `matchid-token-send-info`, children: [
1603
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
1604
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
1648
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-token-send-info`, children: [
1649
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
1650
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
1605
1651
  ] })
1606
1652
  ] })
1607
1653
  ]
@@ -1609,13 +1655,13 @@ function TokenSendList({ close }) {
1609
1655
  index
1610
1656
  );
1611
1657
  }) }),
1612
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react_intl15.FormattedMessage, { id: "next" }) })
1658
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react_intl16.FormattedMessage, { id: "next" }) })
1613
1659
  ] });
1614
1660
  }
1615
1661
 
1616
1662
  // src/components/TransactionList/index.tsx
1617
1663
  var import_react_infinite_scroll_component = __toESM(require("react-infinite-scroll-component"));
1618
- var import_react24 = require("react");
1664
+ var import_react26 = require("react");
1619
1665
  var import_viem3 = require("viem");
1620
1666
  var import_viem4 = require("viem");
1621
1667
 
@@ -1676,16 +1722,88 @@ var useContractStore = (0, import_zustand3.create)((0, import_middleware2.devtoo
1676
1722
  var useContractStore_default = useContractStore;
1677
1723
 
1678
1724
  // src/components/TransactionList/index.tsx
1679
- var import_react_intl16 = require("react-intl");
1680
- var import_jsx_runtime83 = require("react/jsx-runtime");
1725
+ var import_react_intl17 = require("react-intl");
1726
+ var import_jsx_runtime88 = require("react/jsx-runtime");
1727
+
1728
+ // src/hooks/api/bind.ts
1729
+ var import_react_query3 = require("@tanstack/react-query");
1730
+
1731
+ // src/hooks/api/poh.ts
1732
+ var import_react_query4 = require("@tanstack/react-query");
1733
+
1734
+ // src/hooks/api/wallet.ts
1735
+ var import_react_query5 = require("@tanstack/react-query");
1736
+ function useChainListQuery(options) {
1737
+ const { isLogin, token } = useUserInfo();
1738
+ return (0, import_react_query5.useQuery)({
1739
+ queryKey: ["match-user-chain-list", token],
1740
+ queryFn: async () => {
1741
+ const res = await getUserChainListApi();
1742
+ if (!isSuccess(res)) {
1743
+ return [];
1744
+ }
1745
+ return res.data;
1746
+ },
1747
+ enabled: isLogin,
1748
+ ...options
1749
+ });
1750
+ }
1751
+ function useAssetListQuery({
1752
+ chainId,
1753
+ ...options
1754
+ }) {
1755
+ const { isLogin, token } = useUserInfo();
1756
+ return (0, import_react_query5.useQuery)({
1757
+ queryKey: ["match-user-asset-list", token, chainId],
1758
+ queryFn: async () => {
1759
+ const res = await getUserWalletAssetApi({ chain_id: chainId.toString() });
1760
+ if (!isSuccess(res)) {
1761
+ return [];
1762
+ }
1763
+ return res.data || [];
1764
+ },
1765
+ enabled: isLogin,
1766
+ ...options
1767
+ });
1768
+ }
1769
+ var USER_IMPORT_TOKEN_LIST_KEY = "match-user-import-token-list";
1770
+ function useImportTokenListQuery({
1771
+ chainId,
1772
+ ...options
1773
+ }) {
1774
+ const { isLogin, token } = useUserInfo();
1775
+ return (0, import_react_query5.useQuery)({
1776
+ queryKey: [USER_IMPORT_TOKEN_LIST_KEY, token, chainId],
1777
+ queryFn: async () => {
1778
+ const res = await getUserImportTokenListApi({ chain_id: chainId.toString() });
1779
+ if (!isSuccess(res)) {
1780
+ return [];
1781
+ }
1782
+ return res.data || [];
1783
+ },
1784
+ enabled: isLogin,
1785
+ ...options
1786
+ });
1787
+ }
1788
+
1789
+ // src/hooks/api/contact.ts
1790
+ var import_react_query6 = require("@tanstack/react-query");
1791
+ var import_last = __toESM(require("lodash/last"));
1792
+ var import_react27 = require("react");
1793
+
1794
+ // src/components/ContactList/index.tsx
1795
+ var import_react_virtuoso = require("react-virtuoso");
1796
+ var import_react28 = require("react");
1797
+ var import_react_intl18 = require("react-intl");
1798
+ var import_jsx_runtime89 = require("react/jsx-runtime");
1681
1799
 
1682
1800
  // src/components/CEXBindModal/index.tsx
1683
- var import_react25 = require("react");
1684
- var import_react_intl17 = require("react-intl");
1685
- var import_jsx_runtime84 = require("react/jsx-runtime");
1801
+ var import_react29 = require("react");
1802
+ var import_react_intl19 = require("react-intl");
1803
+ var import_jsx_runtime90 = require("react/jsx-runtime");
1686
1804
 
1687
1805
  // src/context/BusinessProvider.tsx
1688
- var import_react_query3 = require("@tanstack/react-query");
1806
+ var import_react_query7 = require("@tanstack/react-query");
1689
1807
 
1690
1808
  // src/store/useStore.ts
1691
1809
  var import_zustand4 = require("zustand");
@@ -1700,15 +1818,15 @@ var useStore = (0, import_zustand4.create)((set) => ({
1700
1818
  var useStore_default = useStore;
1701
1819
 
1702
1820
  // src/context/BusinessProvider.tsx
1703
- var import_jsx_runtime85 = require("react/jsx-runtime");
1821
+ var import_jsx_runtime91 = require("react/jsx-runtime");
1704
1822
 
1705
1823
  // src/context/ModalContext.tsx
1706
- var import_react26 = require("react");
1824
+ var import_react30 = __toESM(require("react"));
1707
1825
  var import_react_dom = require("react-dom");
1708
- var import_jsx_runtime86 = require("react/jsx-runtime");
1709
- var ModalContext = (0, import_react26.createContext)(null);
1826
+ var import_jsx_runtime92 = require("react/jsx-runtime");
1827
+ var ModalContext = (0, import_react30.createContext)(null);
1710
1828
  function useModal() {
1711
- const context = (0, import_react26.useContext)(ModalContext);
1829
+ const context = (0, import_react30.useContext)(ModalContext);
1712
1830
  if (!context) {
1713
1831
  throw new Error("useModal must be used within a ModalProvider");
1714
1832
  }
@@ -1716,12 +1834,12 @@ function useModal() {
1716
1834
  }
1717
1835
 
1718
1836
  // src/context/ToastContext.tsx
1719
- var import_react27 = require("react");
1837
+ var import_react31 = require("react");
1720
1838
  var import_react_dom2 = require("react-dom");
1721
- var import_jsx_runtime87 = require("react/jsx-runtime");
1722
- var ToastContext = (0, import_react27.createContext)(null);
1839
+ var import_jsx_runtime93 = require("react/jsx-runtime");
1840
+ var ToastContext = (0, import_react31.createContext)(null);
1723
1841
  function useToast() {
1724
- const context = (0, import_react27.useContext)(ToastContext);
1842
+ const context = (0, import_react31.useContext)(ToastContext);
1725
1843
  if (!context) {
1726
1844
  throw new Error("useToast must be used within a ToastProvider");
1727
1845
  }
@@ -1729,23 +1847,108 @@ function useToast() {
1729
1847
  }
1730
1848
 
1731
1849
  // src/context/index.tsx
1732
- var import_jsx_runtime88 = require("react/jsx-runtime");
1850
+ var import_jsx_runtime94 = require("react/jsx-runtime");
1733
1851
 
1734
1852
  // src/hooks/useWalletInit.ts
1735
- var import_react28 = require("react");
1853
+ var import_react32 = require("react");
1736
1854
  var AppClientId = getAppClientId();
1737
1855
 
1738
1856
  // src/hooks/useInit.tsx
1739
- var import_react29 = require("react");
1857
+ var import_react33 = require("react");
1740
1858
 
1741
1859
  // src/MatchContext.tsx
1742
- var import_react_query4 = require("@tanstack/react-query");
1743
- var import_react_intl18 = require("react-intl");
1744
- var import_jsx_runtime89 = require("react/jsx-runtime");
1745
- var queryClient = new import_react_query4.QueryClient();
1746
- var MatchContext = (0, import_react30.createContext)(void 0);
1860
+ var import_react_query8 = require("@tanstack/react-query");
1861
+ var import_react_intl20 = require("react-intl");
1862
+ var import_rainbowkit2 = require("@rainbow-me/rainbowkit");
1863
+ var import_wallets = require("@rainbow-me/rainbowkit/wallets");
1864
+ var import_chains = require("wagmi/chains");
1865
+
1866
+ // src/config/chains/MatchMain.ts
1867
+ var import_viem5 = require("viem");
1868
+ var matchMain = /* @__PURE__ */ (0, import_viem5.defineChain)({
1869
+ //定义match链
1870
+ id: 698,
1871
+ name: "Matchain",
1872
+ nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
1873
+ rpcUrls: {
1874
+ default: {
1875
+ http: ["https://rpc.matchain.io"]
1876
+ }
1877
+ },
1878
+ blockExplorers: {
1879
+ default: {
1880
+ name: "Matchscan",
1881
+ url: "https://matchscan.io/",
1882
+ apiUrl: "https://matchscan.io/api"
1883
+ }
1884
+ },
1885
+ iconUrl: "https://matchscan.io/static/identicon_logos/blockies.png",
1886
+ contracts: {
1887
+ multicall3: {
1888
+ address: "0xca11bde05977b3631167028862be2a173976ca11"
1889
+ }
1890
+ }
1891
+ // testnet: true,
1892
+ });
1893
+
1894
+ // src/config/chains/MatchTest.ts
1895
+ var import_viem6 = require("viem");
1896
+ var matchTest = /* @__PURE__ */ (0, import_viem6.defineChain)({
1897
+ //定义matchTest链
1898
+ id: 699,
1899
+ name: "MatchTest",
1900
+ nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
1901
+ rpcUrls: {
1902
+ default: {
1903
+ http: ["https://testnet-rpc.matchain.io"]
1904
+ }
1905
+ },
1906
+ blockExplorers: {
1907
+ default: {
1908
+ name: "Matchscan",
1909
+ url: "https://testnet.matchscan.io/",
1910
+ apiUrl: "https://testnet.matchscan.io/api"
1911
+ }
1912
+ },
1913
+ iconUrl: "https://testnet.matchscan.io/static/identicon_logos/blockies.png",
1914
+ contracts: {
1915
+ multicall3: {
1916
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
1917
+ blockCreated: 751532
1918
+ },
1919
+ ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
1920
+ ensUniversalResolver: {
1921
+ address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",
1922
+ blockCreated: 5317080
1923
+ }
1924
+ }
1925
+ // testnet: true,
1926
+ });
1927
+
1928
+ // src/MatchContext.tsx
1929
+ var import_wagmi3 = require("wagmi");
1930
+ var import_jsx_runtime95 = require("react/jsx-runtime");
1931
+ var queryClient = new import_react_query8.QueryClient();
1932
+ var wagmiConfig = (0, import_rainbowkit2.getDefaultConfig)({
1933
+ appName: "MatchID",
1934
+ projectId: "9ac6ea7e07860f04616fb311b447dee9",
1935
+ wallets: [
1936
+ {
1937
+ groupName: "Recommended",
1938
+ wallets: [
1939
+ import_wallets.metaMaskWallet,
1940
+ import_wallets.walletConnectWallet,
1941
+ import_wallets.okxWallet,
1942
+ import_wallets.bitgetWallet,
1943
+ import_wallets.injectedWallet
1944
+ ]
1945
+ }
1946
+ ],
1947
+ chains: [import_chains.mainnet, import_chains.polygon, import_chains.optimism, import_chains.arbitrum, import_chains.base, matchMain, matchTest, import_chains.bsc]
1948
+ });
1949
+ var MatchContext = (0, import_react34.createContext)(void 0);
1747
1950
  var useMatch = () => {
1748
- const context = (0, import_react30.useContext)(MatchContext);
1951
+ const context = (0, import_react34.useContext)(MatchContext);
1749
1952
  if (context === void 0) {
1750
1953
  throw new Error("useMatch must be used within a MatchProvider");
1751
1954
  }
@@ -1770,6 +1973,7 @@ function useUserInfo() {
1770
1973
  const { setTgAppAuthCode, emailLoginKey, setEmailLoginKey } = useStore_default();
1771
1974
  const isDownMd = useDownMd();
1772
1975
  const { events, login } = useMatch();
1976
+ const { open: EVMOpen } = useEVMModalStore();
1773
1977
  const { open: TRONOpen } = useTRONModalStore();
1774
1978
  const { open: TONOpen } = useTONModalStore();
1775
1979
  const { open: BTCOpen } = useBTCModalStore();
@@ -1778,7 +1982,7 @@ function useUserInfo() {
1778
1982
  const getRedirectUri = () => {
1779
1983
  return encodeURIComponent(window.location.href);
1780
1984
  };
1781
- const isLogin = (0, import_react31.useMemo)(() => !!token && !!overview, [token, overview]);
1985
+ const isLogin = (0, import_react35.useMemo)(() => !!token && !!overview, [token, overview]);
1782
1986
  const logout = async () => {
1783
1987
  try {
1784
1988
  await toLogoutApi();
@@ -1846,7 +2050,8 @@ function useUserInfo() {
1846
2050
  case "wallet":
1847
2051
  return walletModalStore.open("login", extra?.methods);
1848
2052
  case "evm":
1849
- return window.open(`${endpoints.auth}login/wallet?appid=${appid}&locale=${locale}`);
2053
+ return EVMOpen("login");
2054
+ // return window.open(`${endpoints.auth}login/wallet?appid=${appid}&locale=${locale}`)
1850
2055
  case "sol":
1851
2056
  if (isDownMd) {
1852
2057
  return window.location.href = `${endpoints.auth}login/sol?appid=${appid}&locale=${locale}&redirect_uri=${getRedirectUri()}`;
@@ -1938,7 +2143,8 @@ function useUserInfo() {
1938
2143
  case "wallet":
1939
2144
  return walletModalStore.open("bind", extra?.methods);
1940
2145
  case "evm":
1941
- return window.open(`${endpoints.auth}bind/wallet?appid=${appid}&locale=${locale}&st=` + encodeURIComponent(encodeBase64(token)));
2146
+ return EVMOpen("bind");
2147
+ // return window.open(`${endpoints.auth}bind/wallet?appid=${appid}&locale=${locale}&st=` + encodeURIComponent(encodeBase64(token)))
1942
2148
  case "sol":
1943
2149
  if (isDownMd) {
1944
2150
  return window.location.href = `${endpoints.auth}bind/sol?appid=${appid}&locale=${locale}&st=${encodeURIComponent(encodeBase64(token))}&redirect_uri=${getRedirectUri()}`;
@@ -2013,6 +2219,11 @@ function useUserInfo() {
2013
2219
  window.addEventListener("message", authMessageHandle);
2014
2220
  });
2015
2221
  };
2222
+ const invite = async (invite_code) => {
2223
+ return await userInviteApi({
2224
+ invite_code
2225
+ });
2226
+ };
2016
2227
  return {
2017
2228
  loginByMethod,
2018
2229
  loginByTelegram,
@@ -2036,14 +2247,15 @@ function useUserInfo() {
2036
2247
  auth,
2037
2248
  login: loginMethod,
2038
2249
  bind,
2039
- getAuthInfo
2250
+ getAuthInfo,
2251
+ invite
2040
2252
  };
2041
2253
  }
2042
2254
 
2043
2255
  // src/hooks/useMatchEvents.ts
2044
- var import_react32 = require("react");
2256
+ var import_react36 = require("react");
2045
2257
  function useMatchEvents(handlers) {
2046
- (0, import_react32.useEffect)(() => {
2258
+ (0, import_react36.useEffect)(() => {
2047
2259
  Object.entries(handlers).forEach(([event, handler2]) => {
2048
2260
  if (handler2) {
2049
2261
  eventManager_default.on(event, handler2);
@@ -2060,11 +2272,11 @@ function useMatchEvents(handlers) {
2060
2272
  }
2061
2273
 
2062
2274
  // src/hooks/useWallet.tsx
2063
- var import_viem5 = require("viem");
2064
- var import_accounts = require("viem/accounts");
2065
- var import_viem6 = require("viem");
2066
- var import_react33 = require("react");
2067
2275
  var import_viem7 = require("viem");
2276
+ var import_accounts = require("viem/accounts");
2277
+ var import_viem8 = require("viem");
2278
+ var import_react37 = require("react");
2279
+ var import_viem9 = require("viem");
2068
2280
 
2069
2281
  // src/store/useTransactionStore.ts
2070
2282
  var import_zustand5 = require("zustand");
@@ -2097,7 +2309,7 @@ var useTransactionStore = (0, import_zustand5.create)((0, import_middleware3.dev
2097
2309
  var useTransactionStore_default = useTransactionStore;
2098
2310
 
2099
2311
  // src/hooks/useWallet.tsx
2100
- var import_jsx_runtime90 = require("react/jsx-runtime");
2312
+ var import_jsx_runtime96 = require("react/jsx-runtime");
2101
2313
  var AppClientId2 = "react-sdk-" + getVersion();
2102
2314
  function useWallet() {
2103
2315
  const { address, wallet: walletConfig } = useLocalStore_default();
@@ -2148,7 +2360,7 @@ function useWallet() {
2148
2360
  throw error;
2149
2361
  }
2150
2362
  };
2151
- const evmAccount = (0, import_react33.useMemo)(() => {
2363
+ const evmAccount = (0, import_react37.useMemo)(() => {
2152
2364
  try {
2153
2365
  return address ? (0, import_accounts.toAccount)({
2154
2366
  address,
@@ -2187,14 +2399,14 @@ function useWallet() {
2187
2399
  return void 0;
2188
2400
  }
2189
2401
  }, [address]);
2190
- (0, import_react33.useEffect)(() => {
2402
+ (0, import_react37.useEffect)(() => {
2191
2403
  matchlog_default.log("qwe-evmAccount", evmAccount);
2192
2404
  }, [evmAccount]);
2193
2405
  const realCreateWalletClient = (parameters) => {
2194
2406
  if (!evmAccount) {
2195
2407
  return;
2196
2408
  }
2197
- const obj = (0, import_viem6.createWalletClient)({
2409
+ const obj = (0, import_viem8.createWalletClient)({
2198
2410
  ...parameters,
2199
2411
  account: evmAccount
2200
2412
  });
@@ -2270,7 +2482,7 @@ function useWallet() {
2270
2482
  address: evmAccount.address
2271
2483
  });
2272
2484
  modal.show((props) => {
2273
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
2485
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
2274
2486
  });
2275
2487
  clearInterval(window.matchProvider.transactionMessageIntervalMap[transactionId].interval);
2276
2488
  delete window.matchProvider.transactionMessageIntervalMap[transactionId];
@@ -2284,7 +2496,7 @@ function useWallet() {
2284
2496
  };
2285
2497
  const deployContract = async (parameters2) => {
2286
2498
  const { abi, args, bytecode, ...request3 } = parameters2;
2287
- const calldata = (0, import_viem7.encodeDeployData)({ abi, args, bytecode });
2499
+ const calldata = (0, import_viem9.encodeDeployData)({ abi, args, bytecode });
2288
2500
  return await sendTransaction({
2289
2501
  ...request3,
2290
2502
  data: calldata
@@ -2292,7 +2504,7 @@ function useWallet() {
2292
2504
  };
2293
2505
  const writeContract = async (parameters2) => {
2294
2506
  const { abi, address: address2, args, dataSuffix, functionName, ...request3 } = parameters2;
2295
- const data = (0, import_viem5.encodeFunctionData)({
2507
+ const data = (0, import_viem7.encodeFunctionData)({
2296
2508
  abi,
2297
2509
  args,
2298
2510
  functionName
@@ -2323,14 +2535,14 @@ function useWallet() {
2323
2535
 
2324
2536
  // src/hooks/useCopyClipboard.ts
2325
2537
  var import_copy_to_clipboard = __toESM(require("copy-to-clipboard"));
2326
- var import_react34 = require("react");
2538
+ var import_react38 = require("react");
2327
2539
  function useCopyClipboard(timeout = 500) {
2328
- const [isCopied, setIsCopied] = (0, import_react34.useState)(false);
2329
- const staticCopy = (0, import_react34.useCallback)((text) => {
2540
+ const [isCopied, setIsCopied] = (0, import_react38.useState)(false);
2541
+ const staticCopy = (0, import_react38.useCallback)((text) => {
2330
2542
  const didCopy = (0, import_copy_to_clipboard.default)(text);
2331
2543
  setIsCopied(didCopy);
2332
2544
  }, []);
2333
- (0, import_react34.useEffect)(() => {
2545
+ (0, import_react38.useEffect)(() => {
2334
2546
  if (isCopied) {
2335
2547
  const hide = setTimeout(() => {
2336
2548
  setIsCopied(false);
@@ -2344,72 +2556,17 @@ function useCopyClipboard(timeout = 500) {
2344
2556
  return [isCopied, staticCopy];
2345
2557
  }
2346
2558
 
2347
- // src/hooks/api/wallet.ts
2348
- var import_react_query5 = require("@tanstack/react-query");
2349
- function useChainListQuery(options) {
2350
- const { isLogin, token } = useUserInfo();
2351
- return (0, import_react_query5.useQuery)({
2352
- queryKey: ["match-user-chain-list", token],
2353
- queryFn: async () => {
2354
- const res = await getUserChainListApi();
2355
- if (!isSuccess(res)) {
2356
- return [];
2357
- }
2358
- return res.data;
2359
- },
2360
- enabled: isLogin,
2361
- ...options
2362
- });
2363
- }
2364
- function useAssetListQuery({
2365
- chainId,
2366
- ...options
2367
- }) {
2368
- const { isLogin, token } = useUserInfo();
2369
- return (0, import_react_query5.useQuery)({
2370
- queryKey: ["match-user-asset-list", token, chainId],
2371
- queryFn: async () => {
2372
- const res = await getUserWalletAssetApi({ chain_id: chainId.toString() });
2373
- if (!isSuccess(res)) {
2374
- return [];
2375
- }
2376
- return res.data || [];
2377
- },
2378
- enabled: isLogin,
2379
- ...options
2380
- });
2381
- }
2382
- var USER_IMPORT_TOKEN_LIST_KEY = "match-user-import-token-list";
2383
- function useImportTokenListQuery({
2384
- chainId,
2385
- ...options
2386
- }) {
2387
- const { isLogin, token } = useUserInfo();
2388
- return (0, import_react_query5.useQuery)({
2389
- queryKey: [USER_IMPORT_TOKEN_LIST_KEY, token, chainId],
2390
- queryFn: async () => {
2391
- const res = await getUserImportTokenListApi({ chain_id: chainId.toString() });
2392
- if (!isSuccess(res)) {
2393
- return [];
2394
- }
2395
- return res.data || [];
2396
- },
2397
- enabled: isLogin,
2398
- ...options
2399
- });
2400
- }
2401
-
2402
2559
  // src/hooks/useMatchChain.tsx
2403
- var import_react35 = require("react");
2404
- var import_viem8 = require("viem");
2405
- var import_react_intl19 = require("react-intl");
2406
- var import_jsx_runtime91 = require("react/jsx-runtime");
2560
+ var import_react39 = require("react");
2561
+ var import_viem10 = require("viem");
2562
+ var import_react_intl21 = require("react-intl");
2563
+ var import_jsx_runtime97 = require("react/jsx-runtime");
2407
2564
  function useMatchChain() {
2408
2565
  const chainListQuery = useChainListQuery();
2409
2566
  const modal = useModal();
2410
- const intl = (0, import_react_intl19.useIntl)();
2567
+ const intl = (0, import_react_intl21.useIntl)();
2411
2568
  const { chainId: storeChainId, setChainId } = useLocalStore_default();
2412
- const chainId = (0, import_react35.useMemo)(() => {
2569
+ const chainId = (0, import_react39.useMemo)(() => {
2413
2570
  if (!chainListQuery.data || !chainListQuery.data.length) {
2414
2571
  return null;
2415
2572
  }
@@ -2418,7 +2575,7 @@ function useMatchChain() {
2418
2575
  }
2419
2576
  return chainListQuery.data[0].id;
2420
2577
  }, [storeChainId, chainListQuery.data]);
2421
- const chain = (0, import_react35.useMemo)(() => {
2578
+ const chain = (0, import_react39.useMemo)(() => {
2422
2579
  if (!chainListQuery.data || !chainListQuery.data.length) {
2423
2580
  return null;
2424
2581
  }
@@ -2432,30 +2589,30 @@ function useMatchChain() {
2432
2589
  close
2433
2590
  }) {
2434
2591
  const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
2435
- const [selectedChainId, setSelectedChainId] = (0, import_react35.useState)(storeChainId2);
2592
+ const [selectedChainId, setSelectedChainId] = (0, import_react39.useState)(storeChainId2);
2436
2593
  const isDownMd = useDownMd();
2437
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-change-network-box`, children: [
2438
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
2439
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
2594
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: `matchid-change-network-box`, children: [
2595
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
2596
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
2440
2597
  "div",
2441
2598
  {
2442
2599
  onClick: () => setSelectedChainId(item.id),
2443
2600
  className: `matchid-change-network-item ${selectedChainId == item.id ? "matchid-change-network-selected" : ""}`,
2444
2601
  children: [
2445
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
2446
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
2447
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
2602
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
2603
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
2604
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
2448
2605
  ] }),
2449
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
2606
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
2450
2607
  ]
2451
2608
  },
2452
2609
  index
2453
2610
  );
2454
2611
  }) }),
2455
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
2612
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
2456
2613
  setChainId2(selectedChainId || 0);
2457
2614
  close();
2458
- }, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl19.FormattedMessage, { id: "confirm" }) })
2615
+ }, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_intl21.FormattedMessage, { id: "confirm" }) })
2459
2616
  ] });
2460
2617
  }
2461
2618
  const showChangeNetwork = () => {
@@ -2464,13 +2621,13 @@ function useMatchChain() {
2464
2621
  content: ChangeNetwork
2465
2622
  });
2466
2623
  };
2467
- const publicClient = (0, import_react35.useMemo)(() => {
2624
+ const publicClient = (0, import_react39.useMemo)(() => {
2468
2625
  if (!chain) {
2469
2626
  return null;
2470
2627
  }
2471
- return (0, import_viem8.createPublicClient)({
2628
+ return (0, import_viem10.createPublicClient)({
2472
2629
  chain,
2473
- transport: (0, import_viem8.http)()
2630
+ transport: (0, import_viem10.http)()
2474
2631
  });
2475
2632
  }, [chain]);
2476
2633
  return {
@@ -2482,43 +2639,43 @@ function useMatchChain() {
2482
2639
  showChangeNetwork,
2483
2640
  publicClient,
2484
2641
  formatUnits: (value) => {
2485
- return (0, import_viem8.formatUnits)(value, chain?.nativeCurrency.decimals || 18);
2642
+ return (0, import_viem10.formatUnits)(value, chain?.nativeCurrency.decimals || 18);
2486
2643
  },
2487
2644
  parseUnits: (value) => {
2488
- return (0, import_viem8.parseUnits)(value, chain?.nativeCurrency.decimals || 18);
2645
+ return (0, import_viem10.parseUnits)(value, chain?.nativeCurrency.decimals || 18);
2489
2646
  }
2490
2647
  };
2491
2648
  }
2492
2649
 
2493
2650
  // src/hooks/useMatchWallet.tsx
2494
2651
  var import_react_qrcode = require("react-qrcode");
2495
- var import_react37 = require("react");
2496
- var import_react_query8 = require("@tanstack/react-query");
2497
- var import_viem11 = require("viem");
2498
- var import_react_intl21 = require("react-intl");
2652
+ var import_react41 = require("react");
2653
+ var import_react_query11 = require("@tanstack/react-query");
2654
+ var import_viem13 = require("viem");
2655
+ var import_react_intl23 = require("react-intl");
2499
2656
 
2500
2657
  // src/components/ImportToken/index.tsx
2501
- var import_react36 = require("react");
2502
- var import_react_intl20 = require("react-intl");
2503
- var import_react_query7 = require("@tanstack/react-query");
2504
- var import_viem10 = require("viem");
2658
+ var import_react40 = require("react");
2659
+ var import_react_intl22 = require("react-intl");
2660
+ var import_react_query10 = require("@tanstack/react-query");
2661
+ var import_viem12 = require("viem");
2505
2662
 
2506
2663
  // src/hooks/useIsContract.ts
2507
- var import_viem9 = require("viem");
2508
- var import_react_query6 = require("@tanstack/react-query");
2664
+ var import_viem11 = require("viem");
2665
+ var import_react_query9 = require("@tanstack/react-query");
2509
2666
  function useIsContract({
2510
2667
  address,
2511
2668
  chain,
2512
2669
  enabled
2513
2670
  }) {
2514
- return (0, import_react_query6.useQuery)({
2671
+ return (0, import_react_query9.useQuery)({
2515
2672
  queryKey: ["is_contract", chain?.id, address],
2516
2673
  queryFn: async () => {
2517
2674
  if (!chain) return false;
2518
2675
  if (!address) return false;
2519
- const publicClient = (0, import_viem9.createPublicClient)({
2676
+ const publicClient = (0, import_viem11.createPublicClient)({
2520
2677
  chain,
2521
- transport: (0, import_viem9.http)()
2678
+ transport: (0, import_viem11.http)()
2522
2679
  });
2523
2680
  const res = await publicClient.getCode({ address });
2524
2681
  return res !== null && res !== void 0;
@@ -2528,27 +2685,27 @@ function useIsContract({
2528
2685
  }
2529
2686
 
2530
2687
  // src/components/ImportToken/index.tsx
2531
- var import_jsx_runtime92 = require("react/jsx-runtime");
2688
+ var import_jsx_runtime98 = require("react/jsx-runtime");
2532
2689
  function ImportToken({ close }) {
2533
- const [status, setStatus] = (0, import_react36.useState)("");
2690
+ const [status, setStatus] = (0, import_react40.useState)("");
2534
2691
  const { token } = useUserInfo();
2535
- const [address, setAddress] = (0, import_react36.useState)("");
2536
- const [symbol, setSymbol] = (0, import_react36.useState)("");
2537
- const [decimals, setDecimals] = (0, import_react36.useState)("");
2538
- const [error, setError] = (0, import_react36.useState)({});
2692
+ const [address, setAddress] = (0, import_react40.useState)("");
2693
+ const [symbol, setSymbol] = (0, import_react40.useState)("");
2694
+ const [decimals, setDecimals] = (0, import_react40.useState)("");
2695
+ const [error, setError] = (0, import_react40.useState)({});
2539
2696
  const { publicClient, chainId, chain } = useMatchChain();
2540
2697
  const getContractInfo = async () => {
2541
2698
  if (!publicClient) return;
2542
2699
  const calls = [
2543
2700
  {
2544
2701
  address,
2545
- abi: import_viem10.erc20Abi,
2702
+ abi: import_viem12.erc20Abi,
2546
2703
  functionName: "symbol",
2547
2704
  args: []
2548
2705
  },
2549
2706
  {
2550
2707
  address,
2551
- abi: import_viem10.erc20Abi,
2708
+ abi: import_viem12.erc20Abi,
2552
2709
  functionName: "decimals",
2553
2710
  args: []
2554
2711
  }
@@ -2568,8 +2725,8 @@ function ImportToken({ close }) {
2568
2725
  });
2569
2726
  }
2570
2727
  };
2571
- const intl = (0, import_react_intl20.useIntl)();
2572
- (0, import_react36.useEffect)(() => {
2728
+ const intl = (0, import_react_intl22.useIntl)();
2729
+ (0, import_react40.useEffect)(() => {
2573
2730
  if (address.length === 42) {
2574
2731
  const reg = /^0x[0-9a-fA-F]{40}$/;
2575
2732
  if (!reg.test(address)) {
@@ -2588,9 +2745,9 @@ function ImportToken({ close }) {
2588
2745
  }
2589
2746
  }
2590
2747
  }, [address, publicClient]);
2591
- const [loading, setLoading] = (0, import_react36.useState)(false);
2748
+ const [loading, setLoading] = (0, import_react40.useState)(false);
2592
2749
  const toast = useToast();
2593
- const queryClient2 = (0, import_react_query7.useQueryClient)();
2750
+ const queryClient2 = (0, import_react_query10.useQueryClient)();
2594
2751
  const onImport = async () => {
2595
2752
  setLoading(true);
2596
2753
  try {
@@ -2616,7 +2773,7 @@ function ImportToken({ close }) {
2616
2773
  setLoading(false);
2617
2774
  }
2618
2775
  };
2619
- const canImport = (0, import_react36.useMemo)(() => {
2776
+ const canImport = (0, import_react40.useMemo)(() => {
2620
2777
  if (!address) {
2621
2778
  return false;
2622
2779
  }
@@ -2634,24 +2791,24 @@ function ImportToken({ close }) {
2634
2791
  }, [error, address, symbol, decimals]);
2635
2792
  const isContractQuery = useIsContract({
2636
2793
  //@ts-ignore
2637
- chain: (0, import_viem10.defineChain)(chain),
2794
+ chain: (0, import_viem12.defineChain)(chain),
2638
2795
  address,
2639
2796
  enabled: canImport
2640
2797
  });
2641
2798
  if (status == "success" || status == "fail") {
2642
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-import-token-result matchid-flex`, children: [
2643
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-import-token-result-box matchid-flex`, children: [
2644
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("img", { src: status == "success" ? success_default : fail_default, alt: status == "success" ? "success" : "fail", className: `matchid-import-token-result-img` }),
2645
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: `matchid-import-token-result-text matchid-import-token-result-text-${status}`, children: status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl20.FormattedMessage, { id: "importSuccess" }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl20.FormattedMessage, { id: "importFail" }) })
2799
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-import-token-result matchid-flex`, children: [
2800
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-import-token-result-box matchid-flex`, children: [
2801
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("img", { src: status == "success" ? success_default : fail_default, alt: status == "success" ? "success" : "fail", className: `matchid-import-token-result-img` }),
2802
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-import-token-result-text matchid-import-token-result-text-${status}`, children: status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl22.FormattedMessage, { id: "importSuccess" }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl22.FormattedMessage, { id: "importFail" }) })
2646
2803
  ] }),
2647
- status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Button, { size: "lg", onClick: close, block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl20.FormattedMessage, { id: "close" }) }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Button, { size: "lg", onClick: () => setStatus(""), block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl20.FormattedMessage, { id: "back" }) })
2804
+ status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Button, { size: "lg", onClick: close, block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl22.FormattedMessage, { id: "close" }) }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Button, { size: "lg", onClick: () => setStatus(""), block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl22.FormattedMessage, { id: "back" }) })
2648
2805
  ] });
2649
2806
  }
2650
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-import-token`, children: [
2651
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "matchid-import-token-form", children: [
2652
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Field, { label: intl.formatMessage({
2807
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-import-token`, children: [
2808
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "matchid-import-token-form", children: [
2809
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Field, { label: intl.formatMessage({
2653
2810
  id: "tokenSmartContract"
2654
- }), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
2811
+ }), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
2655
2812
  Input,
2656
2813
  {
2657
2814
  placeholder: intl.formatMessage({
@@ -2662,9 +2819,9 @@ function ImportToken({ close }) {
2662
2819
  maxLength: 42
2663
2820
  }
2664
2821
  ) }),
2665
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Field, { label: intl.formatMessage({
2822
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Field, { label: intl.formatMessage({
2666
2823
  id: "tokenSymbol"
2667
- }), error: error.symbol, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
2824
+ }), error: error.symbol, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
2668
2825
  Input,
2669
2826
  {
2670
2827
  placeholder: intl.formatMessage({
@@ -2675,9 +2832,9 @@ function ImportToken({ close }) {
2675
2832
  maxLength: 16
2676
2833
  }
2677
2834
  ) }),
2678
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Field, { label: intl.formatMessage({
2835
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Field, { label: intl.formatMessage({
2679
2836
  id: "tokenDecimals"
2680
- }), error: error.decimals, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
2837
+ }), error: error.decimals, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
2681
2838
  Input,
2682
2839
  {
2683
2840
  placeholder: intl.formatMessage({
@@ -2689,7 +2846,7 @@ function ImportToken({ close }) {
2689
2846
  }
2690
2847
  ) })
2691
2848
  ] }),
2692
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
2849
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
2693
2850
  Button,
2694
2851
  {
2695
2852
  size: "lg",
@@ -2698,20 +2855,20 @@ function ImportToken({ close }) {
2698
2855
  loading: loading || isContractQuery.isLoading,
2699
2856
  disabled: !canImport || !isContractQuery.data,
2700
2857
  highlight: true,
2701
- children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl20.FormattedMessage, { id: "import" })
2858
+ children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl22.FormattedMessage, { id: "import" })
2702
2859
  }
2703
2860
  )
2704
2861
  ] });
2705
2862
  }
2706
2863
 
2707
2864
  // src/hooks/useMatchWallet.tsx
2708
- var import_jsx_runtime93 = require("react/jsx-runtime");
2865
+ var import_jsx_runtime99 = require("react/jsx-runtime");
2709
2866
  var ReceiveModal = () => {
2710
2867
  const chain = useMatchChain();
2711
2868
  const { address } = useWallet();
2712
2869
  const [copied, setCopied] = useCopyClipboard();
2713
2870
  const toast = useToast();
2714
- const intl = (0, import_react_intl21.useIntl)();
2871
+ const intl = (0, import_react_intl23.useIntl)();
2715
2872
  const onCopy = () => {
2716
2873
  setCopied(address);
2717
2874
  toast.success(intl.formatMessage({
@@ -2719,10 +2876,10 @@ var ReceiveModal = () => {
2719
2876
  }));
2720
2877
  };
2721
2878
  const chainLink = chain.explorerLink("address/" + address);
2722
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-receive-modal`, children: [
2723
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-receive-container", children: [
2724
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl21.FormattedMessage, { id: "receiveQrcode" }) }),
2725
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: `matchid-qr-container`, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
2879
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: `matchid-receive-modal`, children: [
2880
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "matchid-receive-container", children: [
2881
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl23.FormattedMessage, { id: "receiveQrcode" }) }),
2882
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: `matchid-qr-container`, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
2726
2883
  import_react_qrcode.QRCode,
2727
2884
  {
2728
2885
  margin: "0",
@@ -2730,7 +2887,7 @@ var ReceiveModal = () => {
2730
2887
  value: address
2731
2888
  }
2732
2889
  ) }),
2733
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
2890
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
2734
2891
  "a",
2735
2892
  {
2736
2893
  href: chainLink,
@@ -2740,8 +2897,8 @@ var ReceiveModal = () => {
2740
2897
  }
2741
2898
  )
2742
2899
  ] }),
2743
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { size: "lg", onClick: onCopy, block: true, highlight: true, disabled: copied, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
2744
- import_react_intl21.FormattedMessage,
2900
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Button, { size: "lg", onClick: onCopy, block: true, highlight: true, disabled: copied, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
2901
+ import_react_intl23.FormattedMessage,
2745
2902
  {
2746
2903
  id: "copyAddress"
2747
2904
  }
@@ -2750,7 +2907,7 @@ var ReceiveModal = () => {
2750
2907
  };
2751
2908
  function useMatchWallet() {
2752
2909
  const modal = useModal();
2753
- const intl = (0, import_react_intl21.useIntl)();
2910
+ const intl = (0, import_react_intl23.useIntl)();
2754
2911
  const showReceiveModal = () => {
2755
2912
  modal.open({
2756
2913
  title: intl.formatMessage({
@@ -2782,12 +2939,12 @@ function useMatchWallet() {
2782
2939
  };
2783
2940
  }
2784
2941
  function useMatchWalletRecords() {
2785
- const [hasMore, setHasMore] = (0, import_react37.useState)(true);
2786
- const [items, setItems] = (0, import_react37.useState)([]);
2942
+ const [hasMore, setHasMore] = (0, import_react41.useState)(true);
2943
+ const [items, setItems] = (0, import_react41.useState)([]);
2787
2944
  const { chainId, publicClient } = useMatchChain();
2788
2945
  const { address } = useWallet();
2789
- const hasMoreRef = (0, import_react37.useRef)(hasMore);
2790
- const nextPageParamsRef = (0, import_react37.useRef)(void 0);
2946
+ const hasMoreRef = (0, import_react41.useRef)(hasMore);
2947
+ const nextPageParamsRef = (0, import_react41.useRef)(void 0);
2791
2948
  const { contracts, setContracts } = useContractStore_default();
2792
2949
  const fetchMoreData = async () => {
2793
2950
  const chainIdStr = chainId ? chainId.toString() : "";
@@ -2814,7 +2971,7 @@ function useMatchWalletRecords() {
2814
2971
  hasMoreRef.current = true;
2815
2972
  fetchMoreData();
2816
2973
  };
2817
- (0, import_react37.useEffect)(() => {
2974
+ (0, import_react41.useEffect)(() => {
2818
2975
  if (chainId && address) {
2819
2976
  onInit();
2820
2977
  }
@@ -2838,13 +2995,13 @@ function useMatchWalletRecords() {
2838
2995
  for (const contract of contractUnique) {
2839
2996
  calls.push({
2840
2997
  address: contract,
2841
- abi: import_viem11.erc20Abi,
2998
+ abi: import_viem13.erc20Abi,
2842
2999
  functionName: "symbol",
2843
3000
  args: []
2844
3001
  });
2845
3002
  calls.push({
2846
3003
  address: contract,
2847
- abi: import_viem11.erc20Abi,
3004
+ abi: import_viem13.erc20Abi,
2848
3005
  functionName: "decimals",
2849
3006
  args: []
2850
3007
  });
@@ -2870,7 +3027,7 @@ function useMatchWalletRecords() {
2870
3027
  setContracts(contractMap);
2871
3028
  }
2872
3029
  };
2873
- const list = (0, import_react37.useMemo)(() => {
3030
+ const list = (0, import_react41.useMemo)(() => {
2874
3031
  const localTransactions = transactions[`${chainId}-${address}`] || [];
2875
3032
  const removeList = localTransactions.filter((n) => items.findIndex((m) => m.hash == n.hash) >= 0);
2876
3033
  removeList.forEach((item) => {
@@ -2912,7 +3069,7 @@ function useMatchWalletAssets({
2912
3069
  chainId: chainId || 0,
2913
3070
  ...assetListOptions
2914
3071
  });
2915
- const mergedAssets = (0, import_react37.useMemo)(() => {
3072
+ const mergedAssets = (0, import_react41.useMemo)(() => {
2916
3073
  if (!assetListQuery.data && !importTokenQuery.data) return [];
2917
3074
  const assetList = (assetListQuery.data || []).map((asset) => ({
2918
3075
  ...asset,
@@ -2980,7 +3137,7 @@ function useMatchWalletAssetList({
2980
3137
  name: chain?.nativeCurrency.name,
2981
3138
  balance: 0
2982
3139
  };
2983
- const nativeBalanceQuery = (0, import_react_query8.useQuery)({
3140
+ const nativeBalanceQuery = (0, import_react_query11.useQuery)({
2984
3141
  queryKey: ["nativeBalance", nativeToken?.chain_id],
2985
3142
  queryFn: async () => {
2986
3143
  if (!nativeToken || !publicClient) return null;
@@ -2999,14 +3156,14 @@ function useMatchWalletAssetList({
2999
3156
  retry: 3
3000
3157
  // Retry up to 3 times if failed
3001
3158
  });
3002
- const erc20Tokens = (0, import_react37.useMemo)(() => list.filter((asset) => asset.address !== NATIVE_TOKEN_ADDRESS), [list]);
3003
- const erc20BalanceQuery = (0, import_react_query8.useQuery)({
3159
+ const erc20Tokens = (0, import_react41.useMemo)(() => list.filter((asset) => asset.address !== NATIVE_TOKEN_ADDRESS), [list]);
3160
+ const erc20BalanceQuery = (0, import_react_query11.useQuery)({
3004
3161
  queryKey: ["erc20Balances", erc20Tokens.map((token) => token.address)],
3005
3162
  queryFn: async () => {
3006
3163
  if (!erc20Tokens.length || !publicClient) return [];
3007
3164
  const calls = erc20Tokens.map((token) => ({
3008
3165
  address: token.address,
3009
- abi: import_viem11.erc20Abi,
3166
+ abi: import_viem13.erc20Abi,
3010
3167
  functionName: "balanceOf",
3011
3168
  args: [address]
3012
3169
  }));
@@ -3027,7 +3184,7 @@ function useMatchWalletAssetList({
3027
3184
  // Refresh every 15 seconds
3028
3185
  retry: 3
3029
3186
  });
3030
- const enrichedAssets = (0, import_react37.useMemo)(() => {
3187
+ const enrichedAssets = (0, import_react41.useMemo)(() => {
3031
3188
  if (!list) return [];
3032
3189
  const erc20Balances = erc20BalanceQuery.data || [];
3033
3190
  return list.map((asset) => {
@@ -3037,11 +3194,11 @@ function useMatchWalletAssetList({
3037
3194
  const assetAddress = asset.address.toLowerCase();
3038
3195
  if (assetAddress === NATIVE_TOKEN_ADDRESS) {
3039
3196
  balanceValue = nativeBalanceQuery.data?.toString() || "0";
3040
- balance = nativeBalanceQuery.data ? Number((0, import_viem11.formatUnits)(nativeBalanceQuery.data, decimals)) : 0;
3197
+ balance = nativeBalanceQuery.data ? Number((0, import_viem13.formatUnits)(nativeBalanceQuery.data, decimals)) : 0;
3041
3198
  } else {
3042
3199
  const index = erc20Tokens.findIndex((t) => t.address.toLowerCase() === assetAddress);
3043
3200
  if (index !== -1 && erc20Balances[index] && erc20Balances[index].status === "success") {
3044
- balance = Number((0, import_viem11.formatUnits)(erc20Balances[index].result, decimals));
3201
+ balance = Number((0, import_viem13.formatUnits)(erc20Balances[index].result, decimals));
3045
3202
  balanceValue = erc20Balances[index].result?.toString() || "0";
3046
3203
  }
3047
3204
  }
@@ -3049,7 +3206,7 @@ function useMatchWalletAssetList({
3049
3206
  return { ...asset, balance, value, balanceValue };
3050
3207
  });
3051
3208
  }, [list, nativeBalanceQuery.data, erc20BalanceQuery.data]);
3052
- (0, import_react37.useEffect)(() => {
3209
+ (0, import_react41.useEffect)(() => {
3053
3210
  const list2 = enrichedAssets.sort((a, b) => {
3054
3211
  if (a.address === NATIVE_TOKEN_ADDRESS) return -1;
3055
3212
  if (b.address === NATIVE_TOKEN_ADDRESS) return 1;
@@ -3074,14 +3231,14 @@ function useMatchWalletAssetList({
3074
3231
  }
3075
3232
 
3076
3233
  // src/hooks/useReceipt.tsx
3077
- var import_react38 = require("react");
3078
- var import_react_query9 = require("@tanstack/react-query");
3079
- var import_viem12 = require("viem");
3234
+ var import_react42 = require("react");
3235
+ var import_react_query12 = require("@tanstack/react-query");
3236
+ var import_viem14 = require("viem");
3080
3237
  var CACHE_TTL = 86400 * 30 * 1e3;
3081
3238
  var MAX_CACHE_SIZE = 500;
3082
3239
  var STORAGE_KEY = "match_receipt_logs";
3083
3240
  function useReceiptCache() {
3084
- const [cache, setCache] = (0, import_react38.useState)(/* @__PURE__ */ new Map());
3241
+ const [cache, setCache] = (0, import_react42.useState)(/* @__PURE__ */ new Map());
3085
3242
  const isLocalStorageAvailable = (() => {
3086
3243
  try {
3087
3244
  const testKey = "__test__";
@@ -3092,7 +3249,7 @@ function useReceiptCache() {
3092
3249
  return false;
3093
3250
  }
3094
3251
  })();
3095
- (0, import_react38.useEffect)(() => {
3252
+ (0, import_react42.useEffect)(() => {
3096
3253
  if (isLocalStorageAvailable) {
3097
3254
  try {
3098
3255
  const storedData = localStorage.getItem(STORAGE_KEY);
@@ -3111,7 +3268,7 @@ function useReceiptCache() {
3111
3268
  }
3112
3269
  }
3113
3270
  }, []);
3114
- const updateLocalStorage = (0, import_react38.useCallback)((updatedCache) => {
3271
+ const updateLocalStorage = (0, import_react42.useCallback)((updatedCache) => {
3115
3272
  if (isLocalStorageAvailable) {
3116
3273
  try {
3117
3274
  const storedData = localStorage.getItem(STORAGE_KEY);
@@ -3128,7 +3285,7 @@ function useReceiptCache() {
3128
3285
  }
3129
3286
  }
3130
3287
  }, []);
3131
- const set = (0, import_react38.useCallback)((key, value) => {
3288
+ const set = (0, import_react42.useCallback)((key, value) => {
3132
3289
  const now = Date.now();
3133
3290
  const newCache = new Map(cache);
3134
3291
  newCache.forEach((entry, k) => {
@@ -3146,7 +3303,7 @@ function useReceiptCache() {
3146
3303
  setCache(newCache);
3147
3304
  updateLocalStorage(newCache);
3148
3305
  }, [cache, updateLocalStorage]);
3149
- const get = (0, import_react38.useCallback)((key) => {
3306
+ const get = (0, import_react42.useCallback)((key) => {
3150
3307
  const entry = cache.get(key);
3151
3308
  if (entry) {
3152
3309
  if (Date.now() - entry.timestamp > CACHE_TTL) {
@@ -3160,7 +3317,7 @@ function useReceiptCache() {
3160
3317
  }
3161
3318
  return void 0;
3162
3319
  }, [cache, updateLocalStorage]);
3163
- const del = (0, import_react38.useCallback)((key) => {
3320
+ const del = (0, import_react42.useCallback)((key) => {
3164
3321
  if (cache.has(key)) {
3165
3322
  const newCache = new Map(cache);
3166
3323
  newCache.delete(key);
@@ -3168,7 +3325,7 @@ function useReceiptCache() {
3168
3325
  updateLocalStorage(newCache);
3169
3326
  }
3170
3327
  }, [cache, updateLocalStorage]);
3171
- const clear = (0, import_react38.useCallback)(() => {
3328
+ const clear = (0, import_react42.useCallback)(() => {
3172
3329
  setCache(/* @__PURE__ */ new Map());
3173
3330
  if (isLocalStorageAvailable) {
3174
3331
  localStorage.removeItem(STORAGE_KEY);
@@ -3183,8 +3340,8 @@ function useReceipt2({
3183
3340
  const { list } = useMatchChain();
3184
3341
  const cache = useReceiptCache();
3185
3342
  const chain = list?.find((item) => item.id === chainId);
3186
- const [shouldRefetch, setShouldRefetch] = (0, import_react38.useState)(true);
3187
- const query = (0, import_react_query9.useQuery)({
3343
+ const [shouldRefetch, setShouldRefetch] = (0, import_react42.useState)(true);
3344
+ const query = (0, import_react_query12.useQuery)({
3188
3345
  queryKey: ["match-tx-receipt", hash, chain],
3189
3346
  queryFn: async () => {
3190
3347
  if (!chain || !hash) return false;
@@ -3193,9 +3350,9 @@ function useReceipt2({
3193
3350
  return cache.get(cacheKey);
3194
3351
  }
3195
3352
  try {
3196
- const publicClient = (0, import_viem12.createPublicClient)({
3197
- chain: (0, import_viem12.defineChain)(chain),
3198
- transport: (0, import_viem12.http)()
3353
+ const publicClient = (0, import_viem14.createPublicClient)({
3354
+ chain: (0, import_viem14.defineChain)(chain),
3355
+ transport: (0, import_viem14.http)()
3199
3356
  });
3200
3357
  const receipt = await publicClient.getTransactionReceipt({ hash });
3201
3358
  if (!receipt) {
@@ -3209,7 +3366,7 @@ function useReceipt2({
3209
3366
  },
3210
3367
  refetchInterval: shouldRefetch ? 1e4 : false
3211
3368
  });
3212
- (0, import_react38.useEffect)(() => {
3369
+ (0, import_react42.useEffect)(() => {
3213
3370
  if (query.data) {
3214
3371
  setShouldRefetch(false);
3215
3372
  }
@@ -3218,14 +3375,14 @@ function useReceipt2({
3218
3375
  }
3219
3376
 
3220
3377
  // src/hooks/useTransaction.tsx
3221
- var import_react39 = require("react");
3222
- var import_react_query10 = require("@tanstack/react-query");
3223
- var import_viem13 = require("viem");
3378
+ var import_react43 = require("react");
3379
+ var import_react_query13 = require("@tanstack/react-query");
3380
+ var import_viem15 = require("viem");
3224
3381
  var CACHE_TTL2 = 86400 * 30 * 1e3;
3225
3382
  var MAX_CACHE_SIZE2 = 500;
3226
3383
  var STORAGE_KEY2 = "match_transaction_logs";
3227
3384
  function useTransactionCache() {
3228
- const [cache, setCache] = (0, import_react39.useState)(/* @__PURE__ */ new Map());
3385
+ const [cache, setCache] = (0, import_react43.useState)(/* @__PURE__ */ new Map());
3229
3386
  const isLocalStorageAvailable = (() => {
3230
3387
  try {
3231
3388
  const testKey = "__test__";
@@ -3236,7 +3393,7 @@ function useTransactionCache() {
3236
3393
  return false;
3237
3394
  }
3238
3395
  })();
3239
- (0, import_react39.useEffect)(() => {
3396
+ (0, import_react43.useEffect)(() => {
3240
3397
  if (isLocalStorageAvailable) {
3241
3398
  try {
3242
3399
  const storedData = localStorage.getItem(STORAGE_KEY2);
@@ -3255,7 +3412,7 @@ function useTransactionCache() {
3255
3412
  }
3256
3413
  }
3257
3414
  }, []);
3258
- const updateLocalStorage = (0, import_react39.useCallback)((updatedCache) => {
3415
+ const updateLocalStorage = (0, import_react43.useCallback)((updatedCache) => {
3259
3416
  if (isLocalStorageAvailable) {
3260
3417
  try {
3261
3418
  const storedData = localStorage.getItem(STORAGE_KEY2);
@@ -3272,7 +3429,7 @@ function useTransactionCache() {
3272
3429
  }
3273
3430
  }
3274
3431
  }, []);
3275
- const set = (0, import_react39.useCallback)((key, value) => {
3432
+ const set = (0, import_react43.useCallback)((key, value) => {
3276
3433
  const now = Date.now();
3277
3434
  const newCache = new Map(cache);
3278
3435
  newCache.forEach((entry, k) => {
@@ -3290,7 +3447,7 @@ function useTransactionCache() {
3290
3447
  setCache(newCache);
3291
3448
  updateLocalStorage(newCache);
3292
3449
  }, [cache, updateLocalStorage]);
3293
- const get = (0, import_react39.useCallback)((key) => {
3450
+ const get = (0, import_react43.useCallback)((key) => {
3294
3451
  const entry = cache.get(key);
3295
3452
  if (entry) {
3296
3453
  if (Date.now() - entry.timestamp > CACHE_TTL2) {
@@ -3304,7 +3461,7 @@ function useTransactionCache() {
3304
3461
  }
3305
3462
  return void 0;
3306
3463
  }, [cache, updateLocalStorage]);
3307
- const del = (0, import_react39.useCallback)((key) => {
3464
+ const del = (0, import_react43.useCallback)((key) => {
3308
3465
  if (cache.has(key)) {
3309
3466
  const newCache = new Map(cache);
3310
3467
  newCache.delete(key);
@@ -3312,7 +3469,7 @@ function useTransactionCache() {
3312
3469
  updateLocalStorage(newCache);
3313
3470
  }
3314
3471
  }, [cache, updateLocalStorage]);
3315
- const clear = (0, import_react39.useCallback)(() => {
3472
+ const clear = (0, import_react43.useCallback)(() => {
3316
3473
  setCache(/* @__PURE__ */ new Map());
3317
3474
  if (isLocalStorageAvailable) {
3318
3475
  localStorage.removeItem(STORAGE_KEY2);
@@ -3327,8 +3484,8 @@ function useTransaction({
3327
3484
  const { list } = useMatchChain();
3328
3485
  const cache = useTransactionCache();
3329
3486
  const chain = list?.find((item) => item.id === chainId);
3330
- const [shouldRefetch, setShouldRefetch] = (0, import_react39.useState)(true);
3331
- const query = (0, import_react_query10.useQuery)({
3487
+ const [shouldRefetch, setShouldRefetch] = (0, import_react43.useState)(true);
3488
+ const query = (0, import_react_query13.useQuery)({
3332
3489
  queryKey: ["match-tx-transaction", hash, chain],
3333
3490
  queryFn: async () => {
3334
3491
  if (!chain || !hash) return false;
@@ -3337,9 +3494,9 @@ function useTransaction({
3337
3494
  return cache.get(cacheKey);
3338
3495
  }
3339
3496
  try {
3340
- const publicClient = (0, import_viem13.createPublicClient)({
3341
- chain: (0, import_viem13.defineChain)(chain),
3342
- transport: (0, import_viem13.http)()
3497
+ const publicClient = (0, import_viem15.createPublicClient)({
3498
+ chain: (0, import_viem15.defineChain)(chain),
3499
+ transport: (0, import_viem15.http)()
3343
3500
  });
3344
3501
  const transaction = await publicClient.getTransaction({ hash });
3345
3502
  if (!transaction) {
@@ -3353,7 +3510,7 @@ function useTransaction({
3353
3510
  },
3354
3511
  refetchInterval: shouldRefetch ? 1e4 : false
3355
3512
  });
3356
- (0, import_react39.useEffect)(() => {
3513
+ (0, import_react43.useEffect)(() => {
3357
3514
  if (query.data) {
3358
3515
  setShouldRefetch(false);
3359
3516
  }