@matchain/matchid-sdk-react 0.1.53-alpha.0 → 0.1.53-alpha.10

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 (101) 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-LHNKZISB.mjs → chunk-FKXS2XRG.mjs} +114 -2
  9. package/dist/chunk-FKXS2XRG.mjs.map +1 -0
  10. package/dist/{chunk-HLUFAIFV.mjs → chunk-IZOOVZAD.mjs} +11 -6
  11. package/dist/chunk-IZOOVZAD.mjs.map +1 -0
  12. package/dist/{chunk-HYQ3T6WW.mjs → chunk-JX73EY6V.mjs} +2 -14
  13. package/dist/chunk-JX73EY6V.mjs.map +1 -0
  14. package/dist/{chunk-LRJDS2OK.mjs → chunk-NCVBLRAJ.mjs} +5750 -4942
  15. package/dist/chunk-NCVBLRAJ.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 +1468 -591
  21. package/dist/components/index.js.map +1 -1
  22. package/dist/components/index.mjs +11 -6
  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 +402 -148
  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 +638 -545
  32. package/dist/hooks/index.js.map +1 -1
  33. package/dist/hooks/index.mjs +5 -4
  34. package/dist/index-BVfCh4l-.d.mts +203 -0
  35. package/dist/{index-CGx_yc95.d.mts → index-BaFmUVw-.d.mts} +1 -1
  36. package/dist/{index-BoIDCH41.d.ts → index-BgdY5xdW.d.ts} +41 -17
  37. package/dist/{index-CteYYAoN.d.mts → index-BrzFSkOe.d.mts} +41 -17
  38. package/dist/{index-CO1j3Cxc.d.ts → index-C0UKUm0h.d.ts} +25 -5
  39. package/dist/{index-BlYHNOxm.d.ts → index-CQmN0dN4.d.ts} +1 -1
  40. package/dist/index-D3Kp05kW.d.ts +203 -0
  41. package/dist/{index-BNNgBoTN.d.ts → index-D5WIVIkc.d.ts} +4 -2
  42. package/dist/{index-Ce5JlNJv.d.ts → index-D7S5DMUy.d.mts} +21 -8
  43. package/dist/{index-CqO8nMTh.d.mts → index-DC4F1u-w.d.mts} +25 -5
  44. package/dist/{index-0EM3dXJ4.d.mts → index-DQFQ39D9.d.ts} +21 -8
  45. package/dist/{index-C7InzeOC.d.ts → index-DjbH13zc.d.mts} +16 -14
  46. package/dist/{index-C29kl7io.d.mts → index-SOVt-ADK.d.mts} +4 -2
  47. package/dist/{index-Bsfb3Ysq.d.mts → index-zc2GEzJ9.d.ts} +16 -14
  48. package/dist/index.css +139 -16
  49. package/dist/index.d.mts +9 -8
  50. package/dist/index.d.ts +9 -8
  51. package/dist/index.js +1861 -920
  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-Cv5UhCIP.d.mts → types-VrV1kYga.d.mts} +10 -2
  59. package/dist/{types-Cv5UhCIP.d.ts → types-VrV1kYga.d.ts} +10 -2
  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/package.json +5 -2
  71. package/example/src/App.tsx +42 -6
  72. package/example/src/pages/Contact/index.tsx +90 -0
  73. package/example/src/pages/UI/components/Tabs.tsx +18 -0
  74. package/example/src/pages/UI/index.tsx +2 -0
  75. package/example/src/pages/User/index.tsx +7 -1
  76. package/example/src/store/useLocalStore.ts +9 -0
  77. package/package.json +5 -5
  78. package/dist/chunk-FB5MHLWX.mjs.map +0 -1
  79. package/dist/chunk-HLUFAIFV.mjs.map +0 -1
  80. package/dist/chunk-HYQ3T6WW.mjs.map +0 -1
  81. package/dist/chunk-LHNKZISB.mjs.map +0 -1
  82. package/dist/chunk-LRJDS2OK.mjs.map +0 -1
  83. package/dist/chunk-YQHI5BIZ.mjs +0 -97
  84. package/dist/chunk-YQHI5BIZ.mjs.map +0 -1
  85. package/example/dist/assets/TransportWebHID-BwG9Tbw2.js +0 -1
  86. package/example/dist/assets/bignumber-FiRdtNkj.js +0 -10
  87. package/example/dist/assets/ccip-CJyR03AW.js +0 -1
  88. package/example/dist/assets/draggabilly-1Sl0icBA.js +0 -14
  89. package/example/dist/assets/index-BAfSBdWW.js +0 -1
  90. package/example/dist/assets/index-CYk2C9XJ.js +0 -1
  91. package/example/dist/assets/index-CcgesoWE.js +0 -179
  92. package/example/dist/assets/index-D5RU9xxK.js +0 -3
  93. package/example/dist/assets/index-D8N4Z5B5.js +0 -1677
  94. package/example/dist/assets/index-DATAk5xI.js +0 -569
  95. package/example/dist/assets/index-DN1wW-Mo.js +0 -3
  96. package/example/dist/assets/index-DxxLiL3_.js +0 -303
  97. package/example/dist/assets/index-Gy3FXGhr.css +0 -1
  98. package/example/dist/assets/index-RIWy1Hg7.js +0 -1
  99. package/example/dist/assets/inherits_browser-BlmhoU4v.js +0 -1
  100. package/example/dist/assets/solanaEmbed.esm-CNS-QKE2.js +0 -38
  101. package/example/dist/index.html +0 -14
@@ -32,6 +32,9 @@ var components_exports = {};
32
32
  __export(components_exports, {
33
33
  BTCModal: () => BTCModal,
34
34
  Button: () => Button,
35
+ ContactCard: () => ContactCard,
36
+ ContactList: () => ContactList,
37
+ EVMModal: () => EVMModal,
35
38
  EmailModal: () => EmailModal,
36
39
  Field: () => Field,
37
40
  Input: () => Input,
@@ -43,7 +46,6 @@ __export(components_exports, {
43
46
  ModalWithHeader: () => ModalWithHeader,
44
47
  Overlay: () => Overlay,
45
48
  Popover: () => Popover,
46
- SOLModal: () => SOLModal,
47
49
  TONModal: () => TONModal,
48
50
  TRONModal: () => TRONModal,
49
51
  TokenDetail: () => TokenDetail,
@@ -1184,6 +1186,56 @@ function ArrowSendIcon({
1184
1186
  ) });
1185
1187
  }
1186
1188
 
1189
+ // src/assets/icon/PhantomIcon.tsx
1190
+ var import_jsx_runtime49 = require("react/jsx-runtime");
1191
+ function PhantomIcon({
1192
+ size = 128,
1193
+ ...props
1194
+ }) {
1195
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("svg", { width: size, height: size, ...props, viewBox: "0 0 128 128", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
1196
+ "path",
1197
+ {
1198
+ fill: "#ab9ff2",
1199
+ d: "m53.520552,86.603299c-5.9423,9.106 -15.8999,20.63 -29.1497,20.63c-6.2636,0 -12.2864,-2.578 -12.2866,-13.779c-0.0005,-28.5271 38.946,-72.687 75.0825,-72.6876c20.557,-0.0004 28.749,14.2625 28.749,30.4597c0,20.7903 -13.491,44.5629 -26.901,44.5629c-4.256,0 -6.344,-2.337 -6.344,-6.043c0,-0.967 0.16,-2.015 0.482,-3.143c-4.578,7.816 -13.411,15.07 -21.6822,15.07c-6.0227,0 -9.074,-3.788 -9.0741,-9.107c0,-1.934 0.4015,-3.948 1.1241,-5.963zm26.8222,-43.9027c-3.271,0.0058 -5.501,2.7849 -5.494,6.7495c0.007,3.9646 2.247,6.8152 5.518,6.8095c3.192,-0.0057 5.421,-2.8641 5.414,-6.8288c-0.007,-3.9646 -2.246,-6.7358 -5.438,-6.7302zm17.351,-0.0189c-3.271,0.0058 -5.501,2.7849 -5.494,6.7495c0.007,3.9646 2.246,6.8152 5.518,6.8095c3.192,-0.0056 5.421,-2.8641 5.414,-6.8288c-0.007,-3.9646 -2.246,-6.7358 -5.438,-6.7302z",
1200
+ clipRule: "evenodd",
1201
+ fillRule: "evenodd"
1202
+ }
1203
+ ) });
1204
+ }
1205
+
1206
+ // src/assets/icon/MoreIcon.tsx
1207
+ var import_jsx_runtime50 = require("react/jsx-runtime");
1208
+ function MoreIcon({
1209
+ width = "11",
1210
+ height = "3",
1211
+ color = "black",
1212
+ ...props
1213
+ }) {
1214
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width, height, viewBox: "0 0 11 3", fill: "none", ...props, children: [
1215
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
1216
+ "path",
1217
+ {
1218
+ d: "M2.3335 1.33325C2.3335 1.88554 1.88578 2.33325 1.3335 2.33325C0.781211 2.33325 0.333496 1.88554 0.333496 1.33325C0.333496 0.780967 0.781211 0.333252 1.3335 0.333252C1.88578 0.333252 2.3335 0.780967 2.3335 1.33325Z",
1219
+ fill: color
1220
+ }
1221
+ ),
1222
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
1223
+ "path",
1224
+ {
1225
+ d: "M6.3335 1.33325C6.3335 1.88554 5.88578 2.33325 5.3335 2.33325C4.78121 2.33325 4.3335 1.88554 4.3335 1.33325C4.3335 0.780967 4.78121 0.333252 5.3335 0.333252C5.88578 0.333252 6.3335 0.780967 6.3335 1.33325Z",
1226
+ fill: color
1227
+ }
1228
+ ),
1229
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
1230
+ "path",
1231
+ {
1232
+ d: "M10.3335 1.33325C10.3335 1.88554 9.88578 2.33325 9.3335 2.33325C8.78121 2.33325 8.3335 1.88554 8.3335 1.33325C8.3335 0.780967 8.78121 0.333252 9.3335 0.333252C9.88578 0.333252 10.3335 0.780967 10.3335 1.33325Z",
1233
+ fill: color
1234
+ }
1235
+ )
1236
+ ] });
1237
+ }
1238
+
1187
1239
  // src/hooks/useLayout.tsx
1188
1240
  var import_react = require("react");
1189
1241
  function useDownMd() {
@@ -1202,7 +1254,7 @@ function useDownMd() {
1202
1254
 
1203
1255
  // src/ui/Overlay/index.tsx
1204
1256
  var import_react2 = require("react");
1205
- var import_jsx_runtime49 = require("react/jsx-runtime");
1257
+ var import_jsx_runtime51 = require("react/jsx-runtime");
1206
1258
  function Overlay({
1207
1259
  isOpen = false,
1208
1260
  children,
@@ -1218,7 +1270,7 @@ function Overlay({
1218
1270
  document.body.style.overflow = "";
1219
1271
  };
1220
1272
  }, [isOpen]);
1221
- return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
1273
+ return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
1222
1274
  "div",
1223
1275
  {
1224
1276
  className: "matchid-overlay",
@@ -1227,11 +1279,11 @@ function Overlay({
1227
1279
  },
1228
1280
  children
1229
1281
  }
1230
- ) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, {});
1282
+ ) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, {});
1231
1283
  }
1232
1284
 
1233
1285
  // src/ui/Modal/index.tsx
1234
- var import_jsx_runtime50 = require("react/jsx-runtime");
1286
+ var import_jsx_runtime52 = require("react/jsx-runtime");
1235
1287
  function Modal({
1236
1288
  children,
1237
1289
  isOpen,
@@ -1239,10 +1291,10 @@ function Modal({
1239
1291
  zIndex = 100,
1240
1292
  className = ""
1241
1293
  }) {
1242
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: `matchid-modal ${className}`, style: {
1294
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: `matchid-modal ${className}`, style: {
1243
1295
  width
1244
1296
  }, children: [
1245
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "matchid-modal-mobile-header" }),
1297
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "matchid-modal-mobile-header" }),
1246
1298
  children
1247
1299
  ] }) });
1248
1300
  }
@@ -1256,13 +1308,13 @@ function ModalWithHeader({
1256
1308
  ...props
1257
1309
  }) {
1258
1310
  const isDownMd = useDownMd();
1259
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Modal, { ...props, children: [
1260
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
1261
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "matchid-modal-header-content", children: [
1262
- onBack && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
1263
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "matchid-modal-header-title", children: title })
1311
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Modal, { ...props, children: [
1312
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
1313
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "matchid-modal-header-content", children: [
1314
+ onBack && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
1315
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "matchid-modal-header-title", children: title })
1264
1316
  ] }),
1265
- onClose && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
1317
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
1266
1318
  ] }),
1267
1319
  children
1268
1320
  ] });
@@ -1273,7 +1325,7 @@ var import_react4 = require("react");
1273
1325
 
1274
1326
  // src/utils/index.tsx
1275
1327
  var import_moment = __toESM(require("moment"));
1276
- var import_jsx_runtime51 = require("react/jsx-runtime");
1328
+ var import_jsx_runtime53 = require("react/jsx-runtime");
1277
1329
  var getVersion = () => {
1278
1330
  return "0.0.2";
1279
1331
  };
@@ -1286,12 +1338,12 @@ var isValidEmail = (email) => {
1286
1338
  var isValidUsername = (username) => {
1287
1339
  return /^[a-zA-Z0-9_-]+$/.test(username);
1288
1340
  };
1289
- function truncateAddress(address) {
1290
- if (address.length <= 6) {
1341
+ function truncateAddress(address, startLen = 4, endLen = 4) {
1342
+ if (address.length <= startLen + endLen) {
1291
1343
  return address;
1292
1344
  }
1293
- const start = address.slice(0, 4);
1294
- const end = address.slice(-2);
1345
+ const start = address.slice(0, startLen);
1346
+ const end = address.slice(-endLen);
1295
1347
  return `${start}...${end}`;
1296
1348
  }
1297
1349
  function getAppClientId() {
@@ -1319,10 +1371,10 @@ var NumberFormatter = ({
1319
1371
  const [intPart, decimalPart] = numberValue.toString().split(".");
1320
1372
  const intFormat = separator ? intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : intPart;
1321
1373
  if (Math.abs(parseFloat(numberValue)) >= 1) {
1322
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className, children: [
1323
- prefix && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: prefixClassName, children: prefix }),
1324
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: intClassName, children: intFormat }),
1325
- decimalPart ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: decimalClassName, children: [
1374
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className, children: [
1375
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: prefixClassName, children: prefix }),
1376
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: intClassName, children: intFormat }),
1377
+ decimalPart ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: decimalClassName, children: [
1326
1378
  ".",
1327
1379
  decimalPart.substring(0, fixNum)
1328
1380
  ] }) : "",
@@ -1339,30 +1391,30 @@ var NumberFormatter = ({
1339
1391
  }
1340
1392
  }
1341
1393
  if (zeroCount < tFixNum) {
1342
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className, children: [
1343
- prefix && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: prefixClassName, children: prefix }),
1344
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: intClassName, children: intFormat }),
1345
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: decimalClassName, children: [
1394
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className, children: [
1395
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: prefixClassName, children: prefix }),
1396
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: intClassName, children: intFormat }),
1397
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: decimalClassName, children: [
1346
1398
  ".",
1347
1399
  decimalPart.substring(0, tFixNum)
1348
1400
  ] }),
1349
1401
  suffix
1350
1402
  ] });
1351
1403
  }
1352
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className, children: [
1353
- prefix && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: prefixClassName, children: prefix }),
1354
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: intClassName, children: intFormat }),
1355
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: decimalClassName, children: [
1404
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className, children: [
1405
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: prefixClassName, children: prefix }),
1406
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: intClassName, children: intFormat }),
1407
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: decimalClassName, children: [
1356
1408
  ".0",
1357
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("sub", { children: zeroCount }),
1409
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("sub", { children: zeroCount }),
1358
1410
  decimalPart?.substring(zeroCount, zeroCount + tFixNum - 2)
1359
1411
  ] }),
1360
1412
  suffix
1361
1413
  ] });
1362
1414
  }
1363
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className, children: [
1364
- prefix && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: prefixClassName, children: prefix }),
1365
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: intClassName, children: intPart }),
1415
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className, children: [
1416
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: prefixClassName, children: prefix }),
1417
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: intClassName, children: intPart }),
1366
1418
  suffix
1367
1419
  ] });
1368
1420
  };
