@matchain/matchid-sdk-react 0.1.56-alpha.4 → 0.1.56-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.mts +2 -2
- package/dist/api.d.ts +2 -2
- package/dist/api.js +51 -48
- package/dist/api.js.map +1 -1
- package/dist/api.mjs +3 -3
- package/dist/{chunk-NGNJ44SH.mjs → chunk-2SJCPZJQ.mjs} +2 -2
- package/dist/{chunk-OSY7MTZY.mjs → chunk-GD7URBBZ.mjs} +21 -1
- package/dist/chunk-GD7URBBZ.mjs.map +1 -0
- package/dist/{chunk-2HVTQUPR.mjs → chunk-YR46VC65.mjs} +120 -90
- package/dist/chunk-YR46VC65.mjs.map +1 -0
- package/dist/components.d.mts +3 -3
- package/dist/components.d.ts +3 -3
- package/dist/components.js +408 -361
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +2 -2
- package/dist/hooks.d.mts +2 -2
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +226 -179
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.mjs +2 -2
- package/dist/icon.d.mts +2 -2
- package/dist/icon.d.ts +2 -2
- package/dist/icon.js +20 -0
- package/dist/icon.js.map +1 -1
- package/dist/icon.mjs +3 -1
- package/dist/{index-CsUEaGtM.d.ts → index-BcuSCgol.d.ts} +2 -2
- package/dist/{index-CPTgrfjn.d.mts → index-BlMLqmS2.d.mts} +1 -1
- package/dist/{index-B7ZEyP1j.d.ts → index-C1Nyy5zx.d.ts} +1 -1
- package/dist/{index-FKxw4Vaa.d.mts → index-CBcBTQyU.d.mts} +1 -1
- package/dist/{index-BXbfmVoU.d.mts → index-CD0dACxf.d.mts} +2 -2
- package/dist/{index-TjbO7d74.d.mts → index-CER00guz.d.mts} +1 -1
- package/dist/{index-BtjgRcNJ.d.ts → index-CjekOYJl.d.mts} +2 -2
- package/dist/{index-AtpUyTIk.d.ts → index-DN-jrh8-.d.ts} +6 -3
- package/dist/{index-BKSGbw7b.d.mts → index-DdN22cwf.d.ts} +2 -2
- package/dist/{index-nwqg5fYH.d.ts → index-DkIIQLbh.d.ts} +2 -2
- package/dist/{index-4dZbgWG2.d.ts → index-DlaCsN95.d.ts} +1 -1
- package/dist/{index-zmJl2a0q.d.mts → index-lh6qBAf_.d.mts} +2 -2
- package/dist/{index-CwHXzvvB.d.ts → index-o0WW1c5O.d.ts} +1 -1
- package/dist/{index-CRLiCVf9.d.mts → index-xThRnNN3.d.mts} +6 -3
- package/dist/index.css +35 -1
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +458 -410
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{types-DEsY_CPH.d.mts → types-CheN9vHJ.d.mts} +4 -0
- package/dist/{types-DEsY_CPH.d.ts → types-CheN9vHJ.d.ts} +4 -0
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/ui.d.mts +3 -3
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +154 -107
- package/dist/ui.js.map +1 -1
- package/dist/ui.mjs +2 -2
- package/example/src/pages/UI/components/Input.tsx +12 -0
- package/example/src/pages/UI/index.tsx +2 -0
- package/package.json +1 -1
- package/dist/chunk-2HVTQUPR.mjs.map +0 -1
- package/dist/chunk-OSY7MTZY.mjs.map +0 -1
- /package/dist/{chunk-NGNJ44SH.mjs.map → chunk-2SJCPZJQ.mjs.map} +0 -0
package/dist/components.js
CHANGED
|
@@ -1213,6 +1213,24 @@ var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
|
1213
1213
|
// src/assets/icon/CheckboxCheckedIcon.tsx
|
|
1214
1214
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1215
1215
|
|
|
1216
|
+
// src/assets/icon/InputLengthIcon.tsx
|
|
1217
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1218
|
+
function InputLengthIcon({
|
|
1219
|
+
size = 12,
|
|
1220
|
+
color = "#B6B6B6",
|
|
1221
|
+
...props
|
|
1222
|
+
}) {
|
|
1223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("svg", { width: size, height: size, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1224
|
+
"path",
|
|
1225
|
+
{
|
|
1226
|
+
"fill-rule": "evenodd",
|
|
1227
|
+
"clip-rule": "evenodd",
|
|
1228
|
+
d: "M1.10097 12L12 1.10097L10.899 0L0 10.899L1.10097 12ZM7.19277 11.4594L11.6684 6.98378L10.5675 5.88281L6.0918 10.3585L7.19277 11.4594Z",
|
|
1229
|
+
fill: color
|
|
1230
|
+
}
|
|
1231
|
+
) });
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1216
1234
|
// src/hooks/useLayout.tsx
|
|
1217
1235
|
var import_react = require("react");
|
|
1218
1236
|
function useDownMd() {
|
|
@@ -1231,7 +1249,7 @@ function useDownMd() {
|
|
|
1231
1249
|
|
|
1232
1250
|
// src/ui/Overlay/index.tsx
|
|
1233
1251
|
var import_react2 = require("react");
|
|
1234
|
-
var
|
|
1252
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
1235
1253
|
function Overlay({
|
|
1236
1254
|
isOpen = false,
|
|
1237
1255
|
children,
|
|
@@ -1247,7 +1265,7 @@ function Overlay({
|
|
|
1247
1265
|
document.body.style.overflow = "";
|
|
1248
1266
|
};
|
|
1249
1267
|
}, [isOpen]);
|
|
1250
|
-
return isOpen ? /* @__PURE__ */ (0,
|
|
1268
|
+
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
1251
1269
|
"div",
|
|
1252
1270
|
{
|
|
1253
1271
|
className: "matchid-overlay",
|
|
@@ -1256,12 +1274,12 @@ function Overlay({
|
|
|
1256
1274
|
},
|
|
1257
1275
|
children
|
|
1258
1276
|
}
|
|
1259
|
-
) : /* @__PURE__ */ (0,
|
|
1277
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, {});
|
|
1260
1278
|
}
|
|
1261
1279
|
|
|
1262
1280
|
// src/ui/Modal/index.tsx
|
|
1263
1281
|
var import_react_intl = require("react-intl");
|
|
1264
|
-
var
|
|
1282
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1265
1283
|
function Modal({
|
|
1266
1284
|
children,
|
|
1267
1285
|
isOpen,
|
|
@@ -1269,10 +1287,10 @@ function Modal({
|
|
|
1269
1287
|
zIndex = 100,
|
|
1270
1288
|
className = ""
|
|
1271
1289
|
}) {
|
|
1272
|
-
return /* @__PURE__ */ (0,
|
|
1290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: `matchid-modal ${className}`, style: {
|
|
1273
1291
|
width
|
|
1274
1292
|
}, children: [
|
|
1275
|
-
/* @__PURE__ */ (0,
|
|
1293
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "matchid-modal-mobile-header" }),
|
|
1276
1294
|
children
|
|
1277
1295
|
] }) });
|
|
1278
1296
|
}
|
|
@@ -1286,13 +1304,13 @@ function ModalWithHeader({
|
|
|
1286
1304
|
...props
|
|
1287
1305
|
}) {
|
|
1288
1306
|
const isDownMd = useDownMd();
|
|
1289
|
-
return /* @__PURE__ */ (0,
|
|
1290
|
-
/* @__PURE__ */ (0,
|
|
1291
|
-
/* @__PURE__ */ (0,
|
|
1292
|
-
onBack && /* @__PURE__ */ (0,
|
|
1293
|
-
/* @__PURE__ */ (0,
|
|
1307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Modal, { ...props, children: [
|
|
1308
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
|
|
1309
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "matchid-modal-header-content", children: [
|
|
1310
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
|
|
1311
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "matchid-modal-header-title", children: title })
|
|
1294
1312
|
] }),
|
|
1295
|
-
onClose && /* @__PURE__ */ (0,
|
|
1313
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
|
|
1296
1314
|
] }),
|
|
1297
1315
|
children
|
|
1298
1316
|
] });
|
|
@@ -1303,7 +1321,7 @@ var import_react5 = require("react");
|
|
|
1303
1321
|
|
|
1304
1322
|
// src/utils/index.tsx
|
|
1305
1323
|
var import_moment = __toESM(require("moment"));
|
|
1306
|
-
var
|
|
1324
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
1307
1325
|
var getVersion = () => {
|
|
1308
1326
|
return "0.0.2";
|
|
1309
1327
|
};
|
|
@@ -1349,10 +1367,10 @@ var NumberFormatter = ({
|
|
|
1349
1367
|
const [intPart, decimalPart] = numberValue.toString().split(".");
|
|
1350
1368
|
const intFormat = separator ? intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : intPart;
|
|
1351
1369
|
if (Math.abs(parseFloat(numberValue)) >= 1) {
|
|
1352
|
-
return /* @__PURE__ */ (0,
|
|
1353
|
-
prefix && /* @__PURE__ */ (0,
|
|
1354
|
-
/* @__PURE__ */ (0,
|
|
1355
|
-
decimalPart ? /* @__PURE__ */ (0,
|
|
1370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className, children: [
|
|
1371
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
1372
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: intClassName, children: intFormat }),
|
|
1373
|
+
decimalPart ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: decimalClassName, children: [
|
|
1356
1374
|
".",
|
|
1357
1375
|
decimalPart.substring(0, fixNum)
|
|
1358
1376
|
] }) : "",
|
|
@@ -1369,30 +1387,30 @@ var NumberFormatter = ({
|
|
|
1369
1387
|
}
|
|
1370
1388
|
}
|
|
1371
1389
|
if (zeroCount < tFixNum) {
|
|
1372
|
-
return /* @__PURE__ */ (0,
|
|
1373
|
-
prefix && /* @__PURE__ */ (0,
|
|
1374
|
-
/* @__PURE__ */ (0,
|
|
1375
|
-
/* @__PURE__ */ (0,
|
|
1390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className, children: [
|
|
1391
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
1392
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: intClassName, children: intFormat }),
|
|
1393
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: decimalClassName, children: [
|
|
1376
1394
|
".",
|
|
1377
1395
|
decimalPart.substring(0, tFixNum)
|
|
1378
1396
|
] }),
|
|
1379
1397
|
suffix
|
|
1380
1398
|
] });
|
|
1381
1399
|
}
|
|
1382
|
-
return /* @__PURE__ */ (0,
|
|
1383
|
-
prefix && /* @__PURE__ */ (0,
|
|
1384
|
-
/* @__PURE__ */ (0,
|
|
1385
|
-
/* @__PURE__ */ (0,
|
|
1400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className, children: [
|
|
1401
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
1402
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: intClassName, children: intFormat }),
|
|
1403
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: decimalClassName, children: [
|
|
1386
1404
|
".0",
|
|
1387
|
-
/* @__PURE__ */ (0,
|
|
1405
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("sub", { children: zeroCount }),
|
|
1388
1406
|
decimalPart?.substring(zeroCount, zeroCount + tFixNum - 2)
|
|
1389
1407
|
] }),
|
|
1390
1408
|
suffix
|
|
1391
1409
|
] });
|
|
1392
1410
|
}
|
|
1393
|
-
return /* @__PURE__ */ (0,
|
|
1394
|
-
prefix && /* @__PURE__ */ (0,
|
|
1395
|
-
/* @__PURE__ */ (0,
|
|
1411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className, children: [
|
|
1412
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
1413
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: intClassName, children: intPart }),
|
|
1396
1414
|
suffix
|
|
1397
1415
|
] });
|
|
1398
1416
|
};
|
|
@@ -1414,7 +1432,7 @@ function bytesToBase64(bytes) {
|
|
|
1414
1432
|
}
|
|
1415
1433
|
|
|
1416
1434
|
// src/ui/Button/index.tsx
|
|
1417
|
-
var
|
|
1435
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
1418
1436
|
function Button({
|
|
1419
1437
|
size = "df",
|
|
1420
1438
|
disabled = false,
|
|
@@ -1434,7 +1452,7 @@ function Button({
|
|
|
1434
1452
|
onClick && onClick();
|
|
1435
1453
|
}
|
|
1436
1454
|
};
|
|
1437
|
-
return /* @__PURE__ */ (0,
|
|
1455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1438
1456
|
"button",
|
|
1439
1457
|
{
|
|
1440
1458
|
type,
|
|
@@ -1445,34 +1463,55 @@ function Button({
|
|
|
1445
1463
|
},
|
|
1446
1464
|
onClick: onAction,
|
|
1447
1465
|
...dataset,
|
|
1448
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
1466
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
|
|
1449
1467
|
}
|
|
1450
1468
|
);
|
|
1451
1469
|
}
|
|
1452
1470
|
|
|
1453
1471
|
// src/ui/Input/index.tsx
|
|
1454
1472
|
var import_react4 = require("react");
|
|
1455
|
-
var
|
|
1473
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
1456
1474
|
function Input({
|
|
1457
1475
|
onChange,
|
|
1458
1476
|
type,
|
|
1459
1477
|
after,
|
|
1478
|
+
showLength = false,
|
|
1479
|
+
showClear = true,
|
|
1460
1480
|
className = "",
|
|
1481
|
+
rows = 1,
|
|
1482
|
+
maxRows = 4,
|
|
1483
|
+
children,
|
|
1461
1484
|
...props
|
|
1462
1485
|
}) {
|
|
1463
1486
|
const [inputType, setInputType] = (0, import_react4.useState)(type);
|
|
1464
1487
|
const isDownMd = useDownMd();
|
|
1465
|
-
|
|
1488
|
+
const textareaRef = (0, import_react4.useRef)(null);
|
|
1489
|
+
(0, import_react4.useEffect)(() => {
|
|
1490
|
+
const textarea = textareaRef.current;
|
|
1491
|
+
if (textarea) {
|
|
1492
|
+
textarea.style.height = "auto";
|
|
1493
|
+
const lineHeight = 24;
|
|
1494
|
+
const maxHeight = lineHeight * 4;
|
|
1495
|
+
textarea.style.height = Math.min(textarea.scrollHeight, maxHeight) + "px";
|
|
1496
|
+
}
|
|
1497
|
+
}, [props.value]);
|
|
1498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
1466
1499
|
"div",
|
|
1467
1500
|
{
|
|
1468
|
-
className: `matchid-input-box ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
1501
|
+
className: `matchid-input-box matchid-input-${type} ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
1502
|
+
style: {
|
|
1503
|
+
// @ts-ignore
|
|
1504
|
+
"--max-rows": maxRows
|
|
1505
|
+
},
|
|
1469
1506
|
children: [
|
|
1470
|
-
/* @__PURE__ */ (0,
|
|
1471
|
-
|
|
1507
|
+
children ?? (type == "textarea" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("textarea", { rows: 1, onChange, ...props, className: "matchid-input-field", ref: textareaRef, style: {
|
|
1508
|
+
maxHeight: maxRows * 24 + "px"
|
|
1509
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" })),
|
|
1510
|
+
type != "textarea" && showClear && props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
|
|
1472
1511
|
if (onChange) {
|
|
1473
1512
|
onChange({ target: { value: "" } });
|
|
1474
1513
|
}
|
|
1475
|
-
}, children: /* @__PURE__ */ (0,
|
|
1514
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
1476
1515
|
DeleteRoundIcon,
|
|
1477
1516
|
{
|
|
1478
1517
|
height: isDownMd ? 16 : 21,
|
|
@@ -1480,9 +1519,17 @@ function Input({
|
|
|
1480
1519
|
color: "var(--matchid-input-delete-icon-color)"
|
|
1481
1520
|
}
|
|
1482
1521
|
) }),
|
|
1483
|
-
type === "password" && /* @__PURE__ */ (0,
|
|
1522
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
|
|
1484
1523
|
setInputType(inputType === "password" ? "text" : "password");
|
|
1485
|
-
}, children: inputType === "password" ? /* @__PURE__ */ (0,
|
|
1524
|
+
}, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
|
|
1525
|
+
showLength && props.maxLength && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: `matchid-input-length`, children: [
|
|
1526
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { children: [
|
|
1527
|
+
props.value.length || 0,
|
|
1528
|
+
"/",
|
|
1529
|
+
props.maxLength
|
|
1530
|
+
] }),
|
|
1531
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(InputLengthIcon, { color: "var(--icon-color)" })
|
|
1532
|
+
] }),
|
|
1486
1533
|
after
|
|
1487
1534
|
]
|
|
1488
1535
|
}
|
|
@@ -1490,7 +1537,7 @@ function Input({
|
|
|
1490
1537
|
}
|
|
1491
1538
|
|
|
1492
1539
|
// src/ui/Field/index.tsx
|
|
1493
|
-
var
|
|
1540
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
1494
1541
|
function Field({
|
|
1495
1542
|
label,
|
|
1496
1543
|
children,
|
|
@@ -1498,19 +1545,19 @@ function Field({
|
|
|
1498
1545
|
required,
|
|
1499
1546
|
className = ""
|
|
1500
1547
|
}) {
|
|
1501
|
-
return /* @__PURE__ */ (0,
|
|
1502
|
-
/* @__PURE__ */ (0,
|
|
1503
|
-
required && /* @__PURE__ */ (0,
|
|
1548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
|
|
1549
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "matchid-field-label", children: [
|
|
1550
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "matchid-field-required", children: "*" }),
|
|
1504
1551
|
label
|
|
1505
1552
|
] }),
|
|
1506
1553
|
children,
|
|
1507
|
-
error && /* @__PURE__ */ (0,
|
|
1554
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "matchid-field-error", children: error })
|
|
1508
1555
|
] });
|
|
1509
1556
|
}
|
|
1510
1557
|
|
|
1511
1558
|
// src/components/EmailModal/StepEmail.tsx
|
|
1512
1559
|
var import_react_intl2 = require("react-intl");
|
|
1513
|
-
var
|
|
1560
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
1514
1561
|
function StepEmail(props) {
|
|
1515
1562
|
const intl = (0, import_react_intl2.useIntl)();
|
|
1516
1563
|
const [emailVal, setEmailVal] = (0, import_react5.useState)("");
|
|
@@ -1525,10 +1572,10 @@ function StepEmail(props) {
|
|
|
1525
1572
|
const onContinue = async () => {
|
|
1526
1573
|
props.onContinue(emailVal);
|
|
1527
1574
|
};
|
|
1528
|
-
return /* @__PURE__ */ (0,
|
|
1529
|
-
/* @__PURE__ */ (0,
|
|
1575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "matchid-email-email-box", children: [
|
|
1576
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Field, { label: intl.formatMessage({
|
|
1530
1577
|
id: "emailAddress"
|
|
1531
|
-
}), children: /* @__PURE__ */ (0,
|
|
1578
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
1532
1579
|
Input,
|
|
1533
1580
|
{
|
|
1534
1581
|
placeholder: intl.formatMessage({
|
|
@@ -1538,9 +1585,9 @@ function StepEmail(props) {
|
|
|
1538
1585
|
value: emailVal
|
|
1539
1586
|
}
|
|
1540
1587
|
) }),
|
|
1541
|
-
/* @__PURE__ */ (0,
|
|
1588
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Button, { disabled: !canContinue, style: {
|
|
1542
1589
|
marginTop: "64px"
|
|
1543
|
-
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
1590
|
+
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react_intl2.FormattedMessage, { id: "continue" }) })
|
|
1544
1591
|
] });
|
|
1545
1592
|
}
|
|
1546
1593
|
|
|
@@ -1963,7 +2010,7 @@ var import_react10 = require("react");
|
|
|
1963
2010
|
var import_react_dom = require("react-dom");
|
|
1964
2011
|
|
|
1965
2012
|
// src/ui/Drawer/index.tsx
|
|
1966
|
-
var
|
|
2013
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
1967
2014
|
function Drawer({
|
|
1968
2015
|
children,
|
|
1969
2016
|
showClose = true,
|
|
@@ -1974,15 +2021,15 @@ function Drawer({
|
|
|
1974
2021
|
onBack
|
|
1975
2022
|
}) {
|
|
1976
2023
|
if (!isOpen) {
|
|
1977
|
-
return /* @__PURE__ */ (0,
|
|
2024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_jsx_runtime61.Fragment, {});
|
|
1978
2025
|
}
|
|
1979
|
-
return /* @__PURE__ */ (0,
|
|
1980
|
-
/* @__PURE__ */ (0,
|
|
1981
|
-
/* @__PURE__ */ (0,
|
|
1982
|
-
onBack && /* @__PURE__ */ (0,
|
|
2026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "matchid-drawer", children: [
|
|
2027
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: `matchid-drawer-header matchid-flex`, children: [
|
|
2028
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: `matchid-drawer-header-content matchid-flex`, children: [
|
|
2029
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ArrowLeftIcon, { height: 25, width: 24, className: "matchid-drawer-header-back", onClick: onBack }),
|
|
1983
2030
|
title
|
|
1984
2031
|
] }),
|
|
1985
|
-
showClose && /* @__PURE__ */ (0,
|
|
2032
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
|
|
1986
2033
|
] }),
|
|
1987
2034
|
children
|
|
1988
2035
|
] }) });
|
|
@@ -1992,7 +2039,7 @@ function Drawer({
|
|
|
1992
2039
|
var import_react7 = require("react");
|
|
1993
2040
|
|
|
1994
2041
|
// src/ui/ModalDrawer/index.tsx
|
|
1995
|
-
var
|
|
2042
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
1996
2043
|
function ModalDrawer({
|
|
1997
2044
|
title,
|
|
1998
2045
|
drawerTitleVisible = true,
|
|
@@ -2000,9 +2047,9 @@ function ModalDrawer({
|
|
|
2000
2047
|
}) {
|
|
2001
2048
|
const isDownMd = useDownMd();
|
|
2002
2049
|
if (isDownMd) {
|
|
2003
|
-
return /* @__PURE__ */ (0,
|
|
2050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ModalWithHeader, { ...props, title });
|
|
2004
2051
|
}
|
|
2005
|
-
return /* @__PURE__ */ (0,
|
|
2052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
|
|
2006
2053
|
}
|
|
2007
2054
|
|
|
2008
2055
|
// src/assets/lottie/confirm.json
|
|
@@ -2070,7 +2117,7 @@ function useHash({
|
|
|
2070
2117
|
}
|
|
2071
2118
|
|
|
2072
2119
|
// src/ui/HashPanel/index.tsx
|
|
2073
|
-
var
|
|
2120
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2074
2121
|
function HashPanel({
|
|
2075
2122
|
hash,
|
|
2076
2123
|
chain,
|
|
@@ -2130,14 +2177,14 @@ function HashPanel({
|
|
|
2130
2177
|
}
|
|
2131
2178
|
}, [hashQuery.data]);
|
|
2132
2179
|
const link = chain ? `${chain?.blockExplorers?.default.url}/tx/${hash}` : "";
|
|
2133
|
-
return /* @__PURE__ */ (0,
|
|
2180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2134
2181
|
ModalDrawer,
|
|
2135
2182
|
{
|
|
2136
2183
|
isOpen,
|
|
2137
2184
|
showClose: true,
|
|
2138
2185
|
onClose,
|
|
2139
2186
|
zIndex,
|
|
2140
|
-
title: /* @__PURE__ */ (0,
|
|
2187
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2141
2188
|
"div",
|
|
2142
2189
|
{
|
|
2143
2190
|
className: "matchid-hashpanel-header",
|
|
@@ -2147,33 +2194,33 @@ function HashPanel({
|
|
|
2147
2194
|
children: statusValue.text
|
|
2148
2195
|
}
|
|
2149
2196
|
),
|
|
2150
|
-
children: /* @__PURE__ */ (0,
|
|
2151
|
-
/* @__PURE__ */ (0,
|
|
2152
|
-
/* @__PURE__ */ (0,
|
|
2197
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "matchid-hashpanel-box", children: [
|
|
2198
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "matchid-hashpanel-content", children: [
|
|
2199
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: `matchid-hashpanel-status`, style: {
|
|
2153
2200
|
color: statusValue.color
|
|
2154
2201
|
}, children: statusValue.text }),
|
|
2155
|
-
statusValue.lottie && /* @__PURE__ */ (0,
|
|
2202
|
+
statusValue.lottie && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Lottie_default, { animationData: statusValue.lottie, style: {
|
|
2156
2203
|
width: "96px",
|
|
2157
2204
|
height: "96px"
|
|
2158
2205
|
} }),
|
|
2159
|
-
hash && /* @__PURE__ */ (0,
|
|
2206
|
+
hash && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
|
|
2160
2207
|
"Hash:",
|
|
2161
|
-
/* @__PURE__ */ (0,
|
|
2208
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("a", { href: link, target: "_blank", children: hash })
|
|
2162
2209
|
] }),
|
|
2163
|
-
error && /* @__PURE__ */ (0,
|
|
2210
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "matchid-hashpanel-text", children: error })
|
|
2164
2211
|
] }),
|
|
2165
|
-
/* @__PURE__ */ (0,
|
|
2212
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
|
|
2166
2213
|
] })
|
|
2167
2214
|
}
|
|
2168
2215
|
);
|
|
2169
2216
|
}
|
|
2170
2217
|
function HashPanel_default(props) {
|
|
2171
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
2218
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(HashPanel, { ...props });
|
|
2172
2219
|
}
|
|
2173
2220
|
|
|
2174
2221
|
// src/ui/Popover/index.tsx
|
|
2175
2222
|
var import_react8 = require("react");
|
|
2176
|
-
var
|
|
2223
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2177
2224
|
function Popover({
|
|
2178
2225
|
children,
|
|
2179
2226
|
content,
|
|
@@ -2183,7 +2230,7 @@ function Popover({
|
|
|
2183
2230
|
gap = "20px"
|
|
2184
2231
|
}) {
|
|
2185
2232
|
const [active, setActive] = (0, import_react8.useState)(false);
|
|
2186
|
-
return children && /* @__PURE__ */ (0,
|
|
2233
|
+
return children && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
2187
2234
|
"div",
|
|
2188
2235
|
{
|
|
2189
2236
|
onClick: () => {
|
|
@@ -2194,20 +2241,20 @@ function Popover({
|
|
|
2194
2241
|
className: `matchid-popover-box matchid-popover-${position} matchid-popover-${type} ${className} ${type == "click" && active ? "matchid-popover-click-active" : ""}`,
|
|
2195
2242
|
children: [
|
|
2196
2243
|
children,
|
|
2197
|
-
/* @__PURE__ */ (0,
|
|
2244
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { style: {
|
|
2198
2245
|
paddingTop: gap
|
|
2199
|
-
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0,
|
|
2246
|
+
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: `matchid-popover-content`, children: content }) })
|
|
2200
2247
|
]
|
|
2201
2248
|
}
|
|
2202
2249
|
);
|
|
2203
2250
|
}
|
|
2204
2251
|
|
|
2205
2252
|
// src/ui/Switch/index.tsx
|
|
2206
|
-
var
|
|
2253
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2207
2254
|
|
|
2208
2255
|
// src/ui/AlphaAvatar/index.tsx
|
|
2209
2256
|
var import_react9 = require("react");
|
|
2210
|
-
var
|
|
2257
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2211
2258
|
function AlphaAvatar({
|
|
2212
2259
|
name,
|
|
2213
2260
|
size = "default",
|
|
@@ -2224,7 +2271,7 @@ function AlphaAvatar({
|
|
|
2224
2271
|
return "";
|
|
2225
2272
|
}, [name]);
|
|
2226
2273
|
const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
|
|
2227
|
-
return /* @__PURE__ */ (0,
|
|
2274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
2228
2275
|
width: numberSize,
|
|
2229
2276
|
height: numberSize,
|
|
2230
2277
|
fontSize: Math.ceil(numberSize / 2),
|
|
@@ -2233,7 +2280,7 @@ function AlphaAvatar({
|
|
|
2233
2280
|
}
|
|
2234
2281
|
|
|
2235
2282
|
// src/ui/Radio/index.tsx
|
|
2236
|
-
var
|
|
2283
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2237
2284
|
function Radio({
|
|
2238
2285
|
checked = false,
|
|
2239
2286
|
onChange,
|
|
@@ -2242,23 +2289,23 @@ function Radio({
|
|
|
2242
2289
|
className = "",
|
|
2243
2290
|
style = {}
|
|
2244
2291
|
}) {
|
|
2245
|
-
return /* @__PURE__ */ (0,
|
|
2292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
|
|
2246
2293
|
width: size,
|
|
2247
2294
|
height: size,
|
|
2248
2295
|
...style,
|
|
2249
2296
|
// @ts-ignore
|
|
2250
2297
|
"--matchid-radio-checked": color
|
|
2251
|
-
}, children: checked && /* @__PURE__ */ (0,
|
|
2298
|
+
}, children: checked && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: `matchid-radio-content`, style: {
|
|
2252
2299
|
width: Math.floor(size * 0.7),
|
|
2253
2300
|
height: Math.floor(size * 0.7)
|
|
2254
2301
|
} }) });
|
|
2255
2302
|
}
|
|
2256
2303
|
|
|
2257
2304
|
// src/ui/Skeleton/index.tsx
|
|
2258
|
-
var
|
|
2305
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2259
2306
|
|
|
2260
2307
|
// src/ui/Tabs/index.tsx
|
|
2261
|
-
var
|
|
2308
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2262
2309
|
|
|
2263
2310
|
// src/ui/Lottie/index.tsx
|
|
2264
2311
|
var import_lottie_react = require("lottie-react");
|
|
@@ -2274,10 +2321,10 @@ var LazyLottie = (props) => {
|
|
|
2274
2321
|
var Lottie_default = LazyLottie;
|
|
2275
2322
|
|
|
2276
2323
|
// src/ui/Checkbox/index.tsx
|
|
2277
|
-
var
|
|
2324
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2278
2325
|
|
|
2279
2326
|
// src/context/ModalContext.tsx
|
|
2280
|
-
var
|
|
2327
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
2281
2328
|
var ModalContext = (0, import_react10.createContext)(null);
|
|
2282
2329
|
function useModal() {
|
|
2283
2330
|
const context = (0, import_react10.useContext)(ModalContext);
|
|
@@ -2318,7 +2365,7 @@ var useTransactionStore = (0, import_zustand3.create)((0, import_middleware2.dev
|
|
|
2318
2365
|
var useTransactionStore_default = useTransactionStore;
|
|
2319
2366
|
|
|
2320
2367
|
// src/hooks/useWallet.tsx
|
|
2321
|
-
var
|
|
2368
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
2322
2369
|
var AppClientId = "react-sdk-" + getVersion();
|
|
2323
2370
|
function useWallet() {
|
|
2324
2371
|
const { address, wallet: walletConfig } = useLocalStore_default();
|
|
@@ -2492,12 +2539,12 @@ function useWallet() {
|
|
|
2492
2539
|
address: evmAccount.address
|
|
2493
2540
|
});
|
|
2494
2541
|
modal.show((props) => {
|
|
2495
|
-
return /* @__PURE__ */ (0,
|
|
2542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
|
|
2496
2543
|
});
|
|
2497
2544
|
return txHash;
|
|
2498
2545
|
} catch (error) {
|
|
2499
2546
|
modal.show((props) => {
|
|
2500
|
-
return /* @__PURE__ */ (0,
|
|
2547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, error: typeof error == "string" ? error : error.details || error.message, chain: _chain });
|
|
2501
2548
|
});
|
|
2502
2549
|
throw error;
|
|
2503
2550
|
}
|
|
@@ -2575,7 +2622,7 @@ function useCopyClipboard(timeout = 500) {
|
|
|
2575
2622
|
// src/context/ToastContext.tsx
|
|
2576
2623
|
var import_react13 = require("react");
|
|
2577
2624
|
var import_react_dom2 = require("react-dom");
|
|
2578
|
-
var
|
|
2625
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
2579
2626
|
var ToastContext = (0, import_react13.createContext)(null);
|
|
2580
2627
|
|
|
2581
2628
|
// src/hooks/api/wallet.ts
|
|
@@ -2637,7 +2684,7 @@ function useImportTokenListQuery({
|
|
|
2637
2684
|
var import_react14 = require("react");
|
|
2638
2685
|
var import_viem5 = require("viem");
|
|
2639
2686
|
var import_react_intl3 = require("react-intl");
|
|
2640
|
-
var
|
|
2687
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
2641
2688
|
function useMatchChain() {
|
|
2642
2689
|
const chainListQuery = useChainListQuery();
|
|
2643
2690
|
const modal = useModal();
|
|
@@ -2668,28 +2715,28 @@ function useMatchChain() {
|
|
|
2668
2715
|
const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
|
|
2669
2716
|
const [selectedChainId, setSelectedChainId] = (0, import_react14.useState)(storeChainId2);
|
|
2670
2717
|
const isDownMd = useDownMd();
|
|
2671
|
-
return /* @__PURE__ */ (0,
|
|
2672
|
-
/* @__PURE__ */ (0,
|
|
2673
|
-
return /* @__PURE__ */ (0,
|
|
2718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: `matchid-change-network-box`, children: [
|
|
2719
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
|
|
2720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
2674
2721
|
"div",
|
|
2675
2722
|
{
|
|
2676
2723
|
onClick: () => setSelectedChainId(item.id),
|
|
2677
2724
|
className: `matchid-change-network-item ${selectedChainId == item.id ? "matchid-change-network-selected" : ""}`,
|
|
2678
2725
|
children: [
|
|
2679
|
-
/* @__PURE__ */ (0,
|
|
2680
|
-
/* @__PURE__ */ (0,
|
|
2681
|
-
/* @__PURE__ */ (0,
|
|
2726
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
|
|
2728
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
|
|
2682
2729
|
] }),
|
|
2683
|
-
/* @__PURE__ */ (0,
|
|
2730
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
|
|
2684
2731
|
]
|
|
2685
2732
|
},
|
|
2686
2733
|
index
|
|
2687
2734
|
);
|
|
2688
2735
|
}) }),
|
|
2689
|
-
/* @__PURE__ */ (0,
|
|
2736
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
|
|
2690
2737
|
setChainId2(selectedChainId || 0);
|
|
2691
2738
|
close();
|
|
2692
|
-
}, block: true, children: /* @__PURE__ */ (0,
|
|
2739
|
+
}, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react_intl3.FormattedMessage, { id: "confirm" }) })
|
|
2693
2740
|
] });
|
|
2694
2741
|
}
|
|
2695
2742
|
const showChangeNetwork = () => {
|
|
@@ -2807,10 +2854,10 @@ var import_viem6 = require("viem");
|
|
|
2807
2854
|
var import_react_query3 = require("@tanstack/react-query");
|
|
2808
2855
|
|
|
2809
2856
|
// src/components/ImportToken/index.tsx
|
|
2810
|
-
var
|
|
2857
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
2811
2858
|
|
|
2812
2859
|
// src/hooks/useMatchWallet.tsx
|
|
2813
|
-
var
|
|
2860
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
2814
2861
|
function useMatchWalletRecords() {
|
|
2815
2862
|
const [hasMore, setHasMore] = (0, import_react16.useState)(true);
|
|
2816
2863
|
const [items, setItems] = (0, import_react16.useState)([]);
|
|
@@ -3119,39 +3166,39 @@ var CACHE_TTL2 = 86400 * 30 * 1e3;
|
|
|
3119
3166
|
var import_zustand5 = require("zustand");
|
|
3120
3167
|
|
|
3121
3168
|
// src/hooks/useConfig.tsx
|
|
3122
|
-
var
|
|
3169
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
3123
3170
|
var DEFAULT_WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
3124
3171
|
var WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
3125
3172
|
function useWalletConfig() {
|
|
3126
3173
|
const isDownMd = useDownMd();
|
|
3127
3174
|
const walletMap = {
|
|
3128
3175
|
evm: {
|
|
3129
|
-
icon: /* @__PURE__ */ (0,
|
|
3130
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3176
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(EVMDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3177
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(EVMLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3131
3178
|
name: "EVM",
|
|
3132
3179
|
method: "evm"
|
|
3133
3180
|
},
|
|
3134
3181
|
sol: {
|
|
3135
|
-
icon: /* @__PURE__ */ (0,
|
|
3136
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3182
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SOLDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3183
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SOLLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3137
3184
|
name: "SOL",
|
|
3138
3185
|
method: "sol"
|
|
3139
3186
|
},
|
|
3140
3187
|
btc: {
|
|
3141
|
-
icon: /* @__PURE__ */ (0,
|
|
3142
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3188
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(BTCDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3189
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(BTCLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3143
3190
|
name: "BTC",
|
|
3144
3191
|
method: "btc"
|
|
3145
3192
|
},
|
|
3146
3193
|
tron: {
|
|
3147
|
-
icon: /* @__PURE__ */ (0,
|
|
3148
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3194
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TRXDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3195
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TRXLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3149
3196
|
name: "TRON",
|
|
3150
3197
|
method: "tron"
|
|
3151
3198
|
},
|
|
3152
3199
|
ton: {
|
|
3153
|
-
icon: /* @__PURE__ */ (0,
|
|
3154
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3200
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TonLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3201
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TonLightIcon2, { size: isDownMd ? 36 : 40 }),
|
|
3155
3202
|
name: "TON",
|
|
3156
3203
|
method: "ton"
|
|
3157
3204
|
}
|
|
@@ -3203,14 +3250,14 @@ var useWalletModalStore = (0, import_zustand5.create)((set) => ({
|
|
|
3203
3250
|
// src/components/CEXBindModal/index.tsx
|
|
3204
3251
|
var import_react19 = require("react");
|
|
3205
3252
|
var import_react_intl6 = require("react-intl");
|
|
3206
|
-
var
|
|
3253
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
3207
3254
|
|
|
3208
3255
|
// src/context/BusinessProvider.tsx
|
|
3209
3256
|
var import_react_query8 = require("@tanstack/react-query");
|
|
3210
|
-
var
|
|
3257
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
3211
3258
|
|
|
3212
3259
|
// src/context/index.tsx
|
|
3213
|
-
var
|
|
3260
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3214
3261
|
|
|
3215
3262
|
// src/hooks/useWalletInit.ts
|
|
3216
3263
|
var import_react20 = require("react");
|
|
@@ -3290,7 +3337,7 @@ var matchTest = /* @__PURE__ */ (0, import_viem12.defineChain)({
|
|
|
3290
3337
|
|
|
3291
3338
|
// src/MatchContext.tsx
|
|
3292
3339
|
var import_wagmi = require("wagmi");
|
|
3293
|
-
var
|
|
3340
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3294
3341
|
var queryClient = new import_react_query9.QueryClient();
|
|
3295
3342
|
var wagmiConfig = (0, import_rainbowkit.getDefaultConfig)({
|
|
3296
3343
|
appName: "MatchID",
|
|
@@ -3618,7 +3665,7 @@ function useUserInfo() {
|
|
|
3618
3665
|
// src/components/EmailModal/StepVerify.tsx
|
|
3619
3666
|
var import_react24 = require("react");
|
|
3620
3667
|
var import_react_intl8 = require("react-intl");
|
|
3621
|
-
var
|
|
3668
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
3622
3669
|
function StepVerify(props) {
|
|
3623
3670
|
const intl = (0, import_react_intl8.useIntl)();
|
|
3624
3671
|
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
@@ -3695,17 +3742,17 @@ function StepVerify(props) {
|
|
|
3695
3742
|
setSubmitting(false);
|
|
3696
3743
|
}
|
|
3697
3744
|
};
|
|
3698
|
-
return /* @__PURE__ */ (0,
|
|
3699
|
-
/* @__PURE__ */ (0,
|
|
3700
|
-
/* @__PURE__ */ (0,
|
|
3701
|
-
/* @__PURE__ */ (0,
|
|
3702
|
-
/* @__PURE__ */ (0,
|
|
3703
|
-
/* @__PURE__ */ (0,
|
|
3745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "matchid-email-verify-box", children: [
|
|
3746
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "matchid-email-verify-header", children: [
|
|
3747
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
|
|
3748
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "matchid-email-verify-header-content", children: [
|
|
3749
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "matchid-email-verify-header-value", children: props.email }),
|
|
3750
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react_intl8.FormattedMessage, { id: "sendEmailTips" }) })
|
|
3704
3751
|
] })
|
|
3705
3752
|
] }),
|
|
3706
|
-
/* @__PURE__ */ (0,
|
|
3753
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Field, { label: intl.formatMessage({
|
|
3707
3754
|
id: "verificationCode"
|
|
3708
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
3755
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3709
3756
|
Input,
|
|
3710
3757
|
{
|
|
3711
3758
|
placeholder: intl.formatMessage({
|
|
@@ -3715,7 +3762,7 @@ function StepVerify(props) {
|
|
|
3715
3762
|
maxLength: codeLength,
|
|
3716
3763
|
onChange: (e) => setCode(e.target.value),
|
|
3717
3764
|
value: code,
|
|
3718
|
-
after: /* @__PURE__ */ (0,
|
|
3765
|
+
after: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3719
3766
|
Button,
|
|
3720
3767
|
{
|
|
3721
3768
|
highlight: true,
|
|
@@ -3734,13 +3781,13 @@ function StepVerify(props) {
|
|
|
3734
3781
|
)
|
|
3735
3782
|
}
|
|
3736
3783
|
) }),
|
|
3737
|
-
/* @__PURE__ */ (0,
|
|
3784
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Button, { disabled: !canContinue, loading: submitting, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react_intl8.FormattedMessage, { id: "continue" }) })
|
|
3738
3785
|
] });
|
|
3739
3786
|
}
|
|
3740
3787
|
|
|
3741
3788
|
// src/components/EmailModal/index.tsx
|
|
3742
3789
|
var import_react_intl9 = require("react-intl");
|
|
3743
|
-
var
|
|
3790
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
3744
3791
|
function EmailModal({
|
|
3745
3792
|
isOpen = false,
|
|
3746
3793
|
width = 480,
|
|
@@ -3757,7 +3804,7 @@ function EmailModal({
|
|
|
3757
3804
|
setEmailVal("");
|
|
3758
3805
|
}
|
|
3759
3806
|
}, [isOpen]);
|
|
3760
|
-
return /* @__PURE__ */ (0,
|
|
3807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
3761
3808
|
ModalWithHeader,
|
|
3762
3809
|
{
|
|
3763
3810
|
isOpen,
|
|
@@ -3767,10 +3814,10 @@ function EmailModal({
|
|
|
3767
3814
|
id: "email"
|
|
3768
3815
|
}),
|
|
3769
3816
|
onBack: step == "verify" ? () => setStep("input") : onBack,
|
|
3770
|
-
children: step === "input" ? /* @__PURE__ */ (0,
|
|
3817
|
+
children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
|
|
3771
3818
|
setEmailVal(email);
|
|
3772
3819
|
setStep("verify");
|
|
3773
|
-
} }) : /* @__PURE__ */ (0,
|
|
3820
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(StepVerify, { email: emailVal, onSuccess: onLogin })
|
|
3774
3821
|
}
|
|
3775
3822
|
);
|
|
3776
3823
|
}
|
|
@@ -3800,7 +3847,7 @@ function useAppConfig() {
|
|
|
3800
3847
|
}
|
|
3801
3848
|
|
|
3802
3849
|
// src/components/LoginBox/index.tsx
|
|
3803
|
-
var
|
|
3850
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
3804
3851
|
var RecommendItem = ({
|
|
3805
3852
|
icon,
|
|
3806
3853
|
name,
|
|
@@ -3809,20 +3856,20 @@ var RecommendItem = ({
|
|
|
3809
3856
|
children,
|
|
3810
3857
|
footer
|
|
3811
3858
|
}) => {
|
|
3812
|
-
return /* @__PURE__ */ (0,
|
|
3813
|
-
/* @__PURE__ */ (0,
|
|
3814
|
-
/* @__PURE__ */ (0,
|
|
3815
|
-
/* @__PURE__ */ (0,
|
|
3816
|
-
/* @__PURE__ */ (0,
|
|
3859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-login-recommend-method", children: [
|
|
3860
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-login-recommend-method-item", onClick, children: [
|
|
3861
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-login-recommend-method-content", children: [
|
|
3862
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-login-recommend-method-icon", children: icon }),
|
|
3863
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "matchid-login-recommend-method-name", children: name })
|
|
3817
3864
|
] }),
|
|
3818
|
-
footer ? footer : children ? /* @__PURE__ */ (0,
|
|
3865
|
+
footer ? footer : children ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
3819
3866
|
ArrowDownIcon,
|
|
3820
3867
|
{
|
|
3821
3868
|
className: `matchid-login-recommend-method-arrow ${showChildren ? "matchid-login-recommend-method-arrow-active" : ""}`,
|
|
3822
3869
|
size: 20,
|
|
3823
3870
|
color: "var(--matchid-arrow-color)"
|
|
3824
3871
|
}
|
|
3825
|
-
) : /* @__PURE__ */ (0,
|
|
3872
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
3826
3873
|
ArrowRightIcon,
|
|
3827
3874
|
{
|
|
3828
3875
|
className: "matchid-login-recommend-method-arrow",
|
|
@@ -3831,7 +3878,7 @@ var RecommendItem = ({
|
|
|
3831
3878
|
}
|
|
3832
3879
|
)
|
|
3833
3880
|
] }),
|
|
3834
|
-
children && /* @__PURE__ */ (0,
|
|
3881
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
3835
3882
|
"div",
|
|
3836
3883
|
{
|
|
3837
3884
|
className: `matchid-login-recommend-method-popover ${showChildren ? "matchid-login-recommend-method-popover-active" : ""}`,
|
|
@@ -3896,75 +3943,75 @@ function LoginBox({
|
|
|
3896
3943
|
const isDownMd = useDownMd();
|
|
3897
3944
|
const methodMap = {
|
|
3898
3945
|
wallet: {
|
|
3899
|
-
icon: /* @__PURE__ */ (0,
|
|
3946
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(WalletIcon, { size: isDownMd ? 36 : 40 }),
|
|
3900
3947
|
name: intl.formatMessage({ id: "wallet" }),
|
|
3901
3948
|
onClick: () => setShowWallet(!showWallet),
|
|
3902
3949
|
type: "wallet"
|
|
3903
3950
|
},
|
|
3904
3951
|
email: {
|
|
3905
|
-
icon: /* @__PURE__ */ (0,
|
|
3952
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
|
|
3906
3953
|
name: intl.formatMessage({ id: "email" }),
|
|
3907
3954
|
onClick: () => {
|
|
3908
3955
|
setEmailOpen(true);
|
|
3909
3956
|
}
|
|
3910
3957
|
},
|
|
3911
3958
|
google: {
|
|
3912
|
-
icon: /* @__PURE__ */ (0,
|
|
3959
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(GoogleIcon, { size: isDownMd ? 36 : 40 }),
|
|
3913
3960
|
name: "Google",
|
|
3914
3961
|
onClick: () => login("google")
|
|
3915
3962
|
},
|
|
3916
3963
|
twitter: {
|
|
3917
|
-
icon: /* @__PURE__ */ (0,
|
|
3964
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(XIcon, { size: isDownMd ? 36 : 40 }),
|
|
3918
3965
|
name: "X",
|
|
3919
3966
|
onClick: () => login("twitter")
|
|
3920
3967
|
},
|
|
3921
3968
|
telegram: {
|
|
3922
|
-
icon: /* @__PURE__ */ (0,
|
|
3969
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TelegramIcon, { size: isDownMd ? 36 : 40 }),
|
|
3923
3970
|
name: "Telegram",
|
|
3924
3971
|
onClick: () => login("telegram")
|
|
3925
3972
|
},
|
|
3926
3973
|
github: {
|
|
3927
|
-
icon: /* @__PURE__ */ (0,
|
|
3974
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(GithubIcon, { size: isDownMd ? 36 : 40 }),
|
|
3928
3975
|
name: "Github",
|
|
3929
3976
|
onClick: () => login("github")
|
|
3930
3977
|
},
|
|
3931
3978
|
discord: {
|
|
3932
|
-
icon: /* @__PURE__ */ (0,
|
|
3979
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(DiscordIcon, { size: isDownMd ? 36 : 40 }),
|
|
3933
3980
|
name: "Discord",
|
|
3934
3981
|
onClick: () => login("discord")
|
|
3935
3982
|
},
|
|
3936
3983
|
linkedin: {
|
|
3937
|
-
icon: /* @__PURE__ */ (0,
|
|
3984
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
|
|
3938
3985
|
name: "LinkedIn",
|
|
3939
3986
|
onClick: () => login("linkedin")
|
|
3940
3987
|
},
|
|
3941
3988
|
facebook: {
|
|
3942
|
-
icon: /* @__PURE__ */ (0,
|
|
3989
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(FacebookIcon, { size: isDownMd ? 36 : 40 }),
|
|
3943
3990
|
name: "Facebook",
|
|
3944
3991
|
onClick: () => login("facebook")
|
|
3945
3992
|
},
|
|
3946
3993
|
youtube: {
|
|
3947
|
-
icon: /* @__PURE__ */ (0,
|
|
3994
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
|
|
3948
3995
|
name: "Youtube",
|
|
3949
3996
|
onClick: () => login("youtube")
|
|
3950
3997
|
}
|
|
3951
3998
|
};
|
|
3952
3999
|
const { walletMap } = useWalletConfig();
|
|
3953
|
-
return /* @__PURE__ */ (0,
|
|
3954
|
-
(!inModal || !emailOpen) && /* @__PURE__ */ (0,
|
|
3955
|
-
/* @__PURE__ */ (0,
|
|
3956
|
-
return /* @__PURE__ */ (0,
|
|
4000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
|
|
4001
|
+
(!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-login-box", children: [
|
|
4002
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
|
|
4003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
3957
4004
|
RecommendItem,
|
|
3958
4005
|
{
|
|
3959
4006
|
icon: methodMap[m]?.icon,
|
|
3960
4007
|
name: methodMap[m]?.name,
|
|
3961
4008
|
onClick: methodMap[m]?.onClick,
|
|
3962
4009
|
showChildren: m == "wallet" && showWallet,
|
|
3963
|
-
children: m == "wallet" && /* @__PURE__ */ (0,
|
|
3964
|
-
/* @__PURE__ */ (0,
|
|
3965
|
-
/* @__PURE__ */ (0,
|
|
4010
|
+
children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
|
|
4011
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
|
|
4012
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
|
|
3966
4013
|
const m2 = walletMap[n];
|
|
3967
|
-
return /* @__PURE__ */ (0,
|
|
4014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
3968
4015
|
"div",
|
|
3969
4016
|
{
|
|
3970
4017
|
className: "matchid-login-recommend-wallet-item",
|
|
@@ -3972,16 +4019,16 @@ function LoginBox({
|
|
|
3972
4019
|
login(m2.method);
|
|
3973
4020
|
},
|
|
3974
4021
|
children: [
|
|
3975
|
-
/* @__PURE__ */ (0,
|
|
3976
|
-
/* @__PURE__ */ (0,
|
|
3977
|
-
/* @__PURE__ */ (0,
|
|
4022
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
|
|
4023
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
|
|
4024
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
3978
4025
|
"div",
|
|
3979
4026
|
{
|
|
3980
4027
|
className: "matchid-login-recommend-wallet-item-hover-icon",
|
|
3981
4028
|
children: m2.activeIcon
|
|
3982
4029
|
}
|
|
3983
4030
|
),
|
|
3984
|
-
/* @__PURE__ */ (0,
|
|
4031
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
3985
4032
|
"span",
|
|
3986
4033
|
{
|
|
3987
4034
|
className: "matchid-login-recommend-wallet-item-name",
|
|
@@ -3989,7 +4036,7 @@ function LoginBox({
|
|
|
3989
4036
|
}
|
|
3990
4037
|
)
|
|
3991
4038
|
] }),
|
|
3992
|
-
/* @__PURE__ */ (0,
|
|
4039
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
3993
4040
|
ArrowRightIcon,
|
|
3994
4041
|
{
|
|
3995
4042
|
className: "matchid-login-recommend-wallet-item-arrow",
|
|
@@ -4007,10 +4054,10 @@ function LoginBox({
|
|
|
4007
4054
|
m
|
|
4008
4055
|
);
|
|
4009
4056
|
}) }),
|
|
4010
|
-
methodConfig.methods.length > 0 && /* @__PURE__ */ (0,
|
|
4011
|
-
/* @__PURE__ */ (0,
|
|
4012
|
-
/* @__PURE__ */ (0,
|
|
4013
|
-
return /* @__PURE__ */ (0,
|
|
4057
|
+
methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-login-other", children: [
|
|
4058
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_intl10.FormattedMessage, { id: "otherLoginMethods" }) }),
|
|
4059
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
4060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
4014
4061
|
"div",
|
|
4015
4062
|
{
|
|
4016
4063
|
className: "matchid-login-method-item",
|
|
@@ -4023,7 +4070,7 @@ function LoginBox({
|
|
|
4023
4070
|
}) })
|
|
4024
4071
|
] })
|
|
4025
4072
|
] }),
|
|
4026
|
-
/* @__PURE__ */ (0,
|
|
4073
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
4027
4074
|
EmailModal,
|
|
4028
4075
|
{
|
|
4029
4076
|
isOpen: emailOpen,
|
|
@@ -4043,40 +4090,40 @@ var import_react28 = require("react");
|
|
|
4043
4090
|
|
|
4044
4091
|
// src/components/LoginPanel/index.tsx
|
|
4045
4092
|
var import_react_intl11 = require("react-intl");
|
|
4046
|
-
var
|
|
4093
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
4047
4094
|
function LoginPanel({
|
|
4048
4095
|
header,
|
|
4049
4096
|
onClose,
|
|
4050
4097
|
...props
|
|
4051
4098
|
}) {
|
|
4052
4099
|
const isDownMd = useDownMd();
|
|
4053
|
-
return /* @__PURE__ */ (0,
|
|
4054
|
-
header ? header : /* @__PURE__ */ (0,
|
|
4055
|
-
/* @__PURE__ */ (0,
|
|
4056
|
-
/* @__PURE__ */ (0,
|
|
4057
|
-
/* @__PURE__ */ (0,
|
|
4100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-login-panel", children: [
|
|
4101
|
+
header ? header : /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-login-panel-header", children: [
|
|
4102
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-login-panel-header-content", children: [
|
|
4103
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl11.FormattedMessage, { id: "loginTitle" }) }),
|
|
4104
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl11.FormattedMessage, { id: "loginTips" }) })
|
|
4058
4105
|
] }),
|
|
4059
|
-
onClose && /* @__PURE__ */ (0,
|
|
4106
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
|
|
4060
4107
|
] }),
|
|
4061
|
-
/* @__PURE__ */ (0,
|
|
4062
|
-
/* @__PURE__ */ (0,
|
|
4108
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-login-panel-divide" }),
|
|
4109
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(LoginBox, { ...props }) })
|
|
4063
4110
|
] });
|
|
4064
4111
|
}
|
|
4065
4112
|
|
|
4066
4113
|
// src/components/LoginModal/index.tsx
|
|
4067
|
-
var
|
|
4114
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
4068
4115
|
function LoginModal({
|
|
4069
4116
|
isOpen = false,
|
|
4070
4117
|
width = 480,
|
|
4071
4118
|
...props
|
|
4072
4119
|
}) {
|
|
4073
4120
|
const { isLogin } = useUserInfo();
|
|
4074
|
-
return /* @__PURE__ */ (0,
|
|
4121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
4075
4122
|
Modal,
|
|
4076
4123
|
{
|
|
4077
4124
|
isOpen: isOpen && !isLogin,
|
|
4078
4125
|
width,
|
|
4079
|
-
children: /* @__PURE__ */ (0,
|
|
4126
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(LoginPanel, { ...props, inModal: true })
|
|
4080
4127
|
}
|
|
4081
4128
|
);
|
|
4082
4129
|
}
|
|
@@ -4085,10 +4132,10 @@ function LoginModal({
|
|
|
4085
4132
|
var import_react27 = require("react");
|
|
4086
4133
|
|
|
4087
4134
|
// src/assets/icon/ProfileIcon.tsx
|
|
4088
|
-
var
|
|
4135
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
4089
4136
|
function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
4090
|
-
return /* @__PURE__ */ (0,
|
|
4091
|
-
/* @__PURE__ */ (0,
|
|
4137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
4138
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4092
4139
|
"path",
|
|
4093
4140
|
{
|
|
4094
4141
|
fillRule: "evenodd",
|
|
@@ -4097,7 +4144,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
4097
4144
|
fill: color
|
|
4098
4145
|
}
|
|
4099
4146
|
),
|
|
4100
|
-
/* @__PURE__ */ (0,
|
|
4147
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4101
4148
|
"path",
|
|
4102
4149
|
{
|
|
4103
4150
|
fillRule: "evenodd",
|
|
@@ -4111,7 +4158,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
4111
4158
|
|
|
4112
4159
|
// src/components/UserPopover/index.tsx
|
|
4113
4160
|
var import_react_intl12 = require("react-intl");
|
|
4114
|
-
var
|
|
4161
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
4115
4162
|
function UserContent() {
|
|
4116
4163
|
const { logout, address, username } = useUserInfo();
|
|
4117
4164
|
const [logouting, setLogouting] = (0, import_react27.useState)(false);
|
|
@@ -4132,34 +4179,34 @@ function UserContent() {
|
|
|
4132
4179
|
rightIcon,
|
|
4133
4180
|
onClick
|
|
4134
4181
|
}) => {
|
|
4135
|
-
return /* @__PURE__ */ (0,
|
|
4136
|
-
/* @__PURE__ */ (0,
|
|
4182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-user-popover-item", onClick, children: [
|
|
4183
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: `matchid-user-popover-item-content`, children: [
|
|
4137
4184
|
icon,
|
|
4138
|
-
/* @__PURE__ */ (0,
|
|
4185
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-user-popover-item-text", children })
|
|
4139
4186
|
] }),
|
|
4140
4187
|
rightIcon
|
|
4141
4188
|
] });
|
|
4142
4189
|
};
|
|
4143
4190
|
const UserDivider = () => {
|
|
4144
|
-
return /* @__PURE__ */ (0,
|
|
4191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: `matchid-user-popover-divider` });
|
|
4145
4192
|
};
|
|
4146
4193
|
const [usernameOpen, setUsernameOpen] = (0, import_react27.useState)(false);
|
|
4147
4194
|
const [copied, setCopied] = useCopyClipboard();
|
|
4148
4195
|
const intl = (0, import_react_intl12.useIntl)();
|
|
4149
|
-
return /* @__PURE__ */ (0,
|
|
4150
|
-
/* @__PURE__ */ (0,
|
|
4151
|
-
/* @__PURE__ */ (0,
|
|
4196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-user-popover-content", children: [
|
|
4197
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-user-popover-list", children: [
|
|
4198
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(UserItem, { onClick: () => {
|
|
4152
4199
|
setCopied(address);
|
|
4153
|
-
}, icon: copied ? /* @__PURE__ */ (0,
|
|
4154
|
-
/* @__PURE__ */ (0,
|
|
4155
|
-
/* @__PURE__ */ (0,
|
|
4200
|
+
}, icon: copied ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(CheckIcon, { size: 20, color: "#0ecb81" }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(CopyIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(CheckIcon, { size: 20, color: "var(--icon-color)" }), children: truncateAddress(address) }),
|
|
4201
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(UserDivider, {}),
|
|
4202
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(UserItem, { onClick: () => {
|
|
4156
4203
|
setUsernameOpen(true);
|
|
4157
|
-
}, icon: /* @__PURE__ */ (0,
|
|
4204
|
+
}, icon: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ProfileIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ArrowRightIcon, { size: 20, color: "var(--icon-color)" }), children: username || intl.formatMessage({
|
|
4158
4205
|
id: "setUsername"
|
|
4159
4206
|
}) })
|
|
4160
4207
|
] }),
|
|
4161
|
-
/* @__PURE__ */ (0,
|
|
4162
|
-
/* @__PURE__ */ (0,
|
|
4208
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react_intl12.FormattedMessage, { id: "disconnect" }) }),
|
|
4209
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(UsernameModal, { isOpen: usernameOpen, onClose: () => {
|
|
4163
4210
|
setUsernameOpen(false);
|
|
4164
4211
|
}, onSuccess: () => {
|
|
4165
4212
|
setUsernameOpen(false);
|
|
@@ -4170,12 +4217,12 @@ function UserPopover({
|
|
|
4170
4217
|
children,
|
|
4171
4218
|
...props
|
|
4172
4219
|
}) {
|
|
4173
|
-
return /* @__PURE__ */ (0,
|
|
4220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Popover, { ...props, content: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(UserContent, {}), children });
|
|
4174
4221
|
}
|
|
4175
4222
|
|
|
4176
4223
|
// src/components/LoginButton/index.tsx
|
|
4177
4224
|
var import_react_intl13 = require("react-intl");
|
|
4178
|
-
var
|
|
4225
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
4179
4226
|
function LoginButton({
|
|
4180
4227
|
loginRender,
|
|
4181
4228
|
methods,
|
|
@@ -4191,8 +4238,8 @@ function LoginButton({
|
|
|
4191
4238
|
const { isLogin, username } = useUserInfo();
|
|
4192
4239
|
const [loginOpen, setLoginOpen] = (0, import_react28.useState)(false);
|
|
4193
4240
|
if (!isLogin) {
|
|
4194
|
-
return /* @__PURE__ */ (0,
|
|
4195
|
-
/* @__PURE__ */ (0,
|
|
4241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_jsx_runtime89.Fragment, { children: [
|
|
4242
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4196
4243
|
LoginModal,
|
|
4197
4244
|
{
|
|
4198
4245
|
methods,
|
|
@@ -4202,15 +4249,15 @@ function LoginButton({
|
|
|
4202
4249
|
onClose: () => setLoginOpen(false)
|
|
4203
4250
|
}
|
|
4204
4251
|
),
|
|
4205
|
-
/* @__PURE__ */ (0,
|
|
4206
|
-
/* @__PURE__ */ (0,
|
|
4207
|
-
/* @__PURE__ */ (0,
|
|
4252
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
|
|
4253
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(UnLoginIcon_default, {}),
|
|
4254
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react_intl13.FormattedMessage, { id: "login" }) })
|
|
4208
4255
|
] })
|
|
4209
4256
|
] });
|
|
4210
4257
|
}
|
|
4211
|
-
return loginRender ? /* @__PURE__ */ (0,
|
|
4212
|
-
/* @__PURE__ */ (0,
|
|
4213
|
-
/* @__PURE__ */ (0,
|
|
4258
|
+
return loginRender ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_jsx_runtime89.Fragment, { children: loginRender }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(UserPopover, { position: popoverPosition, type: popoverType, gap: popoverGap, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(Button, { onClick: onLoginClick, className: "matchid-login-btn", ...props, children: [
|
|
4259
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(LoginIcon_default, {}),
|
|
4260
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { children: username ? truncateAddress(username) : "MatchID " + intl.formatMessage({
|
|
4214
4261
|
id: "user"
|
|
4215
4262
|
}) })
|
|
4216
4263
|
] }) });
|
|
@@ -4219,15 +4266,15 @@ function LoginButton({
|
|
|
4219
4266
|
// src/components/UsernameModal/index.tsx
|
|
4220
4267
|
var import_react29 = require("react");
|
|
4221
4268
|
var import_react_intl14 = require("react-intl");
|
|
4222
|
-
var
|
|
4269
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
4223
4270
|
var ValidItem = ({
|
|
4224
4271
|
success = false,
|
|
4225
4272
|
text
|
|
4226
4273
|
}) => {
|
|
4227
4274
|
const isDownMd = useDownMd();
|
|
4228
|
-
return /* @__PURE__ */ (0,
|
|
4229
|
-
success ? /* @__PURE__ */ (0,
|
|
4230
|
-
/* @__PURE__ */ (0,
|
|
4275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
|
|
4276
|
+
success ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
|
|
4277
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { children: text })
|
|
4231
4278
|
] });
|
|
4232
4279
|
};
|
|
4233
4280
|
function UsernameModal({
|
|
@@ -4275,12 +4322,12 @@ function UsernameModal({
|
|
|
4275
4322
|
}
|
|
4276
4323
|
};
|
|
4277
4324
|
const intl = (0, import_react_intl14.useIntl)();
|
|
4278
|
-
return /* @__PURE__ */ (0,
|
|
4325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
|
|
4279
4326
|
id: username ? "editUsernameTitle" : "setUsernameTitle"
|
|
4280
|
-
}), children: /* @__PURE__ */ (0,
|
|
4281
|
-
/* @__PURE__ */ (0,
|
|
4327
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "matchid-username-box", children: [
|
|
4328
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Field, { label: intl.formatMessage({
|
|
4282
4329
|
id: "username"
|
|
4283
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
4330
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4284
4331
|
Input,
|
|
4285
4332
|
{
|
|
4286
4333
|
placeholder: intl.formatMessage({
|
|
@@ -4293,8 +4340,8 @@ function UsernameModal({
|
|
|
4293
4340
|
value: val
|
|
4294
4341
|
}
|
|
4295
4342
|
) }),
|
|
4296
|
-
/* @__PURE__ */ (0,
|
|
4297
|
-
/* @__PURE__ */ (0,
|
|
4343
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "matchid-valid", children: [
|
|
4344
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4298
4345
|
ValidItem,
|
|
4299
4346
|
{
|
|
4300
4347
|
success: isValid,
|
|
@@ -4303,16 +4350,16 @@ function UsernameModal({
|
|
|
4303
4350
|
})
|
|
4304
4351
|
}
|
|
4305
4352
|
),
|
|
4306
|
-
/* @__PURE__ */ (0,
|
|
4353
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ValidItem, { success: isLength, text: intl.formatMessage({
|
|
4307
4354
|
id: "usernameLengthError"
|
|
4308
4355
|
}) })
|
|
4309
4356
|
] }),
|
|
4310
|
-
/* @__PURE__ */ (0,
|
|
4357
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Button, { disabled: !isSafe, loading: isSubmitting, style: {
|
|
4311
4358
|
marginTop: isDownMd ? "36px" : "64px"
|
|
4312
|
-
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
4313
|
-
/* @__PURE__ */ (0,
|
|
4359
|
+
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react_intl14.FormattedMessage, { id: "confirm" }) }),
|
|
4360
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Button, { style: {
|
|
4314
4361
|
marginTop: isDownMd ? "12px" : "24px"
|
|
4315
|
-
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0,
|
|
4362
|
+
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react_intl14.FormattedMessage, { id: "cancel" }) })
|
|
4316
4363
|
] }) });
|
|
4317
4364
|
}
|
|
4318
4365
|
|
|
@@ -4331,7 +4378,7 @@ var walletConnectImage = wallet_default;
|
|
|
4331
4378
|
var walletSigningImage = signing_default;
|
|
4332
4379
|
|
|
4333
4380
|
// src/components/WalletModalContent/index.tsx
|
|
4334
|
-
var
|
|
4381
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
4335
4382
|
function WalletModalContent({
|
|
4336
4383
|
status,
|
|
4337
4384
|
error,
|
|
@@ -4401,15 +4448,15 @@ function WalletModalContent({
|
|
|
4401
4448
|
statusImage: walletConnectImage
|
|
4402
4449
|
};
|
|
4403
4450
|
}, [visible, connected, status, error, address]);
|
|
4404
|
-
return /* @__PURE__ */ (0,
|
|
4405
|
-
/* @__PURE__ */ (0,
|
|
4406
|
-
/* @__PURE__ */ (0,
|
|
4451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
4452
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
4453
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
4407
4454
|
width: 128,
|
|
4408
4455
|
height: 128
|
|
4409
4456
|
} }),
|
|
4410
|
-
/* @__PURE__ */ (0,
|
|
4457
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: pageData.isError ? "matchid-error" : "", children: pageData.text })
|
|
4411
4458
|
] }),
|
|
4412
|
-
/* @__PURE__ */ (0,
|
|
4459
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
4413
4460
|
Button,
|
|
4414
4461
|
{
|
|
4415
4462
|
block: true,
|
|
@@ -4485,15 +4532,15 @@ function WalletModalContentV2(props) {
|
|
|
4485
4532
|
statusImage: walletConnectImage
|
|
4486
4533
|
};
|
|
4487
4534
|
}, [props, submitting]);
|
|
4488
|
-
return /* @__PURE__ */ (0,
|
|
4489
|
-
/* @__PURE__ */ (0,
|
|
4490
|
-
/* @__PURE__ */ (0,
|
|
4535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
4536
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
4537
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
4491
4538
|
width: 128,
|
|
4492
4539
|
height: 128
|
|
4493
4540
|
} }),
|
|
4494
|
-
/* @__PURE__ */ (0,
|
|
4541
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: props.status == "error" ? "matchid-error" : "", children: pageData.text })
|
|
4495
4542
|
] }),
|
|
4496
|
-
/* @__PURE__ */ (0,
|
|
4543
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
4497
4544
|
Button,
|
|
4498
4545
|
{
|
|
4499
4546
|
block: true,
|
|
@@ -4775,7 +4822,7 @@ async function getEthersSigner(config, { chainId } = {}) {
|
|
|
4775
4822
|
// src/components/EVMModal/index.tsx
|
|
4776
4823
|
var import_siwe = require("siwe");
|
|
4777
4824
|
var import_styles = require("@rainbow-me/rainbowkit/styles.css");
|
|
4778
|
-
var
|
|
4825
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
4779
4826
|
function WalletContent({
|
|
4780
4827
|
onSuccess,
|
|
4781
4828
|
type
|
|
@@ -4933,7 +4980,7 @@ function WalletContent({
|
|
|
4933
4980
|
setNonce(void 0);
|
|
4934
4981
|
setStatus("start");
|
|
4935
4982
|
};
|
|
4936
|
-
return /* @__PURE__ */ (0,
|
|
4983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
4937
4984
|
WalletModalContentV2,
|
|
4938
4985
|
{
|
|
4939
4986
|
status,
|
|
@@ -4951,14 +4998,14 @@ function EVMConnectModal({
|
|
|
4951
4998
|
...props
|
|
4952
4999
|
}) {
|
|
4953
5000
|
const intl = (0, import_react_intl15.useIntl)();
|
|
4954
|
-
return /* @__PURE__ */ (0,
|
|
5001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4955
5002
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4956
5003
|
}, {
|
|
4957
5004
|
name: "EVM"
|
|
4958
|
-
}), children: /* @__PURE__ */ (0,
|
|
5005
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(WalletContent, { onSuccess, type }) });
|
|
4959
5006
|
}
|
|
4960
5007
|
function EVMModal(props) {
|
|
4961
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5008
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_rainbowkit2.RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(EVMConnectModal, { ...props }) });
|
|
4962
5009
|
}
|
|
4963
5010
|
|
|
4964
5011
|
// src/components/TRONModal/index.tsx
|
|
@@ -5073,7 +5120,7 @@ var useTRONWallet = () => {
|
|
|
5073
5120
|
};
|
|
5074
5121
|
|
|
5075
5122
|
// src/components/TRONModal/index.tsx
|
|
5076
|
-
var
|
|
5123
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
5077
5124
|
function TRONConnectModal({
|
|
5078
5125
|
type = "login",
|
|
5079
5126
|
onSuccess,
|
|
@@ -5083,9 +5130,9 @@ function TRONConnectModal({
|
|
|
5083
5130
|
const intl = (0, import_react_intl16.useIntl)();
|
|
5084
5131
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
|
|
5085
5132
|
const iconMaps = {
|
|
5086
|
-
tronlink: /* @__PURE__ */ (0,
|
|
5087
|
-
bitget: /* @__PURE__ */ (0,
|
|
5088
|
-
okx: /* @__PURE__ */ (0,
|
|
5133
|
+
tronlink: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
|
|
5134
|
+
bitget: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(BitgetIcon, { size: isDownMd ? 36 : 40 }),
|
|
5135
|
+
okx: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(OKXIcon, { size: isDownMd ? 36 : 40 })
|
|
5089
5136
|
};
|
|
5090
5137
|
const { events, login } = useMatch();
|
|
5091
5138
|
const [status, setStatus] = (0, import_react34.useState)("");
|
|
@@ -5177,11 +5224,11 @@ function TRONConnectModal({
|
|
|
5177
5224
|
disconnect();
|
|
5178
5225
|
}
|
|
5179
5226
|
}, [props.isOpen]);
|
|
5180
|
-
return /* @__PURE__ */ (0,
|
|
5227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5181
5228
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5182
5229
|
}, {
|
|
5183
5230
|
name: "TRON"
|
|
5184
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5231
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
5185
5232
|
WalletModalContent,
|
|
5186
5233
|
{
|
|
5187
5234
|
error,
|
|
@@ -5194,9 +5241,9 @@ function TRONConnectModal({
|
|
|
5194
5241
|
setVisible: () => {
|
|
5195
5242
|
}
|
|
5196
5243
|
}
|
|
5197
|
-
) : /* @__PURE__ */ (0,
|
|
5244
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
5198
5245
|
installedWallets.map((wallet2) => {
|
|
5199
|
-
return /* @__PURE__ */ (0,
|
|
5246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
5200
5247
|
RecommendItem,
|
|
5201
5248
|
{
|
|
5202
5249
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -5209,14 +5256,14 @@ function TRONConnectModal({
|
|
|
5209
5256
|
);
|
|
5210
5257
|
}),
|
|
5211
5258
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
5212
|
-
return /* @__PURE__ */ (0,
|
|
5259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
5213
5260
|
RecommendItem,
|
|
5214
5261
|
{
|
|
5215
5262
|
icon: iconMaps[wallet2.walletKey],
|
|
5216
5263
|
name: wallet2.name,
|
|
5217
5264
|
onClick: () => {
|
|
5218
5265
|
},
|
|
5219
|
-
footer: /* @__PURE__ */ (0,
|
|
5266
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { size: "sm", onClick: () => {
|
|
5220
5267
|
window.open(wallet2.website);
|
|
5221
5268
|
}, children: "Install" })
|
|
5222
5269
|
},
|
|
@@ -5226,14 +5273,14 @@ function TRONConnectModal({
|
|
|
5226
5273
|
] }) }) });
|
|
5227
5274
|
}
|
|
5228
5275
|
function TRONModal(props) {
|
|
5229
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5276
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(TRONConnectModal, { ...props, type: props.type });
|
|
5230
5277
|
}
|
|
5231
5278
|
|
|
5232
5279
|
// src/components/TONModal/index.tsx
|
|
5233
5280
|
var import_react35 = __toESM(require("react"));
|
|
5234
5281
|
var import_react_intl17 = require("react-intl");
|
|
5235
5282
|
var import_ui_react = require("@tonconnect/ui-react");
|
|
5236
|
-
var
|
|
5283
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
5237
5284
|
function WalletContent2({
|
|
5238
5285
|
onSuccess,
|
|
5239
5286
|
type
|
|
@@ -5360,7 +5407,7 @@ function WalletContent2({
|
|
|
5360
5407
|
}
|
|
5361
5408
|
}
|
|
5362
5409
|
}, [state]);
|
|
5363
|
-
return /* @__PURE__ */ (0,
|
|
5410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5364
5411
|
WalletModalContent,
|
|
5365
5412
|
{
|
|
5366
5413
|
connected,
|
|
@@ -5394,20 +5441,20 @@ function TONConnectModal({
|
|
|
5394
5441
|
const intl = (0, import_react_intl17.useIntl)();
|
|
5395
5442
|
const { endpoints, appid } = useLocalStore_default();
|
|
5396
5443
|
const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
|
|
5397
|
-
return /* @__PURE__ */ (0,
|
|
5444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5398
5445
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5399
5446
|
}, {
|
|
5400
5447
|
name: "TON"
|
|
5401
|
-
}), children: /* @__PURE__ */ (0,
|
|
5448
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5402
5449
|
import_ui_react.TonConnectUIProvider,
|
|
5403
5450
|
{
|
|
5404
5451
|
manifestUrl,
|
|
5405
|
-
children: /* @__PURE__ */ (0,
|
|
5452
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(WalletContent2, { onSuccess, type })
|
|
5406
5453
|
}
|
|
5407
5454
|
) });
|
|
5408
5455
|
}
|
|
5409
5456
|
function TONModal(props) {
|
|
5410
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5457
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(TONConnectModal, { ...props });
|
|
5411
5458
|
}
|
|
5412
5459
|
|
|
5413
5460
|
// src/components/BTCModal/index.tsx
|
|
@@ -5630,7 +5677,7 @@ var useBTCWallet = () => {
|
|
|
5630
5677
|
};
|
|
5631
5678
|
|
|
5632
5679
|
// src/components/BTCModal/index.tsx
|
|
5633
|
-
var
|
|
5680
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
5634
5681
|
function BTCConnectModal({
|
|
5635
5682
|
type = "login",
|
|
5636
5683
|
onSuccess,
|
|
@@ -5640,10 +5687,10 @@ function BTCConnectModal({
|
|
|
5640
5687
|
const intl = (0, import_react_intl18.useIntl)();
|
|
5641
5688
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
|
|
5642
5689
|
const iconMaps = {
|
|
5643
|
-
leather: /* @__PURE__ */ (0,
|
|
5644
|
-
unisat: /* @__PURE__ */ (0,
|
|
5645
|
-
xverse: /* @__PURE__ */ (0,
|
|
5646
|
-
phantom: /* @__PURE__ */ (0,
|
|
5690
|
+
leather: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(LeatherIcon, { size: isDownMd ? 36 : 40 }),
|
|
5691
|
+
unisat: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(UnisatIcon, { size: isDownMd ? 36 : 40 }),
|
|
5692
|
+
xverse: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(XverseIcon, { size: isDownMd ? 36 : 40 }),
|
|
5693
|
+
phantom: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(PhantomIcon, { size: isDownMd ? 36 : 40 })
|
|
5647
5694
|
};
|
|
5648
5695
|
const { events, login } = useMatch();
|
|
5649
5696
|
const [status, setStatus] = (0, import_react37.useState)("");
|
|
@@ -5743,11 +5790,11 @@ function BTCConnectModal({
|
|
|
5743
5790
|
statusRef.current = "";
|
|
5744
5791
|
setError("");
|
|
5745
5792
|
};
|
|
5746
|
-
return /* @__PURE__ */ (0,
|
|
5793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5747
5794
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5748
5795
|
}, {
|
|
5749
5796
|
name: "BTC"
|
|
5750
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5797
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5751
5798
|
WalletModalContent,
|
|
5752
5799
|
{
|
|
5753
5800
|
error,
|
|
@@ -5760,9 +5807,9 @@ function BTCConnectModal({
|
|
|
5760
5807
|
setVisible: () => {
|
|
5761
5808
|
}
|
|
5762
5809
|
}
|
|
5763
|
-
) : /* @__PURE__ */ (0,
|
|
5810
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
5764
5811
|
installedWallets.map((wallet2) => {
|
|
5765
|
-
return /* @__PURE__ */ (0,
|
|
5812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5766
5813
|
RecommendItem,
|
|
5767
5814
|
{
|
|
5768
5815
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -5775,14 +5822,14 @@ function BTCConnectModal({
|
|
|
5775
5822
|
);
|
|
5776
5823
|
}),
|
|
5777
5824
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
5778
|
-
return /* @__PURE__ */ (0,
|
|
5825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5779
5826
|
RecommendItem,
|
|
5780
5827
|
{
|
|
5781
5828
|
icon: iconMaps[wallet2.walletKey],
|
|
5782
5829
|
name: wallet2.name,
|
|
5783
5830
|
onClick: () => {
|
|
5784
5831
|
},
|
|
5785
|
-
footer: /* @__PURE__ */ (0,
|
|
5832
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Button, { size: "sm", onClick: () => {
|
|
5786
5833
|
window.open(wallet2.website);
|
|
5787
5834
|
}, children: "Install" })
|
|
5788
5835
|
},
|
|
@@ -5792,13 +5839,13 @@ function BTCConnectModal({
|
|
|
5792
5839
|
] }) }) });
|
|
5793
5840
|
}
|
|
5794
5841
|
function BTCModal(props) {
|
|
5795
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5842
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(BTCConnectModal, { ...props });
|
|
5796
5843
|
}
|
|
5797
5844
|
|
|
5798
5845
|
// src/components/WalletModal/index.tsx
|
|
5799
5846
|
var import_react38 = require("react");
|
|
5800
5847
|
var import_react_intl19 = require("react-intl");
|
|
5801
|
-
var
|
|
5848
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
5802
5849
|
function WalletConnectModal({
|
|
5803
5850
|
type,
|
|
5804
5851
|
methods: _methods,
|
|
@@ -5816,13 +5863,13 @@ function WalletConnectModal({
|
|
|
5816
5863
|
const platform = config.platform.map((p) => p.toLowerCase());
|
|
5817
5864
|
return WALLET_METHODS.filter((m) => platform.includes(m));
|
|
5818
5865
|
}, [config.platform, _methods]);
|
|
5819
|
-
return /* @__PURE__ */ (0,
|
|
5866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5820
5867
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5821
5868
|
}, {
|
|
5822
5869
|
name: ""
|
|
5823
|
-
}), children: /* @__PURE__ */ (0,
|
|
5870
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "matchid-login-recommend-list", children: methods.map((method, index) => {
|
|
5824
5871
|
const m = walletMap[method];
|
|
5825
|
-
return /* @__PURE__ */ (0,
|
|
5872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
5826
5873
|
RecommendItem,
|
|
5827
5874
|
{
|
|
5828
5875
|
icon: m?.icon,
|
|
@@ -5836,12 +5883,12 @@ function WalletConnectModal({
|
|
|
5836
5883
|
}) }) }) });
|
|
5837
5884
|
}
|
|
5838
5885
|
function WalletModal(props) {
|
|
5839
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5886
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(WalletConnectModal, { ...props });
|
|
5840
5887
|
}
|
|
5841
5888
|
|
|
5842
5889
|
// src/components/AlphaAvatar/index.tsx
|
|
5843
5890
|
var import_react39 = require("react");
|
|
5844
|
-
var
|
|
5891
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
5845
5892
|
function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
5846
5893
|
const [avatar, setAvatar] = (0, import_react39.useState)(void 0);
|
|
5847
5894
|
(0, import_react39.useEffect)(() => {
|
|
@@ -5850,7 +5897,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
5850
5897
|
setAvatar(char);
|
|
5851
5898
|
}
|
|
5852
5899
|
}, [name]);
|
|
5853
|
-
return /* @__PURE__ */ (0,
|
|
5900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
5854
5901
|
width: size,
|
|
5855
5902
|
height: size,
|
|
5856
5903
|
fontSize: Math.ceil(size / 2)
|
|
@@ -5858,7 +5905,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
5858
5905
|
}
|
|
5859
5906
|
|
|
5860
5907
|
// src/components/WalletAsset/index.tsx
|
|
5861
|
-
var
|
|
5908
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
5862
5909
|
function WalletAsset({
|
|
5863
5910
|
onAssetClick,
|
|
5864
5911
|
matchWalletAssetsOptions
|
|
@@ -5868,7 +5915,7 @@ function WalletAsset({
|
|
|
5868
5915
|
list: walletAssets.mergedAssets
|
|
5869
5916
|
});
|
|
5870
5917
|
const { list } = useMatchChain();
|
|
5871
|
-
return /* @__PURE__ */ (0,
|
|
5918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5872
5919
|
const clickFunc = onAssetClick && onAssetClick(n);
|
|
5873
5920
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5874
5921
|
const getFooterColor = () => {
|
|
@@ -5883,11 +5930,11 @@ function WalletAsset({
|
|
|
5883
5930
|
}
|
|
5884
5931
|
return "";
|
|
5885
5932
|
};
|
|
5886
|
-
return /* @__PURE__ */ (0,
|
|
5933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-wallet-asset-item`, onClick: clickFunc, style: {
|
|
5887
5934
|
cursor: clickFunc ? "pointer" : "default"
|
|
5888
5935
|
}, children: [
|
|
5889
|
-
/* @__PURE__ */ (0,
|
|
5890
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
5936
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
|
|
5937
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-wallet-asset-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5891
5938
|
AlphaAvatar2,
|
|
5892
5939
|
{
|
|
5893
5940
|
className: `matchid-wallet-asset-icon`,
|
|
@@ -5895,12 +5942,12 @@ function WalletAsset({
|
|
|
5895
5942
|
name: n.symbol || n.name || ""
|
|
5896
5943
|
}
|
|
5897
5944
|
),
|
|
5898
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
5945
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
|
|
5899
5946
|
] }),
|
|
5900
|
-
/* @__PURE__ */ (0,
|
|
5901
|
-
/* @__PURE__ */ (0,
|
|
5902
|
-
"price" in n && /* @__PURE__ */ (0,
|
|
5903
|
-
/* @__PURE__ */ (0,
|
|
5947
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-wallet-asset-info`, children: [
|
|
5948
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
|
|
5949
|
+
"price" in n && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-wallet-asset-content`, children: [
|
|
5950
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5904
5951
|
NumberFormatter,
|
|
5905
5952
|
{
|
|
5906
5953
|
value: n.price,
|
|
@@ -5908,7 +5955,7 @@ function WalletAsset({
|
|
|
5908
5955
|
tFixNum: 2
|
|
5909
5956
|
}
|
|
5910
5957
|
) }),
|
|
5911
|
-
/* @__PURE__ */ (0,
|
|
5958
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5912
5959
|
NumberFormatter,
|
|
5913
5960
|
{
|
|
5914
5961
|
value: n.value,
|
|
@@ -5917,15 +5964,15 @@ function WalletAsset({
|
|
|
5917
5964
|
}
|
|
5918
5965
|
) })
|
|
5919
5966
|
] }),
|
|
5920
|
-
/* @__PURE__ */ (0,
|
|
5921
|
-
/* @__PURE__ */ (0,
|
|
5967
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-wallet-asset-footer`, children: [
|
|
5968
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5922
5969
|
NumberFormatter,
|
|
5923
5970
|
{
|
|
5924
5971
|
value: n.balance,
|
|
5925
5972
|
tFixNum: 3
|
|
5926
5973
|
}
|
|
5927
5974
|
) }),
|
|
5928
|
-
"price_change_24h" in n && /* @__PURE__ */ (0,
|
|
5975
|
+
"price_change_24h" in n && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-wallet-asset-change ${getFooterColor()}`, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5929
5976
|
NumberFormatter,
|
|
5930
5977
|
{
|
|
5931
5978
|
prefix: `${(n?.price_change_24h || 0) < 0 ? "-" : "+"} `,
|
|
@@ -5944,7 +5991,7 @@ function WalletAsset({
|
|
|
5944
5991
|
var import_react40 = require("react");
|
|
5945
5992
|
var import_viem15 = require("viem");
|
|
5946
5993
|
var import_react_intl20 = require("react-intl");
|
|
5947
|
-
var
|
|
5994
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
5948
5995
|
function Input2({
|
|
5949
5996
|
onChange,
|
|
5950
5997
|
placeholder,
|
|
@@ -5954,8 +6001,8 @@ function Input2({
|
|
|
5954
6001
|
error,
|
|
5955
6002
|
size = "df"
|
|
5956
6003
|
}) {
|
|
5957
|
-
return /* @__PURE__ */ (0,
|
|
5958
|
-
/* @__PURE__ */ (0,
|
|
6004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
|
|
6005
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
5959
6006
|
"input",
|
|
5960
6007
|
{
|
|
5961
6008
|
placeholder,
|
|
@@ -5966,7 +6013,7 @@ function Input2({
|
|
|
5966
6013
|
className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
|
|
5967
6014
|
}
|
|
5968
6015
|
),
|
|
5969
|
-
error && /* @__PURE__ */ (0,
|
|
6016
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-token-input-error-text", children: error })
|
|
5970
6017
|
] });
|
|
5971
6018
|
}
|
|
5972
6019
|
function TokenSend({
|
|
@@ -6094,24 +6141,24 @@ function TokenSend({
|
|
|
6094
6141
|
window.removeEventListener("message", receiveMessage);
|
|
6095
6142
|
};
|
|
6096
6143
|
}, []);
|
|
6097
|
-
return /* @__PURE__ */ (0,
|
|
6098
|
-
/* @__PURE__ */ (0,
|
|
6099
|
-
/* @__PURE__ */ (0,
|
|
6100
|
-
/* @__PURE__ */ (0,
|
|
6101
|
-
/* @__PURE__ */ (0,
|
|
6102
|
-
/* @__PURE__ */ (0,
|
|
6103
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
6144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl20.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: `matchid-token-send-box`, children: [
|
|
6145
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
6146
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: `matchid-token-amount-content`, children: [
|
|
6147
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: `matchid-token-amount-header`, children: [
|
|
6148
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl20.FormattedMessage, { id: "amount" }) }),
|
|
6149
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
|
|
6150
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
6104
6151
|
"img",
|
|
6105
6152
|
{
|
|
6106
6153
|
src: token?.icon,
|
|
6107
6154
|
alt: token?.symbol,
|
|
6108
6155
|
className: `matchid-token-amount-chain-icon`
|
|
6109
6156
|
}
|
|
6110
|
-
) : /* @__PURE__ */ (0,
|
|
6111
|
-
/* @__PURE__ */ (0,
|
|
6157
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
|
|
6158
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: token?.symbol })
|
|
6112
6159
|
] })
|
|
6113
6160
|
] }),
|
|
6114
|
-
/* @__PURE__ */ (0,
|
|
6161
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
6115
6162
|
Input2,
|
|
6116
6163
|
{
|
|
6117
6164
|
type: "text",
|
|
@@ -6124,18 +6171,18 @@ function TokenSend({
|
|
|
6124
6171
|
error: error.amount || txError
|
|
6125
6172
|
}
|
|
6126
6173
|
),
|
|
6127
|
-
/* @__PURE__ */ (0,
|
|
6128
|
-
/* @__PURE__ */ (0,
|
|
6129
|
-
/* @__PURE__ */ (0,
|
|
6174
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
|
|
6175
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: `matchid-token-amount-title`, children: [
|
|
6176
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl20.FormattedMessage, { id: "balance" }),
|
|
6130
6177
|
":"
|
|
6131
6178
|
] }),
|
|
6132
|
-
/* @__PURE__ */ (0,
|
|
6179
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
|
|
6133
6180
|
] }),
|
|
6134
|
-
/* @__PURE__ */ (0,
|
|
6181
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
6135
6182
|
] }),
|
|
6136
|
-
/* @__PURE__ */ (0,
|
|
6137
|
-
/* @__PURE__ */ (0,
|
|
6138
|
-
/* @__PURE__ */ (0,
|
|
6183
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: `matchid-token-address-content`, children: [
|
|
6184
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl20.FormattedMessage, { id: "receiveTitle" }) }) }),
|
|
6185
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
6139
6186
|
Input2,
|
|
6140
6187
|
{
|
|
6141
6188
|
type: "text",
|
|
@@ -6151,7 +6198,7 @@ function TokenSend({
|
|
|
6151
6198
|
)
|
|
6152
6199
|
] })
|
|
6153
6200
|
] }),
|
|
6154
|
-
/* @__PURE__ */ (0,
|
|
6201
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
6155
6202
|
Button,
|
|
6156
6203
|
{
|
|
6157
6204
|
size: "lg",
|
|
@@ -6160,7 +6207,7 @@ function TokenSend({
|
|
|
6160
6207
|
disabled: !canSend || !!txError,
|
|
6161
6208
|
onClick: onNext,
|
|
6162
6209
|
loading: loading || sending,
|
|
6163
|
-
children: /* @__PURE__ */ (0,
|
|
6210
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl20.FormattedMessage, { id: "next" })
|
|
6164
6211
|
}
|
|
6165
6212
|
)
|
|
6166
6213
|
] }) });
|
|
@@ -6168,7 +6215,7 @@ function TokenSend({
|
|
|
6168
6215
|
|
|
6169
6216
|
// src/components/TokenDetail/index.tsx
|
|
6170
6217
|
var import_react_intl21 = require("react-intl");
|
|
6171
|
-
var
|
|
6218
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
6172
6219
|
function TokenDetail({
|
|
6173
6220
|
onClose,
|
|
6174
6221
|
token
|
|
@@ -6178,41 +6225,41 @@ function TokenDetail({
|
|
|
6178
6225
|
const chain = chainList?.find((m) => m.id.toString() === token.chain_id);
|
|
6179
6226
|
const onSend = () => {
|
|
6180
6227
|
modal.show((props) => {
|
|
6181
|
-
return /* @__PURE__ */ (0,
|
|
6228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(TokenSend, { onClose: () => {
|
|
6182
6229
|
props.close();
|
|
6183
6230
|
onClose();
|
|
6184
6231
|
}, onBack: props.close, zIndex: props.zIndex, token });
|
|
6185
6232
|
});
|
|
6186
6233
|
};
|
|
6187
6234
|
const intl = (0, import_react_intl21.useIntl)();
|
|
6188
|
-
return /* @__PURE__ */ (0,
|
|
6235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ModalDrawer, { isOpen: true, title: intl.formatMessage({
|
|
6189
6236
|
id: "tokenDetails"
|
|
6190
|
-
}), onClose, children: /* @__PURE__ */ (0,
|
|
6191
|
-
/* @__PURE__ */ (0,
|
|
6192
|
-
/* @__PURE__ */ (0,
|
|
6193
|
-
/* @__PURE__ */ (0,
|
|
6194
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
6195
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6237
|
+
}), onClose, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: `matchid-token-detail`, children: [
|
|
6238
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: `matchid-token-main`, children: [
|
|
6239
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: `matchid-token-info`, children: [
|
|
6240
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: `matchid-token-logo`, children: [
|
|
6241
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("img", { src: token.icon, alt: token.symbol, className: `matchid-token-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(AlphaAvatar, { className: `matchid-token-icon`, size: 48, name: token.symbol || token.name || "" }),
|
|
6242
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-token-chain` })
|
|
6196
6243
|
] }),
|
|
6197
|
-
/* @__PURE__ */ (0,
|
|
6198
|
-
/* @__PURE__ */ (0,
|
|
6244
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: `matchid-token-name`, children: [
|
|
6245
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10 }),
|
|
6199
6246
|
" ",
|
|
6200
6247
|
token.symbol
|
|
6201
6248
|
] })
|
|
6202
6249
|
] }),
|
|
6203
|
-
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0,
|
|
6204
|
-
/* @__PURE__ */ (0,
|
|
6205
|
-
/* @__PURE__ */ (0,
|
|
6250
|
+
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: `matchid-token-contract`, children: [
|
|
6251
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "matchid-token-contract-title", children: "Contract address" }),
|
|
6252
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "matchid-token-contract-address", children: token.address })
|
|
6206
6253
|
] })
|
|
6207
6254
|
] }),
|
|
6208
|
-
/* @__PURE__ */ (0,
|
|
6255
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react_intl21.FormattedMessage, { id: "send" }) })
|
|
6209
6256
|
] }) });
|
|
6210
6257
|
}
|
|
6211
6258
|
|
|
6212
6259
|
// src/components/TokenSendList/index.tsx
|
|
6213
6260
|
var import_react41 = require("react");
|
|
6214
6261
|
var import_react_intl22 = require("react-intl");
|
|
6215
|
-
var
|
|
6262
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
6216
6263
|
function TokenSendList({ close }) {
|
|
6217
6264
|
const isDownMd = useDownMd();
|
|
6218
6265
|
const walletAssets = useMatchWalletAssets();
|
|
@@ -6224,16 +6271,16 @@ function TokenSendList({ close }) {
|
|
|
6224
6271
|
const modal = useModal();
|
|
6225
6272
|
const onNext = () => {
|
|
6226
6273
|
checked && modal.show((props) => {
|
|
6227
|
-
return /* @__PURE__ */ (0,
|
|
6274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(TokenSend, { onClose: () => {
|
|
6228
6275
|
props.close();
|
|
6229
6276
|
close();
|
|
6230
6277
|
}, onBack: props.close, zIndex: props.zIndex, token: checked });
|
|
6231
6278
|
});
|
|
6232
6279
|
};
|
|
6233
|
-
return /* @__PURE__ */ (0,
|
|
6234
|
-
/* @__PURE__ */ (0,
|
|
6280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "matchid-token-send-list-box", children: [
|
|
6281
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
6235
6282
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
6236
|
-
return /* @__PURE__ */ (0,
|
|
6283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
6237
6284
|
"div",
|
|
6238
6285
|
{
|
|
6239
6286
|
className: `matchid-token-send-item ${checked?.address == n.address ? "matchid-token-send-chekced" : ""}`,
|
|
@@ -6241,10 +6288,10 @@ function TokenSendList({ close }) {
|
|
|
6241
6288
|
setChecked(n);
|
|
6242
6289
|
},
|
|
6243
6290
|
children: [
|
|
6244
|
-
/* @__PURE__ */ (0,
|
|
6245
|
-
/* @__PURE__ */ (0,
|
|
6246
|
-
/* @__PURE__ */ (0,
|
|
6247
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
6291
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
|
|
6292
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
6293
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "matchid-token-send-logo", children: [
|
|
6294
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
6248
6295
|
AlphaAvatar2,
|
|
6249
6296
|
{
|
|
6250
6297
|
className: `matchid-token-send-icon`,
|
|
@@ -6252,7 +6299,7 @@ function TokenSendList({ close }) {
|
|
|
6252
6299
|
name: n.symbol || n.name || ""
|
|
6253
6300
|
}
|
|
6254
6301
|
),
|
|
6255
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6302
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
6256
6303
|
"img",
|
|
6257
6304
|
{
|
|
6258
6305
|
src: chain.iconUrl,
|
|
@@ -6261,9 +6308,9 @@ function TokenSendList({ close }) {
|
|
|
6261
6308
|
}
|
|
6262
6309
|
)
|
|
6263
6310
|
] }),
|
|
6264
|
-
/* @__PURE__ */ (0,
|
|
6265
|
-
/* @__PURE__ */ (0,
|
|
6266
|
-
/* @__PURE__ */ (0,
|
|
6311
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-token-send-info`, children: [
|
|
6312
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
|
|
6313
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
|
|
6267
6314
|
] })
|
|
6268
6315
|
] })
|
|
6269
6316
|
]
|
|
@@ -6271,7 +6318,7 @@ function TokenSendList({ close }) {
|
|
|
6271
6318
|
index
|
|
6272
6319
|
);
|
|
6273
6320
|
}) }),
|
|
6274
|
-
/* @__PURE__ */ (0,
|
|
6321
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react_intl22.FormattedMessage, { id: "next" }) })
|
|
6275
6322
|
] });
|
|
6276
6323
|
}
|
|
6277
6324
|
|
|
@@ -6281,7 +6328,7 @@ var import_react42 = require("react");
|
|
|
6281
6328
|
var import_viem16 = require("viem");
|
|
6282
6329
|
var import_viem17 = require("viem");
|
|
6283
6330
|
var import_react_intl23 = require("react-intl");
|
|
6284
|
-
var
|
|
6331
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
6285
6332
|
var Item = ({ data }) => {
|
|
6286
6333
|
const { address } = useWallet();
|
|
6287
6334
|
const isOut = data.from.toLowerCase() == address.toLowerCase();
|
|
@@ -6368,18 +6415,18 @@ var Item = ({ data }) => {
|
|
|
6368
6415
|
}
|
|
6369
6416
|
return chain?.nativeCurrency.symbol || chain?.nativeCurrency.name;
|
|
6370
6417
|
}, [transferType, chain, contracts, chainId, data.to]);
|
|
6371
|
-
return /* @__PURE__ */ (0,
|
|
6418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|
|
6372
6419
|
"a",
|
|
6373
6420
|
{
|
|
6374
6421
|
href: explorerLink(`tx/${data.hash}`),
|
|
6375
6422
|
target: "_blank",
|
|
6376
6423
|
className: `matchid-transaction-item`,
|
|
6377
6424
|
children: [
|
|
6378
|
-
/* @__PURE__ */ (0,
|
|
6379
|
-
/* @__PURE__ */ (0,
|
|
6380
|
-
/* @__PURE__ */ (0,
|
|
6381
|
-
/* @__PURE__ */ (0,
|
|
6382
|
-
/* @__PURE__ */ (0,
|
|
6425
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-transacton-item-container`, children: [
|
|
6426
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
|
|
6427
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-transaction-item-details`, children: [
|
|
6428
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
|
|
6429
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
6383
6430
|
"div",
|
|
6384
6431
|
{
|
|
6385
6432
|
className: `matchid-transaction-item-timestamp`,
|
|
@@ -6388,11 +6435,11 @@ var Item = ({ data }) => {
|
|
|
6388
6435
|
)
|
|
6389
6436
|
] })
|
|
6390
6437
|
] }),
|
|
6391
|
-
/* @__PURE__ */ (0,
|
|
6392
|
-
/* @__PURE__ */ (0,
|
|
6393
|
-
status == "loading" && /* @__PURE__ */ (0,
|
|
6394
|
-
status == "success" && /* @__PURE__ */ (0,
|
|
6395
|
-
status == "error" && /* @__PURE__ */ (0,
|
|
6438
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
|
|
6439
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(NumberFormatter, { value: amount, tFixNum: 6, prefix: isOut ? "-" : "+", suffix: " " + symbol }),
|
|
6440
|
+
status == "loading" && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(LoadingIcon_default, { color: "#000000", size: 16, rotate: true }),
|
|
6441
|
+
status == "success" && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(CheckRoundIcon, { size: 16 }),
|
|
6442
|
+
status == "error" && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(InfoRoundIcon, { size: 16 })
|
|
6396
6443
|
] })
|
|
6397
6444
|
]
|
|
6398
6445
|
}
|
|
@@ -6402,19 +6449,19 @@ function TransactionList({
|
|
|
6402
6449
|
scrollableTarget
|
|
6403
6450
|
}) {
|
|
6404
6451
|
const { fetchMoreData, hasMore, items } = useMatchWalletRecords();
|
|
6405
|
-
return /* @__PURE__ */ (0,
|
|
6452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
6406
6453
|
import_react_infinite_scroll_component.default,
|
|
6407
6454
|
{
|
|
6408
6455
|
scrollableTarget,
|
|
6409
6456
|
dataLength: items.length,
|
|
6410
6457
|
next: fetchMoreData,
|
|
6411
6458
|
hasMore,
|
|
6412
|
-
loader: /* @__PURE__ */ (0,
|
|
6413
|
-
/* @__PURE__ */ (0,
|
|
6459
|
+
loader: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "matchid-list-nomore", children: [
|
|
6460
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
|
|
6414
6461
|
"Loading..."
|
|
6415
6462
|
] }),
|
|
6416
|
-
endMessage: items.length > 0 ? /* @__PURE__ */ (0,
|
|
6417
|
-
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0,
|
|
6463
|
+
endMessage: items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_intl23.FormattedMessage, { id: "noMoreRecords" }) }) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_intl23.FormattedMessage, { id: "noRecords" }) }),
|
|
6464
|
+
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "mt-[150px]" }) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Item, { data: item }, index)) })
|
|
6418
6465
|
}
|
|
6419
6466
|
);
|
|
6420
6467
|
}
|