@@ -1378,9 +1430,13 @@ var formatDate = (value, formatString = "YYYY-MM-DD HH:mm:ss") => {
1378
1430
  var isInTgApp = () => {
1379
1431
  return !!window.TelegramWebviewProxy;
1380
1432
  };
1433
+ function bytesToBase64(bytes) {
1434
+ const binString = String.fromCodePoint(...bytes);
1435
+ return btoa(binString);
1436
+ }
1381
1437
 
1382
1438
  // src/ui/Button/index.tsx
1383
- var import_jsx_runtime52 = require("react/jsx-runtime");
1439
+ var import_jsx_runtime54 = require("react/jsx-runtime");
1384
1440
  function Button({
1385
1441
  size = "df",
1386
1442
  disabled = false,
@@ -1399,7 +1455,7 @@ function Button({
1399
1455
  onClick && onClick();
1400
1456
  }
1401
1457
  };
1402
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
1458
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
1403
1459
  "button",
1404
1460
  {
1405
1461
  type,
@@ -1409,14 +1465,14 @@ function Button({
1409
1465
  ...style
1410
1466
  },
1411
1467
  onClick: onAction,
1412
- children: loading ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
1468
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
1413
1469
  }
1414
1470
  );
1415
1471
  }
1416
1472
 
1417
1473
  // src/ui/Input/index.tsx
1418
1474
  var import_react3 = require("react");
1419
- var import_jsx_runtime53 = require("react/jsx-runtime");
1475
+ var import_jsx_runtime55 = require("react/jsx-runtime");
1420
1476
  function Input({
1421
1477
  onChange,
1422
1478
  type,
@@ -1426,17 +1482,17 @@ function Input({
1426
1482
  }) {
1427
1483
  const [inputType, setInputType] = (0, import_react3.useState)(type);
1428
1484
  const isDownMd = useDownMd();
1429
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
1485
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
1430
1486
  "div",
1431
1487
  {
1432
1488
  className: `matchid-input-box ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
1433
1489
  children: [
1434
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" }),
1435
- props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
1490
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" }),
1491
+ props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
1436
1492
  if (onChange) {
1437
1493
  onChange({ target: { value: "" } });
1438
1494
  }
1439
- }, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
1495
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
1440
1496
  DeleteRoundIcon,
1441
1497
  {
1442
1498
  height: isDownMd ? 16 : 21,
@@ -1444,9 +1500,9 @@ function Input({
1444
1500
  color: "var(--matchid-input-delete-icon-color)"
1445
1501
  }
1446
1502
  ) }),
1447
- type === "password" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
1503
+ type === "password" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
1448
1504
  setInputType(inputType === "password" ? "text" : "password");
1449
- }, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
1505
+ }, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
1450
1506
  after
1451
1507
  ]
1452
1508
  }
@@ -1454,7 +1510,7 @@ function Input({
1454
1510
  }
1455
1511
 
1456
1512
  // src/ui/Field/index.tsx
1457
- var import_jsx_runtime54 = require("react/jsx-runtime");
1513
+ var import_jsx_runtime56 = require("react/jsx-runtime");
1458
1514
  function Field({
1459
1515
  label,
1460
1516
  children,
@@ -1462,19 +1518,19 @@ function Field({
1462
1518
  required,
1463
1519
  className = ""
1464
1520
  }) {
1465
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
1466
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "matchid-field-label", children: [
1467
- required && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "matchid-field-required", children: "*" }),
1521
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
1522
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "matchid-field-label", children: [
1523
+ required && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "matchid-field-required", children: "*" }),
1468
1524
  label
1469
1525
  ] }),
1470
1526
  children,
1471
- error && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "matchid-field-error", children: error })
1527
+ error && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "matchid-field-error", children: error })
1472
1528
  ] });
1473
1529
  }
1474
1530
 
1475
1531
  // src/components/EmailModal/StepEmail.tsx
1476
1532
  var import_react_intl = require("react-intl");
1477
- var import_jsx_runtime55 = require("react/jsx-runtime");
1533
+ var import_jsx_runtime57 = require("react/jsx-runtime");
1478
1534
  function StepEmail(props) {
1479
1535
  const intl = (0, import_react_intl.useIntl)();
1480
1536
  const [emailVal, setEmailVal] = (0, import_react4.useState)("");
@@ -1489,10 +1545,10 @@ function StepEmail(props) {
1489
1545
  const onContinue = async () => {
1490
1546
  props.onContinue(emailVal);
1491
1547
  };
1492
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "matchid-email-email-box", children: [
1493
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Field, { label: intl.formatMessage({
1548
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "matchid-email-email-box", children: [
1549
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Field, { label: intl.formatMessage({
1494
1550
  id: "emailAddress"
1495
- }), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
1551
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
1496
1552
  Input,
1497
1553
  {
1498
1554
  placeholder: intl.formatMessage({
@@ -1502,9 +1558,9 @@ function StepEmail(props) {
1502
1558
  value: emailVal
1503
1559
  }
1504
1560
  ) }),
1505
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Button, { disabled: !canContinue, style: {
1561
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button, { disabled: !canContinue, style: {
1506
1562
  marginTop: "64px"
1507
- }, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_intl.FormattedMessage, { id: "continue" }) })
1563
+ }, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react_intl.FormattedMessage, { id: "continue" }) })
1508
1564
  ] });
1509
1565
  }
1510
1566
 
@@ -1802,6 +1858,54 @@ var tgAppLoginInitApi = () => {
1802
1858
  method: "GET"
1803
1859
  });
1804
1860
  };
1861
+ var getContactListApi = (data) => {
1862
+ return request_default({
1863
+ url: `/api/v1/contacts/list`,
1864
+ method: "POST",
1865
+ data
1866
+ });
1867
+ };
1868
+ var searchContactsApi = (data) => {
1869
+ return request_default({
1870
+ url: `/api/v1/contacts/search`,
1871
+ method: "POST",
1872
+ data
1873
+ });
1874
+ };
1875
+ var addContactsApi = (data) => {
1876
+ return request_default({
1877
+ url: `/api/v1/contacts/add`,
1878
+ method: "POST",
1879
+ data
1880
+ });
1881
+ };
1882
+ var acceptContactsApi = (data) => {
1883
+ return request_default({
1884
+ url: `/api/v1/contacts/accept`,
1885
+ method: "POST",
1886
+ data
1887
+ });
1888
+ };
1889
+ var delContactsApi = (data) => {
1890
+ return request_default({
1891
+ url: `/api/v1/contacts/del`,
1892
+ method: "POST",
1893
+ data
1894
+ });
1895
+ };
1896
+ var getContractsInfoApi = () => {
1897
+ return retryRequest({
1898
+ url: `/api/v1/contracts/info`,
1899
+ method: "GET"
1900
+ });
1901
+ };
1902
+ var userInviteApi = (data) => {
1903
+ return request_default({
1904
+ url: `/api/v1/user/invite`,
1905
+ method: "POST",
1906
+ data
1907
+ });
1908
+ };
1805
1909
 
1806
1910
  // src/store/useLocalStore.ts
1807
1911
  var persistedState = (0, import_middleware.persist)(
@@ -1920,7 +2024,7 @@ var import_react9 = require("react");
1920
2024
  var import_react_dom = require("react-dom");
1921
2025
 
1922
2026
  // src/ui/Drawer/index.tsx
1923
- var import_jsx_runtime56 = require("react/jsx-runtime");
2027
+ var import_jsx_runtime58 = require("react/jsx-runtime");
1924
2028
  function Drawer({
1925
2029
  children,
1926
2030
  showClose = true,
@@ -1931,15 +2035,15 @@ function Drawer({
1931
2035
  onBack
1932
2036
  }) {
1933
2037
  if (!isOpen) {
1934
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_jsx_runtime56.Fragment, {});
2038
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, {});
1935
2039
  }
1936
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "matchid-drawer", children: [
1937
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: `matchid-drawer-header matchid-flex`, children: [
1938
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: `matchid-drawer-header-content matchid-flex`, children: [
1939
- onBack && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ArrowLeftIcon, { height: 25, width: 24, className: "matchid-drawer-header-back", onClick: onBack }),
2040
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "matchid-drawer", children: [
2041
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: `matchid-drawer-header matchid-flex`, children: [
2042
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: `matchid-drawer-header-content matchid-flex`, children: [
2043
+ onBack && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ArrowLeftIcon, { height: 25, width: 24, className: "matchid-drawer-header-back", onClick: onBack }),
1940
2044
  title
1941
2045
  ] }),
1942
- showClose && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
2046
+ showClose && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
1943
2047
  ] }),
1944
2048
  children
1945
2049
  ] }) });
@@ -1949,7 +2053,7 @@ function Drawer({
1949
2053
  var import_react6 = require("react");
1950
2054
 
1951
2055
  // src/ui/ModalDrawer/index.tsx
1952
- var import_jsx_runtime57 = require("react/jsx-runtime");
2056
+ var import_jsx_runtime59 = require("react/jsx-runtime");
1953
2057
  function ModalDrawer({
1954
2058
  title,
1955
2059
  drawerTitleVisible = true,
@@ -1957,9 +2061,9 @@ function ModalDrawer({
1957
2061
  }) {
1958
2062
  const isDownMd = useDownMd();
1959
2063
  if (isDownMd) {
1960
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ModalWithHeader, { ...props, title });
2064
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ModalWithHeader, { ...props, title });
1961
2065
  }
1962
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
2066
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
1963
2067
  }
1964
2068
 
1965
2069
  // src/assets/img/confirm.gif
@@ -2015,7 +2119,7 @@ function useHash({
2015
2119
  }
2016
2120
 
2017
2121
  // src/ui/HashPanel/index.tsx
2018
- var import_jsx_runtime58 = require("react/jsx-runtime");
2122
+ var import_jsx_runtime60 = require("react/jsx-runtime");
2019
2123
  function HashPanel({
2020
2124
  hash,
2021
2125
  chain,
@@ -2074,14 +2178,14 @@ function HashPanel({
2074
2178
  }
2075
2179
  }, [hashQuery.data]);
2076
2180
  const link = chain ? `${chain?.blockExplorers?.default.url}/tx/${hash}` : "";
2077
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2181
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2078
2182
  ModalDrawer,
2079
2183
  {
2080
2184
  isOpen,
2081
2185
  showClose: true,
2082
2186
  onClose,
2083
2187
  zIndex,
2084
- title: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2188
+ title: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2085
2189
  "div",
2086
2190
  {
2087
2191
  className: "matchid-hashpanel-header",
@@ -2091,29 +2195,29 @@ function HashPanel({
2091
2195
  children: statusValue.text
2092
2196
  }
2093
2197
  ),
2094
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "matchid-hashpanel-box", children: [
2095
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "matchid-hashpanel-content", children: [
2096
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: `matchid-hashpanel-status`, style: {
2198
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "matchid-hashpanel-box", children: [
2199
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "matchid-hashpanel-content", children: [
2200
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: `matchid-hashpanel-status`, style: {
2097
2201
  color: statusValue.color
2098
2202
  }, children: statusValue.text }),
2099
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("img", { src: statusValue.icon, alt: statusValue.text, className: `matchid-hashpanel-img` }),
2100
- hash && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
2203
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("img", { src: statusValue.icon, alt: statusValue.text, className: `matchid-hashpanel-img` }),
2204
+ hash && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
2101
2205
  "Hash:",
2102
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("a", { href: link, target: "_blank", children: hash })
2206
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("a", { href: link, target: "_blank", children: hash })
2103
2207
  ] })
2104
2208
  ] }),
2105
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
2209
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
2106
2210
  ] })
2107
2211
  }
2108
2212
  );
2109
2213
  }
2110
2214
  function HashPanel_default(props) {
2111
- return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(HashPanel, { ...props });
2215
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HashPanel, { ...props });
2112
2216
  }
2113
2217
 
2114
2218
  // src/ui/Popover/index.tsx
2115
2219
  var import_react7 = require("react");
2116
- var import_jsx_runtime59 = require("react/jsx-runtime");
2220
+ var import_jsx_runtime61 = require("react/jsx-runtime");
2117
2221
  function Popover({
2118
2222
  children,
2119
2223
  content,
@@ -2123,7 +2227,7 @@ function Popover({
2123
2227
  gap = "20px"
2124
2228
  }) {
2125
2229
  const [active, setActive] = (0, import_react7.useState)(false);
2126
- return children && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
2230
+ return children && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
2127
2231
  "div",
2128
2232
  {
2129
2233
  onClick: () => {
@@ -2134,20 +2238,20 @@ function Popover({
2134
2238
  className: `matchid-popover-box matchid-popover-${position} matchid-popover-${type} ${className} ${type == "click" && active ? "matchid-popover-click-active" : ""}`,
2135
2239
  children: [
2136
2240
  children,
2137
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { style: {
2241
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { style: {
2138
2242
  paddingTop: gap
2139
- }, className: `matchid-popover-area`, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: `matchid-popover-content`, children: content }) })
2243
+ }, className: `matchid-popover-area`, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: `matchid-popover-content`, children: content }) })
2140
2244
  ]
2141
2245
  }
2142
2246
  );
2143
2247
  }
2144
2248
 
2145
2249
  // src/ui/Switch/index.tsx
2146
- var import_jsx_runtime60 = require("react/jsx-runtime");
2250
+ var import_jsx_runtime62 = require("react/jsx-runtime");
2147
2251
 
2148
2252
  // src/ui/AlphaAvatar/index.tsx
2149
2253
  var import_react8 = require("react");
2150
- var import_jsx_runtime61 = require("react/jsx-runtime");
2254
+ var import_jsx_runtime63 = require("react/jsx-runtime");
2151
2255
  function AlphaAvatar({
2152
2256
  name,
2153
2257
  size = "default",
@@ -2164,7 +2268,7 @@ function AlphaAvatar({
2164
2268
  return "";
2165
2269
  }, [name]);
2166
2270
  const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
2167
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
2271
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
2168
2272
  width: numberSize,
2169
2273
  height: numberSize,
2170
2274
  fontSize: Math.ceil(numberSize / 2),
@@ -2173,7 +2277,7 @@ function AlphaAvatar({
2173
2277
  }
2174
2278
 
2175
2279
  // src/ui/Radio/index.tsx
2176
- var import_jsx_runtime62 = require("react/jsx-runtime");
2280
+ var import_jsx_runtime64 = require("react/jsx-runtime");
2177
2281
  function Radio({
2178
2282
  checked = false,
2179
2283
  onChange,
@@ -2182,20 +2286,53 @@ function Radio({
2182
2286
  className = "",
2183
2287
  style = {}
2184
2288
  }) {
2185
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
2289
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
2186
2290
  width: size,
2187
2291
  height: size,
2188
2292
  ...style,
2189
2293
  // @ts-ignore
2190
2294
  "--matchid-radio-checked": color
2191
- }, children: checked && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: `matchid-radio-content`, style: {
2295
+ }, children: checked && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: `matchid-radio-content`, style: {
2192
2296
  width: Math.floor(size * 0.7),
2193
2297
  height: Math.floor(size * 0.7)
2194
2298
  } }) });
2195
2299
  }
2196
2300
 
2301
+ // src/ui/Skeleton/index.tsx
2302
+ var import_jsx_runtime65 = require("react/jsx-runtime");
2303
+ var Skeleton = ({
2304
+ style = {},
2305
+ className = "",
2306
+ width = 40,
2307
+ height = 40,
2308
+ radius = 5,
2309
+ loading = true,
2310
+ children
2311
+ }) => {
2312
+ if (!loading) {
2313
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_jsx_runtime65.Fragment, { children });
2314
+ }
2315
+ const skeletonStyle = {
2316
+ width,
2317
+ height,
2318
+ borderRadius: radius,
2319
+ ...style
2320
+ };
2321
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
2322
+ "div",
2323
+ {
2324
+ className: "matchid-skeleton " + className,
2325
+ style: skeletonStyle
2326
+ }
2327
+ );
2328
+ };
2329
+ var Skeleton_default = Skeleton;
2330
+
2331
+ // src/ui/Tabs/index.tsx
2332
+ var import_jsx_runtime66 = require("react/jsx-runtime");
2333
+
2197
2334
  // src/context/ModalContext.tsx
2198
- var import_jsx_runtime63 = require("react/jsx-runtime");
2335
+ var import_jsx_runtime67 = require("react/jsx-runtime");
2199
2336
  var ModalContext = (0, import_react9.createContext)(null);
2200
2337
  function useModal() {
2201
2338
  const context = (0, import_react9.useContext)(ModalContext);
@@ -2236,7 +2373,7 @@ var useTransactionStore = (0, import_zustand3.create)((0, import_middleware2.dev
2236
2373
  var useTransactionStore_default = useTransactionStore;
2237
2374
 
2238
2375
  // src/hooks/useWallet.tsx
2239
- var import_jsx_runtime64 = require("react/jsx-runtime");
2376
+ var import_jsx_runtime68 = require("react/jsx-runtime");
2240
2377
  var AppClientId = "react-sdk-" + getVersion();
2241
2378
  function useWallet() {
2242
2379
  const { address, wallet: walletConfig } = useLocalStore_default();
@@ -2409,7 +2546,7 @@ function useWallet() {
2409
2546
  address: evmAccount.address
2410
2547
  });
2411
2548
  modal.show((props) => {
2412
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
2549
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
2413
2550
  });
2414
2551
  clearInterval(window.matchProvider.transactionMessageIntervalMap[transactionId].interval);
2415
2552
  delete window.matchProvider.transactionMessageIntervalMap[transactionId];
@@ -2486,8 +2623,15 @@ function useCopyClipboard(timeout = 500) {
2486
2623
  // src/context/ToastContext.tsx
2487
2624
  var import_react12 = require("react");
2488
2625
  var import_react_dom2 = require("react-dom");
2489
- var import_jsx_runtime65 = require("react/jsx-runtime");
2626
+ var import_jsx_runtime69 = require("react/jsx-runtime");
2490
2627
  var ToastContext = (0, import_react12.createContext)(null);
2628
+ function useToast() {
2629
+ const context = (0, import_react12.useContext)(ToastContext);
2630
+ if (!context) {
2631
+ throw new Error("useToast must be used within a ToastProvider");
2632
+ }
2633
+ return context;
2634
+ }
2491
2635
 
2492
2636
  // src/hooks/api/wallet.ts
2493
2637
  var import_react_query2 = require("@tanstack/react-query");
@@ -2548,7 +2692,7 @@ function useImportTokenListQuery({
2548
2692
  var import_react13 = require("react");
2549
2693
  var import_viem5 = require("viem");
2550
2694
  var import_react_intl2 = require("react-intl");
2551
- var import_jsx_runtime66 = require("react/jsx-runtime");
2695
+ var import_jsx_runtime70 = require("react/jsx-runtime");
2552
2696
  function useMatchChain() {
2553
2697
  const chainListQuery = useChainListQuery();
2554
2698
  const modal = useModal();
@@ -2579,28 +2723,28 @@ function useMatchChain() {
2579
2723
  const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
2580
2724
  const [selectedChainId, setSelectedChainId] = (0, import_react13.useState)(storeChainId2);
2581
2725
  const isDownMd = useDownMd();
2582
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: `matchid-change-network-box`, children: [
2583
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
2584
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
2726
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: `matchid-change-network-box`, children: [
2727
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
2728
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
2585
2729
  "div",
2586
2730
  {
2587
2731
  onClick: () => setSelectedChainId(item.id),
2588
2732
  className: `matchid-change-network-item ${selectedChainId == item.id ? "matchid-change-network-selected" : ""}`,
2589
2733
  children: [
2590
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
2591
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
2592
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
2734
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
2735
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
2736
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
2593
2737
  ] }),
2594
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
2738
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
2595
2739
  ]
2596
2740
  },
2597
2741
  index
2598
2742
  );
2599
2743
  }) }),
2600
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
2744
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
2601
2745
  setChainId2(selectedChainId || 0);
2602
2746
  close();
2603
- }, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react_intl2.FormattedMessage, { id: "confirm" }) })
2747
+ }, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react_intl2.FormattedMessage, { id: "confirm" }) })
2604
2748
  ] });
2605
2749
  }
2606
2750
  const showChangeNetwork = () => {
@@ -2718,10 +2862,10 @@ var import_viem6 = require("viem");
2718
2862
  var import_react_query3 = require("@tanstack/react-query");
2719
2863
 
2720
2864
  // src/components/ImportToken/index.tsx
2721
- var import_jsx_runtime67 = require("react/jsx-runtime");
2865
+ var import_jsx_runtime71 = require("react/jsx-runtime");
2722
2866
 
2723
2867
  // src/hooks/useMatchWallet.tsx
2724
- var import_jsx_runtime68 = require("react/jsx-runtime");
2868
+ var import_jsx_runtime72 = require("react/jsx-runtime");
2725
2869
  function useMatchWalletRecords() {
2726
2870
  const [hasMore, setHasMore] = (0, import_react15.useState)(true);
2727
2871
  const [items, setItems] = (0, import_react15.useState)([]);
@@ -3030,39 +3174,39 @@ var CACHE_TTL2 = 86400 * 30 * 1e3;
3030
3174
  var import_zustand5 = require("zustand");
3031
3175
 
3032
3176
  // src/hooks/useConfig.tsx
3033
- var import_jsx_runtime69 = require("react/jsx-runtime");
3177
+ var import_jsx_runtime73 = require("react/jsx-runtime");
3034
3178
  var DEFAULT_WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
3035
3179
  var WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
3036
3180
  function useWalletConfig() {
3037
3181
  const isDownMd = useDownMd();
3038
3182
  const walletMap = {
3039
3183
  evm: {
3040
- icon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(EVMDarkIcon, { size: isDownMd ? 36 : 40 }),
3041
- activeIcon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(EVMLightIcon, { size: isDownMd ? 36 : 40 }),
3184
+ icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(EVMDarkIcon, { size: isDownMd ? 36 : 40 }),
3185
+ activeIcon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(EVMLightIcon, { size: isDownMd ? 36 : 40 }),
3042
3186
  name: "EVM",
3043
3187
  method: "evm"
3044
3188
  },
3045
3189
  sol: {
3046
- icon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(SOLDarkIcon, { size: isDownMd ? 36 : 40 }),
3047
- activeIcon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(SOLLightIcon, { size: isDownMd ? 36 : 40 }),
3190
+ icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(SOLDarkIcon, { size: isDownMd ? 36 : 40 }),
3191
+ activeIcon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(SOLLightIcon, { size: isDownMd ? 36 : 40 }),
3048
3192
  name: "SOL",
3049
3193
  method: "sol"
3050
3194
  },
3051
3195
  btc: {
3052
- icon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(BTCDarkIcon, { size: isDownMd ? 36 : 40 }),
3053
- activeIcon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(BTCLightIcon, { size: isDownMd ? 36 : 40 }),
3196
+ icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(BTCDarkIcon, { size: isDownMd ? 36 : 40 }),
3197
+ activeIcon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(BTCLightIcon, { size: isDownMd ? 36 : 40 }),
3054
3198
  name: "BTC",
3055
3199
  method: "btc"
3056
3200
  },
3057
3201
  tron: {
3058
- icon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(TRXDarkIcon, { size: isDownMd ? 36 : 40 }),
3059
- activeIcon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(TRXLightIcon, { size: isDownMd ? 36 : 40 }),
3202
+ icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TRXDarkIcon, { size: isDownMd ? 36 : 40 }),
3203
+ activeIcon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TRXLightIcon, { size: isDownMd ? 36 : 40 }),
3060
3204
  name: "TRON",
3061
3205
  method: "tron"
3062
3206
  },
3063
3207
  ton: {
3064
- icon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(TonLightIcon, { size: isDownMd ? 36 : 40 }),
3065
- activeIcon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(TonLightIcon2, { size: isDownMd ? 36 : 40 }),
3208
+ icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TonLightIcon, { size: isDownMd ? 36 : 40 }),
3209
+ activeIcon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TonLightIcon2, { size: isDownMd ? 36 : 40 }),
3066
3210
  name: "TON",
3067
3211
  method: "ton"
3068
3212
  }
@@ -3073,25 +3217,25 @@ function useWalletConfig() {
3073
3217
  }
3074
3218
 
3075
3219
  // src/store/useModalStore.ts
3076
- var useSOLModalStore = (0, import_zustand5.create)((set) => ({
3220
+ var useTRONModalStore = (0, import_zustand5.create)((set) => ({
3077
3221
  isOpen: false,
3078
3222
  type: "",
3079
3223
  open: (type) => set({ isOpen: true, type }),
3080
3224
  close: () => set({ isOpen: false })
3081
3225
  }));
3082
- var useTRONModalStore = (0, import_zustand5.create)((set) => ({
3226
+ var useTONModalStore = (0, import_zustand5.create)((set) => ({
3083
3227
  isOpen: false,
3084
3228
  type: "",
3085
3229
  open: (type) => set({ isOpen: true, type }),
3086
3230
  close: () => set({ isOpen: false })
3087
3231
  }));
3088
- var useTONModalStore = (0, import_zustand5.create)((set) => ({
3232
+ var useBTCModalStore = (0, import_zustand5.create)((set) => ({
3089
3233
  isOpen: false,
3090
3234
  type: "",
3091
3235
  open: (type) => set({ isOpen: true, type }),
3092
3236
  close: () => set({ isOpen: false })
3093
3237
  }));
3094
- var useBTCModalStore = (0, import_zustand5.create)((set) => ({
3238
+ var useEVMModalStore = (0, import_zustand5.create)((set) => ({
3095
3239
  isOpen: false,
3096
3240
  type: "",
3097
3241
  open: (type) => set({ isOpen: true, type }),
@@ -3114,14 +3258,14 @@ var useWalletModalStore = (0, import_zustand5.create)((set) => ({
3114
3258
  // src/components/CEXBindModal/index.tsx
3115
3259
  var import_react18 = require("react");
3116
3260
  var import_react_intl5 = require("react-intl");
3117
- var import_jsx_runtime70 = require("react/jsx-runtime");
3261
+ var import_jsx_runtime74 = require("react/jsx-runtime");
3118
3262
 
3119
3263
  // src/context/BusinessProvider.tsx
3120
3264
  var import_react_query8 = require("@tanstack/react-query");
3121
- var import_jsx_runtime71 = require("react/jsx-runtime");
3265
+ var import_jsx_runtime75 = require("react/jsx-runtime");
3122
3266
 
3123
3267
  // src/context/index.tsx
3124
- var import_jsx_runtime72 = require("react/jsx-runtime");
3268
+ var import_jsx_runtime76 = require("react/jsx-runtime");
3125
3269
 
3126
3270
  // src/hooks/useWalletInit.ts
3127
3271
  var import_react19 = require("react");
@@ -3133,7 +3277,7 @@ var import_react20 = require("react");
3133
3277
  // src/MatchContext.tsx
3134
3278
  var import_react_query9 = require("@tanstack/react-query");
3135
3279
  var import_react_intl6 = require("react-intl");
3136
- var import_jsx_runtime73 = require("react/jsx-runtime");
3280
+ var import_jsx_runtime77 = require("react/jsx-runtime");
3137
3281
  var queryClient = new import_react_query9.QueryClient();
3138
3282
  var MatchContext = (0, import_react21.createContext)(void 0);
3139
3283
  var useMatch = () => {
@@ -3160,13 +3304,17 @@ function useUserInfo() {
3160
3304
  refreshOverview
3161
3305
  } = useLocalStore_default();
3162
3306
  const { setTgAppAuthCode, emailLoginKey, setEmailLoginKey } = useStore_default();
3307
+ const isDownMd = useDownMd();
3163
3308
  const { events, login } = useMatch();
3164
- const { open: SOLOpen } = useSOLModalStore();
3309
+ const { open: EVMOpen } = useEVMModalStore();
3165
3310
  const { open: TRONOpen } = useTRONModalStore();
3166
3311
  const { open: TONOpen } = useTONModalStore();
3167
3312
  const { open: BTCOpen } = useBTCModalStore();
3168
3313
  const { open: CEXBindOpen } = useCEXBindModalStore();
3169
3314
  const walletModalStore = useWalletModalStore();
3315
+ const getRedirectUri = () => {
3316
+ return encodeURIComponent(window.location.href);
3317
+ };
3170
3318
  const isLogin = (0, import_react22.useMemo)(() => !!token && !!overview, [token, overview]);
3171
3319
  const logout = async () => {
3172
3320
  try {
@@ -3235,9 +3383,13 @@ function useUserInfo() {
3235
3383
  case "wallet":
3236
3384
  return walletModalStore.open("login", extra?.methods);
3237
3385
  case "evm":
3238
- return window.open(`${endpoints.auth}login/wallet?appid=${appid}&locale=${locale}`);
3386
+ return EVMOpen("login");
3387
+ // return window.open(`${endpoints.auth}login/wallet?appid=${appid}&locale=${locale}`)
3239
3388
  case "sol":
3240
- return SOLOpen("login");
3389
+ if (isDownMd) {
3390
+ return window.location.href = `${endpoints.auth}login/sol?appid=${appid}&locale=${locale}&redirect_uri=${getRedirectUri()}`;
3391
+ }
3392
+ return window.open(`${endpoints.auth}login/sol?appid=${appid}&locale=${locale}`);
3241
3393
  case "tron":
3242
3394
  return TRONOpen("login");
3243
3395
  case "ton":
@@ -3279,7 +3431,7 @@ function useUserInfo() {
3279
3431
  const res = await verifyEmailCodeApi(obj);
3280
3432
  if (res && res.data && isSuccess(res)) {
3281
3433
  await login({
3282
- mid: res.data.mid,
3434
+ // mid: res.data.mid,
3283
3435
  token: `${res.data.token_type} ${res.data.access_token}`
3284
3436
  });
3285
3437
  return true;
@@ -3324,9 +3476,13 @@ function useUserInfo() {
3324
3476
  case "wallet":
3325
3477
  return walletModalStore.open("bind", extra?.methods);
3326
3478
  case "evm":
3327
- return window.open(`${endpoints.auth}bind/wallet?appid=${appid}&locale=${locale}&st=` + encodeURIComponent(encodeBase64(token)));
3479
+ return EVMOpen("bind");
3480
+ // return window.open(`${endpoints.auth}bind/wallet?appid=${appid}&locale=${locale}&st=` + encodeURIComponent(encodeBase64(token)))
3328
3481
  case "sol":
3329
- return SOLOpen("bind");
3482
+ if (isDownMd) {
3483
+ return window.location.href = `${endpoints.auth}bind/sol?appid=${appid}&locale=${locale}&st=${encodeURIComponent(encodeBase64(token))}&redirect_uri=${getRedirectUri()}`;
3484
+ }
3485
+ return window.open(`${endpoints.auth}bind/sol?appid=${appid}&locale=${locale}&st=${encodeURIComponent(encodeBase64(token))}`);
3330
3486
  case "tron":
3331
3487
  return TRONOpen("bind");
3332
3488
  case "ton":
@@ -3396,6 +3552,11 @@ function useUserInfo() {
3396
3552
  window.addEventListener("message", authMessageHandle);
3397
3553
  });
3398
3554
  };
3555
+ const invite = async (invite_code) => {
3556
+ return await userInviteApi({
3557
+ invite_code
3558
+ });
3559
+ };
3399
3560
  return {
3400
3561
  loginByMethod,
3401
3562
  loginByTelegram,
@@ -3419,14 +3580,15 @@ function useUserInfo() {
3419
3580
  auth,
3420
3581
  login: loginMethod,
3421
3582
  bind,
3422
- getAuthInfo
3583
+ getAuthInfo,
3584
+ invite
3423
3585
  };
3424
3586
  }
3425
3587
 
3426
3588
  // src/components/EmailModal/StepVerify.tsx
3427
3589
  var import_react23 = require("react");
3428
3590
  var import_react_intl7 = require("react-intl");
3429
- var import_jsx_runtime74 = require("react/jsx-runtime");
3591
+ var import_jsx_runtime78 = require("react/jsx-runtime");
3430
3592
  function StepVerify(props) {
3431
3593
  const intl = (0, import_react_intl7.useIntl)();
3432
3594
  const { getLoginEmailCode, loginByEmail } = useUserInfo();
@@ -3503,17 +3665,17 @@ function StepVerify(props) {
3503
3665
  setSubmitting(false);
3504
3666
  }
3505
3667
  };
3506
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "matchid-email-verify-box", children: [
3507
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "matchid-email-verify-header", children: [
3508
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
3509
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "matchid-email-verify-header-content", children: [
3510
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "matchid-email-verify-header-value", children: props.email }),
3511
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react_intl7.FormattedMessage, { id: "sendEmailTips" }) })
3668
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-email-verify-box", children: [
3669
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-email-verify-header", children: [
3670
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
3671
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-email-verify-header-content", children: [
3672
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-email-verify-header-value", children: props.email }),
3673
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react_intl7.FormattedMessage, { id: "sendEmailTips" }) })
3512
3674
  ] })
3513
3675
  ] }),
3514
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Field, { label: intl.formatMessage({
3676
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Field, { label: intl.formatMessage({
3515
3677
  id: "verificationCode"
3516
- }), error, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
3678
+ }), error, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3517
3679
  Input,
3518
3680
  {
3519
3681
  placeholder: intl.formatMessage({
@@ -3523,7 +3685,7 @@ function StepVerify(props) {
3523
3685
  maxLength: codeLength,
3524
3686
  onChange: (e) => setCode(e.target.value),
3525
3687
  value: code,
3526
- after: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
3688
+ after: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3527
3689
  Button,
3528
3690
  {
3529
3691
  highlight: true,
@@ -3542,13 +3704,13 @@ function StepVerify(props) {
3542
3704
  )
3543
3705
  }
3544
3706
  ) }),
3545
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Button, { disabled: !canContinue, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react_intl7.FormattedMessage, { id: "continue" }) })
3707
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Button, { disabled: !canContinue, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react_intl7.FormattedMessage, { id: "continue" }) })
3546
3708
  ] });
3547
3709
  }
3548
3710
 
3549
3711
  // src/components/EmailModal/index.tsx
3550
3712
  var import_react_intl8 = require("react-intl");
3551
- var import_jsx_runtime75 = require("react/jsx-runtime");
3713
+ var import_jsx_runtime79 = require("react/jsx-runtime");
3552
3714
  function EmailModal({
3553
3715
  isOpen = false,
3554
3716
  width = 480,
@@ -3565,7 +3727,7 @@ function EmailModal({
3565
3727
  setEmailVal("");
3566
3728
  }
3567
3729
  }, [isOpen]);
3568
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
3730
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
3569
3731
  ModalWithHeader,
3570
3732
  {
3571
3733
  isOpen,
@@ -3575,10 +3737,10 @@ function EmailModal({
3575
3737
  id: "email"
3576
3738
  }),
3577
3739
  onBack: step == "verify" ? () => setStep("input") : onBack,
3578
- children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
3740
+ children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
3579
3741
  setEmailVal(email);
3580
3742
  setStep("verify");
3581
- } }) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(StepVerify, { email: emailVal, onSuccess: onLogin })
3743
+ } }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(StepVerify, { email: emailVal, onSuccess: onLogin })
3582
3744
  }
3583
3745
  );
3584
3746
  }
@@ -3608,7 +3770,7 @@ function useAppConfig() {
3608
3770
  }
3609
3771
 
3610
3772
  // src/components/LoginBox/index.tsx
3611
- var import_jsx_runtime76 = require("react/jsx-runtime");
3773
+ var import_jsx_runtime80 = require("react/jsx-runtime");
3612
3774
  var RecommendItem = ({
3613
3775
  icon,
3614
3776
  name,
@@ -3617,20 +3779,20 @@ var RecommendItem = ({
3617
3779
  children,
3618
3780
  footer
3619
3781
  }) => {
3620
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "matchid-login-recommend-method", children: [
3621
- /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "matchid-login-recommend-method-item", onClick, children: [
3622
- /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "matchid-login-recommend-method-content", children: [
3623
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "matchid-login-recommend-method-icon", children: icon }),
3624
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "matchid-login-recommend-method-name", children: name })
3782
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-recommend-method", children: [
3783
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-recommend-method-item", onClick, children: [
3784
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-recommend-method-content", children: [
3785
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-recommend-method-icon", children: icon }),
3786
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "matchid-login-recommend-method-name", children: name })
3625
3787
  ] }),
3626
- footer ? footer : children ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3788
+ footer ? footer : children ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
3627
3789
  ArrowDownIcon,
3628
3790
  {
3629
3791
  className: `matchid-login-recommend-method-arrow ${showChildren ? "matchid-login-recommend-method-arrow-active" : ""}`,
3630
3792
  size: 20,
3631
3793
  color: "var(--matchid-arrow-color)"
3632
3794
  }
3633
- ) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3795
+ ) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
3634
3796
  ArrowRightIcon,
3635
3797
  {
3636
3798
  className: "matchid-login-recommend-method-arrow",
@@ -3639,7 +3801,7 @@ var RecommendItem = ({
3639
3801
  }
3640
3802
  )
3641
3803
  ] }),
3642
- children && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3804
+ children && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
3643
3805
  "div",
3644
3806
  {
3645
3807
  className: `matchid-login-recommend-method-popover ${showChildren ? "matchid-login-recommend-method-popover-active" : ""}`,
@@ -3704,75 +3866,75 @@ function LoginBox({
3704
3866
  const isDownMd = useDownMd();
3705
3867
  const methodMap = {
3706
3868
  wallet: {
3707
- icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(WalletIcon, { size: isDownMd ? 36 : 40 }),
3869
+ icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(WalletIcon, { size: isDownMd ? 36 : 40 }),
3708
3870
  name: intl.formatMessage({ id: "wallet" }),
3709
3871
  onClick: () => setShowWallet(!showWallet),
3710
3872
  type: "wallet"
3711
3873
  },
3712
3874
  email: {
3713
- icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
3875
+ icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
3714
3876
  name: intl.formatMessage({ id: "email" }),
3715
3877
  onClick: () => {
3716
3878
  setEmailOpen(true);
3717
3879
  }
3718
3880
  },
3719
3881
  google: {
3720
- icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(GoogleIcon, { size: isDownMd ? 36 : 40 }),
3882
+ icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(GoogleIcon, { size: isDownMd ? 36 : 40 }),
3721
3883
  name: "Google",
3722
3884
  onClick: () => login("google")
3723
3885
  },
3724
3886
  twitter: {
3725
- icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(XIcon, { size: isDownMd ? 36 : 40 }),
3887
+ icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(XIcon, { size: isDownMd ? 36 : 40 }),
3726
3888
  name: "X",
3727
3889
  onClick: () => login("twitter")
3728
3890
  },
3729
3891
  telegram: {
3730
- icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TelegramIcon, { size: isDownMd ? 36 : 40 }),
3892
+ icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TelegramIcon, { size: isDownMd ? 36 : 40 }),
3731
3893
  name: "Telegram",
3732
3894
  onClick: () => login("telegram")
3733
3895
  },
3734
3896
  github: {
3735
- icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(GithubIcon, { size: isDownMd ? 36 : 40 }),
3897
+ icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(GithubIcon, { size: isDownMd ? 36 : 40 }),
3736
3898
  name: "Github",
3737
3899
  onClick: () => login("github")
3738
3900
  },
3739
3901
  discord: {
3740
- icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(DiscordIcon, { size: isDownMd ? 36 : 40 }),
3902
+ icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(DiscordIcon, { size: isDownMd ? 36 : 40 }),
3741
3903
  name: "Discord",
3742
3904
  onClick: () => login("discord")
3743
3905
  },
3744
3906
  linkedin: {
3745
- icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
3907
+ icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
3746
3908
  name: "LinkedIn",
3747
3909
  onClick: () => login("linkedin")
3748
3910
  },
3749
3911
  facebook: {
3750
- icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(FacebookIcon, { size: isDownMd ? 36 : 40 }),
3912
+ icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(FacebookIcon, { size: isDownMd ? 36 : 40 }),
3751
3913
  name: "Facebook",
3752
3914
  onClick: () => login("facebook")
3753
3915
  },
3754
3916
  youtube: {
3755
- icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
3917
+ icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
3756
3918
  name: "Youtube",
3757
3919
  onClick: () => login("youtube")
3758
3920
  }
3759
3921
  };
3760
3922
  const { walletMap } = useWalletConfig();
3761
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
3762
- (!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "matchid-login-box", children: [
3763
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
3764
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3923
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
3924
+ (!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-box", children: [
3925
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
3926
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
3765
3927
  RecommendItem,
3766
3928
  {
3767
3929
  icon: methodMap[m]?.icon,
3768
3930
  name: methodMap[m]?.name,
3769
3931
  onClick: methodMap[m]?.onClick,
3770
3932
  showChildren: m == "wallet" && showWallet,
3771
- children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
3772
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
3773
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
3933
+ children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
3934
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
3935
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
3774
3936
  const m2 = walletMap[n];
3775
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
3937
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
3776
3938
  "div",
3777
3939
  {
3778
3940
  className: "matchid-login-recommend-wallet-item",
@@ -3780,16 +3942,16 @@ function LoginBox({
3780
3942
  login(m2.method);
3781
3943
  },
3782
3944
  children: [
3783
- /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
3784
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
3785
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3945
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
3946
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
3947
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
3786
3948
  "div",
3787
3949
  {
3788
3950
  className: "matchid-login-recommend-wallet-item-hover-icon",
3789
3951
  children: m2.activeIcon
3790
3952
  }
3791
3953
  ),
3792
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3954
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
3793
3955
  "span",
3794
3956
  {
3795
3957
  className: "matchid-login-recommend-wallet-item-name",
@@ -3797,7 +3959,7 @@ function LoginBox({
3797
3959
  }
3798
3960
  )
3799
3961
  ] }),
3800
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3962
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
3801
3963
  ArrowRightIcon,
3802
3964
  {
3803
3965
  className: "matchid-login-recommend-wallet-item-arrow",
@@ -3815,10 +3977,10 @@ function LoginBox({
3815
3977
  m
3816
3978
  );
3817
3979
  }) }),
3818
- methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "matchid-login-other", children: [
3819
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react_intl9.FormattedMessage, { id: "otherLoginMethods" }) }),
3820
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
3821
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3980
+ methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-other", children: [
3981
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl9.FormattedMessage, { id: "otherLoginMethods" }) }),
3982
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
3983
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
3822
3984
  "div",
3823
3985
  {
3824
3986
  className: "matchid-login-method-item",
@@ -3831,7 +3993,7 @@ function LoginBox({
3831
3993
  }) })
3832
3994
  ] })
3833
3995
  ] }),
3834
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3996
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
3835
3997
  EmailModal,
3836
3998
  {
3837
3999
  isOpen: emailOpen,
@@ -3851,40 +4013,40 @@ var import_react27 = require("react");
3851
4013
 
3852
4014
  // src/components/LoginPanel/index.tsx
3853
4015
  var import_react_intl10 = require("react-intl");
3854
- var import_jsx_runtime77 = require("react/jsx-runtime");
4016
+ var import_jsx_runtime81 = require("react/jsx-runtime");
3855
4017
  function LoginPanel({
3856
4018
  header,
3857
4019
  onClose,
3858
4020
  ...props
3859
4021
  }) {
3860
4022
  const isDownMd = useDownMd();
3861
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "matchid-login-panel", children: [
3862
- header ? header : /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "matchid-login-panel-header", children: [
3863
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "matchid-login-panel-header-content", children: [
3864
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_intl10.FormattedMessage, { id: "loginTitle" }) }),
3865
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_intl10.FormattedMessage, { id: "loginTips" }) })
4023
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-login-panel", children: [
4024
+ header ? header : /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-login-panel-header", children: [
4025
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-login-panel-header-content", children: [
4026
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl10.FormattedMessage, { id: "loginTitle" }) }),
4027
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl10.FormattedMessage, { id: "loginTips" }) })
3866
4028
  ] }),
3867
- onClose && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
4029
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
3868
4030
  ] }),
3869
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "matchid-login-panel-divide" }),
3870
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(LoginBox, { ...props }) })
4031
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-login-panel-divide" }),
4032
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(LoginBox, { ...props }) })
3871
4033
  ] });
3872
4034
  }
3873
4035
 
3874
4036
  // src/components/LoginModal/index.tsx
3875
- var import_jsx_runtime78 = require("react/jsx-runtime");
4037
+ var import_jsx_runtime82 = require("react/jsx-runtime");
3876
4038
  function LoginModal({
3877
4039
  isOpen = false,
3878
4040
  width = 480,
3879
4041
  ...props
3880
4042
  }) {
3881
4043
  const { isLogin } = useUserInfo();
3882
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4044
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
3883
4045
  Modal,
3884
4046
  {
3885
4047
  isOpen: isOpen && !isLogin,
3886
4048
  width,
3887
- children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(LoginPanel, { ...props, inModal: true })
4049
+ children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(LoginPanel, { ...props, inModal: true })
3888
4050
  }
3889
4051
  );
3890
4052
  }
@@ -3893,10 +4055,10 @@ function LoginModal({
3893
4055
  var import_react26 = require("react");
3894
4056
 
3895
4057
  // src/assets/icon/ProfileIcon.tsx
3896
- var import_jsx_runtime79 = require("react/jsx-runtime");
4058
+ var import_jsx_runtime83 = require("react/jsx-runtime");
3897
4059
  function ProfileIcon({ size = 24, color = "black", ...props }) {
3898
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
3899
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
4060
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
4061
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
3900
4062
  "path",
3901
4063
  {
3902
4064
  fillRule: "evenodd",
@@ -3905,7 +4067,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
3905
4067
  fill: color
3906
4068
  }
3907
4069
  ),
3908
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
4070
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
3909
4071
  "path",
3910
4072
  {
3911
4073
  fillRule: "evenodd",
@@ -3919,7 +4081,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
3919
4081
 
3920
4082
  // src/components/UserPopover/index.tsx
3921
4083
  var import_react_intl11 = require("react-intl");
3922
- var import_jsx_runtime80 = require("react/jsx-runtime");
4084
+ var import_jsx_runtime84 = require("react/jsx-runtime");
3923
4085
  function UserContent() {
3924
4086
  const { logout, address, username } = useUserInfo();
3925
4087
  const [logouting, setLogouting] = (0, import_react26.useState)(false);
@@ -3940,34 +4102,34 @@ function UserContent() {
3940
4102
  rightIcon,
3941
4103
  onClick
3942
4104
  }) => {
3943
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-user-popover-item", onClick, children: [
3944
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-user-popover-item-content`, children: [
4105
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-user-popover-item", onClick, children: [
4106
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: `matchid-user-popover-item-content`, children: [
3945
4107
  icon,
3946
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-user-popover-item-text", children })
4108
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-user-popover-item-text", children })
3947
4109
  ] }),
3948
4110
  rightIcon
3949
4111
  ] });
3950
4112
  };
3951
4113
  const UserDivider = () => {
3952
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: `matchid-user-popover-divider` });
4114
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: `matchid-user-popover-divider` });
3953
4115
  };
3954
4116
  const [usernameOpen, setUsernameOpen] = (0, import_react26.useState)(false);
3955
4117
  const [copied, setCopied] = useCopyClipboard();
3956
4118
  const intl = (0, import_react_intl11.useIntl)();
3957
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-user-popover-content", children: [
3958
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-user-popover-list", children: [
3959
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(UserItem, { onClick: () => {
4119
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-user-popover-content", children: [
4120
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-user-popover-list", children: [
4121
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(UserItem, { onClick: () => {
3960
4122
  setCopied(address);
3961
- }, icon: copied ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CheckIcon, { size: 20, color: "#0ecb81" }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CopyIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CheckIcon, { size: 20, color: "var(--icon-color)" }), children: truncateAddress(address) }),
3962
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(UserDivider, {}),
3963
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(UserItem, { onClick: () => {
4123
+ }, icon: copied ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CheckIcon, { size: 20, color: "#0ecb81" }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CopyIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CheckIcon, { size: 20, color: "var(--icon-color)" }), children: truncateAddress(address) }),
4124
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(UserDivider, {}),
4125
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(UserItem, { onClick: () => {
3964
4126
  setUsernameOpen(true);
3965
- }, icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(ProfileIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(ArrowRightIcon, { size: 20, color: "var(--icon-color)" }), children: username || intl.formatMessage({
4127
+ }, icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ProfileIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ArrowRightIcon, { size: 20, color: "var(--icon-color)" }), children: username || intl.formatMessage({
3966
4128
  id: "setUsername"
3967
4129
  }) })
3968
4130
  ] }),
3969
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl11.FormattedMessage, { id: "disconnect" }) }),
3970
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(UsernameModal, { isOpen: usernameOpen, onClose: () => {
4131
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_intl11.FormattedMessage, { id: "disconnect" }) }),
4132
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(UsernameModal, { isOpen: usernameOpen, onClose: () => {
3971
4133
  setUsernameOpen(false);
3972
4134
  }, onSuccess: () => {
3973
4135
  setUsernameOpen(false);
@@ -3978,12 +4140,12 @@ function UserPopover({
3978
4140
  children,
3979
4141
  ...props
3980
4142
  }) {
3981
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Popover, { ...props, content: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(UserContent, {}), children });
4143
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Popover, { ...props, content: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(UserContent, {}), children });
3982
4144
  }
3983
4145
 
3984
4146
  // src/components/LoginButton/index.tsx
3985
4147
  var import_react_intl12 = require("react-intl");
3986
- var import_jsx_runtime81 = require("react/jsx-runtime");
4148
+ var import_jsx_runtime85 = require("react/jsx-runtime");
3987
4149
  function LoginButton({
3988
4150
  loginRender,
3989
4151
  methods,
@@ -3999,8 +4161,8 @@ function LoginButton({
3999
4161
  const { isLogin, username } = useUserInfo();
4000
4162
  const [loginOpen, setLoginOpen] = (0, import_react27.useState)(false);
4001
4163
  if (!isLogin) {
4002
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
4003
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4164
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
4165
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
4004
4166
  LoginModal,
4005
4167
  {
4006
4168
  methods,
@@ -4010,15 +4172,15 @@ function LoginButton({
4010
4172
  onClose: () => setLoginOpen(false)
4011
4173
  }
4012
4174
  ),
4013
- /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
4014
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(UnLoginIcon_default, {}),
4015
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl12.FormattedMessage, { id: "login" }) })
4175
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
4176
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(UnLoginIcon_default, {}),
4177
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl12.FormattedMessage, { id: "login" }) })
4016
4178
  ] })
4017
4179
  ] });
4018
4180
  }
4019
- return loginRender ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_jsx_runtime81.Fragment, { children: loginRender }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(UserPopover, { position: popoverPosition, type: popoverType, gap: popoverGap, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(Button, { onClick: onLoginClick, className: "matchid-login-btn", ...props, children: [
4020
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(LoginIcon_default, {}),
4021
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { children: username ? truncateAddress(username) : "MatchID " + intl.formatMessage({
4181
+ return loginRender ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_jsx_runtime85.Fragment, { children: loginRender }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(UserPopover, { position: popoverPosition, type: popoverType, gap: popoverGap, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(Button, { onClick: onLoginClick, className: "matchid-login-btn", ...props, children: [
4182
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(LoginIcon_default, {}),
4183
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: username ? truncateAddress(username) : "MatchID " + intl.formatMessage({
4022
4184
  id: "user"
4023
4185
  }) })
4024
4186
  ] }) });
@@ -4027,15 +4189,15 @@ function LoginButton({
4027
4189
  // src/components/UsernameModal/index.tsx
4028
4190
  var import_react28 = require("react");
4029
4191
  var import_react_intl13 = require("react-intl");
4030
- var import_jsx_runtime82 = require("react/jsx-runtime");
4192
+ var import_jsx_runtime86 = require("react/jsx-runtime");
4031
4193
  var ValidItem = ({
4032
4194
  success = false,
4033
4195
  text
4034
4196
  }) => {
4035
4197
  const isDownMd = useDownMd();
4036
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
4037
- success ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
4038
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { children: text })
4198
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
4199
+ success ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
4200
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: text })
4039
4201
  ] });
4040
4202
  };
4041
4203
  function UsernameModal({
@@ -4083,12 +4245,12 @@ function UsernameModal({
4083
4245
  }
4084
4246
  };
4085
4247
  const intl = (0, import_react_intl13.useIntl)();
4086
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
4248
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
4087
4249
  id: username ? "editUsernameTitle" : "setUsernameTitle"
4088
- }), children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "matchid-username-box", children: [
4089
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Field, { label: intl.formatMessage({
4250
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-username-box", children: [
4251
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Field, { label: intl.formatMessage({
4090
4252
  id: "username"
4091
- }), error, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
4253
+ }), error, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4092
4254
  Input,
4093
4255
  {
4094
4256
  placeholder: intl.formatMessage({
@@ -4101,8 +4263,8 @@ function UsernameModal({
4101
4263
  value: val
4102
4264
  }
4103
4265
  ) }),
4104
- /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "matchid-valid", children: [
4105
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
4266
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-valid", children: [
4267
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4106
4268
  ValidItem,
4107
4269
  {
4108
4270
  success: isValid,
@@ -4111,36 +4273,21 @@ function UsernameModal({
4111
4273
  })
4112
4274
  }
4113
4275
  ),
4114
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(ValidItem, { success: isLength, text: intl.formatMessage({
4276
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ValidItem, { success: isLength, text: intl.formatMessage({
4115
4277
  id: "usernameLengthError"
4116
4278
  }) })
4117
4279
  ] }),
4118
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Button, { disabled: !isSafe, loading: isSubmitting, style: {
4280
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Button, { disabled: !isSafe, loading: isSubmitting, style: {
4119
4281
  marginTop: isDownMd ? "36px" : "64px"
4120
- }, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react_intl13.FormattedMessage, { id: "confirm" }) }),
4121
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Button, { style: {
4282
+ }, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl13.FormattedMessage, { id: "confirm" }) }),
4283
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Button, { style: {
4122
4284
  marginTop: isDownMd ? "12px" : "24px"
4123
- }, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react_intl13.FormattedMessage, { id: "cancel" }) })
4285
+ }, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl13.FormattedMessage, { id: "cancel" }) })
4124
4286
  ] }) });
4125
4287
  }
4126
4288
 
4127
- // src/components/SOLModal/index.tsx
4128
- var import_react30 = __toESM(require("react"));
4129
- var import_web3 = require("@solana/web3.js");
4130
- var import_wallet_adapter_react = require("@solana/wallet-adapter-react");
4131
- var import_wallet_adapter_react_ui = require("@solana/wallet-adapter-react-ui");
4132
-
4133
- // node_modules/@solana/wallet-adapter-base/lib/esm/types.js
4134
- var WalletAdapterNetwork;
4135
- (function(WalletAdapterNetwork2) {
4136
- WalletAdapterNetwork2["Mainnet"] = "mainnet-beta";
4137
- WalletAdapterNetwork2["Testnet"] = "testnet";
4138
- WalletAdapterNetwork2["Devnet"] = "devnet";
4139
- })(WalletAdapterNetwork || (WalletAdapterNetwork = {}));
4140
-
4141
- // src/components/SOLModal/index.tsx
4142
- var import_wallet_adapter_wallets = require("@solana/wallet-adapter-wallets");
4143
- var import_styles = require("@solana/wallet-adapter-react-ui/styles.css");
4289
+ // src/components/EVMModal/index.tsx
4290
+ var import_react31 = require("react");
4144
4291
  var import_react_intl14 = require("react-intl");
4145
4292
 
4146
4293
  // src/components/WalletModalContent/index.tsx
@@ -4154,7 +4301,7 @@ var walletConnectImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEA
4154
4301
  var walletSigningImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAABAsUlEQVR4Xu19CXQUx7X2vCUveS/vJdgx+yaJHQwI8G4wzWIbG2LLNrbxPgnY7CC0SyNpJBAIECAZAbLB8gAyKGGxiFnkGJwmz47xsU0mvyEWoGW0D0jgSeK88L84/7l/fS2V3GrNaDRCEiPpfud8p3qqu6tnpvt+favqVpXJxGAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYbYvCwkKlpKREvXDhglpQUKCKz+qlS5e0z8j3N5aXl6tXrlwJMf4OBoPRDD777LPg7Ozs0MOHD1NiYiLNnTuX7rzrDho5ejj179+f+vbt69ccNGgQBQQE0LBhw2jUqFE0ZswYun3sGBo3cQxNmDiexk+8XaTBIh1LwYLfbY/vcvsnTpyofUbqjXfeeSdNnjyZHnnkEXrxxRcpKSmJfvnLX9KuXbtCz5w5ozgcjmDjs8LoQlBVNcBqtZrFjbfjIYAR/fCHP6Qf/OAH9C//8i/0z//8zw2p3P6nf/qnhtRfKH4K00B534z5kvr/71//9V/p3/7t36hHjx6aeM6cOZPWr19Pubm56tmzZ81CCHqYGF0LH3/8sW3lypXqtGnTqHfv3tpDAOLBkakkHiQ8KJ4EwOTmAfMHGoWiO1HeO2O+O+r/M5wDMfiv//ovuuu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GT4A/bH5+flJcXFxWiuuSXcDjYatZ3NdiO7orjz9tZhdg3g5oLoBbxFrG+zbt88unq8AE8P/gTaBB6Y+QP/5Xz/UbqbRYJldj7jPraGnc9G1jHal6OhotPjbTYzOhUPvHlLnL/iZFg2IBh/jA+PpwTHul3MMGvObY2vaCHw9R3ZVGfObI85pzW9pzTnGPG9szTltRf39R5UQ3cqPPvqotlApRnhyi38nBKK6RH3N/M4776CbjyZMmEB9+/bVBnfIh83kRvkl5cPRUQbQXFuEJ/p6HX8WgNb8/rYiro0uXSwzh1GkmzIyKDs721xQUKB890QxOiUqKyuDEeCTkpISumvXLlq1ahU99NBDdP/99xNi/DFqcNiwYcxOSNw7EEFecNcR4+ErMcz7hRde0Gb22bNnz+nU1FRF/egjxfgcMboYzp8/H/zll1+qvz9/Xj3/1VfqVwYWFRWhu0e9cOGCto20sLBQo3gz8P4ust/Bk3kwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDN/x/wHjsXZ4EUApzgAAAABJRU5ErkJggg==";
4155
4302
 
4156
4303
  // src/components/WalletModalContent/index.tsx
4157
- var import_jsx_runtime83 = require("react/jsx-runtime");
4304
+ var import_jsx_runtime87 = require("react/jsx-runtime");
4158
4305
  function WalletModalContent({
4159
4306
  status,
4160
4307
  error,
@@ -4224,12 +4371,93 @@ function WalletModalContent({
4224
4371
  statusImage: walletConnectImage
4225
4372
  };
4226
4373
  }, [visible, connected, status, error, address]);
4227
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: `matchid-wallet-box`, children: [
4228
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: `matchid-wallet-content`, children: [
4229
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("img", { src: pageData.statusImage }),
4230
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: pageData.isError ? "text-[#F7585E]" : "", children: pageData.text })
4374
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-wallet-box`, children: [
4375
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-wallet-content`, children: [
4376
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("img", { src: pageData.statusImage }),
4377
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: pageData.isError ? "matchid-error" : "", children: pageData.text })
4231
4378
  ] }),
4232
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
4379
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4380
+ Button,
4381
+ {
4382
+ block: true,
4383
+ size: "lg",
4384
+ onClick: pageData.btnClick,
4385
+ loading: pageData.btnLoading,
4386
+ disabled: pageData.btnDisabled,
4387
+ children: pageData.btnText
4388
+ }
4389
+ )
4390
+ ] }) });
4391
+ }
4392
+ function WalletModalContentV2(props) {
4393
+ const [submitting, setSubmitting] = (0, import_react29.useState)(false);
4394
+ const pageData = (0, import_react29.useMemo)(() => {
4395
+ const { status } = props;
4396
+ if (status == "success") {
4397
+ return {
4398
+ btnText: "Disconnect Wallet",
4399
+ btnClick: async () => {
4400
+ setSubmitting(true);
4401
+ await props.onDisconnect?.();
4402
+ setSubmitting(false);
4403
+ },
4404
+ text: "Wallet connection successful!",
4405
+ statusImage: walletConnectedImage,
4406
+ btnLoading: submitting
4407
+ };
4408
+ }
4409
+ if (status == "error") {
4410
+ return {
4411
+ text: props.error || "Unknown Error",
4412
+ btnText: "Reconnect Wallet",
4413
+ btnClick: async () => {
4414
+ setSubmitting(true);
4415
+ await props.onError?.();
4416
+ setSubmitting(false);
4417
+ },
4418
+ statusImage: walletErrorImage,
4419
+ isError: true,
4420
+ btnLoading: submitting
4421
+ };
4422
+ }
4423
+ if (status == "nonce") {
4424
+ return {
4425
+ btnLoading: true,
4426
+ text: "Connecting",
4427
+ statusImage: walletConnectingImage
4428
+ };
4429
+ }
4430
+ if (status == "signer") {
4431
+ return {
4432
+ btnLoading: true,
4433
+ text: "Signing",
4434
+ statusImage: walletSigningImage
4435
+ };
4436
+ }
4437
+ if (status == "connecting") {
4438
+ return {
4439
+ btnLoading: true,
4440
+ text: "Connecting",
4441
+ statusImage: walletConnectingImage
4442
+ };
4443
+ }
4444
+ return {
4445
+ btnText: "Connect Wallet",
4446
+ btnClick: async () => {
4447
+ setSubmitting(true);
4448
+ await props.onConnect?.();
4449
+ setSubmitting(false);
4450
+ },
4451
+ text: "Please Connect your wallet",
4452
+ statusImage: walletConnectImage
4453
+ };
4454
+ }, [props, submitting]);
4455
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-wallet-box`, children: [
4456
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-wallet-content`, children: [
4457
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("img", { src: pageData.statusImage }),
4458
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: props.status == "error" ? "matchid-error" : "", children: pageData.text })
4459
+ ] }),
4460
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
4233
4461
  Button,
4234
4462
  {
4235
4463
  block: true,
@@ -4243,162 +4471,538 @@ function WalletModalContent({
4243
4471
  ] }) });
4244
4472
  }
4245
4473
 
4246
- // src/components/SOLModal/index.tsx
4247
- var import_jsx_runtime84 = require("react/jsx-runtime");
4248
- function WalletContent({
4249
- onSuccess,
4250
- type
4474
+ // src/components/EVMModal/index.tsx
4475
+ var import_chains = require("wagmi/chains");
4476
+ var import_rainbowkit = require("@rainbow-me/rainbowkit");
4477
+ var import_wagmi2 = require("wagmi");
4478
+ var import_wallets = require("@rainbow-me/rainbowkit/wallets");
4479
+
4480
+ // src/config/chains/MatchMain.ts
4481
+ var import_viem11 = require("viem");
4482
+ var matchMain = /* @__PURE__ */ (0, import_viem11.defineChain)({
4483
+ //定义match链
4484
+ id: 698,
4485
+ name: "Matchain",
4486
+ nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
4487
+ rpcUrls: {
4488
+ default: {
4489
+ http: ["https://rpc.matchain.io"]
4490
+ }
4491
+ },
4492
+ blockExplorers: {
4493
+ default: {
4494
+ name: "Matchscan",
4495
+ url: "https://matchscan.io/",
4496
+ apiUrl: "https://matchscan.io/api"
4497
+ }
4498
+ },
4499
+ iconUrl: "https://matchscan.io/static/identicon_logos/blockies.png",
4500
+ contracts: {
4501
+ multicall3: {
4502
+ address: "0xca11bde05977b3631167028862be2a173976ca11"
4503
+ }
4504
+ }
4505
+ // testnet: true,
4506
+ });
4507
+
4508
+ // src/config/chains/MatchTest.ts
4509
+ var import_viem12 = require("viem");
4510
+ var matchTest = /* @__PURE__ */ (0, import_viem12.defineChain)({
4511
+ //定义matchTest链
4512
+ id: 699,
4513
+ name: "MatchTest",
4514
+ nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
4515
+ rpcUrls: {
4516
+ default: {
4517
+ http: ["https://testnet-rpc.matchain.io"]
4518
+ }
4519
+ },
4520
+ blockExplorers: {
4521
+ default: {
4522
+ name: "Matchscan",
4523
+ url: "https://testnet.matchscan.io/",
4524
+ apiUrl: "https://testnet.matchscan.io/api"
4525
+ }
4526
+ },
4527
+ iconUrl: "https://testnet.matchscan.io/static/identicon_logos/blockies.png",
4528
+ contracts: {
4529
+ multicall3: {
4530
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
4531
+ blockCreated: 751532
4532
+ },
4533
+ ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
4534
+ ensUniversalResolver: {
4535
+ address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",
4536
+ blockCreated: 5317080
4537
+ }
4538
+ }
4539
+ // testnet: true,
4540
+ });
4541
+
4542
+ // src/hooks/useWalletBox.ts
4543
+ var import_react30 = require("react");
4544
+ function useWalletBox({
4545
+ onInit
4251
4546
  }) {
4252
- const { setVisible, visible } = (0, import_wallet_adapter_react_ui.useWalletModal)();
4253
- const wallet = (0, import_wallet_adapter_react.useWallet)();
4254
- const { events, login } = useMatch();
4255
- const [status, setStatus] = (0, import_react30.useState)("");
4256
- const statusRef = import_react30.default.useRef(status);
4547
+ const [status, setStateStatus] = (0, import_react30.useState)("start");
4257
4548
  const [error, setError] = (0, import_react30.useState)("");
4549
+ const statusRef = (0, import_react30.useRef)(status);
4550
+ const [nonce, setNonce] = (0, import_react30.useState)();
4551
+ const setStatus = (status2) => {
4552
+ statusRef.current = status2;
4553
+ setStateStatus(status2);
4554
+ };
4555
+ const init = () => {
4556
+ setError("");
4557
+ setNonce(null);
4558
+ };
4258
4559
  (0, import_react30.useEffect)(() => {
4259
- const init = async () => {
4260
- await wallet.disconnect();
4261
- setVisible(true);
4262
- };
4263
4560
  init();
4561
+ onInit({
4562
+ setStatus
4563
+ });
4564
+ return () => {
4565
+ setStatus("start");
4566
+ setNonce(null);
4567
+ setError("");
4568
+ };
4264
4569
  }, []);
4265
- (0, import_react30.useEffect)(() => {
4266
- if (wallet.connected) {
4267
- console.log("wallet.connected", wallet.connected);
4268
- toLoginInWallet();
4570
+ return {
4571
+ status,
4572
+ statusRef,
4573
+ setStatus,
4574
+ error,
4575
+ setError,
4576
+ nonce,
4577
+ setNonce,
4578
+ init
4579
+ };
4580
+ }
4581
+
4582
+ // src/hooks/useEthersSigner.ts
4583
+ var React8 = __toESM(require("react"));
4584
+ var import_wagmi = require("wagmi");
4585
+ var import_ethers = require("ethers");
4586
+
4587
+ // node_modules/@wagmi/core/dist/esm/version.js
4588
+ var version = "2.16.3";
4589
+
4590
+ // node_modules/@wagmi/core/dist/esm/utils/getVersion.js
4591
+ var getVersion2 = () => `@wagmi/core@${version}`;
4592
+
4593
+ // node_modules/@wagmi/core/dist/esm/errors/base.js
4594
+ var __classPrivateFieldGet = function(receiver, state, kind, f) {
4595
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
4596
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4597
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
4598
+ };
4599
+ var _BaseError_instances;
4600
+ var _BaseError_walk;
4601
+ var BaseError = class _BaseError extends Error {
4602
+ get docsBaseUrl() {
4603
+ return "https://wagmi.sh/core";
4604
+ }
4605
+ get version() {
4606
+ return getVersion2();
4607
+ }
4608
+ constructor(shortMessage, options = {}) {
4609
+ super();
4610
+ _BaseError_instances.add(this);
4611
+ Object.defineProperty(this, "details", {
4612
+ enumerable: true,
4613
+ configurable: true,
4614
+ writable: true,
4615
+ value: void 0
4616
+ });
4617
+ Object.defineProperty(this, "docsPath", {
4618
+ enumerable: true,
4619
+ configurable: true,
4620
+ writable: true,
4621
+ value: void 0
4622
+ });
4623
+ Object.defineProperty(this, "metaMessages", {
4624
+ enumerable: true,
4625
+ configurable: true,
4626
+ writable: true,
4627
+ value: void 0
4628
+ });
4629
+ Object.defineProperty(this, "shortMessage", {
4630
+ enumerable: true,
4631
+ configurable: true,
4632
+ writable: true,
4633
+ value: void 0
4634
+ });
4635
+ Object.defineProperty(this, "name", {
4636
+ enumerable: true,
4637
+ configurable: true,
4638
+ writable: true,
4639
+ value: "WagmiCoreError"
4640
+ });
4641
+ const details = options.cause instanceof _BaseError ? options.cause.details : options.cause?.message ? options.cause.message : options.details;
4642
+ const docsPath = options.cause instanceof _BaseError ? options.cause.docsPath || options.docsPath : options.docsPath;
4643
+ this.message = [
4644
+ shortMessage || "An error occurred.",
4645
+ "",
4646
+ ...options.metaMessages ? [...options.metaMessages, ""] : [],
4647
+ ...docsPath ? [
4648
+ `Docs: ${this.docsBaseUrl}${docsPath}.html${options.docsSlug ? `#${options.docsSlug}` : ""}`
4649
+ ] : [],
4650
+ ...details ? [`Details: ${details}`] : [],
4651
+ `Version: ${this.version}`
4652
+ ].join("\n");
4653
+ if (options.cause)
4654
+ this.cause = options.cause;
4655
+ this.details = details;
4656
+ this.docsPath = docsPath;
4657
+ this.metaMessages = options.metaMessages;
4658
+ this.shortMessage = shortMessage;
4659
+ }
4660
+ walk(fn) {
4661
+ return __classPrivateFieldGet(this, _BaseError_instances, "m", _BaseError_walk).call(this, this, fn);
4662
+ }
4663
+ };
4664
+ _BaseError_instances = /* @__PURE__ */ new WeakSet(), _BaseError_walk = function _BaseError_walk2(err, fn) {
4665
+ if (fn?.(err))
4666
+ return err;
4667
+ if (err.cause)
4668
+ return __classPrivateFieldGet(this, _BaseError_instances, "m", _BaseError_walk2).call(this, err.cause, fn);
4669
+ return err;
4670
+ };
4671
+
4672
+ // node_modules/@wagmi/core/dist/esm/errors/config.js
4673
+ var ConnectorNotConnectedError = class extends BaseError {
4674
+ constructor() {
4675
+ super("Connector not connected.");
4676
+ Object.defineProperty(this, "name", {
4677
+ enumerable: true,
4678
+ configurable: true,
4679
+ writable: true,
4680
+ value: "ConnectorNotConnectedError"
4681
+ });
4682
+ }
4683
+ };
4684
+ var ConnectorAccountNotFoundError = class extends BaseError {
4685
+ constructor({ address, connector }) {
4686
+ super(`Account "${address}" not found for connector "${connector.name}".`);
4687
+ Object.defineProperty(this, "name", {
4688
+ enumerable: true,
4689
+ configurable: true,
4690
+ writable: true,
4691
+ value: "ConnectorAccountNotFoundError"
4692
+ });
4693
+ }
4694
+ };
4695
+ var ConnectorChainMismatchError = class extends BaseError {
4696
+ constructor({ connectionChainId, connectorChainId }) {
4697
+ super(`The current chain of the connector (id: ${connectorChainId}) does not match the connection's chain (id: ${connectionChainId}).`, {
4698
+ metaMessages: [
4699
+ `Current Chain ID: ${connectorChainId}`,
4700
+ `Expected Chain ID: ${connectionChainId}`
4701
+ ]
4702
+ });
4703
+ Object.defineProperty(this, "name", {
4704
+ enumerable: true,
4705
+ configurable: true,
4706
+ writable: true,
4707
+ value: "ConnectorChainMismatchError"
4708
+ });
4709
+ }
4710
+ };
4711
+ var ConnectorUnavailableReconnectingError = class extends BaseError {
4712
+ constructor({ connector }) {
4713
+ super(`Connector "${connector.name}" unavailable while reconnecting.`, {
4714
+ details: [
4715
+ "During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.",
4716
+ "All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.",
4717
+ "This error commonly occurs for connectors that asynchronously inject after reconnection has already started."
4718
+ ].join(" ")
4719
+ });
4720
+ Object.defineProperty(this, "name", {
4721
+ enumerable: true,
4722
+ configurable: true,
4723
+ writable: true,
4724
+ value: "ConnectorUnavailableReconnectingError"
4725
+ });
4726
+ }
4727
+ };
4728
+
4729
+ // node_modules/@wagmi/core/dist/esm/actions/getConnectorClient.js
4730
+ var import_viem13 = require("viem");
4731
+ var import_utils9 = require("viem/utils");
4732
+ async function getConnectorClient(config, parameters = {}) {
4733
+ let connection;
4734
+ if (parameters.connector) {
4735
+ const { connector: connector2 } = parameters;
4736
+ if (config.state.status === "reconnecting" && !connector2.getAccounts && !connector2.getChainId)
4737
+ throw new ConnectorUnavailableReconnectingError({ connector: connector2 });
4738
+ const [accounts, chainId2] = await Promise.all([
4739
+ connector2.getAccounts(),
4740
+ connector2.getChainId()
4741
+ ]);
4742
+ connection = {
4743
+ accounts,
4744
+ chainId: chainId2,
4745
+ connector: connector2
4746
+ };
4747
+ } else
4748
+ connection = config.state.connections.get(config.state.current);
4749
+ if (!connection)
4750
+ throw new ConnectorNotConnectedError();
4751
+ const chainId = parameters.chainId ?? connection.chainId;
4752
+ const connectorChainId = await connection.connector.getChainId();
4753
+ if (connectorChainId !== connection.chainId)
4754
+ throw new ConnectorChainMismatchError({
4755
+ connectionChainId: connection.chainId,
4756
+ connectorChainId
4757
+ });
4758
+ const connector = connection.connector;
4759
+ if (connector.getClient)
4760
+ return connector.getClient({ chainId });
4761
+ const account = (0, import_utils9.parseAccount)(parameters.account ?? connection.accounts[0]);
4762
+ account.address = (0, import_utils9.getAddress)(account.address);
4763
+ if (parameters.account && !connection.accounts.some((x) => x.toLowerCase() === account.address.toLowerCase()))
4764
+ throw new ConnectorAccountNotFoundError({
4765
+ address: account.address,
4766
+ connector
4767
+ });
4768
+ const chain = config.chains.find((chain2) => chain2.id === chainId);
4769
+ const provider = await connection.connector.getProvider({ chainId });
4770
+ return (0, import_viem13.createClient)({
4771
+ account,
4772
+ chain,
4773
+ name: "Connector Client",
4774
+ transport: (opts) => (0, import_viem13.custom)(provider)({ ...opts, retryCount: 0 })
4775
+ });
4776
+ }
4777
+
4778
+ // node_modules/@wagmi/core/dist/esm/exports/index.js
4779
+ var import_viem14 = require("viem");
4780
+
4781
+ // src/hooks/useEthersSigner.ts
4782
+ function clientToSigner(client) {
4783
+ const { account, chain, transport } = client;
4784
+ const network = {
4785
+ chainId: chain.id,
4786
+ name: chain.name,
4787
+ ensAddress: chain.contracts?.ensRegistry?.address
4788
+ };
4789
+ const provider = new import_ethers.providers.Web3Provider(transport, network);
4790
+ const signer = provider.getSigner(account.address);
4791
+ return signer;
4792
+ }
4793
+ async function getEthersSigner(config, { chainId } = {}) {
4794
+ const client = await getConnectorClient(config, { chainId });
4795
+ return clientToSigner(client);
4796
+ }
4797
+
4798
+ // src/components/EVMModal/index.tsx
4799
+ var import_siwe = require("siwe");
4800
+ var import_styles = require("@rainbow-me/rainbowkit/styles.css");
4801
+ var import_jsx_runtime88 = require("react/jsx-runtime");
4802
+ function WalletContent({
4803
+ onSuccess,
4804
+ type
4805
+ }) {
4806
+ const config = (0, import_wagmi2.useConfig)();
4807
+ const { openConnectModal, connectModalOpen } = (0, import_rainbowkit.useConnectModal)();
4808
+ const { address, connector, isConnected } = (0, import_wagmi2.useAccount)();
4809
+ const { disconnectAsync } = (0, import_wagmi2.useDisconnect)({ config });
4810
+ const chainId = (0, import_wagmi2.useChainId)();
4811
+ const { events, login } = useMatch();
4812
+ const [inited, setInited] = (0, import_react31.useState)(false);
4813
+ const { status, setStatus, error, setError, statusRef, nonce, setNonce, init } = useWalletBox({
4814
+ onInit: async ({ setStatus: setStatus2 }) => {
4815
+ setStatus2("start");
4269
4816
  }
4270
- }, [wallet.connected]);
4271
- const toLoginInWallet = async () => {
4272
- if (statusRef.current) return;
4273
- const address = wallet.publicKey?.toBase58() || "";
4817
+ });
4818
+ (0, import_react31.useEffect)(() => {
4819
+ matchlog_default.log(`status=${status}`, `connectModalOpen=${connectModalOpen}`, `address=${address}`, `isConnected=${isConnected}`);
4820
+ }, [status, connectModalOpen, isConnected, address]);
4821
+ (0, import_react31.useEffect)(() => {
4822
+ if (connectModalOpen) {
4823
+ setStatus("connecting");
4824
+ return;
4825
+ }
4826
+ if (!connectModalOpen && address) {
4827
+ toLoginInWallet(address);
4828
+ return;
4829
+ }
4830
+ if (!connectModalOpen && !address) {
4831
+ setStatus("start");
4832
+ }
4833
+ }, [connectModalOpen, address]);
4834
+ (0, import_react31.useEffect)(() => {
4835
+ if (openConnectModal && !isConnected && !inited) {
4836
+ openConnectModal && openConnectModal();
4837
+ setInited(true);
4838
+ }
4839
+ }, [openConnectModal, inited]);
4840
+ const toLoginInWallet = async (address2) => {
4841
+ if (statusRef.current != "start" && statusRef.current != "connecting") return;
4274
4842
  try {
4843
+ if (!address2) {
4844
+ throw new Error("Wallet address is empty");
4845
+ }
4275
4846
  setStatus("nonce");
4276
- statusRef.current = "nonce";
4277
4847
  const res = type == "bind" ? await getWalletInitApi({
4848
+ address: address2,
4849
+ type: "EVM"
4850
+ }) : await getWalletNonceApi({ address: address2, type: "EVM" });
4851
+ if (!isSuccess(res)) {
4852
+ throw new Error(res.message);
4853
+ }
4854
+ setNonce(res.data.nonce);
4855
+ } catch (error2) {
4856
+ console.error("toLoginInWallet", error2);
4857
+ setStatus("error");
4858
+ setError(error2.message);
4859
+ }
4860
+ };
4861
+ const signature = (0, import_react31.useCallback)(async () => {
4862
+ if (!nonce || status != "nonce") {
4863
+ return;
4864
+ }
4865
+ try {
4866
+ const signer = await getEthersSigner(config);
4867
+ if (!signer) return;
4868
+ matchlog_default.log("signature", nonce, status);
4869
+ if (!address) {
4870
+ throw new Error("Wallet address is empty");
4871
+ }
4872
+ setStatus("signer");
4873
+ const params = {
4874
+ domain: window.location.host,
4278
4875
  address,
4279
- type: "SOL"
4280
- }) : await getWalletNonceApi({ address, type: "SOL" });
4876
+ statement: "By signing, you are proving you own this wallet and logging in. This does not initiate a transaction or cost any fees.",
4877
+ uri: window.location.origin,
4878
+ nonce,
4879
+ version: "1",
4880
+ chainId
4881
+ };
4882
+ const message = new import_siwe.SiweMessage({ ...params });
4883
+ const signature2 = await signer.signMessage(message.prepareMessage());
4884
+ const obj = {
4885
+ type: "EVM",
4886
+ address,
4887
+ signature: signature2,
4888
+ message: `${message.prepareMessage()}`,
4889
+ connector_type: connector?.type || "",
4890
+ wallet_client_type: connector?.name || ""
4891
+ };
4892
+ const res = type == "bind" ? await toBindWalletApi(obj) : await loginByWalletApi(obj);
4281
4893
  if (!isSuccess(res)) {
4282
4894
  throw new Error(res.message);
4283
4895
  }
4284
- const nonce = res.code >= 0 ? res.data.nonce : null;
4285
- if (nonce) {
4286
- setStatus("signer");
4287
- statusRef.current = "signer";
4288
- const message = "By signing, you are proving you own this wallet and logging in. This does not initiate a transaction or cost any fees.Nonce:" + res.data.nonce;
4289
- const encodedMessage = new TextEncoder().encode(message);
4290
- const signedMessage = await wallet.signMessage(encodedMessage);
4291
- let obj = {
4292
- type: "SOL",
4293
- address,
4294
- signature: Buffer.from(signedMessage).toString("base64"),
4295
- message,
4296
- connector_type: "SOL",
4297
- wallet_client_type: wallet.wallet?.adapter.name || ""
4298
- };
4299
- const res1 = type == "bind" ? await toBindWalletApi(obj) : await loginByWalletApi(obj);
4300
- if (res1) {
4301
- if (!isSuccess(res1)) {
4302
- throw new Error(res1.message);
4303
- }
4304
- matchlog_default.log(res1);
4305
- setStatus("success");
4306
- statusRef.current = "success";
4307
- if (type == "bind") {
4308
- events.onBind && events.onBind({
4309
- type: "sol"
4310
- });
4311
- eventManager_default.emit("onBind", {
4312
- type: "sol"
4313
- });
4314
- } else {
4315
- await login({
4316
- mid: res1.data.mid,
4317
- token: `${res1.data.token_type} ${res1.data.access_token}`
4318
- });
4319
- }
4320
- onSuccess && onSuccess();
4321
- }
4896
+ matchlog_default.log(res);
4897
+ setStatus("success");
4898
+ if (type == "bind") {
4899
+ events.onBind && events.onBind({
4900
+ type: "evm"
4901
+ });
4902
+ eventManager_default.emit("onBind", {
4903
+ type: "evm"
4904
+ });
4905
+ } else {
4906
+ await login({
4907
+ token: `${res.data.token_type} ${res.data.access_token}`
4908
+ });
4322
4909
  }
4910
+ onSuccess && onSuccess();
4323
4911
  } catch (error2) {
4912
+ console.error("signature", error2);
4324
4913
  setStatus("error");
4325
- setError(error2.message);
4326
- statusRef.current = "";
4914
+ setError(error2.reason || error2.message);
4915
+ }
4916
+ }, [nonce, status, address]);
4917
+ (0, import_react31.useEffect)(() => {
4918
+ if (signature) {
4919
+ signature();
4327
4920
  }
4921
+ }, [signature]);
4922
+ const onError = async () => {
4923
+ if (isConnected) {
4924
+ try {
4925
+ await disconnectAsync();
4926
+ } catch (error2) {
4927
+ console.error("disconnectAsync", error2);
4928
+ }
4929
+ }
4930
+ setError("");
4931
+ setNonce(void 0);
4932
+ setStatus("start");
4933
+ openConnectModal?.();
4328
4934
  };
4329
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
4330
- WalletModalContent,
4935
+ const onConnect = async () => {
4936
+ if (isConnected) {
4937
+ try {
4938
+ await disconnectAsync();
4939
+ } catch (error2) {
4940
+ console.error("disconnectAsync", error2);
4941
+ }
4942
+ }
4943
+ setError("");
4944
+ setNonce(void 0);
4945
+ openConnectModal?.();
4946
+ };
4947
+ const onDisconnect = async () => {
4948
+ if (isConnected) {
4949
+ try {
4950
+ await disconnectAsync();
4951
+ } catch (error2) {
4952
+ console.error("disconnectAsync", error2);
4953
+ }
4954
+ }
4955
+ setError("");
4956
+ setNonce(void 0);
4957
+ setStatus("start");
4958
+ };
4959
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
4960
+ WalletModalContentV2,
4331
4961
  {
4332
- connected: wallet.connected,
4333
- disconnect: wallet.disconnect,
4334
- address: wallet.publicKey?.toBase58(),
4335
- visible,
4336
- setVisible,
4962
+ status,
4963
+ onSuccess: async () => onSuccess?.(),
4337
4964
  error,
4338
- setError,
4339
- status
4965
+ onError,
4966
+ onConnect,
4967
+ onDisconnect
4340
4968
  }
4341
4969
  );
4342
4970
  }
4343
- var wallets = [
4344
- new import_wallet_adapter_wallets.PhantomWalletAdapter(),
4345
- new import_wallet_adapter_wallets.SolflareWalletAdapter(),
4346
- new import_wallet_adapter_wallets.WalletConnectWalletAdapter({
4347
- network: WalletAdapterNetwork.Mainnet,
4348
- options: {
4349
- relayUrl: "wss://relay.walletconnect.com"
4971
+ var wagmiConfig = (0, import_rainbowkit.getDefaultConfig)({
4972
+ appName: "MatchID",
4973
+ projectId: "9ac6ea7e07860f04616fb311b447dee9",
4974
+ wallets: [
4975
+ {
4976
+ groupName: "Recommended",
4977
+ wallets: [
4978
+ import_wallets.metaMaskWallet,
4979
+ import_wallets.walletConnectWallet,
4980
+ import_wallets.okxWallet,
4981
+ import_wallets.bitgetWallet,
4982
+ import_wallets.injectedWallet
4983
+ ]
4350
4984
  }
4351
- }),
4352
- new import_wallet_adapter_wallets.AlphaWalletAdapter(),
4353
- new import_wallet_adapter_wallets.AvanaWalletAdapter(),
4354
- new import_wallet_adapter_wallets.BitgetWalletAdapter(),
4355
- new import_wallet_adapter_wallets.BitpieWalletAdapter(),
4356
- new import_wallet_adapter_wallets.CloverWalletAdapter(),
4357
- new import_wallet_adapter_wallets.Coin98WalletAdapter(),
4358
- new import_wallet_adapter_wallets.CoinbaseWalletAdapter(),
4359
- new import_wallet_adapter_wallets.CoinhubWalletAdapter(),
4360
- new import_wallet_adapter_wallets.FractalWalletAdapter(),
4361
- new import_wallet_adapter_wallets.HuobiWalletAdapter(),
4362
- new import_wallet_adapter_wallets.HyperPayWalletAdapter(),
4363
- new import_wallet_adapter_wallets.KeystoneWalletAdapter(),
4364
- new import_wallet_adapter_wallets.KrystalWalletAdapter(),
4365
- new import_wallet_adapter_wallets.LedgerWalletAdapter(),
4366
- new import_wallet_adapter_wallets.MathWalletAdapter(),
4367
- new import_wallet_adapter_wallets.NekoWalletAdapter(),
4368
- new import_wallet_adapter_wallets.NightlyWalletAdapter(),
4369
- new import_wallet_adapter_wallets.NufiWalletAdapter(),
4370
- new import_wallet_adapter_wallets.OntoWalletAdapter(),
4371
- new import_wallet_adapter_wallets.ParticleAdapter(),
4372
- new import_wallet_adapter_wallets.SafePalWalletAdapter(),
4373
- new import_wallet_adapter_wallets.SaifuWalletAdapter(),
4374
- new import_wallet_adapter_wallets.SalmonWalletAdapter(),
4375
- new import_wallet_adapter_wallets.SkyWalletAdapter(),
4376
- new import_wallet_adapter_wallets.SolongWalletAdapter(),
4377
- new import_wallet_adapter_wallets.SpotWalletAdapter(),
4378
- new import_wallet_adapter_wallets.TokenaryWalletAdapter(),
4379
- new import_wallet_adapter_wallets.TokenPocketWalletAdapter(),
4380
- new import_wallet_adapter_wallets.TorusWalletAdapter(),
4381
- new import_wallet_adapter_wallets.TrustWalletAdapter(),
4382
- new import_wallet_adapter_wallets.XDEFIWalletAdapter()
4383
- ];
4384
- function SOLConnectModal({
4985
+ ],
4986
+ chains: [import_chains.mainnet, import_chains.polygon, import_chains.optimism, import_chains.arbitrum, import_chains.base, matchMain, matchTest, import_chains.bsc]
4987
+ });
4988
+ function EVMConnectModal({
4385
4989
  type = "login",
4386
4990
  onSuccess,
4387
4991
  ...props
4388
4992
  }) {
4389
4993
  const intl = (0, import_react_intl14.useIntl)();
4390
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
4994
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
4391
4995
  id: type == "bind" ? "bindWith" : "loginWith"
4392
4996
  }, {
4393
- name: "SOL"
4394
- }), children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_wallet_adapter_react.ConnectionProvider, { endpoint: (0, import_web3.clusterApiUrl)("devnet"), children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_wallet_adapter_react.WalletProvider, { wallets, autoConnect: true, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_wallet_adapter_react_ui.WalletModalProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(WalletContent, { onSuccess, type }) }) }) }) });
4997
+ name: "EVM"
4998
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_wagmi2.WagmiProvider, { config: wagmiConfig, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_rainbowkit.RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(WalletContent, { onSuccess, type }) }) }) });
4395
4999
  }
4396
- function SOLModal(props) {
4397
- return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(SOLConnectModal, { ...props });
5000
+ function EVMModal(props) {
5001
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(EVMConnectModal, { ...props });
4398
5002
  }
4399
5003
 
4400
5004
  // src/components/TRONModal/index.tsx
4401
- var import_react32 = __toESM(require("react"));
5005
+ var import_react33 = __toESM(require("react"));
4402
5006
  var import_react_intl15 = require("react-intl");
4403
5007
 
4404
5008
  // src/lib/tron/TronLinkAdapter.ts
@@ -4432,7 +5036,7 @@ var TronLinkAdapter = class {
4432
5036
  };
4433
5037
 
4434
5038
  // src/hooks/useTRONWallet.ts
4435
- var import_react31 = require("react");
5039
+ var import_react32 = require("react");
4436
5040
 
4437
5041
  // src/lib/tron/BitgetAdapter.ts
4438
5042
  var BitgetAdapter = class {
@@ -4476,12 +5080,12 @@ var OKXAdapter = class {
4476
5080
 
4477
5081
  // src/hooks/useTRONWallet.ts
4478
5082
  var useTRONWallet = () => {
4479
- const wallets2 = [new TronLinkAdapter(), new BitgetAdapter(), new OKXAdapter()];
4480
- const [installedWallets, setInstalledWallets] = (0, import_react31.useState)([]);
4481
- const [address, setAddress] = (0, import_react31.useState)(null);
4482
- (0, import_react31.useEffect)(() => {
5083
+ const wallets = [new TronLinkAdapter(), new BitgetAdapter(), new OKXAdapter()];
5084
+ const [installedWallets, setInstalledWallets] = (0, import_react32.useState)([]);
5085
+ const [address, setAddress] = (0, import_react32.useState)(null);
5086
+ (0, import_react32.useEffect)(() => {
4483
5087
  const getInstalled = async () => {
4484
- const installed = await Promise.all(wallets2.map((wallet2) => wallet2.isInstalled().then((isInstalled) => ({
5088
+ const installed = await Promise.all(wallets.map((wallet2) => wallet2.isInstalled().then((isInstalled) => ({
4485
5089
  wallet: wallet2,
4486
5090
  isInstalled
4487
5091
  }))));
@@ -4489,18 +5093,18 @@ var useTRONWallet = () => {
4489
5093
  };
4490
5094
  getInstalled();
4491
5095
  }, []);
4492
- const [wallet, chooseWallet] = (0, import_react31.useState)(null);
5096
+ const [wallet, chooseWallet] = (0, import_react32.useState)(null);
4493
5097
  const onConnect = async () => {
4494
5098
  setAddress(await wallet.connect());
4495
5099
  };
4496
- (0, import_react31.useEffect)(() => {
5100
+ (0, import_react32.useEffect)(() => {
4497
5101
  if (!wallet) {
4498
5102
  setAddress(null);
4499
5103
  }
4500
5104
  }, [wallet]);
4501
5105
  return {
4502
5106
  installedWallets,
4503
- wallets: wallets2,
5107
+ wallets,
4504
5108
  chooseWallet,
4505
5109
  wallet,
4506
5110
  address,
@@ -4509,7 +5113,7 @@ var useTRONWallet = () => {
4509
5113
  };
4510
5114
 
4511
5115
  // src/components/TRONModal/index.tsx
4512
- var import_jsx_runtime85 = require("react/jsx-runtime");
5116
+ var import_jsx_runtime89 = require("react/jsx-runtime");
4513
5117
  function TRONConnectModal({
4514
5118
  type = "login",
4515
5119
  onSuccess,
@@ -4517,17 +5121,17 @@ function TRONConnectModal({
4517
5121
  }) {
4518
5122
  const isDownMd = useDownMd();
4519
5123
  const intl = (0, import_react_intl15.useIntl)();
4520
- const { wallets: wallets2, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
5124
+ const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
4521
5125
  const iconMaps = {
4522
- tronlink: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
4523
- bitget: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(BitgetIcon, { size: isDownMd ? 36 : 40 }),
4524
- okx: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(OKXIcon, { size: isDownMd ? 36 : 40 })
5126
+ tronlink: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
5127
+ bitget: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(BitgetIcon, { size: isDownMd ? 36 : 40 }),
5128
+ okx: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(OKXIcon, { size: isDownMd ? 36 : 40 })
4525
5129
  };
4526
5130
  const { events, login } = useMatch();
4527
- const [status, setStatus] = (0, import_react32.useState)("");
4528
- const statusRef = import_react32.default.useRef(status);
4529
- const [error, setError] = (0, import_react32.useState)("");
4530
- const connected = (0, import_react32.useMemo)(() => {
5131
+ const [status, setStatus] = (0, import_react33.useState)("");
5132
+ const statusRef = import_react33.default.useRef(status);
5133
+ const [error, setError] = (0, import_react33.useState)("");
5134
+ const connected = (0, import_react33.useMemo)(() => {
4531
5135
  return !!address;
4532
5136
  }, [address]);
4533
5137
  const disconnect = async () => {
@@ -4582,7 +5186,7 @@ function TRONConnectModal({
4582
5186
  });
4583
5187
  } else {
4584
5188
  await login({
4585
- mid: res1.data.mid,
5189
+ // mid: res1.data.mid,
4586
5190
  token: `${res1.data.token_type} ${res1.data.access_token}`
4587
5191
  });
4588
5192
  }
@@ -4595,7 +5199,7 @@ function TRONConnectModal({
4595
5199
  statusRef.current = "";
4596
5200
  }
4597
5201
  };
4598
- (0, import_react32.useEffect)(() => {
5202
+ (0, import_react33.useEffect)(() => {
4599
5203
  if (wallet) {
4600
5204
  console.log("onConnect");
4601
5205
  onConnect();
@@ -4603,21 +5207,21 @@ function TRONConnectModal({
4603
5207
  setStatus("");
4604
5208
  }
4605
5209
  }, [wallet]);
4606
- (0, import_react32.useEffect)(() => {
5210
+ (0, import_react33.useEffect)(() => {
4607
5211
  if (address) {
4608
5212
  toLoginInWallet();
4609
5213
  }
4610
5214
  }, [address]);
4611
- (0, import_react32.useEffect)(() => {
5215
+ (0, import_react33.useEffect)(() => {
4612
5216
  if (!props.isOpen) {
4613
5217
  disconnect();
4614
5218
  }
4615
5219
  }, [props.isOpen]);
4616
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
5220
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
4617
5221
  id: type == "bind" ? "bindWith" : "loginWith"
4618
5222
  }, {
4619
5223
  name: "TRON"
4620
- }), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
5224
+ }), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
4621
5225
  WalletModalContent,
4622
5226
  {
4623
5227
  error,
@@ -4630,9 +5234,9 @@ function TRONConnectModal({
4630
5234
  setVisible: () => {
4631
5235
  }
4632
5236
  }
4633
- ) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-login-recommend-list", children: [
5237
+ ) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "matchid-login-recommend-list", children: [
4634
5238
  installedWallets.map((wallet2) => {
4635
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
5239
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
4636
5240
  RecommendItem,
4637
5241
  {
4638
5242
  icon: iconMaps[wallet2.walletKey],
@@ -4644,15 +5248,15 @@ function TRONConnectModal({
4644
5248
  wallet2.walletKey
4645
5249
  );
4646
5250
  }),
4647
- wallets2.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
4648
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
5251
+ wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
5252
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
4649
5253
  RecommendItem,
4650
5254
  {
4651
5255
  icon: iconMaps[wallet2.walletKey],
4652
5256
  name: wallet2.name,
4653
5257
  onClick: () => {
4654
5258
  },
4655
- footer: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Button, { size: "sm", onClick: () => {
5259
+ footer: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Button, { size: "sm", onClick: () => {
4656
5260
  window.open(wallet2.website);
4657
5261
  }, children: "Install" })
4658
5262
  },
@@ -4662,28 +5266,28 @@ function TRONConnectModal({
4662
5266
  ] }) }) });
4663
5267
  }
4664
5268
  function TRONModal(props) {
4665
- return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TRONConnectModal, { ...props, type: props.type });
5269
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(TRONConnectModal, { ...props, type: props.type });
4666
5270
  }
4667
5271
 
4668
5272
  // src/components/TONModal/index.tsx
4669
- var import_react33 = __toESM(require("react"));
5273
+ var import_react34 = __toESM(require("react"));
4670
5274
  var import_react_intl16 = require("react-intl");
4671
5275
  var import_ui_react = require("@tonconnect/ui-react");
4672
- var import_jsx_runtime86 = require("react/jsx-runtime");
5276
+ var import_jsx_runtime90 = require("react/jsx-runtime");
4673
5277
  function WalletContent2({
4674
5278
  onSuccess,
4675
5279
  type
4676
5280
  }) {
4677
5281
  const { events, login } = useMatch();
4678
- const [connected, setConnected] = (0, import_react33.useState)(false);
5282
+ const [connected, setConnected] = (0, import_react34.useState)(false);
4679
5283
  const wallet = (0, import_ui_react.useTonWallet)();
4680
5284
  const userFriendlyAddress = (0, import_ui_react.useTonAddress)();
4681
5285
  const [tonConnectUI] = (0, import_ui_react.useTonConnectUI)();
4682
5286
  const { state, open, close } = (0, import_ui_react.useTonConnectModal)();
4683
- const [status, setStatus] = (0, import_react33.useState)("");
4684
- const statusRef = import_react33.default.useRef(status);
4685
- const [error, setError] = (0, import_react33.useState)("");
4686
- (0, import_react33.useEffect)(() => {
5287
+ const [status, setStatus] = (0, import_react34.useState)("");
5288
+ const statusRef = import_react34.default.useRef(status);
5289
+ const [error, setError] = (0, import_react34.useState)("");
5290
+ (0, import_react34.useEffect)(() => {
4687
5291
  const init = async () => {
4688
5292
  if (tonConnectUI.connected) {
4689
5293
  await tonConnectUI.disconnect();
@@ -4740,7 +5344,7 @@ function WalletContent2({
4740
5344
  });
4741
5345
  } else {
4742
5346
  await login({
4743
- mid: res1.data.mid,
5347
+ // mid: res1.data.mid,
4744
5348
  token: `${res1.data.token_type} ${res1.data.access_token}`
4745
5349
  });
4746
5350
  }
@@ -4756,7 +5360,7 @@ function WalletContent2({
4756
5360
  }
4757
5361
  });
4758
5362
  }, []);
4759
- (0, import_react33.useEffect)(() => {
5363
+ (0, import_react34.useEffect)(() => {
4760
5364
  if (wallet) {
4761
5365
  setConnected(true);
4762
5366
  console.log("Wallet connected:", wallet);
@@ -4767,7 +5371,7 @@ function WalletContent2({
4767
5371
  setStatus("");
4768
5372
  }
4769
5373
  }, [wallet]);
4770
- (0, import_react33.useEffect)(() => {
5374
+ (0, import_react34.useEffect)(() => {
4771
5375
  console.log({
4772
5376
  state,
4773
5377
  wallet
@@ -4796,7 +5400,7 @@ function WalletContent2({
4796
5400
  }
4797
5401
  }
4798
5402
  }, [state]);
4799
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
5403
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
4800
5404
  WalletModalContent,
4801
5405
  {
4802
5406
  connected,
@@ -4830,24 +5434,24 @@ function TONConnectModal({
4830
5434
  const intl = (0, import_react_intl16.useIntl)();
4831
5435
  const { endpoints, appid } = useLocalStore_default();
4832
5436
  const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
4833
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
5437
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
4834
5438
  id: type == "bind" ? "bindWith" : "loginWith"
4835
5439
  }, {
4836
5440
  name: "TON"
4837
- }), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
5441
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
4838
5442
  import_ui_react.TonConnectUIProvider,
4839
5443
  {
4840
5444
  manifestUrl,
4841
- children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(WalletContent2, { onSuccess, type })
5445
+ children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(WalletContent2, { onSuccess, type })
4842
5446
  }
4843
5447
  ) });
4844
5448
  }
4845
5449
  function TONModal(props) {
4846
- return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TONConnectModal, { ...props });
5450
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(TONConnectModal, { ...props });
4847
5451
  }
4848
5452
 
4849
5453
  // src/components/BTCModal/index.tsx
4850
- var import_react35 = __toESM(require("react"));
5454
+ var import_react36 = __toESM(require("react"));
4851
5455
  var import_react_intl17 = require("react-intl");
4852
5456
 
4853
5457
  // src/lib/btc/UnisatAdapter.ts
@@ -4988,7 +5592,7 @@ var LeatherAdapter = class {
4988
5592
  return response.result.addresses[0].address;
4989
5593
  }
4990
5594
  async signMessage(message) {
4991
- if (!await this.isInstalled()) throw new Error("Hiro Wallet is not installed");
5595
+ if (!await this.isInstalled()) throw new Error("Leather Wallet is not installed");
4992
5596
  const response = await window.LeatherProvider?.request("signMessage", { message });
4993
5597
  matchlog_default.log("response", response);
4994
5598
  return response.result.signature;
@@ -4996,14 +5600,49 @@ var LeatherAdapter = class {
4996
5600
  };
4997
5601
 
4998
5602
  // src/hooks/useBTCWallet.ts
4999
- var import_react34 = require("react");
5603
+ var import_react35 = require("react");
5604
+
5605
+ // src/lib/btc/PhantomAdapter.ts
5606
+ var PhantomAdapter = class {
5607
+ constructor() {
5608
+ this.name = "Phantom Wallet";
5609
+ this.website = "https://www.phantom.com/";
5610
+ this.walletKey = "phantom";
5611
+ }
5612
+ async isInstalled() {
5613
+ return typeof window.phantom !== "undefined" && typeof window.phantom.bitcoin !== "undefined";
5614
+ }
5615
+ async connect() {
5616
+ if (!await this.isInstalled()) throw new Error("Phantom Wallet is not installed");
5617
+ const response = await window.phantom.bitcoin.requestAccounts();
5618
+ const ordinalAddress = response.find((n) => n.purpose == "ordinals");
5619
+ matchlog_default.log("Addresses:", ordinalAddress);
5620
+ if (!ordinalAddress) {
5621
+ throw new Error("No addresses found in Phantom Wallet");
5622
+ }
5623
+ return ordinalAddress.address;
5624
+ }
5625
+ async signMessage(message) {
5626
+ if (!await this.isInstalled()) throw new Error("Phantom Wallet is not installed");
5627
+ const address = await this.connect();
5628
+ try {
5629
+ const { signature } = await window.phantom.bitcoin.signMessage(address, new TextEncoder().encode(message));
5630
+ return bytesToBase64(signature);
5631
+ } catch (error) {
5632
+ console.error(error);
5633
+ throw error;
5634
+ }
5635
+ }
5636
+ };
5637
+
5638
+ // src/hooks/useBTCWallet.ts
5000
5639
  var useBTCWallet = () => {
5001
- const wallets2 = [new UnisatAdapter(), new XverseAdapter(), new LeatherAdapter()];
5002
- const [installedWallets, setInstalledWallets] = (0, import_react34.useState)([]);
5003
- const [address, setAddress] = (0, import_react34.useState)(null);
5004
- (0, import_react34.useEffect)(() => {
5640
+ const wallets = [new UnisatAdapter(), new XverseAdapter(), new LeatherAdapter(), new PhantomAdapter()];
5641
+ const [installedWallets, setInstalledWallets] = (0, import_react35.useState)([]);
5642
+ const [address, setAddress] = (0, import_react35.useState)(null);
5643
+ (0, import_react35.useEffect)(() => {
5005
5644
  const getInstalled = async () => {
5006
- const installed = await Promise.all(wallets2.map((wallet2) => wallet2.isInstalled().then((isInstalled) => ({
5645
+ const installed = await Promise.all(wallets.map((wallet2) => wallet2.isInstalled().then((isInstalled) => ({
5007
5646
  wallet: wallet2,
5008
5647
  isInstalled
5009
5648
  }))));
@@ -5011,18 +5650,18 @@ var useBTCWallet = () => {
5011
5650
  };
5012
5651
  getInstalled();
5013
5652
  }, []);
5014
- const [wallet, chooseWallet] = (0, import_react34.useState)(null);
5653
+ const [wallet, chooseWallet] = (0, import_react35.useState)(null);
5015
5654
  const onConnect = async () => {
5016
5655
  setAddress(await wallet.connect());
5017
5656
  };
5018
- (0, import_react34.useEffect)(() => {
5657
+ (0, import_react35.useEffect)(() => {
5019
5658
  if (!wallet) {
5020
5659
  setAddress(null);
5021
5660
  }
5022
5661
  }, [wallet]);
5023
5662
  return {
5024
5663
  installedWallets,
5025
- wallets: wallets2,
5664
+ wallets,
5026
5665
  chooseWallet,
5027
5666
  wallet,
5028
5667
  address,
@@ -5031,7 +5670,7 @@ var useBTCWallet = () => {
5031
5670
  };
5032
5671
 
5033
5672
  // src/components/BTCModal/index.tsx
5034
- var import_jsx_runtime87 = require("react/jsx-runtime");
5673
+ var import_jsx_runtime91 = require("react/jsx-runtime");
5035
5674
  function BTCConnectModal({
5036
5675
  type = "login",
5037
5676
  onSuccess,
@@ -5039,17 +5678,18 @@ function BTCConnectModal({
5039
5678
  }) {
5040
5679
  const isDownMd = useDownMd();
5041
5680
  const intl = (0, import_react_intl17.useIntl)();
5042
- const { wallets: wallets2, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
5681
+ const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
5043
5682
  const iconMaps = {
5044
- leather: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(LeatherIcon, { size: isDownMd ? 36 : 40 }),
5045
- unisat: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(UnisatIcon, { size: isDownMd ? 36 : 40 }),
5046
- xverse: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(XverseIcon, { size: isDownMd ? 36 : 40 })
5683
+ leather: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(LeatherIcon, { size: isDownMd ? 36 : 40 }),
5684
+ unisat: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UnisatIcon, { size: isDownMd ? 36 : 40 }),
5685
+ xverse: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(XverseIcon, { size: isDownMd ? 36 : 40 }),
5686
+ phantom: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(PhantomIcon, { size: isDownMd ? 36 : 40 })
5047
5687
  };
5048
5688
  const { events, login } = useMatch();
5049
- const [status, setStatus] = (0, import_react35.useState)("");
5050
- const statusRef = import_react35.default.useRef(status);
5051
- const [error, setError] = (0, import_react35.useState)("");
5052
- const connected = (0, import_react35.useMemo)(() => {
5689
+ const [status, setStatus] = (0, import_react36.useState)("");
5690
+ const statusRef = import_react36.default.useRef(status);
5691
+ const [error, setError] = (0, import_react36.useState)("");
5692
+ const connected = (0, import_react36.useMemo)(() => {
5053
5693
  return !!address;
5054
5694
  }, [address]);
5055
5695
  const disconnect = async () => {
@@ -5099,7 +5739,7 @@ function BTCConnectModal({
5099
5739
  });
5100
5740
  } else {
5101
5741
  await login({
5102
- mid: res1.data.mid,
5742
+ // mid: res1.data.mid,
5103
5743
  token: `${res1.data.token_type} ${res1.data.access_token}`
5104
5744
  });
5105
5745
  }
@@ -5113,7 +5753,7 @@ function BTCConnectModal({
5113
5753
  statusRef.current = "";
5114
5754
  }
5115
5755
  };
5116
- (0, import_react35.useEffect)(() => {
5756
+ (0, import_react36.useEffect)(() => {
5117
5757
  if (wallet) {
5118
5758
  console.log("onConnect");
5119
5759
  try {
@@ -5126,12 +5766,12 @@ function BTCConnectModal({
5126
5766
  setStatus("");
5127
5767
  }
5128
5768
  }, [wallet]);
5129
- (0, import_react35.useEffect)(() => {
5769
+ (0, import_react36.useEffect)(() => {
5130
5770
  if (address) {
5131
5771
  toLoginInWallet();
5132
5772
  }
5133
5773
  }, [address]);
5134
- (0, import_react35.useEffect)(() => {
5774
+ (0, import_react36.useEffect)(() => {
5135
5775
  if (!props.isOpen) {
5136
5776
  disconnect();
5137
5777
  }
@@ -5143,11 +5783,11 @@ function BTCConnectModal({
5143
5783
  statusRef.current = "";
5144
5784
  setError("");
5145
5785
  };
5146
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
5786
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
5147
5787
  id: type == "bind" ? "bindWith" : "loginWith"
5148
5788
  }, {
5149
5789
  name: "BTC"
5150
- }), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
5790
+ }), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
5151
5791
  WalletModalContent,
5152
5792
  {
5153
5793
  error,
@@ -5160,9 +5800,9 @@ function BTCConnectModal({
5160
5800
  setVisible: () => {
5161
5801
  }
5162
5802
  }
5163
- ) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-recommend-list", children: [
5803
+ ) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-login-recommend-list", children: [
5164
5804
  installedWallets.map((wallet2) => {
5165
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
5805
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
5166
5806
  RecommendItem,
5167
5807
  {
5168
5808
  icon: iconMaps[wallet2.walletKey],
@@ -5174,15 +5814,15 @@ function BTCConnectModal({
5174
5814
  wallet2.walletKey
5175
5815
  );
5176
5816
  }),
5177
- wallets2.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
5178
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
5817
+ wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
5818
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
5179
5819
  RecommendItem,
5180
5820
  {
5181
5821
  icon: iconMaps[wallet2.walletKey],
5182
5822
  name: wallet2.name,
5183
5823
  onClick: () => {
5184
5824
  },
5185
- footer: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Button, { size: "sm", onClick: () => {
5825
+ footer: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Button, { size: "sm", onClick: () => {
5186
5826
  window.open(wallet2.website);
5187
5827
  }, children: "Install" })
5188
5828
  },
@@ -5192,13 +5832,13 @@ function BTCConnectModal({
5192
5832
  ] }) }) });
5193
5833
  }
5194
5834
  function BTCModal(props) {
5195
- return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(BTCConnectModal, { ...props });
5835
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(BTCConnectModal, { ...props });
5196
5836
  }
5197
5837
 
5198
5838
  // src/components/WalletModal/index.tsx
5199
- var import_react36 = require("react");
5839
+ var import_react37 = require("react");
5200
5840
  var import_react_intl18 = require("react-intl");
5201
- var import_jsx_runtime88 = require("react/jsx-runtime");
5841
+ var import_jsx_runtime92 = require("react/jsx-runtime");
5202
5842
  function WalletConnectModal({
5203
5843
  type,
5204
5844
  methods: _methods,
@@ -5208,7 +5848,7 @@ function WalletConnectModal({
5208
5848
  const { walletMap } = useWalletConfig();
5209
5849
  const { bind, login } = useUserInfo();
5210
5850
  const config = useAppConfig();
5211
- const methods = (0, import_react36.useMemo)(() => {
5851
+ const methods = (0, import_react37.useMemo)(() => {
5212
5852
  if (_methods) return _methods;
5213
5853
  if (!config.platform) {
5214
5854
  return [];
@@ -5216,13 +5856,13 @@ function WalletConnectModal({
5216
5856
  const platform = config.platform.map((p) => p.toLowerCase());
5217
5857
  return WALLET_METHODS.filter((m) => platform.includes(m));
5218
5858
  }, [config.platform, _methods]);
5219
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
5859
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
5220
5860
  id: type == "bind" ? "bindWith" : "loginWith"
5221
5861
  }, {
5222
5862
  name: ""
5223
- }), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-login-recommend-list", children: methods.map((method, index) => {
5863
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "matchid-login-recommend-list", children: methods.map((method, index) => {
5224
5864
  const m = walletMap[method];
5225
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
5865
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
5226
5866
  RecommendItem,
5227
5867
  {
5228
5868
  icon: m?.icon,
@@ -5236,21 +5876,21 @@ function WalletConnectModal({
5236
5876
  }) }) }) });
5237
5877
  }
5238
5878
  function WalletModal(props) {
5239
- return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(WalletConnectModal, { ...props });
5879
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(WalletConnectModal, { ...props });
5240
5880
  }
5241
5881
 
5242
5882
  // src/components/AlphaAvatar/index.tsx
5243
- var import_react37 = require("react");
5244
- var import_jsx_runtime89 = require("react/jsx-runtime");
5883
+ var import_react38 = require("react");
5884
+ var import_jsx_runtime93 = require("react/jsx-runtime");
5245
5885
  function AlphaAvatar2({ name, size = 40, className = "" }) {
5246
- const [avatar, setAvatar] = (0, import_react37.useState)(void 0);
5247
- (0, import_react37.useEffect)(() => {
5886
+ const [avatar, setAvatar] = (0, import_react38.useState)(void 0);
5887
+ (0, import_react38.useEffect)(() => {
5248
5888
  if (name) {
5249
5889
  const char = name[0].toUpperCase();
5250
5890
  setAvatar(char);
5251
5891
  }
5252
5892
  }, [name]);
5253
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
5893
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
5254
5894
  width: size,
5255
5895
  height: size,
5256
5896
  fontSize: Math.ceil(size / 2)
@@ -5258,7 +5898,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
5258
5898
  }
5259
5899
 
5260
5900
  // src/components/WalletAsset/index.tsx
5261
- var import_jsx_runtime90 = require("react/jsx-runtime");
5901
+ var import_jsx_runtime94 = require("react/jsx-runtime");
5262
5902
  function WalletAsset({
5263
5903
  onAssetClick,
5264
5904
  matchWalletAssetsOptions
@@ -5268,7 +5908,7 @@ function WalletAsset({
5268
5908
  list: walletAssets.mergedAssets
5269
5909
  });
5270
5910
  const { list } = useMatchChain();
5271
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
5911
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
5272
5912
  const clickFunc = onAssetClick && onAssetClick(n);
5273
5913
  const chain = list?.find((m) => m.id.toString() === n.chain_id);
5274
5914
  const getFooterColor = () => {
@@ -5283,11 +5923,11 @@ function WalletAsset({
5283
5923
  }
5284
5924
  return "";
5285
5925
  };
5286
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `matchid-wallet-asset-item`, onClick: clickFunc, style: {
5926
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-asset-item`, onClick: clickFunc, style: {
5287
5927
  cursor: clickFunc ? "pointer" : "default"
5288
5928
  }, children: [
5289
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
5290
- n.icon ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-wallet-asset-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
5929
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
5930
+ n.icon ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-wallet-asset-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
5291
5931
  AlphaAvatar2,
5292
5932
  {
5293
5933
  className: `matchid-wallet-asset-icon`,
@@ -5295,12 +5935,12 @@ function WalletAsset({
5295
5935
  name: n.symbol || n.name || ""
5296
5936
  }
5297
5937
  ),
5298
- chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
5938
+ chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
5299
5939
  ] }),
5300
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `matchid-wallet-asset-info`, children: [
5301
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
5302
- "price" in n && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `matchid-wallet-asset-content`, children: [
5303
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
5940
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-asset-info`, children: [
5941
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
5942
+ "price" in n && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-asset-content`, children: [
5943
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
5304
5944
  NumberFormatter,
5305
5945
  {
5306
5946
  value: n.price,
@@ -5308,7 +5948,7 @@ function WalletAsset({
5308
5948
  tFixNum: 2
5309
5949
  }
5310
5950
  ) }),
5311
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
5951
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
5312
5952
  NumberFormatter,
5313
5953
  {
5314
5954
  value: n.value,
@@ -5317,15 +5957,15 @@ function WalletAsset({
5317
5957
  }
5318
5958
  ) })
5319
5959
  ] }),
5320
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `matchid-wallet-asset-footer`, children: [
5321
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
5960
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-asset-footer`, children: [
5961
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
5322
5962
  NumberFormatter,
5323
5963
  {
5324
5964
  value: n.balance,
5325
5965
  tFixNum: 3
5326
5966
  }
5327
5967
  ) }),
5328
- "price_change_24h" in n && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: `matchid-wallet-asset-change ${getFooterColor()}`, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
5968
+ "price_change_24h" in n && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-wallet-asset-change ${getFooterColor()}`, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
5329
5969
  NumberFormatter,
5330
5970
  {
5331
5971
  prefix: `${(n?.price_change_24h || 0) < 0 ? "-" : "+"} `,
@@ -5341,10 +5981,10 @@ function WalletAsset({
5341
5981
  }
5342
5982
 
5343
5983
  // src/components/TokenSend/index.tsx
5344
- var import_react38 = require("react");
5345
- var import_viem11 = require("viem");
5984
+ var import_react39 = require("react");
5985
+ var import_viem15 = require("viem");
5346
5986
  var import_react_intl19 = require("react-intl");
5347
- var import_jsx_runtime91 = require("react/jsx-runtime");
5987
+ var import_jsx_runtime95 = require("react/jsx-runtime");
5348
5988
  function Input2({
5349
5989
  onChange,
5350
5990
  placeholder,
@@ -5354,8 +5994,8 @@ function Input2({
5354
5994
  error,
5355
5995
  size = "df"
5356
5996
  }) {
5357
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
5358
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
5997
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
5998
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5359
5999
  "input",
5360
6000
  {
5361
6001
  placeholder,
@@ -5366,7 +6006,7 @@ function Input2({
5366
6006
  className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
5367
6007
  }
5368
6008
  ),
5369
- error && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "matchid-token-input-error-text", children: error })
6009
+ error && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "matchid-token-input-error-text", children: error })
5370
6010
  ] });
5371
6011
  }
5372
6012
  function TokenSend({
@@ -5379,33 +6019,33 @@ function TokenSend({
5379
6019
  const intl = (0, import_react_intl19.useIntl)();
5380
6020
  const { createWalletClient: createWalletClient2 } = useWallet();
5381
6021
  const isNative = token.address.toLowerCase() == NATIVE_TOKEN_ADDRESS;
5382
- const chain = (0, import_react38.useMemo)(() => {
6022
+ const chain = (0, import_react39.useMemo)(() => {
5383
6023
  return chainList?.find((m) => m.id.toString() === token.chain_id);
5384
6024
  }, [chainList, token.chain_id]);
5385
- const walletClient = (0, import_react38.useMemo)(() => {
6025
+ const walletClient = (0, import_react39.useMemo)(() => {
5386
6026
  return createWalletClient2({
5387
6027
  // @ts-ignore
5388
- chain: (0, import_viem11.defineChain)(chain),
5389
- transport: (0, import_viem11.http)()
6028
+ chain: (0, import_viem15.defineChain)(chain),
6029
+ transport: (0, import_viem15.http)()
5390
6030
  });
5391
6031
  }, [chain]);
5392
- const [amount, setAmount] = (0, import_react38.useState)("");
5393
- const [address, setAddress] = (0, import_react38.useState)("");
5394
- const [loading, setLoading] = (0, import_react38.useState)(false);
5395
- const [sending, setSending] = (0, import_react38.useState)(false);
5396
- const [txError, setTxError] = (0, import_react38.useState)("");
5397
- const transaction = (0, import_react38.useMemo)(() => {
6032
+ const [amount, setAmount] = (0, import_react39.useState)("");
6033
+ const [address, setAddress] = (0, import_react39.useState)("");
6034
+ const [loading, setLoading] = (0, import_react39.useState)(false);
6035
+ const [sending, setSending] = (0, import_react39.useState)(false);
6036
+ const [txError, setTxError] = (0, import_react39.useState)("");
6037
+ const transaction = (0, import_react39.useMemo)(() => {
5398
6038
  const reg = /^0x[a-fA-F0-9]{40}$/;
5399
6039
  if (!amount || !address || !reg.test(address)) {
5400
6040
  return;
5401
6041
  }
5402
- const viemChain = (0, import_viem11.defineChain)(chain);
6042
+ const viemChain = (0, import_viem15.defineChain)(chain);
5403
6043
  const to = isNative ? address : token.address;
5404
- const value = isNative ? (0, import_viem11.parseUnits)(amount, parseInt(token?.decimals || "18")) : BigInt(0);
5405
- const data = isNative ? "0x" : (0, import_viem11.encodeFunctionData)({
5406
- abi: import_viem11.erc20Abi,
6044
+ const value = isNative ? (0, import_viem15.parseUnits)(amount, parseInt(token?.decimals || "18")) : BigInt(0);
6045
+ const data = isNative ? "0x" : (0, import_viem15.encodeFunctionData)({
6046
+ abi: import_viem15.erc20Abi,
5407
6047
  functionName: "transfer",
5408
- args: [address, (0, import_viem11.parseUnits)(amount, parseInt(token?.decimals || "18"))]
6048
+ args: [address, (0, import_viem15.parseUnits)(amount, parseInt(token?.decimals || "18"))]
5409
6049
  });
5410
6050
  return {
5411
6051
  to,
@@ -5425,7 +6065,7 @@ function TokenSend({
5425
6065
  setLoading(false);
5426
6066
  }
5427
6067
  };
5428
- const error = (0, import_react38.useMemo)(() => {
6068
+ const error = (0, import_react39.useMemo)(() => {
5429
6069
  setTxError("");
5430
6070
  let amountError = "";
5431
6071
  let addressError = "";
@@ -5468,7 +6108,7 @@ function TokenSend({
5468
6108
  setAmount(value);
5469
6109
  }
5470
6110
  };
5471
- const canSend = (0, import_react38.useMemo)(() => {
6111
+ const canSend = (0, import_react39.useMemo)(() => {
5472
6112
  return !error.amount && !error.address && amount && address;
5473
6113
  }, [error]);
5474
6114
  const onNext = async () => {
@@ -5478,7 +6118,7 @@ function TokenSend({
5478
6118
  }
5479
6119
  onClose();
5480
6120
  };
5481
- (0, import_react38.useEffect)(() => {
6121
+ (0, import_react39.useEffect)(() => {
5482
6122
  const receiveMessage = (event) => {
5483
6123
  if (event.data) {
5484
6124
  if (event.data.source == "match-wallet") {
@@ -5494,24 +6134,24 @@ function TokenSend({
5494
6134
  window.removeEventListener("message", receiveMessage);
5495
6135
  };
5496
6136
  }, []);
5497
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl19.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-send-box`, children: [
5498
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-token-send-content", children: [
5499
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-amount-content`, children: [
5500
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-amount-header`, children: [
5501
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl19.FormattedMessage, { id: "amount" }) }),
5502
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
5503
- token.icon ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
6137
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl19.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-send-box`, children: [
6138
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "matchid-token-send-content", children: [
6139
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-amount-content`, children: [
6140
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-amount-header`, children: [
6141
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl19.FormattedMessage, { id: "amount" }) }),
6142
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
6143
+ token.icon ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5504
6144
  "img",
5505
6145
  {
5506
6146
  src: token?.icon,
5507
6147
  alt: token?.symbol,
5508
6148
  className: `matchid-token-amount-chain-icon`
5509
6149
  }
5510
- ) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
5511
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { children: token?.symbol })
6150
+ ) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
6151
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { children: token?.symbol })
5512
6152
  ] })
5513
6153
  ] }),
5514
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
6154
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5515
6155
  Input2,
5516
6156
  {
5517
6157
  type: "text",
@@ -5524,18 +6164,18 @@ function TokenSend({
5524
6164
  error: error.amount || txError
5525
6165
  }
5526
6166
  ),
5527
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
5528
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-amount-title`, children: [
5529
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl19.FormattedMessage, { id: "balance" }),
6167
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
6168
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-amount-title`, children: [
6169
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl19.FormattedMessage, { id: "balance" }),
5530
6170
  ":"
5531
6171
  ] }),
5532
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
6172
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
5533
6173
  ] }),
5534
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
6174
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
5535
6175
  ] }),
5536
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-address-content`, children: [
5537
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl19.FormattedMessage, { id: "receiveTitle" }) }) }),
5538
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
6176
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-address-content`, children: [
6177
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl19.FormattedMessage, { id: "receiveTitle" }) }) }),
6178
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5539
6179
  Input2,
5540
6180
  {
5541
6181
  type: "text",
@@ -5551,7 +6191,7 @@ function TokenSend({
5551
6191
  )
5552
6192
  ] })
5553
6193
  ] }),
5554
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
6194
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5555
6195
  Button,
5556
6196
  {
5557
6197
  size: "lg",
@@ -5560,7 +6200,7 @@ function TokenSend({
5560
6200
  disabled: !canSend || !!txError,
5561
6201
  onClick: onNext,
5562
6202
  loading: loading || sending,
5563
- children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl19.FormattedMessage, { id: "next" })
6203
+ children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl19.FormattedMessage, { id: "next" })
5564
6204
  }
5565
6205
  )
5566
6206
  ] }) });
@@ -5568,7 +6208,7 @@ function TokenSend({
5568
6208
 
5569
6209
  // src/components/TokenDetail/index.tsx
5570
6210
  var import_react_intl20 = require("react-intl");
5571
- var import_jsx_runtime92 = require("react/jsx-runtime");
6211
+ var import_jsx_runtime96 = require("react/jsx-runtime");
5572
6212
  function TokenDetail({
5573
6213
  onClose,
5574
6214
  token
@@ -5578,41 +6218,41 @@ function TokenDetail({
5578
6218
  const chain = chainList?.find((m) => m.id.toString() === token.chain_id);
5579
6219
  const onSend = () => {
5580
6220
  modal.show((props) => {
5581
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(TokenSend, { onClose: () => {
6221
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TokenSend, { onClose: () => {
5582
6222
  props.close();
5583
6223
  onClose();
5584
6224
  }, onBack: props.close, zIndex: props.zIndex, token });
5585
6225
  });
5586
6226
  };
5587
6227
  const intl = (0, import_react_intl20.useIntl)();
5588
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ModalDrawer, { isOpen: true, title: intl.formatMessage({
6228
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ModalDrawer, { isOpen: true, title: intl.formatMessage({
5589
6229
  id: "tokenDetails"
5590
- }), onClose, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-token-detail`, children: [
5591
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-token-main`, children: [
5592
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-token-info`, children: [
5593
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-token-logo`, children: [
5594
- token.icon ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("img", { src: token.icon, alt: token.symbol, className: `matchid-token-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(AlphaAvatar, { className: `matchid-token-icon`, size: 48, name: token.symbol || token.name || "" }),
5595
- chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-token-chain` })
6230
+ }), onClose, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-detail`, children: [
6231
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-main`, children: [
6232
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-info`, children: [
6233
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-logo`, children: [
6234
+ token.icon ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("img", { src: token.icon, alt: token.symbol, className: `matchid-token-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(AlphaAvatar, { className: `matchid-token-icon`, size: 48, name: token.symbol || token.name || "" }),
6235
+ chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-token-chain` })
5596
6236
  ] }),
5597
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-token-name`, children: [
5598
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10 }),
6237
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-name`, children: [
6238
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10 }),
5599
6239
  " ",
5600
6240
  token.symbol
5601
6241
  ] })
5602
6242
  ] }),
5603
- token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-token-contract`, children: [
5604
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "matchid-token-contract-title", children: "Contract address" }),
5605
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "matchid-token-contract-address", children: token.address })
6243
+ token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-contract`, children: [
6244
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "matchid-token-contract-title", children: "Contract address" }),
6245
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "matchid-token-contract-address", children: token.address })
5606
6246
  ] })
5607
6247
  ] }),
5608
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl20.FormattedMessage, { id: "send" }) })
6248
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl20.FormattedMessage, { id: "send" }) })
5609
6249
  ] }) });
5610
6250
  }
5611
6251
 
5612
6252
  // src/components/TokenSendList/index.tsx
5613
- var import_react39 = require("react");
6253
+ var import_react40 = require("react");
5614
6254
  var import_react_intl21 = require("react-intl");
5615
- var import_jsx_runtime93 = require("react/jsx-runtime");
6255
+ var import_jsx_runtime97 = require("react/jsx-runtime");
5616
6256
  function TokenSendList({ close }) {
5617
6257
  const isDownMd = useDownMd();
5618
6258
  const walletAssets = useMatchWalletAssets();
@@ -5620,20 +6260,20 @@ function TokenSendList({ close }) {
5620
6260
  list: walletAssets.mergedAssets
5621
6261
  });
5622
6262
  const { list } = useMatchChain();
5623
- const [checked, setChecked] = (0, import_react39.useState)();
6263
+ const [checked, setChecked] = (0, import_react40.useState)();
5624
6264
  const modal = useModal();
5625
6265
  const onNext = () => {
5626
6266
  checked && modal.show((props) => {
5627
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(TokenSend, { onClose: () => {
6267
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(TokenSend, { onClose: () => {
5628
6268
  props.close();
5629
6269
  close();
5630
6270
  }, onBack: props.close, zIndex: props.zIndex, token: checked });
5631
6271
  });
5632
6272
  };
5633
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-token-send-list-box", children: [
5634
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
6273
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "matchid-token-send-list-box", children: [
6274
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
5635
6275
  const chain = list?.find((m) => m.id.toString() === n.chain_id);
5636
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
6276
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
5637
6277
  "div",
5638
6278
  {
5639
6279
  className: `matchid-token-send-item ${checked?.address == n.address ? "matchid-token-send-chekced" : ""}`,
@@ -5641,10 +6281,10 @@ function TokenSendList({ close }) {
5641
6281
  setChecked(n);
5642
6282
  },
5643
6283
  children: [
5644
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
5645
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-token-send-content", children: [
5646
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-token-send-logo", children: [
5647
- n.icon ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6284
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
6285
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "matchid-token-send-content", children: [
6286
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "matchid-token-send-logo", children: [
6287
+ n.icon ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5648
6288
  AlphaAvatar2,
5649
6289
  {
5650
6290
  className: `matchid-token-send-icon`,
@@ -5652,7 +6292,7 @@ function TokenSendList({ close }) {
5652
6292
  name: n.symbol || n.name || ""
5653
6293
  }
5654
6294
  ),
5655
- chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6295
+ chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5656
6296
  "img",
5657
6297
  {
5658
6298
  src: chain.iconUrl,
@@ -5661,9 +6301,9 @@ function TokenSendList({ close }) {
5661
6301
  }
5662
6302
  )
5663
6303
  ] }),
5664
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-token-send-info`, children: [
5665
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
5666
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
6304
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: `matchid-token-send-info`, children: [
6305
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
6306
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
5667
6307
  ] })
5668
6308
  ] })
5669
6309
  ]
@@ -5671,24 +6311,24 @@ function TokenSendList({ close }) {
5671
6311
  index
5672
6312
  );
5673
6313
  }) }),
5674
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl21.FormattedMessage, { id: "next" }) })
6314
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_intl21.FormattedMessage, { id: "next" }) })
5675
6315
  ] });
5676
6316
  }
5677
6317
 
5678
6318
  // src/components/TransactionList/index.tsx
5679
6319
  var import_react_infinite_scroll_component = __toESM(require("react-infinite-scroll-component"));
5680
- var import_react40 = require("react");
5681
- var import_viem12 = require("viem");
5682
- var import_viem13 = require("viem");
6320
+ var import_react41 = require("react");
6321
+ var import_viem16 = require("viem");
6322
+ var import_viem17 = require("viem");
5683
6323
  var import_react_intl22 = require("react-intl");
5684
- var import_jsx_runtime94 = require("react/jsx-runtime");
6324
+ var import_jsx_runtime98 = require("react/jsx-runtime");
5685
6325
  var Item = ({ data }) => {
5686
6326
  const { address } = useWallet();
5687
6327
  const isOut = data.from.toLowerCase() == address.toLowerCase();
5688
6328
  const { chain, chainId, explorerLink, formatUnits: chainFormatUnits } = useMatchChain();
5689
6329
  const { contracts } = useContractStore_default();
5690
- const [shouldRefetch, setShouldRefetch] = (0, import_react40.useState)(true);
5691
- const transferType = (0, import_react40.useMemo)(() => {
6330
+ const [shouldRefetch, setShouldRefetch] = (0, import_react41.useState)(true);
6331
+ const transferType = (0, import_react41.useMemo)(() => {
5692
6332
  const methodId = data.input.substring(2, 10);
5693
6333
  if (methodId == "095ea7b3") {
5694
6334
  return "erc20_approve";
@@ -5698,38 +6338,38 @@ var Item = ({ data }) => {
5698
6338
  }
5699
6339
  return "unknown";
5700
6340
  }, [data.input]);
5701
- const to = (0, import_react40.useMemo)(() => {
6341
+ const to = (0, import_react41.useMemo)(() => {
5702
6342
  if (!isOut) {
5703
6343
  return data.from;
5704
6344
  }
5705
6345
  if (transferType == "erc20_transfer") {
5706
- const decodeData = (0, import_viem12.decodeFunctionData)({
5707
- abi: import_viem13.erc20Abi,
6346
+ const decodeData = (0, import_viem16.decodeFunctionData)({
6347
+ abi: import_viem17.erc20Abi,
5708
6348
  data: data.input
5709
6349
  });
5710
6350
  return decodeData.args[0];
5711
6351
  }
5712
6352
  return data.to;
5713
6353
  }, [data.input, transferType, data.to, isOut]);
5714
- const amount = (0, import_react40.useMemo)(() => {
6354
+ const amount = (0, import_react41.useMemo)(() => {
5715
6355
  if (transferType == "erc20_transfer") {
5716
- const decodeData = (0, import_viem12.decodeFunctionData)({
5717
- abi: import_viem13.erc20Abi,
6356
+ const decodeData = (0, import_viem16.decodeFunctionData)({
6357
+ abi: import_viem17.erc20Abi,
5718
6358
  data: data.input
5719
6359
  });
5720
6360
  const value = decodeData.args[1];
5721
- return (0, import_viem12.formatUnits)(value, contracts[`${chainId}-${data.to.toLowerCase()}`]?.decimals || 18);
6361
+ return (0, import_viem16.formatUnits)(value, contracts[`${chainId}-${data.to.toLowerCase()}`]?.decimals || 18);
5722
6362
  }
5723
6363
  return chainFormatUnits(BigInt(data.value));
5724
6364
  }, [data.input, transferType, data.value, contracts, chainId, data.to]);
5725
6365
  const hashQuery = useHash({
5726
6366
  hash: data.hash,
5727
6367
  //@ts-ignore
5728
- chain: (0, import_viem12.defineChain)(chain),
6368
+ chain: (0, import_viem16.defineChain)(chain),
5729
6369
  refetchInterval: shouldRefetch ? 3e3 : false,
5730
6370
  enabled: shouldRefetch && data.source == "local"
5731
6371
  });
5732
- const status = (0, import_react40.useMemo)(() => {
6372
+ const status = (0, import_react41.useMemo)(() => {
5733
6373
  if (data.source == "matchain") {
5734
6374
  switch (data.extra.status) {
5735
6375
  case "ok":
@@ -5756,30 +6396,30 @@ var Item = ({ data }) => {
5756
6396
  }
5757
6397
  return "loading";
5758
6398
  }, [data.extra?.status, data.source, hashQuery.data]);
5759
- (0, import_react40.useEffect)(() => {
6399
+ (0, import_react41.useEffect)(() => {
5760
6400
  if (data.hash) {
5761
6401
  setShouldRefetch(status == "loading");
5762
6402
  }
5763
6403
  }, [status, data.hash]);
5764
- const symbol = (0, import_react40.useMemo)(() => {
6404
+ const symbol = (0, import_react41.useMemo)(() => {
5765
6405
  if (transferType == "erc20_transfer") {
5766
6406
  const contract = contracts[`${chainId}-${data.to.toLowerCase()}`];
5767
6407
  return contract?.symbol || contract?.name || "unknown";
5768
6408
  }
5769
6409
  return chain?.nativeCurrency.symbol || chain?.nativeCurrency.name;
5770
6410
  }, [transferType, chain, contracts, chainId, data.to]);
5771
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
6411
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
5772
6412
  "a",
5773
6413
  {
5774
6414
  href: explorerLink(`tx/${data.hash}`),
5775
6415
  target: "_blank",
5776
6416
  className: `matchid-transaction-item`,
5777
6417
  children: [
5778
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-transacton-item-container`, children: [
5779
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
5780
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-transaction-item-details`, children: [
5781
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
5782
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6418
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-transacton-item-container`, children: [
6419
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
6420
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-transaction-item-details`, children: [
6421
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
6422
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5783
6423
  "div",
5784
6424
  {
5785
6425
  className: `matchid-transaction-item-timestamp`,
@@ -5788,11 +6428,11 @@ var Item = ({ data }) => {
5788
6428
  )
5789
6429
  ] })
5790
6430
  ] }),
5791
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
5792
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(NumberFormatter, { value: amount, tFixNum: 6, prefix: isOut ? "-" : "+", suffix: " " + symbol }),
5793
- status == "loading" && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(LoadingIcon_default, { color: "#000000", size: 16, rotate: true }),
5794
- status == "success" && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(CheckRoundIcon, { size: 16 }),
5795
- status == "error" && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(InfoRoundIcon, { size: 16 })
6431
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
6432
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(NumberFormatter, { value: amount, tFixNum: 6, prefix: isOut ? "-" : "+", suffix: " " + symbol }),
6433
+ status == "loading" && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(LoadingIcon_default, { color: "#000000", size: 16, rotate: true }),
6434
+ status == "success" && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(CheckRoundIcon, { size: 16 }),
6435
+ status == "error" && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(InfoRoundIcon, { size: 16 })
5796
6436
  ] })
5797
6437
  ]
5798
6438
  }
@@ -5802,19 +6442,254 @@ function TransactionList({
5802
6442
  scrollableTarget
5803
6443
  }) {
5804
6444
  const { fetchMoreData, hasMore, items } = useMatchWalletRecords();
5805
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6445
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5806
6446
  import_react_infinite_scroll_component.default,
5807
6447
  {
5808
6448
  scrollableTarget,
5809
6449
  dataLength: items.length,
5810
6450
  next: fetchMoreData,
5811
6451
  hasMore,
5812
- loader: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "matchid-list-nomore", children: [
5813
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
6452
+ loader: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "matchid-list-nomore", children: [
6453
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
5814
6454
  "Loading..."
5815
6455
  ] }),
5816
- endMessage: items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl22.FormattedMessage, { id: "noMoreRecords" }) }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl22.FormattedMessage, { id: "noRecords" }) }),
5817
- children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "mt-[150px]" }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Item, { data: item }, index)) })
6456
+ endMessage: items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl22.FormattedMessage, { id: "noMoreRecords" }) }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl22.FormattedMessage, { id: "noRecords" }) }),
6457
+ children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "mt-[150px]" }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Item, { data: item }, index)) })
6458
+ }
6459
+ );
6460
+ }
6461
+
6462
+ // src/hooks/api/bind.ts
6463
+ var import_react_query11 = require("@tanstack/react-query");
6464
+
6465
+ // src/hooks/api/poh.ts
6466
+ var import_react_query12 = require("@tanstack/react-query");
6467
+
6468
+ // src/hooks/api/contact.ts
6469
+ var contact_exports = {};
6470
+ __export(contact_exports, {
6471
+ acceptContact: () => acceptContact,
6472
+ addContact: () => addContact,
6473
+ delContact: () => delContact,
6474
+ useContactInfo: () => useContactInfo,
6475
+ useContactList: () => useContactList,
6476
+ useContactSearch: () => useContactSearch
6477
+ });
6478
+ var import_react_query13 = require("@tanstack/react-query");
6479
+ var import_last = __toESM(require("lodash/last"));
6480
+ var import_react42 = require("react");
6481
+ function useContactList(page_size = 10, type = "Friend") {
6482
+ const { token } = useLocalStore_default();
6483
+ const limitIdRef = (0, import_react42.useRef)(0);
6484
+ const queryClient2 = (0, import_react_query13.useQueryClient)();
6485
+ const contactQuery = (0, import_react_query13.useInfiniteQuery)({
6486
+ queryKey: ["matchid-contacts-list", type, token],
6487
+ initialPageParam: 1,
6488
+ queryFn: async (args) => {
6489
+ console.log(args);
6490
+ if (args.pageParam <= 1) {
6491
+ limitIdRef.current = 0;
6492
+ }
6493
+ return (await getContactListApi({
6494
+ limit: page_size,
6495
+ limit_id: limitIdRef.current,
6496
+ type
6497
+ })).data;
6498
+ },
6499
+ getNextPageParam: (lastPage, allPages) => {
6500
+ if (!lastPage) return void 0;
6501
+ const lastPageNum = Math.ceil(lastPage.meta.total / page_size);
6502
+ return allPages.length >= lastPageNum ? void 0 : allPages.length + 1;
6503
+ }
6504
+ });
6505
+ (0, import_react42.useEffect)(() => {
6506
+ if (!contactQuery.data?.pages || contactQuery.data?.pages.length == 0) {
6507
+ limitIdRef.current = 0;
6508
+ } else {
6509
+ const lastPage = (0, import_last.default)(contactQuery.data?.pages);
6510
+ const items = lastPage?.items;
6511
+ if (!items || items.length == 0) {
6512
+ limitIdRef.current = 0;
6513
+ return;
6514
+ }
6515
+ const lastItem = (0, import_last.default)(items);
6516
+ limitIdRef.current = lastItem?.limit_id || 0;
6517
+ }
6518
+ }, [contactQuery.data?.pages]);
6519
+ return {
6520
+ data: (contactQuery.data?.pages ?? []).reduce(
6521
+ (a, b) => {
6522
+ return a.concat(b?.items ?? []);
6523
+ },
6524
+ []
6525
+ ),
6526
+ totalCount: contactQuery.hasNextPage ? ((0, import_last.default)(contactQuery.data?.pages ?? [])?.meta.total ?? 0) + 1 : (0, import_last.default)(contactQuery.data?.pages ?? [])?.meta.total ?? 0,
6527
+ loading: contactQuery.isLoading,
6528
+ loadingNextPage: contactQuery.isFetchingNextPage,
6529
+ hasNextPage: contactQuery.hasNextPage,
6530
+ onLoadMore: contactQuery.fetchNextPage
6531
+ };
6532
+ }
6533
+ function useContactSearch(keyword, options) {
6534
+ return (0, import_react_query13.useQuery)({
6535
+ queryKey: ["matchid-contacts-search", keyword],
6536
+ enabled: !!keyword,
6537
+ queryFn: async () => {
6538
+ return (await searchContactsApi({
6539
+ address: keyword
6540
+ })).data;
6541
+ },
6542
+ ...options
6543
+ });
6544
+ }
6545
+ function useContactInfo(options) {
6546
+ const { token } = useUserInfo();
6547
+ return (0, import_react_query13.useQuery)({
6548
+ queryKey: ["matchid-contacts-info", token],
6549
+ enabled: !!token,
6550
+ queryFn: async () => {
6551
+ return (await getContractsInfoApi()).data;
6552
+ },
6553
+ ...options
6554
+ });
6555
+ }
6556
+ var addContact = async (friend_id) => {
6557
+ const res = await addContactsApi({
6558
+ friend_id: typeof friend_id === "string" ? friend_id : friend_id.did
6559
+ });
6560
+ if (isSuccess(res)) {
6561
+ return true;
6562
+ }
6563
+ throw new Error(res.message);
6564
+ };
6565
+ var acceptContact = async (friend_id) => {
6566
+ const res = await acceptContactsApi({
6567
+ friend_id: typeof friend_id === "string" ? friend_id : friend_id.did
6568
+ });
6569
+ if (isSuccess(res)) {
6570
+ return true;
6571
+ }
6572
+ throw new Error(res.message);
6573
+ };
6574
+ var delContact = async (friend_id) => {
6575
+ const res = await delContactsApi({
6576
+ friend_id: typeof friend_id === "string" ? friend_id : friend_id.did
6577
+ });
6578
+ if (isSuccess(res)) {
6579
+ return true;
6580
+ }
6581
+ throw new Error(res.message);
6582
+ };
6583
+
6584
+ // src/components/ContactList/index.tsx
6585
+ var import_react_virtuoso = require("react-virtuoso");
6586
+ var import_react43 = require("react");
6587
+ var import_react_intl23 = require("react-intl");
6588
+ var import_jsx_runtime99 = require("react/jsx-runtime");
6589
+ function ContactCard({
6590
+ loading = false,
6591
+ data,
6592
+ action
6593
+ }) {
6594
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "matchid-flex matchid-contact-item", children: [
6595
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "matchid-contact-item-content", children: [
6596
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Skeleton_default, { width: 48, height: 48, radius: 100, loading, children: data?.avatar ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("img", { src: data?.avatar, className: "matchid-contact-item-avatar" }) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(AlphaAvatar, { size: 48, name: data?.name || "MatchID" }) }),
6597
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "matchid-contact-item-info", children: [
6598
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-contact-item-name", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Skeleton_default, { width: 80, height: 20, loading, children: data?.name || "MatchID User" }) }),
6599
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-contact-item-address", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Skeleton_default, { width: 80, height: 16, loading, children: truncateAddress(data?.address || "", 6, 6) }) })
6600
+ ] })
6601
+ ] }),
6602
+ action && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-contact-item-action", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Skeleton_default, { width: 20, height: 20, loading, children: action() }) })
6603
+ ] });
6604
+ }
6605
+ function RequestAction({ data, onSuccess }) {
6606
+ const [loading, setLoading] = (0, import_react43.useState)(false);
6607
+ const toast = useToast();
6608
+ const intl = (0, import_react_intl23.useIntl)();
6609
+ const onApprove = async () => {
6610
+ setLoading(true);
6611
+ try {
6612
+ await contact_exports.acceptContact(data);
6613
+ toast.success(intl.formatMessage({
6614
+ id: "approveSuccess"
6615
+ }));
6616
+ onSuccess && onSuccess(data);
6617
+ } catch (e) {
6618
+ console.error(e);
6619
+ toast.error(e.message);
6620
+ } finally {
6621
+ setLoading(false);
6622
+ }
6623
+ };
6624
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Button, { size: "sm", onClick: onApprove, loading, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl23.FormattedMessage, { id: "Approve" }) });
6625
+ }
6626
+ function FriendsAction({
6627
+ data,
6628
+ onSuccess
6629
+ }) {
6630
+ const [loading, setLoading] = (0, import_react43.useState)(false);
6631
+ const toast = useToast();
6632
+ const intl = (0, import_react_intl23.useIntl)();
6633
+ const onRemove = async () => {
6634
+ setLoading(true);
6635
+ try {
6636
+ await contact_exports.delContact(data);
6637
+ toast.success(intl.formatMessage({
6638
+ id: "removeSuccess"
6639
+ }));
6640
+ onSuccess && onSuccess(data);
6641
+ } catch (e) {
6642
+ console.error(e);
6643
+ toast.error(e.message);
6644
+ } finally {
6645
+ setLoading(false);
6646
+ }
6647
+ };
6648
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-remove-box", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Button, { size: "sm", loading, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl23.FormattedMessage, { id: "Remove" }) }) }), children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(MoreIcon, { className: "matchid-cursor-pointer" }) });
6649
+ }
6650
+ function ContactList({
6651
+ limit = 10,
6652
+ height = 660,
6653
+ type = "Friend"
6654
+ }) {
6655
+ const { loading, totalCount, data, onLoadMore } = contact_exports.useContactList(limit, type);
6656
+ const [hiddenList, setHiddenList] = (0, import_react43.useState)([]);
6657
+ (0, import_react43.useEffect)(() => {
6658
+ setHiddenList([]);
6659
+ }, [type]);
6660
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
6661
+ import_react_virtuoso.Virtuoso,
6662
+ {
6663
+ style: {
6664
+ height
6665
+ },
6666
+ totalCount: loading ? 10 : totalCount,
6667
+ itemContent: (index) => {
6668
+ if (loading || !data[index]) {
6669
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ContactCard, { loading: true });
6670
+ }
6671
+ if (hiddenList.includes(data[index].limit_id || 0)) {
6672
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_jsx_runtime99.Fragment, {});
6673
+ }
6674
+ const item = data[index];
6675
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ContactCard, { data: item, action: () => {
6676
+ if (type == "Requests") {
6677
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(RequestAction, { data: item, onSuccess: (data2) => {
6678
+ setHiddenList([...hiddenList, data2.limit_id || 0]);
6679
+ } });
6680
+ }
6681
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(FriendsAction, { data: item, onSuccess: (data2) => {
6682
+ setHiddenList([...hiddenList, data2.limit_id || 0]);
6683
+ } });
6684
+ } });
6685
+ },
6686
+ endReached: () => {
6687
+ onLoadMore();
6688
+ },
6689
+ components: {
6690
+ EmptyPlaceholder: () => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-nomore", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl23.FormattedMessage, { id: type == "Friend" ? "noFriends" : "noRequests" }) }),
6691
+ Footer: data.length > 0 ? () => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-nomore", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl23.FormattedMessage, { id: "noMore" }) }) : void 0
6692
+ }
5818
6693
  }
5819
6694
  );
5820
6695
  }
@@ -5822,6 +6697,9 @@ function TransactionList({
5822
6697
  0 && (module.exports = {
5823
6698
  BTCModal,
5824
6699
  Button,
6700
+ ContactCard,
6701
+ ContactList,
6702
+ EVMModal,
5825
6703
  EmailModal,
5826
6704
  Field,
5827
6705
  Input,
@@ -5833,7 +6711,6 @@ function TransactionList({
5833
6711
  ModalWithHeader,
5834
6712
  Overlay,
5835
6713
  Popover,
5836
- SOLModal,
5837
6714
  TONModal,
5838
6715
  TRONModal,
5839
6716
  TokenDetail,