@matchain/matchid-sdk-react 0.1.53-alpha.2 → 0.1.53-alpha.4
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/assets/icon/index.d.mts +4 -2
- package/dist/assets/icon/index.d.ts +4 -2
- package/dist/assets/icon/index.js +19 -0
- package/dist/assets/icon/index.js.map +1 -1
- package/dist/assets/icon/index.mjs +3 -1
- package/dist/chunk-3CR66BEX.mjs +19 -0
- package/dist/chunk-3CR66BEX.mjs.map +1 -0
- package/dist/{chunk-LHNKZISB.mjs → chunk-3USZ4ZZY.mjs} +20 -2
- package/dist/chunk-3USZ4ZZY.mjs.map +1 -0
- package/dist/{chunk-4A2YPGO3.mjs → chunk-4J3KZCLG.mjs} +2 -2
- package/dist/{chunk-HYQ3T6WW.mjs → chunk-JX73EY6V.mjs} +2 -14
- package/dist/chunk-JX73EY6V.mjs.map +1 -0
- package/dist/{chunk-MX7N57AH.mjs → chunk-OCQ2AIM3.mjs} +7 -2
- package/dist/{chunk-MX7N57AH.mjs.map → chunk-OCQ2AIM3.mjs.map} +1 -1
- package/dist/{chunk-FB5MHLWX.mjs → chunk-V2S54LGG.mjs} +2 -2
- package/dist/{chunk-W5A6WY7Y.mjs → chunk-XXZZYALJ.mjs} +807 -191
- package/dist/chunk-XXZZYALJ.mjs.map +1 -0
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +1111 -442
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +7 -4
- package/dist/config/chains/index.mjs +2 -1
- package/dist/hooks/api/index.d.mts +2 -2
- package/dist/hooks/api/index.d.ts +2 -2
- package/dist/hooks/api/index.js +202 -88
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +6 -5
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +515 -401
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +5 -4
- package/dist/{index-IwwXQ_QV.d.ts → index-BaYTgL99.d.mts} +3 -2
- package/dist/{index-B8cUP7cH.d.ts → index-BhU3hF7y.d.ts} +2 -2
- package/dist/{index-iWHaT8HV.d.mts → index-Bpd2gBNh.d.mts} +1 -1
- package/dist/{index-Df-WlkXq.d.ts → index-C5StsjWY.d.ts} +11 -4
- package/dist/{index-BS-NO8Y2.d.ts → index-CFqk8eNo.d.ts} +12 -12
- package/dist/{index-BCGJczpk.d.mts → index-D1QeVZyN.d.ts} +3 -2
- package/dist/{index-DNJuiNdz.d.mts → index-D_UNctDI.d.mts} +11 -4
- package/dist/{index-BsL6zo6a.d.ts → index-DaXXoRxr.d.ts} +1 -1
- package/dist/{index-K5vXmiRX.d.ts → index-Dt92N6yZ.d.ts} +1 -1
- package/dist/{index-CZqdmQu1.d.mts → index-W6yjuOKT.d.mts} +1 -1
- package/dist/{index-Bil_db2f.d.mts → index-mxbJ8CFx.d.mts} +12 -12
- package/dist/{index-yy3VTdFU.d.mts → index-wqqEUufi.d.mts} +2 -2
- package/dist/index.css +3 -0
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1297 -680
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -11
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/{types-CZbR7ERa.d.mts → types-Bx_FJ11s.d.mts} +2 -1
- package/dist/{types-CZbR7ERa.d.ts → types-Bx_FJ11s.d.ts} +2 -1
- package/dist/ui/index.d.mts +3 -3
- package/dist/ui/index.d.ts +3 -3
- package/dist/ui/index.js +62 -59
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +2 -2
- package/dist/utils/index.d.mts +2 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +3 -1
- package/example/dist/assets/ccip-nxE3Zma4.js +1 -0
- package/example/dist/assets/index-BFAv3rdU.css +1 -0
- package/example/dist/assets/index-DMWWRDPI.js +1658 -0
- package/example/dist/index.html +2 -2
- package/example/src/pages/User/index.tsx +7 -1
- package/package.json +2 -1
- package/dist/chunk-HYQ3T6WW.mjs.map +0 -1
- package/dist/chunk-LHNKZISB.mjs.map +0 -1
- package/dist/chunk-W5A6WY7Y.mjs.map +0 -1
- package/example/dist/assets/TransportWebHID-BEu7tC0r.js +0 -1
- package/example/dist/assets/bignumber-iG7K-qxw.js +0 -10
- package/example/dist/assets/ccip-a6wQ1Vcb.js +0 -1
- package/example/dist/assets/draggabilly-CRYR_S0q.js +0 -14
- package/example/dist/assets/index--dp9m9Ep.js +0 -1
- package/example/dist/assets/index-BDTHolFv.js +0 -569
- package/example/dist/assets/index-BZl59qLb.js +0 -179
- package/example/dist/assets/index-BmMbYNHO.js +0 -303
- package/example/dist/assets/index-C7cxVRDF.js +0 -1677
- package/example/dist/assets/index-CJk171Yb.js +0 -1
- package/example/dist/assets/index-CQiBesAa.js +0 -3
- package/example/dist/assets/index-D62loNA9.js +0 -3
- package/example/dist/assets/index-DqyX3FG6.js +0 -1
- package/example/dist/assets/index-Gy3FXGhr.css +0 -1
- package/example/dist/assets/inherits_browser-BlmhoU4v.js +0 -1
- package/example/dist/assets/solanaEmbed.esm-Djn-u4Vn.js +0 -38
- /package/dist/{chunk-4A2YPGO3.mjs.map → chunk-4J3KZCLG.mjs.map} +0 -0
- /package/dist/{chunk-FB5MHLWX.mjs.map → chunk-V2S54LGG.mjs.map} +0 -0
package/dist/components/index.js
CHANGED
|
@@ -32,6 +32,7 @@ var components_exports = {};
|
|
|
32
32
|
__export(components_exports, {
|
|
33
33
|
BTCModal: () => BTCModal,
|
|
34
34
|
Button: () => Button,
|
|
35
|
+
EVMModal: () => EVMModal,
|
|
35
36
|
EmailModal: () => EmailModal,
|
|
36
37
|
Field: () => Field,
|
|
37
38
|
Input: () => Input,
|
|
@@ -1183,6 +1184,23 @@ function ArrowSendIcon({
|
|
|
1183
1184
|
) });
|
|
1184
1185
|
}
|
|
1185
1186
|
|
|
1187
|
+
// src/assets/icon/PhantomIcon.tsx
|
|
1188
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1189
|
+
function PhantomIcon({
|
|
1190
|
+
size = 128,
|
|
1191
|
+
...props
|
|
1192
|
+
}) {
|
|
1193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("svg", { width: size, height: size, ...props, viewBox: "0 0 128 128", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
1194
|
+
"path",
|
|
1195
|
+
{
|
|
1196
|
+
fill: "#ab9ff2",
|
|
1197
|
+
d: "m53.520552,86.603299c-5.9423,9.106 -15.8999,20.63 -29.1497,20.63c-6.2636,0 -12.2864,-2.578 -12.2866,-13.779c-0.0005,-28.5271 38.946,-72.687 75.0825,-72.6876c20.557,-0.0004 28.749,14.2625 28.749,30.4597c0,20.7903 -13.491,44.5629 -26.901,44.5629c-4.256,0 -6.344,-2.337 -6.344,-6.043c0,-0.967 0.16,-2.015 0.482,-3.143c-4.578,7.816 -13.411,15.07 -21.6822,15.07c-6.0227,0 -9.074,-3.788 -9.0741,-9.107c0,-1.934 0.4015,-3.948 1.1241,-5.963zm26.8222,-43.9027c-3.271,0.0058 -5.501,2.7849 -5.494,6.7495c0.007,3.9646 2.247,6.8152 5.518,6.8095c3.192,-0.0057 5.421,-2.8641 5.414,-6.8288c-0.007,-3.9646 -2.246,-6.7358 -5.438,-6.7302zm17.351,-0.0189c-3.271,0.0058 -5.501,2.7849 -5.494,6.7495c0.007,3.9646 2.246,6.8152 5.518,6.8095c3.192,-0.0056 5.421,-2.8641 5.414,-6.8288c-0.007,-3.9646 -2.246,-6.7358 -5.438,-6.7302z",
|
|
1198
|
+
clipRule: "evenodd",
|
|
1199
|
+
fillRule: "evenodd"
|
|
1200
|
+
}
|
|
1201
|
+
) });
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1186
1204
|
// src/hooks/useLayout.tsx
|
|
1187
1205
|
var import_react = require("react");
|
|
1188
1206
|
function useDownMd() {
|
|
@@ -1201,7 +1219,7 @@ function useDownMd() {
|
|
|
1201
1219
|
|
|
1202
1220
|
// src/ui/Overlay/index.tsx
|
|
1203
1221
|
var import_react2 = require("react");
|
|
1204
|
-
var
|
|
1222
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1205
1223
|
function Overlay({
|
|
1206
1224
|
isOpen = false,
|
|
1207
1225
|
children,
|
|
@@ -1217,7 +1235,7 @@ function Overlay({
|
|
|
1217
1235
|
document.body.style.overflow = "";
|
|
1218
1236
|
};
|
|
1219
1237
|
}, [isOpen]);
|
|
1220
|
-
return isOpen ? /* @__PURE__ */ (0,
|
|
1238
|
+
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1221
1239
|
"div",
|
|
1222
1240
|
{
|
|
1223
1241
|
className: "matchid-overlay",
|
|
@@ -1226,11 +1244,11 @@ function Overlay({
|
|
|
1226
1244
|
},
|
|
1227
1245
|
children
|
|
1228
1246
|
}
|
|
1229
|
-
) : /* @__PURE__ */ (0,
|
|
1247
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, {});
|
|
1230
1248
|
}
|
|
1231
1249
|
|
|
1232
1250
|
// src/ui/Modal/index.tsx
|
|
1233
|
-
var
|
|
1251
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1234
1252
|
function Modal({
|
|
1235
1253
|
children,
|
|
1236
1254
|
isOpen,
|
|
@@ -1238,10 +1256,10 @@ function Modal({
|
|
|
1238
1256
|
zIndex = 100,
|
|
1239
1257
|
className = ""
|
|
1240
1258
|
}) {
|
|
1241
|
-
return /* @__PURE__ */ (0,
|
|
1259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: `matchid-modal ${className}`, style: {
|
|
1242
1260
|
width
|
|
1243
1261
|
}, children: [
|
|
1244
|
-
/* @__PURE__ */ (0,
|
|
1262
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "matchid-modal-mobile-header" }),
|
|
1245
1263
|
children
|
|
1246
1264
|
] }) });
|
|
1247
1265
|
}
|
|
@@ -1255,13 +1273,13 @@ function ModalWithHeader({
|
|
|
1255
1273
|
...props
|
|
1256
1274
|
}) {
|
|
1257
1275
|
const isDownMd = useDownMd();
|
|
1258
|
-
return /* @__PURE__ */ (0,
|
|
1259
|
-
/* @__PURE__ */ (0,
|
|
1260
|
-
/* @__PURE__ */ (0,
|
|
1261
|
-
onBack && /* @__PURE__ */ (0,
|
|
1262
|
-
/* @__PURE__ */ (0,
|
|
1276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Modal, { ...props, children: [
|
|
1277
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
|
|
1278
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "matchid-modal-header-content", children: [
|
|
1279
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
|
|
1280
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "matchid-modal-header-title", children: title })
|
|
1263
1281
|
] }),
|
|
1264
|
-
onClose && /* @__PURE__ */ (0,
|
|
1282
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
|
|
1265
1283
|
] }),
|
|
1266
1284
|
children
|
|
1267
1285
|
] });
|
|
@@ -1272,7 +1290,7 @@ var import_react4 = require("react");
|
|
|
1272
1290
|
|
|
1273
1291
|
// src/utils/index.tsx
|
|
1274
1292
|
var import_moment = __toESM(require("moment"));
|
|
1275
|
-
var
|
|
1293
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1276
1294
|
var getVersion = () => {
|
|
1277
1295
|
return "0.0.2";
|
|
1278
1296
|
};
|
|
@@ -1318,10 +1336,10 @@ var NumberFormatter = ({
|
|
|
1318
1336
|
const [intPart, decimalPart] = numberValue.toString().split(".");
|
|
1319
1337
|
const intFormat = separator ? intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : intPart;
|
|
1320
1338
|
if (Math.abs(parseFloat(numberValue)) >= 1) {
|
|
1321
|
-
return /* @__PURE__ */ (0,
|
|
1322
|
-
prefix && /* @__PURE__ */ (0,
|
|
1323
|
-
/* @__PURE__ */ (0,
|
|
1324
|
-
decimalPart ? /* @__PURE__ */ (0,
|
|
1339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className, children: [
|
|
1340
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
1341
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: intClassName, children: intFormat }),
|
|
1342
|
+
decimalPart ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: decimalClassName, children: [
|
|
1325
1343
|
".",
|
|
1326
1344
|
decimalPart.substring(0, fixNum)
|
|
1327
1345
|
] }) : "",
|
|
@@ -1338,30 +1356,30 @@ var NumberFormatter = ({
|
|
|
1338
1356
|
}
|
|
1339
1357
|
}
|
|
1340
1358
|
if (zeroCount < tFixNum) {
|
|
1341
|
-
return /* @__PURE__ */ (0,
|
|
1342
|
-
prefix && /* @__PURE__ */ (0,
|
|
1343
|
-
/* @__PURE__ */ (0,
|
|
1344
|
-
/* @__PURE__ */ (0,
|
|
1359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className, children: [
|
|
1360
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
1361
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: intClassName, children: intFormat }),
|
|
1362
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: decimalClassName, children: [
|
|
1345
1363
|
".",
|
|
1346
1364
|
decimalPart.substring(0, tFixNum)
|
|
1347
1365
|
] }),
|
|
1348
1366
|
suffix
|
|
1349
1367
|
] });
|
|
1350
1368
|
}
|
|
1351
|
-
return /* @__PURE__ */ (0,
|
|
1352
|
-
prefix && /* @__PURE__ */ (0,
|
|
1353
|
-
/* @__PURE__ */ (0,
|
|
1354
|
-
/* @__PURE__ */ (0,
|
|
1369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className, children: [
|
|
1370
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
1371
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: intClassName, children: intFormat }),
|
|
1372
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: decimalClassName, children: [
|
|
1355
1373
|
".0",
|
|
1356
|
-
/* @__PURE__ */ (0,
|
|
1374
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("sub", { children: zeroCount }),
|
|
1357
1375
|
decimalPart?.substring(zeroCount, zeroCount + tFixNum - 2)
|
|
1358
1376
|
] }),
|
|
1359
1377
|
suffix
|
|
1360
1378
|
] });
|
|
1361
1379
|
}
|
|
1362
|
-
return /* @__PURE__ */ (0,
|
|
1363
|
-
prefix && /* @__PURE__ */ (0,
|
|
1364
|
-
/* @__PURE__ */ (0,
|
|
1380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className, children: [
|
|
1381
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
1382
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: intClassName, children: intPart }),
|
|
1365
1383
|
suffix
|
|
1366
1384
|
] });
|
|
1367
1385
|
};
|
|
@@ -1377,9 +1395,13 @@ var formatDate = (value, formatString = "YYYY-MM-DD HH:mm:ss") => {
|
|
|
1377
1395
|
var isInTgApp = () => {
|
|
1378
1396
|
return !!window.TelegramWebviewProxy;
|
|
1379
1397
|
};
|
|
1398
|
+
function bytesToBase64(bytes) {
|
|
1399
|
+
const binString = String.fromCodePoint(...bytes);
|
|
1400
|
+
return btoa(binString);
|
|
1401
|
+
}
|
|
1380
1402
|
|
|
1381
1403
|
// src/ui/Button/index.tsx
|
|
1382
|
-
var
|
|
1404
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1383
1405
|
function Button({
|
|
1384
1406
|
size = "df",
|
|
1385
1407
|
disabled = false,
|
|
@@ -1398,7 +1420,7 @@ function Button({
|
|
|
1398
1420
|
onClick && onClick();
|
|
1399
1421
|
}
|
|
1400
1422
|
};
|
|
1401
|
-
return /* @__PURE__ */ (0,
|
|
1423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1402
1424
|
"button",
|
|
1403
1425
|
{
|
|
1404
1426
|
type,
|
|
@@ -1408,14 +1430,14 @@ function Button({
|
|
|
1408
1430
|
...style
|
|
1409
1431
|
},
|
|
1410
1432
|
onClick: onAction,
|
|
1411
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
1433
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
|
|
1412
1434
|
}
|
|
1413
1435
|
);
|
|
1414
1436
|
}
|
|
1415
1437
|
|
|
1416
1438
|
// src/ui/Input/index.tsx
|
|
1417
1439
|
var import_react3 = require("react");
|
|
1418
|
-
var
|
|
1440
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
1419
1441
|
function Input({
|
|
1420
1442
|
onChange,
|
|
1421
1443
|
type,
|
|
@@ -1425,17 +1447,17 @@ function Input({
|
|
|
1425
1447
|
}) {
|
|
1426
1448
|
const [inputType, setInputType] = (0, import_react3.useState)(type);
|
|
1427
1449
|
const isDownMd = useDownMd();
|
|
1428
|
-
return /* @__PURE__ */ (0,
|
|
1450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
1429
1451
|
"div",
|
|
1430
1452
|
{
|
|
1431
1453
|
className: `matchid-input-box ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
1432
1454
|
children: [
|
|
1433
|
-
/* @__PURE__ */ (0,
|
|
1434
|
-
props.value && props.value.length > 0 && /* @__PURE__ */ (0,
|
|
1455
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" }),
|
|
1456
|
+
props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
|
|
1435
1457
|
if (onChange) {
|
|
1436
1458
|
onChange({ target: { value: "" } });
|
|
1437
1459
|
}
|
|
1438
|
-
}, children: /* @__PURE__ */ (0,
|
|
1460
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
1439
1461
|
DeleteRoundIcon,
|
|
1440
1462
|
{
|
|
1441
1463
|
height: isDownMd ? 16 : 21,
|
|
@@ -1443,9 +1465,9 @@ function Input({
|
|
|
1443
1465
|
color: "var(--matchid-input-delete-icon-color)"
|
|
1444
1466
|
}
|
|
1445
1467
|
) }),
|
|
1446
|
-
type === "password" && /* @__PURE__ */ (0,
|
|
1468
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
|
|
1447
1469
|
setInputType(inputType === "password" ? "text" : "password");
|
|
1448
|
-
}, children: inputType === "password" ? /* @__PURE__ */ (0,
|
|
1470
|
+
}, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
|
|
1449
1471
|
after
|
|
1450
1472
|
]
|
|
1451
1473
|
}
|
|
@@ -1453,7 +1475,7 @@ function Input({
|
|
|
1453
1475
|
}
|
|
1454
1476
|
|
|
1455
1477
|
// src/ui/Field/index.tsx
|
|
1456
|
-
var
|
|
1478
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1457
1479
|
function Field({
|
|
1458
1480
|
label,
|
|
1459
1481
|
children,
|
|
@@ -1461,19 +1483,19 @@ function Field({
|
|
|
1461
1483
|
required,
|
|
1462
1484
|
className = ""
|
|
1463
1485
|
}) {
|
|
1464
|
-
return /* @__PURE__ */ (0,
|
|
1465
|
-
/* @__PURE__ */ (0,
|
|
1466
|
-
required && /* @__PURE__ */ (0,
|
|
1486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
|
|
1487
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "matchid-field-label", children: [
|
|
1488
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "matchid-field-required", children: "*" }),
|
|
1467
1489
|
label
|
|
1468
1490
|
] }),
|
|
1469
1491
|
children,
|
|
1470
|
-
error && /* @__PURE__ */ (0,
|
|
1492
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "matchid-field-error", children: error })
|
|
1471
1493
|
] });
|
|
1472
1494
|
}
|
|
1473
1495
|
|
|
1474
1496
|
// src/components/EmailModal/StepEmail.tsx
|
|
1475
1497
|
var import_react_intl = require("react-intl");
|
|
1476
|
-
var
|
|
1498
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
1477
1499
|
function StepEmail(props) {
|
|
1478
1500
|
const intl = (0, import_react_intl.useIntl)();
|
|
1479
1501
|
const [emailVal, setEmailVal] = (0, import_react4.useState)("");
|
|
@@ -1488,10 +1510,10 @@ function StepEmail(props) {
|
|
|
1488
1510
|
const onContinue = async () => {
|
|
1489
1511
|
props.onContinue(emailVal);
|
|
1490
1512
|
};
|
|
1491
|
-
return /* @__PURE__ */ (0,
|
|
1492
|
-
/* @__PURE__ */ (0,
|
|
1513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "matchid-email-email-box", children: [
|
|
1514
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Field, { label: intl.formatMessage({
|
|
1493
1515
|
id: "emailAddress"
|
|
1494
|
-
}), children: /* @__PURE__ */ (0,
|
|
1516
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
1495
1517
|
Input,
|
|
1496
1518
|
{
|
|
1497
1519
|
placeholder: intl.formatMessage({
|
|
@@ -1501,9 +1523,9 @@ function StepEmail(props) {
|
|
|
1501
1523
|
value: emailVal
|
|
1502
1524
|
}
|
|
1503
1525
|
) }),
|
|
1504
|
-
/* @__PURE__ */ (0,
|
|
1526
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button, { disabled: !canContinue, style: {
|
|
1505
1527
|
marginTop: "64px"
|
|
1506
|
-
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
1528
|
+
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react_intl.FormattedMessage, { id: "continue" }) })
|
|
1507
1529
|
] });
|
|
1508
1530
|
}
|
|
1509
1531
|
|
|
@@ -1919,7 +1941,7 @@ var import_react9 = require("react");
|
|
|
1919
1941
|
var import_react_dom = require("react-dom");
|
|
1920
1942
|
|
|
1921
1943
|
// src/ui/Drawer/index.tsx
|
|
1922
|
-
var
|
|
1944
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
1923
1945
|
function Drawer({
|
|
1924
1946
|
children,
|
|
1925
1947
|
showClose = true,
|
|
@@ -1930,15 +1952,15 @@ function Drawer({
|
|
|
1930
1952
|
onBack
|
|
1931
1953
|
}) {
|
|
1932
1954
|
if (!isOpen) {
|
|
1933
|
-
return /* @__PURE__ */ (0,
|
|
1955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_jsx_runtime57.Fragment, {});
|
|
1934
1956
|
}
|
|
1935
|
-
return /* @__PURE__ */ (0,
|
|
1936
|
-
/* @__PURE__ */ (0,
|
|
1937
|
-
/* @__PURE__ */ (0,
|
|
1938
|
-
onBack && /* @__PURE__ */ (0,
|
|
1957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "matchid-drawer", children: [
|
|
1958
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: `matchid-drawer-header matchid-flex`, children: [
|
|
1959
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: `matchid-drawer-header-content matchid-flex`, children: [
|
|
1960
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ArrowLeftIcon, { height: 25, width: 24, className: "matchid-drawer-header-back", onClick: onBack }),
|
|
1939
1961
|
title
|
|
1940
1962
|
] }),
|
|
1941
|
-
showClose && /* @__PURE__ */ (0,
|
|
1963
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
|
|
1942
1964
|
] }),
|
|
1943
1965
|
children
|
|
1944
1966
|
] }) });
|
|
@@ -1948,7 +1970,7 @@ function Drawer({
|
|
|
1948
1970
|
var import_react6 = require("react");
|
|
1949
1971
|
|
|
1950
1972
|
// src/ui/ModalDrawer/index.tsx
|
|
1951
|
-
var
|
|
1973
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
1952
1974
|
function ModalDrawer({
|
|
1953
1975
|
title,
|
|
1954
1976
|
drawerTitleVisible = true,
|
|
@@ -1956,9 +1978,9 @@ function ModalDrawer({
|
|
|
1956
1978
|
}) {
|
|
1957
1979
|
const isDownMd = useDownMd();
|
|
1958
1980
|
if (isDownMd) {
|
|
1959
|
-
return /* @__PURE__ */ (0,
|
|
1981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ModalWithHeader, { ...props, title });
|
|
1960
1982
|
}
|
|
1961
|
-
return /* @__PURE__ */ (0,
|
|
1983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
|
|
1962
1984
|
}
|
|
1963
1985
|
|
|
1964
1986
|
// src/assets/img/confirm.gif
|
|
@@ -2014,7 +2036,7 @@ function useHash({
|
|
|
2014
2036
|
}
|
|
2015
2037
|
|
|
2016
2038
|
// src/ui/HashPanel/index.tsx
|
|
2017
|
-
var
|
|
2039
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2018
2040
|
function HashPanel({
|
|
2019
2041
|
hash,
|
|
2020
2042
|
chain,
|
|
@@ -2073,14 +2095,14 @@ function HashPanel({
|
|
|
2073
2095
|
}
|
|
2074
2096
|
}, [hashQuery.data]);
|
|
2075
2097
|
const link = chain ? `${chain?.blockExplorers?.default.url}/tx/${hash}` : "";
|
|
2076
|
-
return /* @__PURE__ */ (0,
|
|
2098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
2077
2099
|
ModalDrawer,
|
|
2078
2100
|
{
|
|
2079
2101
|
isOpen,
|
|
2080
2102
|
showClose: true,
|
|
2081
2103
|
onClose,
|
|
2082
2104
|
zIndex,
|
|
2083
|
-
title: /* @__PURE__ */ (0,
|
|
2105
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
2084
2106
|
"div",
|
|
2085
2107
|
{
|
|
2086
2108
|
className: "matchid-hashpanel-header",
|
|
@@ -2090,29 +2112,29 @@ function HashPanel({
|
|
|
2090
2112
|
children: statusValue.text
|
|
2091
2113
|
}
|
|
2092
2114
|
),
|
|
2093
|
-
children: /* @__PURE__ */ (0,
|
|
2094
|
-
/* @__PURE__ */ (0,
|
|
2095
|
-
/* @__PURE__ */ (0,
|
|
2115
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "matchid-hashpanel-box", children: [
|
|
2116
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "matchid-hashpanel-content", children: [
|
|
2117
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: `matchid-hashpanel-status`, style: {
|
|
2096
2118
|
color: statusValue.color
|
|
2097
2119
|
}, children: statusValue.text }),
|
|
2098
|
-
/* @__PURE__ */ (0,
|
|
2099
|
-
hash && /* @__PURE__ */ (0,
|
|
2120
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("img", { src: statusValue.icon, alt: statusValue.text, className: `matchid-hashpanel-img` }),
|
|
2121
|
+
hash && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
|
|
2100
2122
|
"Hash:",
|
|
2101
|
-
/* @__PURE__ */ (0,
|
|
2123
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("a", { href: link, target: "_blank", children: hash })
|
|
2102
2124
|
] })
|
|
2103
2125
|
] }),
|
|
2104
|
-
/* @__PURE__ */ (0,
|
|
2126
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
|
|
2105
2127
|
] })
|
|
2106
2128
|
}
|
|
2107
2129
|
);
|
|
2108
2130
|
}
|
|
2109
2131
|
function HashPanel_default(props) {
|
|
2110
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
2132
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(HashPanel, { ...props });
|
|
2111
2133
|
}
|
|
2112
2134
|
|
|
2113
2135
|
// src/ui/Popover/index.tsx
|
|
2114
2136
|
var import_react7 = require("react");
|
|
2115
|
-
var
|
|
2137
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2116
2138
|
function Popover({
|
|
2117
2139
|
children,
|
|
2118
2140
|
content,
|
|
@@ -2122,7 +2144,7 @@ function Popover({
|
|
|
2122
2144
|
gap = "20px"
|
|
2123
2145
|
}) {
|
|
2124
2146
|
const [active, setActive] = (0, import_react7.useState)(false);
|
|
2125
|
-
return children && /* @__PURE__ */ (0,
|
|
2147
|
+
return children && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
2126
2148
|
"div",
|
|
2127
2149
|
{
|
|
2128
2150
|
onClick: () => {
|
|
@@ -2133,20 +2155,20 @@ function Popover({
|
|
|
2133
2155
|
className: `matchid-popover-box matchid-popover-${position} matchid-popover-${type} ${className} ${type == "click" && active ? "matchid-popover-click-active" : ""}`,
|
|
2134
2156
|
children: [
|
|
2135
2157
|
children,
|
|
2136
|
-
/* @__PURE__ */ (0,
|
|
2158
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { style: {
|
|
2137
2159
|
paddingTop: gap
|
|
2138
|
-
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0,
|
|
2160
|
+
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: `matchid-popover-content`, children: content }) })
|
|
2139
2161
|
]
|
|
2140
2162
|
}
|
|
2141
2163
|
);
|
|
2142
2164
|
}
|
|
2143
2165
|
|
|
2144
2166
|
// src/ui/Switch/index.tsx
|
|
2145
|
-
var
|
|
2167
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2146
2168
|
|
|
2147
2169
|
// src/ui/AlphaAvatar/index.tsx
|
|
2148
2170
|
var import_react8 = require("react");
|
|
2149
|
-
var
|
|
2171
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2150
2172
|
function AlphaAvatar({
|
|
2151
2173
|
name,
|
|
2152
2174
|
size = "default",
|
|
@@ -2163,7 +2185,7 @@ function AlphaAvatar({
|
|
|
2163
2185
|
return "";
|
|
2164
2186
|
}, [name]);
|
|
2165
2187
|
const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
|
|
2166
|
-
return /* @__PURE__ */ (0,
|
|
2188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
2167
2189
|
width: numberSize,
|
|
2168
2190
|
height: numberSize,
|
|
2169
2191
|
fontSize: Math.ceil(numberSize / 2),
|
|
@@ -2172,7 +2194,7 @@ function AlphaAvatar({
|
|
|
2172
2194
|
}
|
|
2173
2195
|
|
|
2174
2196
|
// src/ui/Radio/index.tsx
|
|
2175
|
-
var
|
|
2197
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2176
2198
|
function Radio({
|
|
2177
2199
|
checked = false,
|
|
2178
2200
|
onChange,
|
|
@@ -2181,20 +2203,20 @@ function Radio({
|
|
|
2181
2203
|
className = "",
|
|
2182
2204
|
style = {}
|
|
2183
2205
|
}) {
|
|
2184
|
-
return /* @__PURE__ */ (0,
|
|
2206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
|
|
2185
2207
|
width: size,
|
|
2186
2208
|
height: size,
|
|
2187
2209
|
...style,
|
|
2188
2210
|
// @ts-ignore
|
|
2189
2211
|
"--matchid-radio-checked": color
|
|
2190
|
-
}, children: checked && /* @__PURE__ */ (0,
|
|
2212
|
+
}, children: checked && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: `matchid-radio-content`, style: {
|
|
2191
2213
|
width: Math.floor(size * 0.7),
|
|
2192
2214
|
height: Math.floor(size * 0.7)
|
|
2193
2215
|
} }) });
|
|
2194
2216
|
}
|
|
2195
2217
|
|
|
2196
2218
|
// src/context/ModalContext.tsx
|
|
2197
|
-
var
|
|
2219
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2198
2220
|
var ModalContext = (0, import_react9.createContext)(null);
|
|
2199
2221
|
function useModal() {
|
|
2200
2222
|
const context = (0, import_react9.useContext)(ModalContext);
|
|
@@ -2235,7 +2257,7 @@ var useTransactionStore = (0, import_zustand3.create)((0, import_middleware2.dev
|
|
|
2235
2257
|
var useTransactionStore_default = useTransactionStore;
|
|
2236
2258
|
|
|
2237
2259
|
// src/hooks/useWallet.tsx
|
|
2238
|
-
var
|
|
2260
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2239
2261
|
var AppClientId = "react-sdk-" + getVersion();
|
|
2240
2262
|
function useWallet() {
|
|
2241
2263
|
const { address, wallet: walletConfig } = useLocalStore_default();
|
|
@@ -2408,7 +2430,7 @@ function useWallet() {
|
|
|
2408
2430
|
address: evmAccount.address
|
|
2409
2431
|
});
|
|
2410
2432
|
modal.show((props) => {
|
|
2411
|
-
return /* @__PURE__ */ (0,
|
|
2433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
|
|
2412
2434
|
});
|
|
2413
2435
|
clearInterval(window.matchProvider.transactionMessageIntervalMap[transactionId].interval);
|
|
2414
2436
|
delete window.matchProvider.transactionMessageIntervalMap[transactionId];
|
|
@@ -2485,7 +2507,7 @@ function useCopyClipboard(timeout = 500) {
|
|
|
2485
2507
|
// src/context/ToastContext.tsx
|
|
2486
2508
|
var import_react12 = require("react");
|
|
2487
2509
|
var import_react_dom2 = require("react-dom");
|
|
2488
|
-
var
|
|
2510
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2489
2511
|
var ToastContext = (0, import_react12.createContext)(null);
|
|
2490
2512
|
|
|
2491
2513
|
// src/hooks/api/wallet.ts
|
|
@@ -2547,7 +2569,7 @@ function useImportTokenListQuery({
|
|
|
2547
2569
|
var import_react13 = require("react");
|
|
2548
2570
|
var import_viem5 = require("viem");
|
|
2549
2571
|
var import_react_intl2 = require("react-intl");
|
|
2550
|
-
var
|
|
2572
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2551
2573
|
function useMatchChain() {
|
|
2552
2574
|
const chainListQuery = useChainListQuery();
|
|
2553
2575
|
const modal = useModal();
|
|
@@ -2578,28 +2600,28 @@ function useMatchChain() {
|
|
|
2578
2600
|
const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
|
|
2579
2601
|
const [selectedChainId, setSelectedChainId] = (0, import_react13.useState)(storeChainId2);
|
|
2580
2602
|
const isDownMd = useDownMd();
|
|
2581
|
-
return /* @__PURE__ */ (0,
|
|
2582
|
-
/* @__PURE__ */ (0,
|
|
2583
|
-
return /* @__PURE__ */ (0,
|
|
2603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: `matchid-change-network-box`, children: [
|
|
2604
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
|
|
2605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
2584
2606
|
"div",
|
|
2585
2607
|
{
|
|
2586
2608
|
onClick: () => setSelectedChainId(item.id),
|
|
2587
2609
|
className: `matchid-change-network-item ${selectedChainId == item.id ? "matchid-change-network-selected" : ""}`,
|
|
2588
2610
|
children: [
|
|
2589
|
-
/* @__PURE__ */ (0,
|
|
2590
|
-
/* @__PURE__ */ (0,
|
|
2591
|
-
/* @__PURE__ */ (0,
|
|
2611
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
|
|
2612
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
|
|
2613
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
|
|
2592
2614
|
] }),
|
|
2593
|
-
/* @__PURE__ */ (0,
|
|
2615
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
|
|
2594
2616
|
]
|
|
2595
2617
|
},
|
|
2596
2618
|
index
|
|
2597
2619
|
);
|
|
2598
2620
|
}) }),
|
|
2599
|
-
/* @__PURE__ */ (0,
|
|
2621
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
|
|
2600
2622
|
setChainId2(selectedChainId || 0);
|
|
2601
2623
|
close();
|
|
2602
|
-
}, block: true, children: /* @__PURE__ */ (0,
|
|
2624
|
+
}, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_intl2.FormattedMessage, { id: "confirm" }) })
|
|
2603
2625
|
] });
|
|
2604
2626
|
}
|
|
2605
2627
|
const showChangeNetwork = () => {
|
|
@@ -2717,10 +2739,10 @@ var import_viem6 = require("viem");
|
|
|
2717
2739
|
var import_react_query3 = require("@tanstack/react-query");
|
|
2718
2740
|
|
|
2719
2741
|
// src/components/ImportToken/index.tsx
|
|
2720
|
-
var
|
|
2742
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2721
2743
|
|
|
2722
2744
|
// src/hooks/useMatchWallet.tsx
|
|
2723
|
-
var
|
|
2745
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2724
2746
|
function useMatchWalletRecords() {
|
|
2725
2747
|
const [hasMore, setHasMore] = (0, import_react15.useState)(true);
|
|
2726
2748
|
const [items, setItems] = (0, import_react15.useState)([]);
|
|
@@ -3029,39 +3051,39 @@ var CACHE_TTL2 = 86400 * 30 * 1e3;
|
|
|
3029
3051
|
var import_zustand5 = require("zustand");
|
|
3030
3052
|
|
|
3031
3053
|
// src/hooks/useConfig.tsx
|
|
3032
|
-
var
|
|
3054
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3033
3055
|
var DEFAULT_WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
3034
3056
|
var WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
3035
3057
|
function useWalletConfig() {
|
|
3036
3058
|
const isDownMd = useDownMd();
|
|
3037
3059
|
const walletMap = {
|
|
3038
3060
|
evm: {
|
|
3039
|
-
icon: /* @__PURE__ */ (0,
|
|
3040
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3061
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(EVMDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3062
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(EVMLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3041
3063
|
name: "EVM",
|
|
3042
3064
|
method: "evm"
|
|
3043
3065
|
},
|
|
3044
3066
|
sol: {
|
|
3045
|
-
icon: /* @__PURE__ */ (0,
|
|
3046
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3067
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(SOLDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3068
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(SOLLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3047
3069
|
name: "SOL",
|
|
3048
3070
|
method: "sol"
|
|
3049
3071
|
},
|
|
3050
3072
|
btc: {
|
|
3051
|
-
icon: /* @__PURE__ */ (0,
|
|
3052
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3073
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(BTCDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3074
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(BTCLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3053
3075
|
name: "BTC",
|
|
3054
3076
|
method: "btc"
|
|
3055
3077
|
},
|
|
3056
3078
|
tron: {
|
|
3057
|
-
icon: /* @__PURE__ */ (0,
|
|
3058
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3079
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TRXDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3080
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TRXLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3059
3081
|
name: "TRON",
|
|
3060
3082
|
method: "tron"
|
|
3061
3083
|
},
|
|
3062
3084
|
ton: {
|
|
3063
|
-
icon: /* @__PURE__ */ (0,
|
|
3064
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3085
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TonLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3086
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TonLightIcon2, { size: isDownMd ? 36 : 40 }),
|
|
3065
3087
|
name: "TON",
|
|
3066
3088
|
method: "ton"
|
|
3067
3089
|
}
|
|
@@ -3090,6 +3112,12 @@ var useBTCModalStore = (0, import_zustand5.create)((set) => ({
|
|
|
3090
3112
|
open: (type) => set({ isOpen: true, type }),
|
|
3091
3113
|
close: () => set({ isOpen: false })
|
|
3092
3114
|
}));
|
|
3115
|
+
var useEVMModalStore = (0, import_zustand5.create)((set) => ({
|
|
3116
|
+
isOpen: false,
|
|
3117
|
+
type: "",
|
|
3118
|
+
open: (type) => set({ isOpen: true, type }),
|
|
3119
|
+
close: () => set({ isOpen: false })
|
|
3120
|
+
}));
|
|
3093
3121
|
var useCEXBindModalStore = (0, import_zustand5.create)((set) => ({
|
|
3094
3122
|
type: "",
|
|
3095
3123
|
isOpen: false,
|
|
@@ -3107,14 +3135,14 @@ var useWalletModalStore = (0, import_zustand5.create)((set) => ({
|
|
|
3107
3135
|
// src/components/CEXBindModal/index.tsx
|
|
3108
3136
|
var import_react18 = require("react");
|
|
3109
3137
|
var import_react_intl5 = require("react-intl");
|
|
3110
|
-
var
|
|
3138
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3111
3139
|
|
|
3112
3140
|
// src/context/BusinessProvider.tsx
|
|
3113
3141
|
var import_react_query8 = require("@tanstack/react-query");
|
|
3114
|
-
var
|
|
3142
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3115
3143
|
|
|
3116
3144
|
// src/context/index.tsx
|
|
3117
|
-
var
|
|
3145
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3118
3146
|
|
|
3119
3147
|
// src/hooks/useWalletInit.ts
|
|
3120
3148
|
var import_react19 = require("react");
|
|
@@ -3126,7 +3154,7 @@ var import_react20 = require("react");
|
|
|
3126
3154
|
// src/MatchContext.tsx
|
|
3127
3155
|
var import_react_query9 = require("@tanstack/react-query");
|
|
3128
3156
|
var import_react_intl6 = require("react-intl");
|
|
3129
|
-
var
|
|
3157
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3130
3158
|
var queryClient = new import_react_query9.QueryClient();
|
|
3131
3159
|
var MatchContext = (0, import_react21.createContext)(void 0);
|
|
3132
3160
|
var useMatch = () => {
|
|
@@ -3155,6 +3183,7 @@ function useUserInfo() {
|
|
|
3155
3183
|
const { setTgAppAuthCode, emailLoginKey, setEmailLoginKey } = useStore_default();
|
|
3156
3184
|
const isDownMd = useDownMd();
|
|
3157
3185
|
const { events, login } = useMatch();
|
|
3186
|
+
const { open: EVMOpen } = useEVMModalStore();
|
|
3158
3187
|
const { open: TRONOpen } = useTRONModalStore();
|
|
3159
3188
|
const { open: TONOpen } = useTONModalStore();
|
|
3160
3189
|
const { open: BTCOpen } = useBTCModalStore();
|
|
@@ -3231,7 +3260,8 @@ function useUserInfo() {
|
|
|
3231
3260
|
case "wallet":
|
|
3232
3261
|
return walletModalStore.open("login", extra?.methods);
|
|
3233
3262
|
case "evm":
|
|
3234
|
-
return
|
|
3263
|
+
return EVMOpen("login");
|
|
3264
|
+
// return window.open(`${endpoints.auth}login/wallet?appid=${appid}&locale=${locale}`)
|
|
3235
3265
|
case "sol":
|
|
3236
3266
|
if (isDownMd) {
|
|
3237
3267
|
return window.location.href = `${endpoints.auth}login/sol?appid=${appid}&locale=${locale}&redirect_uri=${getRedirectUri()}`;
|
|
@@ -3323,7 +3353,8 @@ function useUserInfo() {
|
|
|
3323
3353
|
case "wallet":
|
|
3324
3354
|
return walletModalStore.open("bind", extra?.methods);
|
|
3325
3355
|
case "evm":
|
|
3326
|
-
return
|
|
3356
|
+
return EVMOpen("bind");
|
|
3357
|
+
// return window.open(`${endpoints.auth}bind/wallet?appid=${appid}&locale=${locale}&st=` + encodeURIComponent(encodeBase64(token)))
|
|
3327
3358
|
case "sol":
|
|
3328
3359
|
if (isDownMd) {
|
|
3329
3360
|
return window.location.href = `${endpoints.auth}bind/sol?appid=${appid}&locale=${locale}&st=${encodeURIComponent(encodeBase64(token))}&redirect_uri=${getRedirectUri()}`;
|
|
@@ -3428,7 +3459,7 @@ function useUserInfo() {
|
|
|
3428
3459
|
// src/components/EmailModal/StepVerify.tsx
|
|
3429
3460
|
var import_react23 = require("react");
|
|
3430
3461
|
var import_react_intl7 = require("react-intl");
|
|
3431
|
-
var
|
|
3462
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
3432
3463
|
function StepVerify(props) {
|
|
3433
3464
|
const intl = (0, import_react_intl7.useIntl)();
|
|
3434
3465
|
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
@@ -3505,17 +3536,17 @@ function StepVerify(props) {
|
|
|
3505
3536
|
setSubmitting(false);
|
|
3506
3537
|
}
|
|
3507
3538
|
};
|
|
3508
|
-
return /* @__PURE__ */ (0,
|
|
3509
|
-
/* @__PURE__ */ (0,
|
|
3510
|
-
/* @__PURE__ */ (0,
|
|
3511
|
-
/* @__PURE__ */ (0,
|
|
3512
|
-
/* @__PURE__ */ (0,
|
|
3513
|
-
/* @__PURE__ */ (0,
|
|
3539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "matchid-email-verify-box", children: [
|
|
3540
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "matchid-email-verify-header", children: [
|
|
3541
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
|
|
3542
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "matchid-email-verify-header-content", children: [
|
|
3543
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "matchid-email-verify-header-value", children: props.email }),
|
|
3544
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react_intl7.FormattedMessage, { id: "sendEmailTips" }) })
|
|
3514
3545
|
] })
|
|
3515
3546
|
] }),
|
|
3516
|
-
/* @__PURE__ */ (0,
|
|
3547
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Field, { label: intl.formatMessage({
|
|
3517
3548
|
id: "verificationCode"
|
|
3518
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
3549
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3519
3550
|
Input,
|
|
3520
3551
|
{
|
|
3521
3552
|
placeholder: intl.formatMessage({
|
|
@@ -3525,7 +3556,7 @@ function StepVerify(props) {
|
|
|
3525
3556
|
maxLength: codeLength,
|
|
3526
3557
|
onChange: (e) => setCode(e.target.value),
|
|
3527
3558
|
value: code,
|
|
3528
|
-
after: /* @__PURE__ */ (0,
|
|
3559
|
+
after: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3529
3560
|
Button,
|
|
3530
3561
|
{
|
|
3531
3562
|
highlight: true,
|
|
@@ -3544,13 +3575,13 @@ function StepVerify(props) {
|
|
|
3544
3575
|
)
|
|
3545
3576
|
}
|
|
3546
3577
|
) }),
|
|
3547
|
-
/* @__PURE__ */ (0,
|
|
3578
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Button, { disabled: !canContinue, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react_intl7.FormattedMessage, { id: "continue" }) })
|
|
3548
3579
|
] });
|
|
3549
3580
|
}
|
|
3550
3581
|
|
|
3551
3582
|
// src/components/EmailModal/index.tsx
|
|
3552
3583
|
var import_react_intl8 = require("react-intl");
|
|
3553
|
-
var
|
|
3584
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
3554
3585
|
function EmailModal({
|
|
3555
3586
|
isOpen = false,
|
|
3556
3587
|
width = 480,
|
|
@@ -3567,7 +3598,7 @@ function EmailModal({
|
|
|
3567
3598
|
setEmailVal("");
|
|
3568
3599
|
}
|
|
3569
3600
|
}, [isOpen]);
|
|
3570
|
-
return /* @__PURE__ */ (0,
|
|
3601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3571
3602
|
ModalWithHeader,
|
|
3572
3603
|
{
|
|
3573
3604
|
isOpen,
|
|
@@ -3577,10 +3608,10 @@ function EmailModal({
|
|
|
3577
3608
|
id: "email"
|
|
3578
3609
|
}),
|
|
3579
3610
|
onBack: step == "verify" ? () => setStep("input") : onBack,
|
|
3580
|
-
children: step === "input" ? /* @__PURE__ */ (0,
|
|
3611
|
+
children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
|
|
3581
3612
|
setEmailVal(email);
|
|
3582
3613
|
setStep("verify");
|
|
3583
|
-
} }) : /* @__PURE__ */ (0,
|
|
3614
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(StepVerify, { email: emailVal, onSuccess: onLogin })
|
|
3584
3615
|
}
|
|
3585
3616
|
);
|
|
3586
3617
|
}
|
|
@@ -3610,7 +3641,7 @@ function useAppConfig() {
|
|
|
3610
3641
|
}
|
|
3611
3642
|
|
|
3612
3643
|
// src/components/LoginBox/index.tsx
|
|
3613
|
-
var
|
|
3644
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
3614
3645
|
var RecommendItem = ({
|
|
3615
3646
|
icon,
|
|
3616
3647
|
name,
|
|
@@ -3619,20 +3650,20 @@ var RecommendItem = ({
|
|
|
3619
3650
|
children,
|
|
3620
3651
|
footer
|
|
3621
3652
|
}) => {
|
|
3622
|
-
return /* @__PURE__ */ (0,
|
|
3623
|
-
/* @__PURE__ */ (0,
|
|
3624
|
-
/* @__PURE__ */ (0,
|
|
3625
|
-
/* @__PURE__ */ (0,
|
|
3626
|
-
/* @__PURE__ */ (0,
|
|
3653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "matchid-login-recommend-method", children: [
|
|
3654
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "matchid-login-recommend-method-item", onClick, children: [
|
|
3655
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "matchid-login-recommend-method-content", children: [
|
|
3656
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "matchid-login-recommend-method-icon", children: icon }),
|
|
3657
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "matchid-login-recommend-method-name", children: name })
|
|
3627
3658
|
] }),
|
|
3628
|
-
footer ? footer : children ? /* @__PURE__ */ (0,
|
|
3659
|
+
footer ? footer : children ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3629
3660
|
ArrowDownIcon,
|
|
3630
3661
|
{
|
|
3631
3662
|
className: `matchid-login-recommend-method-arrow ${showChildren ? "matchid-login-recommend-method-arrow-active" : ""}`,
|
|
3632
3663
|
size: 20,
|
|
3633
3664
|
color: "var(--matchid-arrow-color)"
|
|
3634
3665
|
}
|
|
3635
|
-
) : /* @__PURE__ */ (0,
|
|
3666
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3636
3667
|
ArrowRightIcon,
|
|
3637
3668
|
{
|
|
3638
3669
|
className: "matchid-login-recommend-method-arrow",
|
|
@@ -3641,7 +3672,7 @@ var RecommendItem = ({
|
|
|
3641
3672
|
}
|
|
3642
3673
|
)
|
|
3643
3674
|
] }),
|
|
3644
|
-
children && /* @__PURE__ */ (0,
|
|
3675
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3645
3676
|
"div",
|
|
3646
3677
|
{
|
|
3647
3678
|
className: `matchid-login-recommend-method-popover ${showChildren ? "matchid-login-recommend-method-popover-active" : ""}`,
|
|
@@ -3706,75 +3737,75 @@ function LoginBox({
|
|
|
3706
3737
|
const isDownMd = useDownMd();
|
|
3707
3738
|
const methodMap = {
|
|
3708
3739
|
wallet: {
|
|
3709
|
-
icon: /* @__PURE__ */ (0,
|
|
3740
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(WalletIcon, { size: isDownMd ? 36 : 40 }),
|
|
3710
3741
|
name: intl.formatMessage({ id: "wallet" }),
|
|
3711
3742
|
onClick: () => setShowWallet(!showWallet),
|
|
3712
3743
|
type: "wallet"
|
|
3713
3744
|
},
|
|
3714
3745
|
email: {
|
|
3715
|
-
icon: /* @__PURE__ */ (0,
|
|
3746
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
|
|
3716
3747
|
name: intl.formatMessage({ id: "email" }),
|
|
3717
3748
|
onClick: () => {
|
|
3718
3749
|
setEmailOpen(true);
|
|
3719
3750
|
}
|
|
3720
3751
|
},
|
|
3721
3752
|
google: {
|
|
3722
|
-
icon: /* @__PURE__ */ (0,
|
|
3753
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(GoogleIcon, { size: isDownMd ? 36 : 40 }),
|
|
3723
3754
|
name: "Google",
|
|
3724
3755
|
onClick: () => login("google")
|
|
3725
3756
|
},
|
|
3726
3757
|
twitter: {
|
|
3727
|
-
icon: /* @__PURE__ */ (0,
|
|
3758
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(XIcon, { size: isDownMd ? 36 : 40 }),
|
|
3728
3759
|
name: "X",
|
|
3729
3760
|
onClick: () => login("twitter")
|
|
3730
3761
|
},
|
|
3731
3762
|
telegram: {
|
|
3732
|
-
icon: /* @__PURE__ */ (0,
|
|
3763
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TelegramIcon, { size: isDownMd ? 36 : 40 }),
|
|
3733
3764
|
name: "Telegram",
|
|
3734
3765
|
onClick: () => login("telegram")
|
|
3735
3766
|
},
|
|
3736
3767
|
github: {
|
|
3737
|
-
icon: /* @__PURE__ */ (0,
|
|
3768
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(GithubIcon, { size: isDownMd ? 36 : 40 }),
|
|
3738
3769
|
name: "Github",
|
|
3739
3770
|
onClick: () => login("github")
|
|
3740
3771
|
},
|
|
3741
3772
|
discord: {
|
|
3742
|
-
icon: /* @__PURE__ */ (0,
|
|
3773
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(DiscordIcon, { size: isDownMd ? 36 : 40 }),
|
|
3743
3774
|
name: "Discord",
|
|
3744
3775
|
onClick: () => login("discord")
|
|
3745
3776
|
},
|
|
3746
3777
|
linkedin: {
|
|
3747
|
-
icon: /* @__PURE__ */ (0,
|
|
3778
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
|
|
3748
3779
|
name: "LinkedIn",
|
|
3749
3780
|
onClick: () => login("linkedin")
|
|
3750
3781
|
},
|
|
3751
3782
|
facebook: {
|
|
3752
|
-
icon: /* @__PURE__ */ (0,
|
|
3783
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(FacebookIcon, { size: isDownMd ? 36 : 40 }),
|
|
3753
3784
|
name: "Facebook",
|
|
3754
3785
|
onClick: () => login("facebook")
|
|
3755
3786
|
},
|
|
3756
3787
|
youtube: {
|
|
3757
|
-
icon: /* @__PURE__ */ (0,
|
|
3788
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
|
|
3758
3789
|
name: "Youtube",
|
|
3759
3790
|
onClick: () => login("youtube")
|
|
3760
3791
|
}
|
|
3761
3792
|
};
|
|
3762
3793
|
const { walletMap } = useWalletConfig();
|
|
3763
|
-
return /* @__PURE__ */ (0,
|
|
3764
|
-
(!inModal || !emailOpen) && /* @__PURE__ */ (0,
|
|
3765
|
-
/* @__PURE__ */ (0,
|
|
3766
|
-
return /* @__PURE__ */ (0,
|
|
3794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
3795
|
+
(!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "matchid-login-box", children: [
|
|
3796
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
|
|
3797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3767
3798
|
RecommendItem,
|
|
3768
3799
|
{
|
|
3769
3800
|
icon: methodMap[m]?.icon,
|
|
3770
3801
|
name: methodMap[m]?.name,
|
|
3771
3802
|
onClick: methodMap[m]?.onClick,
|
|
3772
3803
|
showChildren: m == "wallet" && showWallet,
|
|
3773
|
-
children: m == "wallet" && /* @__PURE__ */ (0,
|
|
3774
|
-
/* @__PURE__ */ (0,
|
|
3775
|
-
/* @__PURE__ */ (0,
|
|
3804
|
+
children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
3805
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
|
|
3806
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
|
|
3776
3807
|
const m2 = walletMap[n];
|
|
3777
|
-
return /* @__PURE__ */ (0,
|
|
3808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
3778
3809
|
"div",
|
|
3779
3810
|
{
|
|
3780
3811
|
className: "matchid-login-recommend-wallet-item",
|
|
@@ -3782,16 +3813,16 @@ function LoginBox({
|
|
|
3782
3813
|
login(m2.method);
|
|
3783
3814
|
},
|
|
3784
3815
|
children: [
|
|
3785
|
-
/* @__PURE__ */ (0,
|
|
3786
|
-
/* @__PURE__ */ (0,
|
|
3787
|
-
/* @__PURE__ */ (0,
|
|
3816
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
|
|
3817
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
|
|
3818
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3788
3819
|
"div",
|
|
3789
3820
|
{
|
|
3790
3821
|
className: "matchid-login-recommend-wallet-item-hover-icon",
|
|
3791
3822
|
children: m2.activeIcon
|
|
3792
3823
|
}
|
|
3793
3824
|
),
|
|
3794
|
-
/* @__PURE__ */ (0,
|
|
3825
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3795
3826
|
"span",
|
|
3796
3827
|
{
|
|
3797
3828
|
className: "matchid-login-recommend-wallet-item-name",
|
|
@@ -3799,7 +3830,7 @@ function LoginBox({
|
|
|
3799
3830
|
}
|
|
3800
3831
|
)
|
|
3801
3832
|
] }),
|
|
3802
|
-
/* @__PURE__ */ (0,
|
|
3833
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3803
3834
|
ArrowRightIcon,
|
|
3804
3835
|
{
|
|
3805
3836
|
className: "matchid-login-recommend-wallet-item-arrow",
|
|
@@ -3817,10 +3848,10 @@ function LoginBox({
|
|
|
3817
3848
|
m
|
|
3818
3849
|
);
|
|
3819
3850
|
}) }),
|
|
3820
|
-
methodConfig.methods.length > 0 && /* @__PURE__ */ (0,
|
|
3821
|
-
/* @__PURE__ */ (0,
|
|
3822
|
-
/* @__PURE__ */ (0,
|
|
3823
|
-
return /* @__PURE__ */ (0,
|
|
3851
|
+
methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "matchid-login-other", children: [
|
|
3852
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_intl9.FormattedMessage, { id: "otherLoginMethods" }) }),
|
|
3853
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
3854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3824
3855
|
"div",
|
|
3825
3856
|
{
|
|
3826
3857
|
className: "matchid-login-method-item",
|
|
@@ -3833,7 +3864,7 @@ function LoginBox({
|
|
|
3833
3864
|
}) })
|
|
3834
3865
|
] })
|
|
3835
3866
|
] }),
|
|
3836
|
-
/* @__PURE__ */ (0,
|
|
3867
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3837
3868
|
EmailModal,
|
|
3838
3869
|
{
|
|
3839
3870
|
isOpen: emailOpen,
|
|
@@ -3853,40 +3884,40 @@ var import_react27 = require("react");
|
|
|
3853
3884
|
|
|
3854
3885
|
// src/components/LoginPanel/index.tsx
|
|
3855
3886
|
var import_react_intl10 = require("react-intl");
|
|
3856
|
-
var
|
|
3887
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
3857
3888
|
function LoginPanel({
|
|
3858
3889
|
header,
|
|
3859
3890
|
onClose,
|
|
3860
3891
|
...props
|
|
3861
3892
|
}) {
|
|
3862
3893
|
const isDownMd = useDownMd();
|
|
3863
|
-
return /* @__PURE__ */ (0,
|
|
3864
|
-
header ? header : /* @__PURE__ */ (0,
|
|
3865
|
-
/* @__PURE__ */ (0,
|
|
3866
|
-
/* @__PURE__ */ (0,
|
|
3867
|
-
/* @__PURE__ */ (0,
|
|
3894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-login-panel", children: [
|
|
3895
|
+
header ? header : /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-login-panel-header", children: [
|
|
3896
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-login-panel-header-content", children: [
|
|
3897
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react_intl10.FormattedMessage, { id: "loginTitle" }) }),
|
|
3898
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react_intl10.FormattedMessage, { id: "loginTips" }) })
|
|
3868
3899
|
] }),
|
|
3869
|
-
onClose && /* @__PURE__ */ (0,
|
|
3900
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
|
|
3870
3901
|
] }),
|
|
3871
|
-
/* @__PURE__ */ (0,
|
|
3872
|
-
/* @__PURE__ */ (0,
|
|
3902
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-login-panel-divide" }),
|
|
3903
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(LoginBox, { ...props }) })
|
|
3873
3904
|
] });
|
|
3874
3905
|
}
|
|
3875
3906
|
|
|
3876
3907
|
// src/components/LoginModal/index.tsx
|
|
3877
|
-
var
|
|
3908
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
3878
3909
|
function LoginModal({
|
|
3879
3910
|
isOpen = false,
|
|
3880
3911
|
width = 480,
|
|
3881
3912
|
...props
|
|
3882
3913
|
}) {
|
|
3883
3914
|
const { isLogin } = useUserInfo();
|
|
3884
|
-
return /* @__PURE__ */ (0,
|
|
3915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
3885
3916
|
Modal,
|
|
3886
3917
|
{
|
|
3887
3918
|
isOpen: isOpen && !isLogin,
|
|
3888
3919
|
width,
|
|
3889
|
-
children: /* @__PURE__ */ (0,
|
|
3920
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(LoginPanel, { ...props, inModal: true })
|
|
3890
3921
|
}
|
|
3891
3922
|
);
|
|
3892
3923
|
}
|
|
@@ -3895,10 +3926,10 @@ function LoginModal({
|
|
|
3895
3926
|
var import_react26 = require("react");
|
|
3896
3927
|
|
|
3897
3928
|
// src/assets/icon/ProfileIcon.tsx
|
|
3898
|
-
var
|
|
3929
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3899
3930
|
function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
3900
|
-
return /* @__PURE__ */ (0,
|
|
3901
|
-
/* @__PURE__ */ (0,
|
|
3931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
3932
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3902
3933
|
"path",
|
|
3903
3934
|
{
|
|
3904
3935
|
fillRule: "evenodd",
|
|
@@ -3907,7 +3938,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
3907
3938
|
fill: color
|
|
3908
3939
|
}
|
|
3909
3940
|
),
|
|
3910
|
-
/* @__PURE__ */ (0,
|
|
3941
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3911
3942
|
"path",
|
|
3912
3943
|
{
|
|
3913
3944
|
fillRule: "evenodd",
|
|
@@ -3921,7 +3952,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
3921
3952
|
|
|
3922
3953
|
// src/components/UserPopover/index.tsx
|
|
3923
3954
|
var import_react_intl11 = require("react-intl");
|
|
3924
|
-
var
|
|
3955
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3925
3956
|
function UserContent() {
|
|
3926
3957
|
const { logout, address, username } = useUserInfo();
|
|
3927
3958
|
const [logouting, setLogouting] = (0, import_react26.useState)(false);
|
|
@@ -3942,34 +3973,34 @@ function UserContent() {
|
|
|
3942
3973
|
rightIcon,
|
|
3943
3974
|
onClick
|
|
3944
3975
|
}) => {
|
|
3945
|
-
return /* @__PURE__ */ (0,
|
|
3946
|
-
/* @__PURE__ */ (0,
|
|
3976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-user-popover-item", onClick, children: [
|
|
3977
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-user-popover-item-content`, children: [
|
|
3947
3978
|
icon,
|
|
3948
|
-
/* @__PURE__ */ (0,
|
|
3979
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-user-popover-item-text", children })
|
|
3949
3980
|
] }),
|
|
3950
3981
|
rightIcon
|
|
3951
3982
|
] });
|
|
3952
3983
|
};
|
|
3953
3984
|
const UserDivider = () => {
|
|
3954
|
-
return /* @__PURE__ */ (0,
|
|
3985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: `matchid-user-popover-divider` });
|
|
3955
3986
|
};
|
|
3956
3987
|
const [usernameOpen, setUsernameOpen] = (0, import_react26.useState)(false);
|
|
3957
3988
|
const [copied, setCopied] = useCopyClipboard();
|
|
3958
3989
|
const intl = (0, import_react_intl11.useIntl)();
|
|
3959
|
-
return /* @__PURE__ */ (0,
|
|
3960
|
-
/* @__PURE__ */ (0,
|
|
3961
|
-
/* @__PURE__ */ (0,
|
|
3990
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-user-popover-content", children: [
|
|
3991
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-user-popover-list", children: [
|
|
3992
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(UserItem, { onClick: () => {
|
|
3962
3993
|
setCopied(address);
|
|
3963
|
-
}, icon: copied ? /* @__PURE__ */ (0,
|
|
3964
|
-
/* @__PURE__ */ (0,
|
|
3965
|
-
/* @__PURE__ */ (0,
|
|
3994
|
+
}, icon: copied ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(CheckIcon, { size: 20, color: "#0ecb81" }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(CopyIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(CheckIcon, { size: 20, color: "var(--icon-color)" }), children: truncateAddress(address) }),
|
|
3995
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(UserDivider, {}),
|
|
3996
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(UserItem, { onClick: () => {
|
|
3966
3997
|
setUsernameOpen(true);
|
|
3967
|
-
}, icon: /* @__PURE__ */ (0,
|
|
3998
|
+
}, icon: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ProfileIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ArrowRightIcon, { size: 20, color: "var(--icon-color)" }), children: username || intl.formatMessage({
|
|
3968
3999
|
id: "setUsername"
|
|
3969
4000
|
}) })
|
|
3970
4001
|
] }),
|
|
3971
|
-
/* @__PURE__ */ (0,
|
|
3972
|
-
/* @__PURE__ */ (0,
|
|
4002
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl11.FormattedMessage, { id: "disconnect" }) }),
|
|
4003
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(UsernameModal, { isOpen: usernameOpen, onClose: () => {
|
|
3973
4004
|
setUsernameOpen(false);
|
|
3974
4005
|
}, onSuccess: () => {
|
|
3975
4006
|
setUsernameOpen(false);
|
|
@@ -3980,12 +4011,12 @@ function UserPopover({
|
|
|
3980
4011
|
children,
|
|
3981
4012
|
...props
|
|
3982
4013
|
}) {
|
|
3983
|
-
return /* @__PURE__ */ (0,
|
|
4014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Popover, { ...props, content: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(UserContent, {}), children });
|
|
3984
4015
|
}
|
|
3985
4016
|
|
|
3986
4017
|
// src/components/LoginButton/index.tsx
|
|
3987
4018
|
var import_react_intl12 = require("react-intl");
|
|
3988
|
-
var
|
|
4019
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
3989
4020
|
function LoginButton({
|
|
3990
4021
|
loginRender,
|
|
3991
4022
|
methods,
|
|
@@ -4001,8 +4032,8 @@ function LoginButton({
|
|
|
4001
4032
|
const { isLogin, username } = useUserInfo();
|
|
4002
4033
|
const [loginOpen, setLoginOpen] = (0, import_react27.useState)(false);
|
|
4003
4034
|
if (!isLogin) {
|
|
4004
|
-
return /* @__PURE__ */ (0,
|
|
4005
|
-
/* @__PURE__ */ (0,
|
|
4035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
|
|
4036
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4006
4037
|
LoginModal,
|
|
4007
4038
|
{
|
|
4008
4039
|
methods,
|
|
@@ -4012,15 +4043,15 @@ function LoginButton({
|
|
|
4012
4043
|
onClose: () => setLoginOpen(false)
|
|
4013
4044
|
}
|
|
4014
4045
|
),
|
|
4015
|
-
/* @__PURE__ */ (0,
|
|
4016
|
-
/* @__PURE__ */ (0,
|
|
4017
|
-
/* @__PURE__ */ (0,
|
|
4046
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
|
|
4047
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(UnLoginIcon_default, {}),
|
|
4048
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react_intl12.FormattedMessage, { id: "login" }) })
|
|
4018
4049
|
] })
|
|
4019
4050
|
] });
|
|
4020
4051
|
}
|
|
4021
|
-
return loginRender ? /* @__PURE__ */ (0,
|
|
4022
|
-
/* @__PURE__ */ (0,
|
|
4023
|
-
/* @__PURE__ */ (0,
|
|
4052
|
+
return loginRender ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_jsx_runtime82.Fragment, { children: loginRender }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(UserPopover, { position: popoverPosition, type: popoverType, gap: popoverGap, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(Button, { onClick: onLoginClick, className: "matchid-login-btn", ...props, children: [
|
|
4053
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(LoginIcon_default, {}),
|
|
4054
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { children: username ? truncateAddress(username) : "MatchID " + intl.formatMessage({
|
|
4024
4055
|
id: "user"
|
|
4025
4056
|
}) })
|
|
4026
4057
|
] }) });
|
|
@@ -4029,15 +4060,15 @@ function LoginButton({
|
|
|
4029
4060
|
// src/components/UsernameModal/index.tsx
|
|
4030
4061
|
var import_react28 = require("react");
|
|
4031
4062
|
var import_react_intl13 = require("react-intl");
|
|
4032
|
-
var
|
|
4063
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
4033
4064
|
var ValidItem = ({
|
|
4034
4065
|
success = false,
|
|
4035
4066
|
text
|
|
4036
4067
|
}) => {
|
|
4037
4068
|
const isDownMd = useDownMd();
|
|
4038
|
-
return /* @__PURE__ */ (0,
|
|
4039
|
-
success ? /* @__PURE__ */ (0,
|
|
4040
|
-
/* @__PURE__ */ (0,
|
|
4069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
|
|
4070
|
+
success ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
|
|
4071
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { children: text })
|
|
4041
4072
|
] });
|
|
4042
4073
|
};
|
|
4043
4074
|
function UsernameModal({
|
|
@@ -4085,12 +4116,12 @@ function UsernameModal({
|
|
|
4085
4116
|
}
|
|
4086
4117
|
};
|
|
4087
4118
|
const intl = (0, import_react_intl13.useIntl)();
|
|
4088
|
-
return /* @__PURE__ */ (0,
|
|
4119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
|
|
4089
4120
|
id: username ? "editUsernameTitle" : "setUsernameTitle"
|
|
4090
|
-
}), children: /* @__PURE__ */ (0,
|
|
4091
|
-
/* @__PURE__ */ (0,
|
|
4121
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "matchid-username-box", children: [
|
|
4122
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Field, { label: intl.formatMessage({
|
|
4092
4123
|
id: "username"
|
|
4093
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
4124
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
4094
4125
|
Input,
|
|
4095
4126
|
{
|
|
4096
4127
|
placeholder: intl.formatMessage({
|
|
@@ -4103,8 +4134,8 @@ function UsernameModal({
|
|
|
4103
4134
|
value: val
|
|
4104
4135
|
}
|
|
4105
4136
|
) }),
|
|
4106
|
-
/* @__PURE__ */ (0,
|
|
4107
|
-
/* @__PURE__ */ (0,
|
|
4137
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "matchid-valid", children: [
|
|
4138
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
4108
4139
|
ValidItem,
|
|
4109
4140
|
{
|
|
4110
4141
|
success: isValid,
|
|
@@ -4113,21 +4144,21 @@ function UsernameModal({
|
|
|
4113
4144
|
})
|
|
4114
4145
|
}
|
|
4115
4146
|
),
|
|
4116
|
-
/* @__PURE__ */ (0,
|
|
4147
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ValidItem, { success: isLength, text: intl.formatMessage({
|
|
4117
4148
|
id: "usernameLengthError"
|
|
4118
4149
|
}) })
|
|
4119
4150
|
] }),
|
|
4120
|
-
/* @__PURE__ */ (0,
|
|
4151
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Button, { disabled: !isSafe, loading: isSubmitting, style: {
|
|
4121
4152
|
marginTop: isDownMd ? "36px" : "64px"
|
|
4122
|
-
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
4123
|
-
/* @__PURE__ */ (0,
|
|
4153
|
+
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react_intl13.FormattedMessage, { id: "confirm" }) }),
|
|
4154
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Button, { style: {
|
|
4124
4155
|
marginTop: isDownMd ? "12px" : "24px"
|
|
4125
|
-
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0,
|
|
4156
|
+
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react_intl13.FormattedMessage, { id: "cancel" }) })
|
|
4126
4157
|
] }) });
|
|
4127
4158
|
}
|
|
4128
4159
|
|
|
4129
|
-
// src/components/
|
|
4130
|
-
var import_react31 =
|
|
4160
|
+
// src/components/EVMModal/index.tsx
|
|
4161
|
+
var import_react31 = require("react");
|
|
4131
4162
|
var import_react_intl14 = require("react-intl");
|
|
4132
4163
|
|
|
4133
4164
|
// src/components/WalletModalContent/index.tsx
|
|
@@ -4141,7 +4172,7 @@ var walletConnectImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEA
|
|
|
4141
4172
|
var walletSigningImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAABAsUlEQVR4Xu19CXQUx7X2vCUveS/vJdgx+yaJHQwI8G4wzWIbG2LLNrbxPgnY7CC0SyNpJBAIECAZAbLB8gAyKGGxiFnkGJwmz47xsU0mvyEWoGW0D0jgSeK88L84/7l/fS2V3GrNaDRCEiPpfud8p3qqu6tnpvt+favqVpXJxGAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYbYvCwkKlpKREvXDhglpQUKCKz+qlS5e0z8j3N5aXl6tXrlwJMf4OBoPRDD777LPg7Ozs0MOHD1Ni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
4174
|
// src/components/WalletModalContent/index.tsx
|
|
4144
|
-
var
|
|
4175
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
4145
4176
|
function WalletModalContent({
|
|
4146
4177
|
status,
|
|
4147
4178
|
error,
|
|
@@ -4211,12 +4242,12 @@ function WalletModalContent({
|
|
|
4211
4242
|
statusImage: walletConnectImage
|
|
4212
4243
|
};
|
|
4213
4244
|
}, [visible, connected, status, error, address]);
|
|
4214
|
-
return /* @__PURE__ */ (0,
|
|
4215
|
-
/* @__PURE__ */ (0,
|
|
4216
|
-
/* @__PURE__ */ (0,
|
|
4217
|
-
/* @__PURE__ */ (0,
|
|
4245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
4246
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
4247
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("img", { src: pageData.statusImage }),
|
|
4248
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: pageData.isError ? "matchid-error" : "", children: pageData.text })
|
|
4218
4249
|
] }),
|
|
4219
|
-
/* @__PURE__ */ (0,
|
|
4250
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
4220
4251
|
Button,
|
|
4221
4252
|
{
|
|
4222
4253
|
block: true,
|
|
@@ -4229,6 +4260,607 @@ function WalletModalContent({
|
|
|
4229
4260
|
)
|
|
4230
4261
|
] }) });
|
|
4231
4262
|
}
|
|
4263
|
+
function WalletModalContentV2(props) {
|
|
4264
|
+
const [submitting, setSubmitting] = (0, import_react29.useState)(false);
|
|
4265
|
+
const pageData = (0, import_react29.useMemo)(() => {
|
|
4266
|
+
const { status } = props;
|
|
4267
|
+
if (status == "success") {
|
|
4268
|
+
return {
|
|
4269
|
+
btnText: "Disconnect Wallet",
|
|
4270
|
+
btnClick: async () => {
|
|
4271
|
+
setSubmitting(true);
|
|
4272
|
+
await props.onDisconnect?.();
|
|
4273
|
+
setSubmitting(false);
|
|
4274
|
+
},
|
|
4275
|
+
text: "Wallet connection successful!",
|
|
4276
|
+
statusImage: walletConnectedImage,
|
|
4277
|
+
btnLoading: submitting
|
|
4278
|
+
};
|
|
4279
|
+
}
|
|
4280
|
+
if (status == "error") {
|
|
4281
|
+
return {
|
|
4282
|
+
text: props.error || "Unknown Error",
|
|
4283
|
+
btnText: "Reconnect Wallet",
|
|
4284
|
+
btnClick: async () => {
|
|
4285
|
+
setSubmitting(true);
|
|
4286
|
+
await props.onError?.();
|
|
4287
|
+
setSubmitting(false);
|
|
4288
|
+
},
|
|
4289
|
+
statusImage: walletErrorImage,
|
|
4290
|
+
isError: true,
|
|
4291
|
+
btnLoading: submitting
|
|
4292
|
+
};
|
|
4293
|
+
}
|
|
4294
|
+
if (status == "nonce") {
|
|
4295
|
+
return {
|
|
4296
|
+
btnLoading: true,
|
|
4297
|
+
text: "Connecting",
|
|
4298
|
+
statusImage: walletConnectingImage
|
|
4299
|
+
};
|
|
4300
|
+
}
|
|
4301
|
+
if (status == "signer") {
|
|
4302
|
+
return {
|
|
4303
|
+
btnLoading: true,
|
|
4304
|
+
text: "Signing",
|
|
4305
|
+
statusImage: walletSigningImage
|
|
4306
|
+
};
|
|
4307
|
+
}
|
|
4308
|
+
if (status == "connecting") {
|
|
4309
|
+
return {
|
|
4310
|
+
btnLoading: true,
|
|
4311
|
+
text: "Connecting",
|
|
4312
|
+
statusImage: walletConnectingImage
|
|
4313
|
+
};
|
|
4314
|
+
}
|
|
4315
|
+
return {
|
|
4316
|
+
btnText: "Connect Wallet",
|
|
4317
|
+
btnClick: async () => {
|
|
4318
|
+
setSubmitting(true);
|
|
4319
|
+
await props.onConnect?.();
|
|
4320
|
+
setSubmitting(false);
|
|
4321
|
+
},
|
|
4322
|
+
text: "Please Connect your wallet",
|
|
4323
|
+
statusImage: walletConnectImage
|
|
4324
|
+
};
|
|
4325
|
+
}, [props, submitting]);
|
|
4326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
4327
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
4328
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("img", { src: pageData.statusImage }),
|
|
4329
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: props.status == "error" ? "matchid-error" : "", children: pageData.text })
|
|
4330
|
+
] }),
|
|
4331
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
4332
|
+
Button,
|
|
4333
|
+
{
|
|
4334
|
+
block: true,
|
|
4335
|
+
size: "lg",
|
|
4336
|
+
onClick: pageData.btnClick,
|
|
4337
|
+
loading: pageData.btnLoading,
|
|
4338
|
+
disabled: pageData.btnDisabled,
|
|
4339
|
+
children: pageData.btnText
|
|
4340
|
+
}
|
|
4341
|
+
)
|
|
4342
|
+
] }) });
|
|
4343
|
+
}
|
|
4344
|
+
|
|
4345
|
+
// src/components/EVMModal/index.tsx
|
|
4346
|
+
var import_chains = require("wagmi/chains");
|
|
4347
|
+
var import_rainbowkit = require("@rainbow-me/rainbowkit");
|
|
4348
|
+
var import_wagmi2 = require("wagmi");
|
|
4349
|
+
var import_wallets = require("@rainbow-me/rainbowkit/wallets");
|
|
4350
|
+
|
|
4351
|
+
// src/config/chains/MatchMain.ts
|
|
4352
|
+
var import_viem11 = require("viem");
|
|
4353
|
+
var matchMain = /* @__PURE__ */ (0, import_viem11.defineChain)({
|
|
4354
|
+
//定义match链
|
|
4355
|
+
id: 698,
|
|
4356
|
+
name: "Matchain",
|
|
4357
|
+
nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
|
|
4358
|
+
rpcUrls: {
|
|
4359
|
+
default: {
|
|
4360
|
+
http: ["https://rpc.matchain.io"]
|
|
4361
|
+
}
|
|
4362
|
+
},
|
|
4363
|
+
blockExplorers: {
|
|
4364
|
+
default: {
|
|
4365
|
+
name: "Matchscan",
|
|
4366
|
+
url: "https://matchscan.io/",
|
|
4367
|
+
apiUrl: "https://matchscan.io/api"
|
|
4368
|
+
}
|
|
4369
|
+
},
|
|
4370
|
+
iconUrl: "https://matchscan.io/static/identicon_logos/blockies.png",
|
|
4371
|
+
contracts: {
|
|
4372
|
+
multicall3: {
|
|
4373
|
+
address: "0xca11bde05977b3631167028862be2a173976ca11"
|
|
4374
|
+
}
|
|
4375
|
+
}
|
|
4376
|
+
// testnet: true,
|
|
4377
|
+
});
|
|
4378
|
+
|
|
4379
|
+
// src/config/chains/MatchTest.ts
|
|
4380
|
+
var import_viem12 = require("viem");
|
|
4381
|
+
var matchTest = /* @__PURE__ */ (0, import_viem12.defineChain)({
|
|
4382
|
+
//定义matchTest链
|
|
4383
|
+
id: 699,
|
|
4384
|
+
name: "MatchTest",
|
|
4385
|
+
nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
|
|
4386
|
+
rpcUrls: {
|
|
4387
|
+
default: {
|
|
4388
|
+
http: ["https://testnet-rpc.matchain.io"]
|
|
4389
|
+
}
|
|
4390
|
+
},
|
|
4391
|
+
blockExplorers: {
|
|
4392
|
+
default: {
|
|
4393
|
+
name: "Matchscan",
|
|
4394
|
+
url: "https://testnet.matchscan.io/",
|
|
4395
|
+
apiUrl: "https://testnet.matchscan.io/api"
|
|
4396
|
+
}
|
|
4397
|
+
},
|
|
4398
|
+
iconUrl: "https://testnet.matchscan.io/static/identicon_logos/blockies.png",
|
|
4399
|
+
contracts: {
|
|
4400
|
+
multicall3: {
|
|
4401
|
+
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
4402
|
+
blockCreated: 751532
|
|
4403
|
+
},
|
|
4404
|
+
ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
|
|
4405
|
+
ensUniversalResolver: {
|
|
4406
|
+
address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",
|
|
4407
|
+
blockCreated: 5317080
|
|
4408
|
+
}
|
|
4409
|
+
}
|
|
4410
|
+
// testnet: true,
|
|
4411
|
+
});
|
|
4412
|
+
|
|
4413
|
+
// src/hooks/useWalletBox.ts
|
|
4414
|
+
var import_react30 = require("react");
|
|
4415
|
+
function useWalletBox({
|
|
4416
|
+
onInit
|
|
4417
|
+
}) {
|
|
4418
|
+
const [status, setStateStatus] = (0, import_react30.useState)("start");
|
|
4419
|
+
const [error, setError] = (0, import_react30.useState)("");
|
|
4420
|
+
const statusRef = (0, import_react30.useRef)(status);
|
|
4421
|
+
const [nonce, setNonce] = (0, import_react30.useState)();
|
|
4422
|
+
const setStatus = (status2) => {
|
|
4423
|
+
statusRef.current = status2;
|
|
4424
|
+
setStateStatus(status2);
|
|
4425
|
+
};
|
|
4426
|
+
const init = () => {
|
|
4427
|
+
setError("");
|
|
4428
|
+
setNonce(null);
|
|
4429
|
+
};
|
|
4430
|
+
(0, import_react30.useEffect)(() => {
|
|
4431
|
+
init();
|
|
4432
|
+
onInit({
|
|
4433
|
+
setStatus
|
|
4434
|
+
});
|
|
4435
|
+
return () => {
|
|
4436
|
+
setStatus("start");
|
|
4437
|
+
setNonce(null);
|
|
4438
|
+
setError("");
|
|
4439
|
+
};
|
|
4440
|
+
}, []);
|
|
4441
|
+
return {
|
|
4442
|
+
status,
|
|
4443
|
+
statusRef,
|
|
4444
|
+
setStatus,
|
|
4445
|
+
error,
|
|
4446
|
+
setError,
|
|
4447
|
+
nonce,
|
|
4448
|
+
setNonce,
|
|
4449
|
+
init
|
|
4450
|
+
};
|
|
4451
|
+
}
|
|
4452
|
+
|
|
4453
|
+
// src/hooks/useEthersSigner.ts
|
|
4454
|
+
var React8 = __toESM(require("react"));
|
|
4455
|
+
var import_wagmi = require("wagmi");
|
|
4456
|
+
var import_ethers = require("ethers");
|
|
4457
|
+
|
|
4458
|
+
// node_modules/@wagmi/core/dist/esm/version.js
|
|
4459
|
+
var version = "2.16.3";
|
|
4460
|
+
|
|
4461
|
+
// node_modules/@wagmi/core/dist/esm/utils/getVersion.js
|
|
4462
|
+
var getVersion2 = () => `@wagmi/core@${version}`;
|
|
4463
|
+
|
|
4464
|
+
// node_modules/@wagmi/core/dist/esm/errors/base.js
|
|
4465
|
+
var __classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
4466
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4467
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4468
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
4469
|
+
};
|
|
4470
|
+
var _BaseError_instances;
|
|
4471
|
+
var _BaseError_walk;
|
|
4472
|
+
var BaseError = class _BaseError extends Error {
|
|
4473
|
+
get docsBaseUrl() {
|
|
4474
|
+
return "https://wagmi.sh/core";
|
|
4475
|
+
}
|
|
4476
|
+
get version() {
|
|
4477
|
+
return getVersion2();
|
|
4478
|
+
}
|
|
4479
|
+
constructor(shortMessage, options = {}) {
|
|
4480
|
+
super();
|
|
4481
|
+
_BaseError_instances.add(this);
|
|
4482
|
+
Object.defineProperty(this, "details", {
|
|
4483
|
+
enumerable: true,
|
|
4484
|
+
configurable: true,
|
|
4485
|
+
writable: true,
|
|
4486
|
+
value: void 0
|
|
4487
|
+
});
|
|
4488
|
+
Object.defineProperty(this, "docsPath", {
|
|
4489
|
+
enumerable: true,
|
|
4490
|
+
configurable: true,
|
|
4491
|
+
writable: true,
|
|
4492
|
+
value: void 0
|
|
4493
|
+
});
|
|
4494
|
+
Object.defineProperty(this, "metaMessages", {
|
|
4495
|
+
enumerable: true,
|
|
4496
|
+
configurable: true,
|
|
4497
|
+
writable: true,
|
|
4498
|
+
value: void 0
|
|
4499
|
+
});
|
|
4500
|
+
Object.defineProperty(this, "shortMessage", {
|
|
4501
|
+
enumerable: true,
|
|
4502
|
+
configurable: true,
|
|
4503
|
+
writable: true,
|
|
4504
|
+
value: void 0
|
|
4505
|
+
});
|
|
4506
|
+
Object.defineProperty(this, "name", {
|
|
4507
|
+
enumerable: true,
|
|
4508
|
+
configurable: true,
|
|
4509
|
+
writable: true,
|
|
4510
|
+
value: "WagmiCoreError"
|
|
4511
|
+
});
|
|
4512
|
+
const details = options.cause instanceof _BaseError ? options.cause.details : options.cause?.message ? options.cause.message : options.details;
|
|
4513
|
+
const docsPath = options.cause instanceof _BaseError ? options.cause.docsPath || options.docsPath : options.docsPath;
|
|
4514
|
+
this.message = [
|
|
4515
|
+
shortMessage || "An error occurred.",
|
|
4516
|
+
"",
|
|
4517
|
+
...options.metaMessages ? [...options.metaMessages, ""] : [],
|
|
4518
|
+
...docsPath ? [
|
|
4519
|
+
`Docs: ${this.docsBaseUrl}${docsPath}.html${options.docsSlug ? `#${options.docsSlug}` : ""}`
|
|
4520
|
+
] : [],
|
|
4521
|
+
...details ? [`Details: ${details}`] : [],
|
|
4522
|
+
`Version: ${this.version}`
|
|
4523
|
+
].join("\n");
|
|
4524
|
+
if (options.cause)
|
|
4525
|
+
this.cause = options.cause;
|
|
4526
|
+
this.details = details;
|
|
4527
|
+
this.docsPath = docsPath;
|
|
4528
|
+
this.metaMessages = options.metaMessages;
|
|
4529
|
+
this.shortMessage = shortMessage;
|
|
4530
|
+
}
|
|
4531
|
+
walk(fn) {
|
|
4532
|
+
return __classPrivateFieldGet(this, _BaseError_instances, "m", _BaseError_walk).call(this, this, fn);
|
|
4533
|
+
}
|
|
4534
|
+
};
|
|
4535
|
+
_BaseError_instances = /* @__PURE__ */ new WeakSet(), _BaseError_walk = function _BaseError_walk2(err, fn) {
|
|
4536
|
+
if (fn?.(err))
|
|
4537
|
+
return err;
|
|
4538
|
+
if (err.cause)
|
|
4539
|
+
return __classPrivateFieldGet(this, _BaseError_instances, "m", _BaseError_walk2).call(this, err.cause, fn);
|
|
4540
|
+
return err;
|
|
4541
|
+
};
|
|
4542
|
+
|
|
4543
|
+
// node_modules/@wagmi/core/dist/esm/errors/config.js
|
|
4544
|
+
var ConnectorNotConnectedError = class extends BaseError {
|
|
4545
|
+
constructor() {
|
|
4546
|
+
super("Connector not connected.");
|
|
4547
|
+
Object.defineProperty(this, "name", {
|
|
4548
|
+
enumerable: true,
|
|
4549
|
+
configurable: true,
|
|
4550
|
+
writable: true,
|
|
4551
|
+
value: "ConnectorNotConnectedError"
|
|
4552
|
+
});
|
|
4553
|
+
}
|
|
4554
|
+
};
|
|
4555
|
+
var ConnectorAccountNotFoundError = class extends BaseError {
|
|
4556
|
+
constructor({ address, connector }) {
|
|
4557
|
+
super(`Account "${address}" not found for connector "${connector.name}".`);
|
|
4558
|
+
Object.defineProperty(this, "name", {
|
|
4559
|
+
enumerable: true,
|
|
4560
|
+
configurable: true,
|
|
4561
|
+
writable: true,
|
|
4562
|
+
value: "ConnectorAccountNotFoundError"
|
|
4563
|
+
});
|
|
4564
|
+
}
|
|
4565
|
+
};
|
|
4566
|
+
var ConnectorChainMismatchError = class extends BaseError {
|
|
4567
|
+
constructor({ connectionChainId, connectorChainId }) {
|
|
4568
|
+
super(`The current chain of the connector (id: ${connectorChainId}) does not match the connection's chain (id: ${connectionChainId}).`, {
|
|
4569
|
+
metaMessages: [
|
|
4570
|
+
`Current Chain ID: ${connectorChainId}`,
|
|
4571
|
+
`Expected Chain ID: ${connectionChainId}`
|
|
4572
|
+
]
|
|
4573
|
+
});
|
|
4574
|
+
Object.defineProperty(this, "name", {
|
|
4575
|
+
enumerable: true,
|
|
4576
|
+
configurable: true,
|
|
4577
|
+
writable: true,
|
|
4578
|
+
value: "ConnectorChainMismatchError"
|
|
4579
|
+
});
|
|
4580
|
+
}
|
|
4581
|
+
};
|
|
4582
|
+
var ConnectorUnavailableReconnectingError = class extends BaseError {
|
|
4583
|
+
constructor({ connector }) {
|
|
4584
|
+
super(`Connector "${connector.name}" unavailable while reconnecting.`, {
|
|
4585
|
+
details: [
|
|
4586
|
+
"During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.",
|
|
4587
|
+
"All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.",
|
|
4588
|
+
"This error commonly occurs for connectors that asynchronously inject after reconnection has already started."
|
|
4589
|
+
].join(" ")
|
|
4590
|
+
});
|
|
4591
|
+
Object.defineProperty(this, "name", {
|
|
4592
|
+
enumerable: true,
|
|
4593
|
+
configurable: true,
|
|
4594
|
+
writable: true,
|
|
4595
|
+
value: "ConnectorUnavailableReconnectingError"
|
|
4596
|
+
});
|
|
4597
|
+
}
|
|
4598
|
+
};
|
|
4599
|
+
|
|
4600
|
+
// node_modules/@wagmi/core/dist/esm/actions/getConnectorClient.js
|
|
4601
|
+
var import_viem13 = require("viem");
|
|
4602
|
+
var import_utils9 = require("viem/utils");
|
|
4603
|
+
async function getConnectorClient(config, parameters = {}) {
|
|
4604
|
+
let connection;
|
|
4605
|
+
if (parameters.connector) {
|
|
4606
|
+
const { connector: connector2 } = parameters;
|
|
4607
|
+
if (config.state.status === "reconnecting" && !connector2.getAccounts && !connector2.getChainId)
|
|
4608
|
+
throw new ConnectorUnavailableReconnectingError({ connector: connector2 });
|
|
4609
|
+
const [accounts, chainId2] = await Promise.all([
|
|
4610
|
+
connector2.getAccounts(),
|
|
4611
|
+
connector2.getChainId()
|
|
4612
|
+
]);
|
|
4613
|
+
connection = {
|
|
4614
|
+
accounts,
|
|
4615
|
+
chainId: chainId2,
|
|
4616
|
+
connector: connector2
|
|
4617
|
+
};
|
|
4618
|
+
} else
|
|
4619
|
+
connection = config.state.connections.get(config.state.current);
|
|
4620
|
+
if (!connection)
|
|
4621
|
+
throw new ConnectorNotConnectedError();
|
|
4622
|
+
const chainId = parameters.chainId ?? connection.chainId;
|
|
4623
|
+
const connectorChainId = await connection.connector.getChainId();
|
|
4624
|
+
if (connectorChainId !== connection.chainId)
|
|
4625
|
+
throw new ConnectorChainMismatchError({
|
|
4626
|
+
connectionChainId: connection.chainId,
|
|
4627
|
+
connectorChainId
|
|
4628
|
+
});
|
|
4629
|
+
const connector = connection.connector;
|
|
4630
|
+
if (connector.getClient)
|
|
4631
|
+
return connector.getClient({ chainId });
|
|
4632
|
+
const account = (0, import_utils9.parseAccount)(parameters.account ?? connection.accounts[0]);
|
|
4633
|
+
account.address = (0, import_utils9.getAddress)(account.address);
|
|
4634
|
+
if (parameters.account && !connection.accounts.some((x) => x.toLowerCase() === account.address.toLowerCase()))
|
|
4635
|
+
throw new ConnectorAccountNotFoundError({
|
|
4636
|
+
address: account.address,
|
|
4637
|
+
connector
|
|
4638
|
+
});
|
|
4639
|
+
const chain = config.chains.find((chain2) => chain2.id === chainId);
|
|
4640
|
+
const provider = await connection.connector.getProvider({ chainId });
|
|
4641
|
+
return (0, import_viem13.createClient)({
|
|
4642
|
+
account,
|
|
4643
|
+
chain,
|
|
4644
|
+
name: "Connector Client",
|
|
4645
|
+
transport: (opts) => (0, import_viem13.custom)(provider)({ ...opts, retryCount: 0 })
|
|
4646
|
+
});
|
|
4647
|
+
}
|
|
4648
|
+
|
|
4649
|
+
// node_modules/@wagmi/core/dist/esm/exports/index.js
|
|
4650
|
+
var import_viem14 = require("viem");
|
|
4651
|
+
|
|
4652
|
+
// src/hooks/useEthersSigner.ts
|
|
4653
|
+
function clientToSigner(client) {
|
|
4654
|
+
const { account, chain, transport } = client;
|
|
4655
|
+
const network = {
|
|
4656
|
+
chainId: chain.id,
|
|
4657
|
+
name: chain.name,
|
|
4658
|
+
ensAddress: chain.contracts?.ensRegistry?.address
|
|
4659
|
+
};
|
|
4660
|
+
const provider = new import_ethers.providers.Web3Provider(transport, network);
|
|
4661
|
+
const signer = provider.getSigner(account.address);
|
|
4662
|
+
return signer;
|
|
4663
|
+
}
|
|
4664
|
+
async function getEthersSigner(config, { chainId } = {}) {
|
|
4665
|
+
const client = await getConnectorClient(config, { chainId });
|
|
4666
|
+
return clientToSigner(client);
|
|
4667
|
+
}
|
|
4668
|
+
|
|
4669
|
+
// src/components/EVMModal/index.tsx
|
|
4670
|
+
var import_siwe = require("siwe");
|
|
4671
|
+
var import_styles = require("@rainbow-me/rainbowkit/styles.css");
|
|
4672
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
4673
|
+
function WalletContent({
|
|
4674
|
+
onSuccess,
|
|
4675
|
+
type
|
|
4676
|
+
}) {
|
|
4677
|
+
const config = (0, import_wagmi2.useConfig)();
|
|
4678
|
+
const { openConnectModal, connectModalOpen } = (0, import_rainbowkit.useConnectModal)();
|
|
4679
|
+
const { address, connector, isConnected } = (0, import_wagmi2.useAccount)();
|
|
4680
|
+
const { disconnectAsync } = (0, import_wagmi2.useDisconnect)({ config });
|
|
4681
|
+
const chainId = (0, import_wagmi2.useChainId)();
|
|
4682
|
+
const { events, login } = useMatch();
|
|
4683
|
+
const { status, setStatus, error, setError, statusRef, nonce, setNonce, init } = useWalletBox({
|
|
4684
|
+
onInit: async ({ setStatus: setStatus2 }) => {
|
|
4685
|
+
setStatus2("start");
|
|
4686
|
+
}
|
|
4687
|
+
});
|
|
4688
|
+
(0, import_react31.useEffect)(() => {
|
|
4689
|
+
console.log(`status=${status}`, `connectModalOpen=${connectModalOpen}`, `address=${address}`, `isConnected=${isConnected}`);
|
|
4690
|
+
}, [status, connectModalOpen, isConnected, address]);
|
|
4691
|
+
(0, import_react31.useEffect)(() => {
|
|
4692
|
+
if (connectModalOpen) {
|
|
4693
|
+
setStatus("connecting");
|
|
4694
|
+
return;
|
|
4695
|
+
}
|
|
4696
|
+
if (!connectModalOpen && address) {
|
|
4697
|
+
toLoginInWallet(address);
|
|
4698
|
+
return;
|
|
4699
|
+
}
|
|
4700
|
+
if (!connectModalOpen && !address) {
|
|
4701
|
+
setStatus("start");
|
|
4702
|
+
}
|
|
4703
|
+
}, [connectModalOpen, address]);
|
|
4704
|
+
(0, import_react31.useEffect)(() => {
|
|
4705
|
+
if (openConnectModal && !address) {
|
|
4706
|
+
openConnectModal && openConnectModal();
|
|
4707
|
+
}
|
|
4708
|
+
}, [openConnectModal]);
|
|
4709
|
+
const toLoginInWallet = async (address2) => {
|
|
4710
|
+
if (statusRef.current != "start" && statusRef.current != "connecting") return;
|
|
4711
|
+
try {
|
|
4712
|
+
if (!address2) {
|
|
4713
|
+
throw new Error("Wallet address is empty");
|
|
4714
|
+
}
|
|
4715
|
+
setStatus("nonce");
|
|
4716
|
+
const res = type == "bind" ? await getWalletInitApi({
|
|
4717
|
+
address: address2,
|
|
4718
|
+
type: "EVM"
|
|
4719
|
+
}) : await getWalletNonceApi({ address: address2, type: "EVM" });
|
|
4720
|
+
if (!isSuccess(res)) {
|
|
4721
|
+
throw new Error(res.message);
|
|
4722
|
+
}
|
|
4723
|
+
setNonce(res.data.nonce);
|
|
4724
|
+
} catch (error2) {
|
|
4725
|
+
console.error("toLoginInWallet", error2);
|
|
4726
|
+
setStatus("error");
|
|
4727
|
+
setError(error2.message);
|
|
4728
|
+
}
|
|
4729
|
+
};
|
|
4730
|
+
const signature = (0, import_react31.useCallback)(async () => {
|
|
4731
|
+
if (!nonce || status != "nonce") {
|
|
4732
|
+
return;
|
|
4733
|
+
}
|
|
4734
|
+
try {
|
|
4735
|
+
const signer = await getEthersSigner(config);
|
|
4736
|
+
if (!signer) return;
|
|
4737
|
+
matchlog_default.log("signature", nonce, status);
|
|
4738
|
+
if (!address) {
|
|
4739
|
+
throw new Error("Wallet address is empty");
|
|
4740
|
+
}
|
|
4741
|
+
setStatus("signer");
|
|
4742
|
+
const params = {
|
|
4743
|
+
domain: window.location.host,
|
|
4744
|
+
address,
|
|
4745
|
+
statement: "By signing, you are proving you own this wallet and logging in. This does not initiate a transaction or cost any fees.",
|
|
4746
|
+
uri: window.location.origin,
|
|
4747
|
+
nonce,
|
|
4748
|
+
version: "1",
|
|
4749
|
+
chainId
|
|
4750
|
+
};
|
|
4751
|
+
const message = new import_siwe.SiweMessage({ ...params });
|
|
4752
|
+
const signature2 = await signer.signMessage(message.prepareMessage());
|
|
4753
|
+
const obj = {
|
|
4754
|
+
type: "EVM",
|
|
4755
|
+
address,
|
|
4756
|
+
signature: signature2,
|
|
4757
|
+
message: `${message.prepareMessage()}`,
|
|
4758
|
+
connector_type: connector?.type || "",
|
|
4759
|
+
wallet_client_type: connector?.name || ""
|
|
4760
|
+
};
|
|
4761
|
+
const res = type == "bind" ? await toBindWalletApi(obj) : await loginByWalletApi(obj);
|
|
4762
|
+
if (!isSuccess(res)) {
|
|
4763
|
+
throw new Error(res.message);
|
|
4764
|
+
}
|
|
4765
|
+
matchlog_default.log(res);
|
|
4766
|
+
setStatus("success");
|
|
4767
|
+
if (type == "bind") {
|
|
4768
|
+
events.onBind && events.onBind({
|
|
4769
|
+
type: "evm"
|
|
4770
|
+
});
|
|
4771
|
+
eventManager_default.emit("onBind", {
|
|
4772
|
+
type: "evm"
|
|
4773
|
+
});
|
|
4774
|
+
} else {
|
|
4775
|
+
await login({
|
|
4776
|
+
token: `${res.data.token_type} ${res.data.access_token}`
|
|
4777
|
+
});
|
|
4778
|
+
}
|
|
4779
|
+
onSuccess && onSuccess();
|
|
4780
|
+
} catch (error2) {
|
|
4781
|
+
console.error("signature", error2);
|
|
4782
|
+
setStatus("error");
|
|
4783
|
+
setError(error2.message);
|
|
4784
|
+
}
|
|
4785
|
+
}, [nonce, status, address]);
|
|
4786
|
+
(0, import_react31.useEffect)(() => {
|
|
4787
|
+
if (signature) {
|
|
4788
|
+
signature();
|
|
4789
|
+
}
|
|
4790
|
+
}, [signature]);
|
|
4791
|
+
const onError = async () => {
|
|
4792
|
+
if (isConnected) {
|
|
4793
|
+
try {
|
|
4794
|
+
await disconnectAsync();
|
|
4795
|
+
} catch (error2) {
|
|
4796
|
+
console.error("disconnectAsync", error2);
|
|
4797
|
+
}
|
|
4798
|
+
}
|
|
4799
|
+
setError("");
|
|
4800
|
+
setNonce(void 0);
|
|
4801
|
+
setStatus("start");
|
|
4802
|
+
openConnectModal?.();
|
|
4803
|
+
};
|
|
4804
|
+
const onConnect = async () => {
|
|
4805
|
+
console.log("onConnect");
|
|
4806
|
+
setError("");
|
|
4807
|
+
setNonce(void 0);
|
|
4808
|
+
openConnectModal?.();
|
|
4809
|
+
};
|
|
4810
|
+
const onDisconnect = async () => {
|
|
4811
|
+
await disconnectAsync();
|
|
4812
|
+
setError("");
|
|
4813
|
+
setNonce(void 0);
|
|
4814
|
+
setStatus("start");
|
|
4815
|
+
};
|
|
4816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4817
|
+
WalletModalContentV2,
|
|
4818
|
+
{
|
|
4819
|
+
status,
|
|
4820
|
+
onSuccess: async () => onSuccess?.(),
|
|
4821
|
+
error,
|
|
4822
|
+
onError,
|
|
4823
|
+
onConnect,
|
|
4824
|
+
onDisconnect
|
|
4825
|
+
}
|
|
4826
|
+
);
|
|
4827
|
+
}
|
|
4828
|
+
var wagmiConfig = (0, import_rainbowkit.getDefaultConfig)({
|
|
4829
|
+
appName: "MatchID",
|
|
4830
|
+
projectId: "9ac6ea7e07860f04616fb311b447dee9",
|
|
4831
|
+
wallets: [
|
|
4832
|
+
{
|
|
4833
|
+
groupName: "Recommended",
|
|
4834
|
+
wallets: [
|
|
4835
|
+
import_wallets.metaMaskWallet,
|
|
4836
|
+
import_wallets.walletConnectWallet,
|
|
4837
|
+
import_wallets.okxWallet,
|
|
4838
|
+
import_wallets.bitgetWallet,
|
|
4839
|
+
import_wallets.injectedWallet
|
|
4840
|
+
]
|
|
4841
|
+
}
|
|
4842
|
+
],
|
|
4843
|
+
chains: [import_chains.mainnet, import_chains.polygon, import_chains.optimism, import_chains.arbitrum, import_chains.base, matchMain, matchTest, import_chains.bsc]
|
|
4844
|
+
});
|
|
4845
|
+
function EVMConnectModal({
|
|
4846
|
+
type = "login",
|
|
4847
|
+
onSuccess,
|
|
4848
|
+
...props
|
|
4849
|
+
}) {
|
|
4850
|
+
const intl = (0, import_react_intl14.useIntl)();
|
|
4851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4852
|
+
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4853
|
+
}, {
|
|
4854
|
+
name: "EVM"
|
|
4855
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_wagmi2.WagmiProvider, { config: wagmiConfig, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_rainbowkit.RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(WalletContent, { onSuccess, type }) }) }) });
|
|
4856
|
+
}
|
|
4857
|
+
function EVMModal(props) {
|
|
4858
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(EVMConnectModal, { ...props });
|
|
4859
|
+
}
|
|
4860
|
+
|
|
4861
|
+
// src/components/TRONModal/index.tsx
|
|
4862
|
+
var import_react33 = __toESM(require("react"));
|
|
4863
|
+
var import_react_intl15 = require("react-intl");
|
|
4232
4864
|
|
|
4233
4865
|
// src/lib/tron/TronLinkAdapter.ts
|
|
4234
4866
|
var TronLinkAdapter = class {
|
|
@@ -4261,7 +4893,7 @@ var TronLinkAdapter = class {
|
|
|
4261
4893
|
};
|
|
4262
4894
|
|
|
4263
4895
|
// src/hooks/useTRONWallet.ts
|
|
4264
|
-
var
|
|
4896
|
+
var import_react32 = require("react");
|
|
4265
4897
|
|
|
4266
4898
|
// src/lib/tron/BitgetAdapter.ts
|
|
4267
4899
|
var BitgetAdapter = class {
|
|
@@ -4306,9 +4938,9 @@ var OKXAdapter = class {
|
|
|
4306
4938
|
// src/hooks/useTRONWallet.ts
|
|
4307
4939
|
var useTRONWallet = () => {
|
|
4308
4940
|
const wallets = [new TronLinkAdapter(), new BitgetAdapter(), new OKXAdapter()];
|
|
4309
|
-
const [installedWallets, setInstalledWallets] = (0,
|
|
4310
|
-
const [address, setAddress] = (0,
|
|
4311
|
-
(0,
|
|
4941
|
+
const [installedWallets, setInstalledWallets] = (0, import_react32.useState)([]);
|
|
4942
|
+
const [address, setAddress] = (0, import_react32.useState)(null);
|
|
4943
|
+
(0, import_react32.useEffect)(() => {
|
|
4312
4944
|
const getInstalled = async () => {
|
|
4313
4945
|
const installed = await Promise.all(wallets.map((wallet2) => wallet2.isInstalled().then((isInstalled) => ({
|
|
4314
4946
|
wallet: wallet2,
|
|
@@ -4318,11 +4950,11 @@ var useTRONWallet = () => {
|
|
|
4318
4950
|
};
|
|
4319
4951
|
getInstalled();
|
|
4320
4952
|
}, []);
|
|
4321
|
-
const [wallet, chooseWallet] = (0,
|
|
4953
|
+
const [wallet, chooseWallet] = (0, import_react32.useState)(null);
|
|
4322
4954
|
const onConnect = async () => {
|
|
4323
4955
|
setAddress(await wallet.connect());
|
|
4324
4956
|
};
|
|
4325
|
-
(0,
|
|
4957
|
+
(0, import_react32.useEffect)(() => {
|
|
4326
4958
|
if (!wallet) {
|
|
4327
4959
|
setAddress(null);
|
|
4328
4960
|
}
|
|
@@ -4338,25 +4970,25 @@ var useTRONWallet = () => {
|
|
|
4338
4970
|
};
|
|
4339
4971
|
|
|
4340
4972
|
// src/components/TRONModal/index.tsx
|
|
4341
|
-
var
|
|
4973
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
4342
4974
|
function TRONConnectModal({
|
|
4343
4975
|
type = "login",
|
|
4344
4976
|
onSuccess,
|
|
4345
4977
|
...props
|
|
4346
4978
|
}) {
|
|
4347
4979
|
const isDownMd = useDownMd();
|
|
4348
|
-
const intl = (0,
|
|
4980
|
+
const intl = (0, import_react_intl15.useIntl)();
|
|
4349
4981
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
|
|
4350
4982
|
const iconMaps = {
|
|
4351
|
-
tronlink: /* @__PURE__ */ (0,
|
|
4352
|
-
bitget: /* @__PURE__ */ (0,
|
|
4353
|
-
okx: /* @__PURE__ */ (0,
|
|
4983
|
+
tronlink: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
|
|
4984
|
+
bitget: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(BitgetIcon, { size: isDownMd ? 36 : 40 }),
|
|
4985
|
+
okx: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(OKXIcon, { size: isDownMd ? 36 : 40 })
|
|
4354
4986
|
};
|
|
4355
4987
|
const { events, login } = useMatch();
|
|
4356
|
-
const [status, setStatus] = (0,
|
|
4357
|
-
const statusRef =
|
|
4358
|
-
const [error, setError] = (0,
|
|
4359
|
-
const connected = (0,
|
|
4988
|
+
const [status, setStatus] = (0, import_react33.useState)("");
|
|
4989
|
+
const statusRef = import_react33.default.useRef(status);
|
|
4990
|
+
const [error, setError] = (0, import_react33.useState)("");
|
|
4991
|
+
const connected = (0, import_react33.useMemo)(() => {
|
|
4360
4992
|
return !!address;
|
|
4361
4993
|
}, [address]);
|
|
4362
4994
|
const disconnect = async () => {
|
|
@@ -4424,7 +5056,7 @@ function TRONConnectModal({
|
|
|
4424
5056
|
statusRef.current = "";
|
|
4425
5057
|
}
|
|
4426
5058
|
};
|
|
4427
|
-
(0,
|
|
5059
|
+
(0, import_react33.useEffect)(() => {
|
|
4428
5060
|
if (wallet) {
|
|
4429
5061
|
console.log("onConnect");
|
|
4430
5062
|
onConnect();
|
|
@@ -4432,21 +5064,21 @@ function TRONConnectModal({
|
|
|
4432
5064
|
setStatus("");
|
|
4433
5065
|
}
|
|
4434
5066
|
}, [wallet]);
|
|
4435
|
-
(0,
|
|
5067
|
+
(0, import_react33.useEffect)(() => {
|
|
4436
5068
|
if (address) {
|
|
4437
5069
|
toLoginInWallet();
|
|
4438
5070
|
}
|
|
4439
5071
|
}, [address]);
|
|
4440
|
-
(0,
|
|
5072
|
+
(0, import_react33.useEffect)(() => {
|
|
4441
5073
|
if (!props.isOpen) {
|
|
4442
5074
|
disconnect();
|
|
4443
5075
|
}
|
|
4444
5076
|
}, [props.isOpen]);
|
|
4445
|
-
return /* @__PURE__ */ (0,
|
|
5077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4446
5078
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4447
5079
|
}, {
|
|
4448
5080
|
name: "TRON"
|
|
4449
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5081
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
4450
5082
|
WalletModalContent,
|
|
4451
5083
|
{
|
|
4452
5084
|
error,
|
|
@@ -4459,9 +5091,9 @@ function TRONConnectModal({
|
|
|
4459
5091
|
setVisible: () => {
|
|
4460
5092
|
}
|
|
4461
5093
|
}
|
|
4462
|
-
) : /* @__PURE__ */ (0,
|
|
5094
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
4463
5095
|
installedWallets.map((wallet2) => {
|
|
4464
|
-
return /* @__PURE__ */ (0,
|
|
5096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
4465
5097
|
RecommendItem,
|
|
4466
5098
|
{
|
|
4467
5099
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -4474,14 +5106,14 @@ function TRONConnectModal({
|
|
|
4474
5106
|
);
|
|
4475
5107
|
}),
|
|
4476
5108
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
4477
|
-
return /* @__PURE__ */ (0,
|
|
5109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
4478
5110
|
RecommendItem,
|
|
4479
5111
|
{
|
|
4480
5112
|
icon: iconMaps[wallet2.walletKey],
|
|
4481
5113
|
name: wallet2.name,
|
|
4482
5114
|
onClick: () => {
|
|
4483
5115
|
},
|
|
4484
|
-
footer: /* @__PURE__ */ (0,
|
|
5116
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Button, { size: "sm", onClick: () => {
|
|
4485
5117
|
window.open(wallet2.website);
|
|
4486
5118
|
}, children: "Install" })
|
|
4487
5119
|
},
|
|
@@ -4491,28 +5123,28 @@ function TRONConnectModal({
|
|
|
4491
5123
|
] }) }) });
|
|
4492
5124
|
}
|
|
4493
5125
|
function TRONModal(props) {
|
|
4494
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5126
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TRONConnectModal, { ...props, type: props.type });
|
|
4495
5127
|
}
|
|
4496
5128
|
|
|
4497
5129
|
// src/components/TONModal/index.tsx
|
|
4498
|
-
var
|
|
4499
|
-
var
|
|
5130
|
+
var import_react34 = __toESM(require("react"));
|
|
5131
|
+
var import_react_intl16 = require("react-intl");
|
|
4500
5132
|
var import_ui_react = require("@tonconnect/ui-react");
|
|
4501
|
-
var
|
|
4502
|
-
function
|
|
5133
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
5134
|
+
function WalletContent2({
|
|
4503
5135
|
onSuccess,
|
|
4504
5136
|
type
|
|
4505
5137
|
}) {
|
|
4506
5138
|
const { events, login } = useMatch();
|
|
4507
|
-
const [connected, setConnected] = (0,
|
|
5139
|
+
const [connected, setConnected] = (0, import_react34.useState)(false);
|
|
4508
5140
|
const wallet = (0, import_ui_react.useTonWallet)();
|
|
4509
5141
|
const userFriendlyAddress = (0, import_ui_react.useTonAddress)();
|
|
4510
5142
|
const [tonConnectUI] = (0, import_ui_react.useTonConnectUI)();
|
|
4511
5143
|
const { state, open, close } = (0, import_ui_react.useTonConnectModal)();
|
|
4512
|
-
const [status, setStatus] = (0,
|
|
4513
|
-
const statusRef =
|
|
4514
|
-
const [error, setError] = (0,
|
|
4515
|
-
(0,
|
|
5144
|
+
const [status, setStatus] = (0, import_react34.useState)("");
|
|
5145
|
+
const statusRef = import_react34.default.useRef(status);
|
|
5146
|
+
const [error, setError] = (0, import_react34.useState)("");
|
|
5147
|
+
(0, import_react34.useEffect)(() => {
|
|
4516
5148
|
const init = async () => {
|
|
4517
5149
|
if (tonConnectUI.connected) {
|
|
4518
5150
|
await tonConnectUI.disconnect();
|
|
@@ -4585,7 +5217,7 @@ function WalletContent({
|
|
|
4585
5217
|
}
|
|
4586
5218
|
});
|
|
4587
5219
|
}, []);
|
|
4588
|
-
(0,
|
|
5220
|
+
(0, import_react34.useEffect)(() => {
|
|
4589
5221
|
if (wallet) {
|
|
4590
5222
|
setConnected(true);
|
|
4591
5223
|
console.log("Wallet connected:", wallet);
|
|
@@ -4596,7 +5228,7 @@ function WalletContent({
|
|
|
4596
5228
|
setStatus("");
|
|
4597
5229
|
}
|
|
4598
5230
|
}, [wallet]);
|
|
4599
|
-
(0,
|
|
5231
|
+
(0, import_react34.useEffect)(() => {
|
|
4600
5232
|
console.log({
|
|
4601
5233
|
state,
|
|
4602
5234
|
wallet
|
|
@@ -4625,7 +5257,7 @@ function WalletContent({
|
|
|
4625
5257
|
}
|
|
4626
5258
|
}
|
|
4627
5259
|
}, [state]);
|
|
4628
|
-
return /* @__PURE__ */ (0,
|
|
5260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4629
5261
|
WalletModalContent,
|
|
4630
5262
|
{
|
|
4631
5263
|
connected,
|
|
@@ -4656,28 +5288,28 @@ function TONConnectModal({
|
|
|
4656
5288
|
onSuccess,
|
|
4657
5289
|
...props
|
|
4658
5290
|
}) {
|
|
4659
|
-
const intl = (0,
|
|
5291
|
+
const intl = (0, import_react_intl16.useIntl)();
|
|
4660
5292
|
const { endpoints, appid } = useLocalStore_default();
|
|
4661
5293
|
const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
|
|
4662
|
-
return /* @__PURE__ */ (0,
|
|
5294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4663
5295
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4664
5296
|
}, {
|
|
4665
5297
|
name: "TON"
|
|
4666
|
-
}), children: /* @__PURE__ */ (0,
|
|
5298
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4667
5299
|
import_ui_react.TonConnectUIProvider,
|
|
4668
5300
|
{
|
|
4669
5301
|
manifestUrl,
|
|
4670
|
-
children: /* @__PURE__ */ (0,
|
|
5302
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(WalletContent2, { onSuccess, type })
|
|
4671
5303
|
}
|
|
4672
5304
|
) });
|
|
4673
5305
|
}
|
|
4674
5306
|
function TONModal(props) {
|
|
4675
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5307
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TONConnectModal, { ...props });
|
|
4676
5308
|
}
|
|
4677
5309
|
|
|
4678
5310
|
// src/components/BTCModal/index.tsx
|
|
4679
|
-
var
|
|
4680
|
-
var
|
|
5311
|
+
var import_react36 = __toESM(require("react"));
|
|
5312
|
+
var import_react_intl17 = require("react-intl");
|
|
4681
5313
|
|
|
4682
5314
|
// src/lib/btc/UnisatAdapter.ts
|
|
4683
5315
|
var UnisatAdapter = class {
|
|
@@ -4817,7 +5449,7 @@ var LeatherAdapter = class {
|
|
|
4817
5449
|
return response.result.addresses[0].address;
|
|
4818
5450
|
}
|
|
4819
5451
|
async signMessage(message) {
|
|
4820
|
-
if (!await this.isInstalled()) throw new Error("
|
|
5452
|
+
if (!await this.isInstalled()) throw new Error("Leather Wallet is not installed");
|
|
4821
5453
|
const response = await window.LeatherProvider?.request("signMessage", { message });
|
|
4822
5454
|
matchlog_default.log("response", response);
|
|
4823
5455
|
return response.result.signature;
|
|
@@ -4825,12 +5457,47 @@ var LeatherAdapter = class {
|
|
|
4825
5457
|
};
|
|
4826
5458
|
|
|
4827
5459
|
// src/hooks/useBTCWallet.ts
|
|
4828
|
-
var
|
|
5460
|
+
var import_react35 = require("react");
|
|
5461
|
+
|
|
5462
|
+
// src/lib/btc/PhantomAdapter.ts
|
|
5463
|
+
var PhantomAdapter = class {
|
|
5464
|
+
constructor() {
|
|
5465
|
+
this.name = "Phantom Wallet";
|
|
5466
|
+
this.website = "https://www.phantom.com/";
|
|
5467
|
+
this.walletKey = "phantom";
|
|
5468
|
+
}
|
|
5469
|
+
async isInstalled() {
|
|
5470
|
+
return typeof window.phantom !== "undefined" && typeof window.phantom.bitcoin !== "undefined";
|
|
5471
|
+
}
|
|
5472
|
+
async connect() {
|
|
5473
|
+
if (!await this.isInstalled()) throw new Error("Phantom Wallet is not installed");
|
|
5474
|
+
const response = await window.phantom.bitcoin.requestAccounts();
|
|
5475
|
+
const ordinalAddress = response.find((n) => n.purpose == "ordinals");
|
|
5476
|
+
matchlog_default.log("Addresses:", ordinalAddress);
|
|
5477
|
+
if (!ordinalAddress) {
|
|
5478
|
+
throw new Error("No addresses found in Phantom Wallet");
|
|
5479
|
+
}
|
|
5480
|
+
return ordinalAddress.address;
|
|
5481
|
+
}
|
|
5482
|
+
async signMessage(message) {
|
|
5483
|
+
if (!await this.isInstalled()) throw new Error("Phantom Wallet is not installed");
|
|
5484
|
+
const address = await this.connect();
|
|
5485
|
+
try {
|
|
5486
|
+
const { signature } = await window.phantom.bitcoin.signMessage(address, new TextEncoder().encode(message));
|
|
5487
|
+
return bytesToBase64(signature);
|
|
5488
|
+
} catch (error) {
|
|
5489
|
+
console.error(error);
|
|
5490
|
+
throw error;
|
|
5491
|
+
}
|
|
5492
|
+
}
|
|
5493
|
+
};
|
|
5494
|
+
|
|
5495
|
+
// src/hooks/useBTCWallet.ts
|
|
4829
5496
|
var useBTCWallet = () => {
|
|
4830
|
-
const wallets = [new UnisatAdapter(), new XverseAdapter(), new LeatherAdapter()];
|
|
4831
|
-
const [installedWallets, setInstalledWallets] = (0,
|
|
4832
|
-
const [address, setAddress] = (0,
|
|
4833
|
-
(0,
|
|
5497
|
+
const wallets = [new UnisatAdapter(), new XverseAdapter(), new LeatherAdapter(), new PhantomAdapter()];
|
|
5498
|
+
const [installedWallets, setInstalledWallets] = (0, import_react35.useState)([]);
|
|
5499
|
+
const [address, setAddress] = (0, import_react35.useState)(null);
|
|
5500
|
+
(0, import_react35.useEffect)(() => {
|
|
4834
5501
|
const getInstalled = async () => {
|
|
4835
5502
|
const installed = await Promise.all(wallets.map((wallet2) => wallet2.isInstalled().then((isInstalled) => ({
|
|
4836
5503
|
wallet: wallet2,
|
|
@@ -4840,11 +5507,11 @@ var useBTCWallet = () => {
|
|
|
4840
5507
|
};
|
|
4841
5508
|
getInstalled();
|
|
4842
5509
|
}, []);
|
|
4843
|
-
const [wallet, chooseWallet] = (0,
|
|
5510
|
+
const [wallet, chooseWallet] = (0, import_react35.useState)(null);
|
|
4844
5511
|
const onConnect = async () => {
|
|
4845
5512
|
setAddress(await wallet.connect());
|
|
4846
5513
|
};
|
|
4847
|
-
(0,
|
|
5514
|
+
(0, import_react35.useEffect)(() => {
|
|
4848
5515
|
if (!wallet) {
|
|
4849
5516
|
setAddress(null);
|
|
4850
5517
|
}
|
|
@@ -4860,25 +5527,26 @@ var useBTCWallet = () => {
|
|
|
4860
5527
|
};
|
|
4861
5528
|
|
|
4862
5529
|
// src/components/BTCModal/index.tsx
|
|
4863
|
-
var
|
|
5530
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
4864
5531
|
function BTCConnectModal({
|
|
4865
5532
|
type = "login",
|
|
4866
5533
|
onSuccess,
|
|
4867
5534
|
...props
|
|
4868
5535
|
}) {
|
|
4869
5536
|
const isDownMd = useDownMd();
|
|
4870
|
-
const intl = (0,
|
|
5537
|
+
const intl = (0, import_react_intl17.useIntl)();
|
|
4871
5538
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
|
|
4872
5539
|
const iconMaps = {
|
|
4873
|
-
leather: /* @__PURE__ */ (0,
|
|
4874
|
-
unisat: /* @__PURE__ */ (0,
|
|
4875
|
-
xverse: /* @__PURE__ */ (0,
|
|
5540
|
+
leather: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(LeatherIcon, { size: isDownMd ? 36 : 40 }),
|
|
5541
|
+
unisat: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(UnisatIcon, { size: isDownMd ? 36 : 40 }),
|
|
5542
|
+
xverse: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(XverseIcon, { size: isDownMd ? 36 : 40 }),
|
|
5543
|
+
phantom: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(PhantomIcon, { size: isDownMd ? 36 : 40 })
|
|
4876
5544
|
};
|
|
4877
5545
|
const { events, login } = useMatch();
|
|
4878
|
-
const [status, setStatus] = (0,
|
|
4879
|
-
const statusRef =
|
|
4880
|
-
const [error, setError] = (0,
|
|
4881
|
-
const connected = (0,
|
|
5546
|
+
const [status, setStatus] = (0, import_react36.useState)("");
|
|
5547
|
+
const statusRef = import_react36.default.useRef(status);
|
|
5548
|
+
const [error, setError] = (0, import_react36.useState)("");
|
|
5549
|
+
const connected = (0, import_react36.useMemo)(() => {
|
|
4882
5550
|
return !!address;
|
|
4883
5551
|
}, [address]);
|
|
4884
5552
|
const disconnect = async () => {
|
|
@@ -4942,7 +5610,7 @@ function BTCConnectModal({
|
|
|
4942
5610
|
statusRef.current = "";
|
|
4943
5611
|
}
|
|
4944
5612
|
};
|
|
4945
|
-
(0,
|
|
5613
|
+
(0, import_react36.useEffect)(() => {
|
|
4946
5614
|
if (wallet) {
|
|
4947
5615
|
console.log("onConnect");
|
|
4948
5616
|
try {
|
|
@@ -4955,12 +5623,12 @@ function BTCConnectModal({
|
|
|
4955
5623
|
setStatus("");
|
|
4956
5624
|
}
|
|
4957
5625
|
}, [wallet]);
|
|
4958
|
-
(0,
|
|
5626
|
+
(0, import_react36.useEffect)(() => {
|
|
4959
5627
|
if (address) {
|
|
4960
5628
|
toLoginInWallet();
|
|
4961
5629
|
}
|
|
4962
5630
|
}, [address]);
|
|
4963
|
-
(0,
|
|
5631
|
+
(0, import_react36.useEffect)(() => {
|
|
4964
5632
|
if (!props.isOpen) {
|
|
4965
5633
|
disconnect();
|
|
4966
5634
|
}
|
|
@@ -4972,11 +5640,11 @@ function BTCConnectModal({
|
|
|
4972
5640
|
statusRef.current = "";
|
|
4973
5641
|
setError("");
|
|
4974
5642
|
};
|
|
4975
|
-
return /* @__PURE__ */ (0,
|
|
5643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4976
5644
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4977
5645
|
}, {
|
|
4978
5646
|
name: "BTC"
|
|
4979
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5647
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4980
5648
|
WalletModalContent,
|
|
4981
5649
|
{
|
|
4982
5650
|
error,
|
|
@@ -4989,9 +5657,9 @@ function BTCConnectModal({
|
|
|
4989
5657
|
setVisible: () => {
|
|
4990
5658
|
}
|
|
4991
5659
|
}
|
|
4992
|
-
) : /* @__PURE__ */ (0,
|
|
5660
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
4993
5661
|
installedWallets.map((wallet2) => {
|
|
4994
|
-
return /* @__PURE__ */ (0,
|
|
5662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4995
5663
|
RecommendItem,
|
|
4996
5664
|
{
|
|
4997
5665
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -5004,14 +5672,14 @@ function BTCConnectModal({
|
|
|
5004
5672
|
);
|
|
5005
5673
|
}),
|
|
5006
5674
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
5007
|
-
return /* @__PURE__ */ (0,
|
|
5675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
5008
5676
|
RecommendItem,
|
|
5009
5677
|
{
|
|
5010
5678
|
icon: iconMaps[wallet2.walletKey],
|
|
5011
5679
|
name: wallet2.name,
|
|
5012
5680
|
onClick: () => {
|
|
5013
5681
|
},
|
|
5014
|
-
footer: /* @__PURE__ */ (0,
|
|
5682
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Button, { size: "sm", onClick: () => {
|
|
5015
5683
|
window.open(wallet2.website);
|
|
5016
5684
|
}, children: "Install" })
|
|
5017
5685
|
},
|
|
@@ -5021,23 +5689,23 @@ function BTCConnectModal({
|
|
|
5021
5689
|
] }) }) });
|
|
5022
5690
|
}
|
|
5023
5691
|
function BTCModal(props) {
|
|
5024
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5692
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(BTCConnectModal, { ...props });
|
|
5025
5693
|
}
|
|
5026
5694
|
|
|
5027
5695
|
// src/components/WalletModal/index.tsx
|
|
5028
|
-
var
|
|
5029
|
-
var
|
|
5030
|
-
var
|
|
5696
|
+
var import_react37 = require("react");
|
|
5697
|
+
var import_react_intl18 = require("react-intl");
|
|
5698
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
5031
5699
|
function WalletConnectModal({
|
|
5032
5700
|
type,
|
|
5033
5701
|
methods: _methods,
|
|
5034
5702
|
...props
|
|
5035
5703
|
}) {
|
|
5036
|
-
const intl = (0,
|
|
5704
|
+
const intl = (0, import_react_intl18.useIntl)();
|
|
5037
5705
|
const { walletMap } = useWalletConfig();
|
|
5038
5706
|
const { bind, login } = useUserInfo();
|
|
5039
5707
|
const config = useAppConfig();
|
|
5040
|
-
const methods = (0,
|
|
5708
|
+
const methods = (0, import_react37.useMemo)(() => {
|
|
5041
5709
|
if (_methods) return _methods;
|
|
5042
5710
|
if (!config.platform) {
|
|
5043
5711
|
return [];
|
|
@@ -5045,13 +5713,13 @@ function WalletConnectModal({
|
|
|
5045
5713
|
const platform = config.platform.map((p) => p.toLowerCase());
|
|
5046
5714
|
return WALLET_METHODS.filter((m) => platform.includes(m));
|
|
5047
5715
|
}, [config.platform, _methods]);
|
|
5048
|
-
return /* @__PURE__ */ (0,
|
|
5716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5049
5717
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5050
5718
|
}, {
|
|
5051
5719
|
name: ""
|
|
5052
|
-
}), children: /* @__PURE__ */ (0,
|
|
5720
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "matchid-login-recommend-list", children: methods.map((method, index) => {
|
|
5053
5721
|
const m = walletMap[method];
|
|
5054
|
-
return /* @__PURE__ */ (0,
|
|
5722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
5055
5723
|
RecommendItem,
|
|
5056
5724
|
{
|
|
5057
5725
|
icon: m?.icon,
|
|
@@ -5065,21 +5733,21 @@ function WalletConnectModal({
|
|
|
5065
5733
|
}) }) }) });
|
|
5066
5734
|
}
|
|
5067
5735
|
function WalletModal(props) {
|
|
5068
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5736
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(WalletConnectModal, { ...props });
|
|
5069
5737
|
}
|
|
5070
5738
|
|
|
5071
5739
|
// src/components/AlphaAvatar/index.tsx
|
|
5072
|
-
var
|
|
5073
|
-
var
|
|
5740
|
+
var import_react38 = require("react");
|
|
5741
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
5074
5742
|
function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
5075
|
-
const [avatar, setAvatar] = (0,
|
|
5076
|
-
(0,
|
|
5743
|
+
const [avatar, setAvatar] = (0, import_react38.useState)(void 0);
|
|
5744
|
+
(0, import_react38.useEffect)(() => {
|
|
5077
5745
|
if (name) {
|
|
5078
5746
|
const char = name[0].toUpperCase();
|
|
5079
5747
|
setAvatar(char);
|
|
5080
5748
|
}
|
|
5081
5749
|
}, [name]);
|
|
5082
|
-
return /* @__PURE__ */ (0,
|
|
5750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
5083
5751
|
width: size,
|
|
5084
5752
|
height: size,
|
|
5085
5753
|
fontSize: Math.ceil(size / 2)
|
|
@@ -5087,7 +5755,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
5087
5755
|
}
|
|
5088
5756
|
|
|
5089
5757
|
// src/components/WalletAsset/index.tsx
|
|
5090
|
-
var
|
|
5758
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
5091
5759
|
function WalletAsset({
|
|
5092
5760
|
onAssetClick,
|
|
5093
5761
|
matchWalletAssetsOptions
|
|
@@ -5097,7 +5765,7 @@ function WalletAsset({
|
|
|
5097
5765
|
list: walletAssets.mergedAssets
|
|
5098
5766
|
});
|
|
5099
5767
|
const { list } = useMatchChain();
|
|
5100
|
-
return /* @__PURE__ */ (0,
|
|
5768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5101
5769
|
const clickFunc = onAssetClick && onAssetClick(n);
|
|
5102
5770
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5103
5771
|
const getFooterColor = () => {
|
|
@@ -5112,11 +5780,11 @@ function WalletAsset({
|
|
|
5112
5780
|
}
|
|
5113
5781
|
return "";
|
|
5114
5782
|
};
|
|
5115
|
-
return /* @__PURE__ */ (0,
|
|
5783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-wallet-asset-item`, onClick: clickFunc, style: {
|
|
5116
5784
|
cursor: clickFunc ? "pointer" : "default"
|
|
5117
5785
|
}, children: [
|
|
5118
|
-
/* @__PURE__ */ (0,
|
|
5119
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
5786
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
|
|
5787
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-wallet-asset-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
5120
5788
|
AlphaAvatar2,
|
|
5121
5789
|
{
|
|
5122
5790
|
className: `matchid-wallet-asset-icon`,
|
|
@@ -5124,12 +5792,12 @@ function WalletAsset({
|
|
|
5124
5792
|
name: n.symbol || n.name || ""
|
|
5125
5793
|
}
|
|
5126
5794
|
),
|
|
5127
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
5795
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
|
|
5128
5796
|
] }),
|
|
5129
|
-
/* @__PURE__ */ (0,
|
|
5130
|
-
/* @__PURE__ */ (0,
|
|
5131
|
-
"price" in n && /* @__PURE__ */ (0,
|
|
5132
|
-
/* @__PURE__ */ (0,
|
|
5797
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-wallet-asset-info`, children: [
|
|
5798
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
|
|
5799
|
+
"price" in n && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-wallet-asset-content`, children: [
|
|
5800
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
5133
5801
|
NumberFormatter,
|
|
5134
5802
|
{
|
|
5135
5803
|
value: n.price,
|
|
@@ -5137,7 +5805,7 @@ function WalletAsset({
|
|
|
5137
5805
|
tFixNum: 2
|
|
5138
5806
|
}
|
|
5139
5807
|
) }),
|
|
5140
|
-
/* @__PURE__ */ (0,
|
|
5808
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
5141
5809
|
NumberFormatter,
|
|
5142
5810
|
{
|
|
5143
5811
|
value: n.value,
|
|
@@ -5146,15 +5814,15 @@ function WalletAsset({
|
|
|
5146
5814
|
}
|
|
5147
5815
|
) })
|
|
5148
5816
|
] }),
|
|
5149
|
-
/* @__PURE__ */ (0,
|
|
5150
|
-
/* @__PURE__ */ (0,
|
|
5817
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-wallet-asset-footer`, children: [
|
|
5818
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
5151
5819
|
NumberFormatter,
|
|
5152
5820
|
{
|
|
5153
5821
|
value: n.balance,
|
|
5154
5822
|
tFixNum: 3
|
|
5155
5823
|
}
|
|
5156
5824
|
) }),
|
|
5157
|
-
"price_change_24h" in n && /* @__PURE__ */ (0,
|
|
5825
|
+
"price_change_24h" in n && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-wallet-asset-change ${getFooterColor()}`, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
5158
5826
|
NumberFormatter,
|
|
5159
5827
|
{
|
|
5160
5828
|
prefix: `${(n?.price_change_24h || 0) < 0 ? "-" : "+"} `,
|
|
@@ -5170,10 +5838,10 @@ function WalletAsset({
|
|
|
5170
5838
|
}
|
|
5171
5839
|
|
|
5172
5840
|
// src/components/TokenSend/index.tsx
|
|
5173
|
-
var
|
|
5174
|
-
var
|
|
5175
|
-
var
|
|
5176
|
-
var
|
|
5841
|
+
var import_react39 = require("react");
|
|
5842
|
+
var import_viem15 = require("viem");
|
|
5843
|
+
var import_react_intl19 = require("react-intl");
|
|
5844
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
5177
5845
|
function Input2({
|
|
5178
5846
|
onChange,
|
|
5179
5847
|
placeholder,
|
|
@@ -5183,8 +5851,8 @@ function Input2({
|
|
|
5183
5851
|
error,
|
|
5184
5852
|
size = "df"
|
|
5185
5853
|
}) {
|
|
5186
|
-
return /* @__PURE__ */ (0,
|
|
5187
|
-
/* @__PURE__ */ (0,
|
|
5854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
|
|
5855
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5188
5856
|
"input",
|
|
5189
5857
|
{
|
|
5190
5858
|
placeholder,
|
|
@@ -5195,7 +5863,7 @@ function Input2({
|
|
|
5195
5863
|
className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
|
|
5196
5864
|
}
|
|
5197
5865
|
),
|
|
5198
|
-
error && /* @__PURE__ */ (0,
|
|
5866
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "matchid-token-input-error-text", children: error })
|
|
5199
5867
|
] });
|
|
5200
5868
|
}
|
|
5201
5869
|
function TokenSend({
|
|
@@ -5205,36 +5873,36 @@ function TokenSend({
|
|
|
5205
5873
|
onBack
|
|
5206
5874
|
}) {
|
|
5207
5875
|
const { list: chainList } = useMatchChain();
|
|
5208
|
-
const intl = (0,
|
|
5876
|
+
const intl = (0, import_react_intl19.useIntl)();
|
|
5209
5877
|
const { createWalletClient: createWalletClient2 } = useWallet();
|
|
5210
5878
|
const isNative = token.address.toLowerCase() == NATIVE_TOKEN_ADDRESS;
|
|
5211
|
-
const chain = (0,
|
|
5879
|
+
const chain = (0, import_react39.useMemo)(() => {
|
|
5212
5880
|
return chainList?.find((m) => m.id.toString() === token.chain_id);
|
|
5213
5881
|
}, [chainList, token.chain_id]);
|
|
5214
|
-
const walletClient = (0,
|
|
5882
|
+
const walletClient = (0, import_react39.useMemo)(() => {
|
|
5215
5883
|
return createWalletClient2({
|
|
5216
5884
|
// @ts-ignore
|
|
5217
|
-
chain: (0,
|
|
5218
|
-
transport: (0,
|
|
5885
|
+
chain: (0, import_viem15.defineChain)(chain),
|
|
5886
|
+
transport: (0, import_viem15.http)()
|
|
5219
5887
|
});
|
|
5220
5888
|
}, [chain]);
|
|
5221
|
-
const [amount, setAmount] = (0,
|
|
5222
|
-
const [address, setAddress] = (0,
|
|
5223
|
-
const [loading, setLoading] = (0,
|
|
5224
|
-
const [sending, setSending] = (0,
|
|
5225
|
-
const [txError, setTxError] = (0,
|
|
5226
|
-
const transaction = (0,
|
|
5889
|
+
const [amount, setAmount] = (0, import_react39.useState)("");
|
|
5890
|
+
const [address, setAddress] = (0, import_react39.useState)("");
|
|
5891
|
+
const [loading, setLoading] = (0, import_react39.useState)(false);
|
|
5892
|
+
const [sending, setSending] = (0, import_react39.useState)(false);
|
|
5893
|
+
const [txError, setTxError] = (0, import_react39.useState)("");
|
|
5894
|
+
const transaction = (0, import_react39.useMemo)(() => {
|
|
5227
5895
|
const reg = /^0x[a-fA-F0-9]{40}$/;
|
|
5228
5896
|
if (!amount || !address || !reg.test(address)) {
|
|
5229
5897
|
return;
|
|
5230
5898
|
}
|
|
5231
|
-
const viemChain = (0,
|
|
5899
|
+
const viemChain = (0, import_viem15.defineChain)(chain);
|
|
5232
5900
|
const to = isNative ? address : token.address;
|
|
5233
|
-
const value = isNative ? (0,
|
|
5234
|
-
const data = isNative ? "0x" : (0,
|
|
5235
|
-
abi:
|
|
5901
|
+
const value = isNative ? (0, import_viem15.parseUnits)(amount, parseInt(token?.decimals || "18")) : BigInt(0);
|
|
5902
|
+
const data = isNative ? "0x" : (0, import_viem15.encodeFunctionData)({
|
|
5903
|
+
abi: import_viem15.erc20Abi,
|
|
5236
5904
|
functionName: "transfer",
|
|
5237
|
-
args: [address, (0,
|
|
5905
|
+
args: [address, (0, import_viem15.parseUnits)(amount, parseInt(token?.decimals || "18"))]
|
|
5238
5906
|
});
|
|
5239
5907
|
return {
|
|
5240
5908
|
to,
|
|
@@ -5254,7 +5922,7 @@ function TokenSend({
|
|
|
5254
5922
|
setLoading(false);
|
|
5255
5923
|
}
|
|
5256
5924
|
};
|
|
5257
|
-
const error = (0,
|
|
5925
|
+
const error = (0, import_react39.useMemo)(() => {
|
|
5258
5926
|
setTxError("");
|
|
5259
5927
|
let amountError = "";
|
|
5260
5928
|
let addressError = "";
|
|
@@ -5297,7 +5965,7 @@ function TokenSend({
|
|
|
5297
5965
|
setAmount(value);
|
|
5298
5966
|
}
|
|
5299
5967
|
};
|
|
5300
|
-
const canSend = (0,
|
|
5968
|
+
const canSend = (0, import_react39.useMemo)(() => {
|
|
5301
5969
|
return !error.amount && !error.address && amount && address;
|
|
5302
5970
|
}, [error]);
|
|
5303
5971
|
const onNext = async () => {
|
|
@@ -5307,7 +5975,7 @@ function TokenSend({
|
|
|
5307
5975
|
}
|
|
5308
5976
|
onClose();
|
|
5309
5977
|
};
|
|
5310
|
-
(0,
|
|
5978
|
+
(0, import_react39.useEffect)(() => {
|
|
5311
5979
|
const receiveMessage = (event) => {
|
|
5312
5980
|
if (event.data) {
|
|
5313
5981
|
if (event.data.source == "match-wallet") {
|
|
@@ -5323,24 +5991,24 @@ function TokenSend({
|
|
|
5323
5991
|
window.removeEventListener("message", receiveMessage);
|
|
5324
5992
|
};
|
|
5325
5993
|
}, []);
|
|
5326
|
-
return /* @__PURE__ */ (0,
|
|
5327
|
-
/* @__PURE__ */ (0,
|
|
5328
|
-
/* @__PURE__ */ (0,
|
|
5329
|
-
/* @__PURE__ */ (0,
|
|
5330
|
-
/* @__PURE__ */ (0,
|
|
5331
|
-
/* @__PURE__ */ (0,
|
|
5332
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
5994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl19.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-token-send-box`, children: [
|
|
5995
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
5996
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-token-amount-content`, children: [
|
|
5997
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-token-amount-header`, children: [
|
|
5998
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl19.FormattedMessage, { id: "amount" }) }),
|
|
5999
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
|
|
6000
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5333
6001
|
"img",
|
|
5334
6002
|
{
|
|
5335
6003
|
src: token?.icon,
|
|
5336
6004
|
alt: token?.symbol,
|
|
5337
6005
|
className: `matchid-token-amount-chain-icon`
|
|
5338
6006
|
}
|
|
5339
|
-
) : /* @__PURE__ */ (0,
|
|
5340
|
-
/* @__PURE__ */ (0,
|
|
6007
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
|
|
6008
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: token?.symbol })
|
|
5341
6009
|
] })
|
|
5342
6010
|
] }),
|
|
5343
|
-
/* @__PURE__ */ (0,
|
|
6011
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5344
6012
|
Input2,
|
|
5345
6013
|
{
|
|
5346
6014
|
type: "text",
|
|
@@ -5353,18 +6021,18 @@ function TokenSend({
|
|
|
5353
6021
|
error: error.amount || txError
|
|
5354
6022
|
}
|
|
5355
6023
|
),
|
|
5356
|
-
/* @__PURE__ */ (0,
|
|
5357
|
-
/* @__PURE__ */ (0,
|
|
5358
|
-
/* @__PURE__ */ (0,
|
|
6024
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
|
|
6025
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-token-amount-title`, children: [
|
|
6026
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl19.FormattedMessage, { id: "balance" }),
|
|
5359
6027
|
":"
|
|
5360
6028
|
] }),
|
|
5361
|
-
/* @__PURE__ */ (0,
|
|
6029
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
|
|
5362
6030
|
] }),
|
|
5363
|
-
/* @__PURE__ */ (0,
|
|
6031
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
5364
6032
|
] }),
|
|
5365
|
-
/* @__PURE__ */ (0,
|
|
5366
|
-
/* @__PURE__ */ (0,
|
|
5367
|
-
/* @__PURE__ */ (0,
|
|
6033
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-token-address-content`, children: [
|
|
6034
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl19.FormattedMessage, { id: "receiveTitle" }) }) }),
|
|
6035
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5368
6036
|
Input2,
|
|
5369
6037
|
{
|
|
5370
6038
|
type: "text",
|
|
@@ -5380,7 +6048,7 @@ function TokenSend({
|
|
|
5380
6048
|
)
|
|
5381
6049
|
] })
|
|
5382
6050
|
] }),
|
|
5383
|
-
/* @__PURE__ */ (0,
|
|
6051
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5384
6052
|
Button,
|
|
5385
6053
|
{
|
|
5386
6054
|
size: "lg",
|
|
@@ -5389,15 +6057,15 @@ function TokenSend({
|
|
|
5389
6057
|
disabled: !canSend || !!txError,
|
|
5390
6058
|
onClick: onNext,
|
|
5391
6059
|
loading: loading || sending,
|
|
5392
|
-
children: /* @__PURE__ */ (0,
|
|
6060
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl19.FormattedMessage, { id: "next" })
|
|
5393
6061
|
}
|
|
5394
6062
|
)
|
|
5395
6063
|
] }) });
|
|
5396
6064
|
}
|
|
5397
6065
|
|
|
5398
6066
|
// src/components/TokenDetail/index.tsx
|
|
5399
|
-
var
|
|
5400
|
-
var
|
|
6067
|
+
var import_react_intl20 = require("react-intl");
|
|
6068
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
5401
6069
|
function TokenDetail({
|
|
5402
6070
|
onClose,
|
|
5403
6071
|
token
|
|
@@ -5407,41 +6075,41 @@ function TokenDetail({
|
|
|
5407
6075
|
const chain = chainList?.find((m) => m.id.toString() === token.chain_id);
|
|
5408
6076
|
const onSend = () => {
|
|
5409
6077
|
modal.show((props) => {
|
|
5410
|
-
return /* @__PURE__ */ (0,
|
|
6078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(TokenSend, { onClose: () => {
|
|
5411
6079
|
props.close();
|
|
5412
6080
|
onClose();
|
|
5413
6081
|
}, onBack: props.close, zIndex: props.zIndex, token });
|
|
5414
6082
|
});
|
|
5415
6083
|
};
|
|
5416
|
-
const intl = (0,
|
|
5417
|
-
return /* @__PURE__ */ (0,
|
|
6084
|
+
const intl = (0, import_react_intl20.useIntl)();
|
|
6085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ModalDrawer, { isOpen: true, title: intl.formatMessage({
|
|
5418
6086
|
id: "tokenDetails"
|
|
5419
|
-
}), onClose, children: /* @__PURE__ */ (0,
|
|
5420
|
-
/* @__PURE__ */ (0,
|
|
5421
|
-
/* @__PURE__ */ (0,
|
|
5422
|
-
/* @__PURE__ */ (0,
|
|
5423
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
5424
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6087
|
+
}), onClose, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-token-detail`, children: [
|
|
6088
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-token-main`, children: [
|
|
6089
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-token-info`, children: [
|
|
6090
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-token-logo`, children: [
|
|
6091
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("img", { src: token.icon, alt: token.symbol, className: `matchid-token-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(AlphaAvatar, { className: `matchid-token-icon`, size: 48, name: token.symbol || token.name || "" }),
|
|
6092
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-token-chain` })
|
|
5425
6093
|
] }),
|
|
5426
|
-
/* @__PURE__ */ (0,
|
|
5427
|
-
/* @__PURE__ */ (0,
|
|
6094
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-token-name`, children: [
|
|
6095
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10 }),
|
|
5428
6096
|
" ",
|
|
5429
6097
|
token.symbol
|
|
5430
6098
|
] })
|
|
5431
6099
|
] }),
|
|
5432
|
-
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0,
|
|
5433
|
-
/* @__PURE__ */ (0,
|
|
5434
|
-
/* @__PURE__ */ (0,
|
|
6100
|
+
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-token-contract`, children: [
|
|
6101
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "matchid-token-contract-title", children: "Contract address" }),
|
|
6102
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "matchid-token-contract-address", children: token.address })
|
|
5435
6103
|
] })
|
|
5436
6104
|
] }),
|
|
5437
|
-
/* @__PURE__ */ (0,
|
|
6105
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl20.FormattedMessage, { id: "send" }) })
|
|
5438
6106
|
] }) });
|
|
5439
6107
|
}
|
|
5440
6108
|
|
|
5441
6109
|
// src/components/TokenSendList/index.tsx
|
|
5442
|
-
var
|
|
5443
|
-
var
|
|
5444
|
-
var
|
|
6110
|
+
var import_react40 = require("react");
|
|
6111
|
+
var import_react_intl21 = require("react-intl");
|
|
6112
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
5445
6113
|
function TokenSendList({ close }) {
|
|
5446
6114
|
const isDownMd = useDownMd();
|
|
5447
6115
|
const walletAssets = useMatchWalletAssets();
|
|
@@ -5449,20 +6117,20 @@ function TokenSendList({ close }) {
|
|
|
5449
6117
|
list: walletAssets.mergedAssets
|
|
5450
6118
|
});
|
|
5451
6119
|
const { list } = useMatchChain();
|
|
5452
|
-
const [checked, setChecked] = (0,
|
|
6120
|
+
const [checked, setChecked] = (0, import_react40.useState)();
|
|
5453
6121
|
const modal = useModal();
|
|
5454
6122
|
const onNext = () => {
|
|
5455
6123
|
checked && modal.show((props) => {
|
|
5456
|
-
return /* @__PURE__ */ (0,
|
|
6124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(TokenSend, { onClose: () => {
|
|
5457
6125
|
props.close();
|
|
5458
6126
|
close();
|
|
5459
6127
|
}, onBack: props.close, zIndex: props.zIndex, token: checked });
|
|
5460
6128
|
});
|
|
5461
6129
|
};
|
|
5462
|
-
return /* @__PURE__ */ (0,
|
|
5463
|
-
/* @__PURE__ */ (0,
|
|
6130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "matchid-token-send-list-box", children: [
|
|
6131
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5464
6132
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5465
|
-
return /* @__PURE__ */ (0,
|
|
6133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
5466
6134
|
"div",
|
|
5467
6135
|
{
|
|
5468
6136
|
className: `matchid-token-send-item ${checked?.address == n.address ? "matchid-token-send-chekced" : ""}`,
|
|
@@ -5470,10 +6138,10 @@ function TokenSendList({ close }) {
|
|
|
5470
6138
|
setChecked(n);
|
|
5471
6139
|
},
|
|
5472
6140
|
children: [
|
|
5473
|
-
/* @__PURE__ */ (0,
|
|
5474
|
-
/* @__PURE__ */ (0,
|
|
5475
|
-
/* @__PURE__ */ (0,
|
|
5476
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
6141
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
|
|
6142
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
6143
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "matchid-token-send-logo", children: [
|
|
6144
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5477
6145
|
AlphaAvatar2,
|
|
5478
6146
|
{
|
|
5479
6147
|
className: `matchid-token-send-icon`,
|
|
@@ -5481,7 +6149,7 @@ function TokenSendList({ close }) {
|
|
|
5481
6149
|
name: n.symbol || n.name || ""
|
|
5482
6150
|
}
|
|
5483
6151
|
),
|
|
5484
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6152
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5485
6153
|
"img",
|
|
5486
6154
|
{
|
|
5487
6155
|
src: chain.iconUrl,
|
|
@@ -5490,9 +6158,9 @@ function TokenSendList({ close }) {
|
|
|
5490
6158
|
}
|
|
5491
6159
|
)
|
|
5492
6160
|
] }),
|
|
5493
|
-
/* @__PURE__ */ (0,
|
|
5494
|
-
/* @__PURE__ */ (0,
|
|
5495
|
-
/* @__PURE__ */ (0,
|
|
6161
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-token-send-info`, children: [
|
|
6162
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
|
|
6163
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
|
|
5496
6164
|
] })
|
|
5497
6165
|
] })
|
|
5498
6166
|
]
|
|
@@ -5500,24 +6168,24 @@ function TokenSendList({ close }) {
|
|
|
5500
6168
|
index
|
|
5501
6169
|
);
|
|
5502
6170
|
}) }),
|
|
5503
|
-
/* @__PURE__ */ (0,
|
|
6171
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl21.FormattedMessage, { id: "next" }) })
|
|
5504
6172
|
] });
|
|
5505
6173
|
}
|
|
5506
6174
|
|
|
5507
6175
|
// src/components/TransactionList/index.tsx
|
|
5508
6176
|
var import_react_infinite_scroll_component = __toESM(require("react-infinite-scroll-component"));
|
|
5509
|
-
var
|
|
5510
|
-
var
|
|
5511
|
-
var
|
|
5512
|
-
var
|
|
5513
|
-
var
|
|
6177
|
+
var import_react41 = require("react");
|
|
6178
|
+
var import_viem16 = require("viem");
|
|
6179
|
+
var import_viem17 = require("viem");
|
|
6180
|
+
var import_react_intl22 = require("react-intl");
|
|
6181
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
5514
6182
|
var Item = ({ data }) => {
|
|
5515
6183
|
const { address } = useWallet();
|
|
5516
6184
|
const isOut = data.from.toLowerCase() == address.toLowerCase();
|
|
5517
6185
|
const { chain, chainId, explorerLink, formatUnits: chainFormatUnits } = useMatchChain();
|
|
5518
6186
|
const { contracts } = useContractStore_default();
|
|
5519
|
-
const [shouldRefetch, setShouldRefetch] = (0,
|
|
5520
|
-
const transferType = (0,
|
|
6187
|
+
const [shouldRefetch, setShouldRefetch] = (0, import_react41.useState)(true);
|
|
6188
|
+
const transferType = (0, import_react41.useMemo)(() => {
|
|
5521
6189
|
const methodId = data.input.substring(2, 10);
|
|
5522
6190
|
if (methodId == "095ea7b3") {
|
|
5523
6191
|
return "erc20_approve";
|
|
@@ -5527,38 +6195,38 @@ var Item = ({ data }) => {
|
|
|
5527
6195
|
}
|
|
5528
6196
|
return "unknown";
|
|
5529
6197
|
}, [data.input]);
|
|
5530
|
-
const to = (0,
|
|
6198
|
+
const to = (0, import_react41.useMemo)(() => {
|
|
5531
6199
|
if (!isOut) {
|
|
5532
6200
|
return data.from;
|
|
5533
6201
|
}
|
|
5534
6202
|
if (transferType == "erc20_transfer") {
|
|
5535
|
-
const decodeData = (0,
|
|
5536
|
-
abi:
|
|
6203
|
+
const decodeData = (0, import_viem16.decodeFunctionData)({
|
|
6204
|
+
abi: import_viem17.erc20Abi,
|
|
5537
6205
|
data: data.input
|
|
5538
6206
|
});
|
|
5539
6207
|
return decodeData.args[0];
|
|
5540
6208
|
}
|
|
5541
6209
|
return data.to;
|
|
5542
6210
|
}, [data.input, transferType, data.to, isOut]);
|
|
5543
|
-
const amount = (0,
|
|
6211
|
+
const amount = (0, import_react41.useMemo)(() => {
|
|
5544
6212
|
if (transferType == "erc20_transfer") {
|
|
5545
|
-
const decodeData = (0,
|
|
5546
|
-
abi:
|
|
6213
|
+
const decodeData = (0, import_viem16.decodeFunctionData)({
|
|
6214
|
+
abi: import_viem17.erc20Abi,
|
|
5547
6215
|
data: data.input
|
|
5548
6216
|
});
|
|
5549
6217
|
const value = decodeData.args[1];
|
|
5550
|
-
return (0,
|
|
6218
|
+
return (0, import_viem16.formatUnits)(value, contracts[`${chainId}-${data.to.toLowerCase()}`]?.decimals || 18);
|
|
5551
6219
|
}
|
|
5552
6220
|
return chainFormatUnits(BigInt(data.value));
|
|
5553
6221
|
}, [data.input, transferType, data.value, contracts, chainId, data.to]);
|
|
5554
6222
|
const hashQuery = useHash({
|
|
5555
6223
|
hash: data.hash,
|
|
5556
6224
|
//@ts-ignore
|
|
5557
|
-
chain: (0,
|
|
6225
|
+
chain: (0, import_viem16.defineChain)(chain),
|
|
5558
6226
|
refetchInterval: shouldRefetch ? 3e3 : false,
|
|
5559
6227
|
enabled: shouldRefetch && data.source == "local"
|
|
5560
6228
|
});
|
|
5561
|
-
const status = (0,
|
|
6229
|
+
const status = (0, import_react41.useMemo)(() => {
|
|
5562
6230
|
if (data.source == "matchain") {
|
|
5563
6231
|
switch (data.extra.status) {
|
|
5564
6232
|
case "ok":
|
|
@@ -5585,30 +6253,30 @@ var Item = ({ data }) => {
|
|
|
5585
6253
|
}
|
|
5586
6254
|
return "loading";
|
|
5587
6255
|
}, [data.extra?.status, data.source, hashQuery.data]);
|
|
5588
|
-
(0,
|
|
6256
|
+
(0, import_react41.useEffect)(() => {
|
|
5589
6257
|
if (data.hash) {
|
|
5590
6258
|
setShouldRefetch(status == "loading");
|
|
5591
6259
|
}
|
|
5592
6260
|
}, [status, data.hash]);
|
|
5593
|
-
const symbol = (0,
|
|
6261
|
+
const symbol = (0, import_react41.useMemo)(() => {
|
|
5594
6262
|
if (transferType == "erc20_transfer") {
|
|
5595
6263
|
const contract = contracts[`${chainId}-${data.to.toLowerCase()}`];
|
|
5596
6264
|
return contract?.symbol || contract?.name || "unknown";
|
|
5597
6265
|
}
|
|
5598
6266
|
return chain?.nativeCurrency.symbol || chain?.nativeCurrency.name;
|
|
5599
6267
|
}, [transferType, chain, contracts, chainId, data.to]);
|
|
5600
|
-
return /* @__PURE__ */ (0,
|
|
6268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
5601
6269
|
"a",
|
|
5602
6270
|
{
|
|
5603
6271
|
href: explorerLink(`tx/${data.hash}`),
|
|
5604
6272
|
target: "_blank",
|
|
5605
6273
|
className: `matchid-transaction-item`,
|
|
5606
6274
|
children: [
|
|
5607
|
-
/* @__PURE__ */ (0,
|
|
5608
|
-
/* @__PURE__ */ (0,
|
|
5609
|
-
/* @__PURE__ */ (0,
|
|
5610
|
-
/* @__PURE__ */ (0,
|
|
5611
|
-
/* @__PURE__ */ (0,
|
|
6275
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-transacton-item-container`, children: [
|
|
6276
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
|
|
6277
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-transaction-item-details`, children: [
|
|
6278
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
|
|
6279
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5612
6280
|
"div",
|
|
5613
6281
|
{
|
|
5614
6282
|
className: `matchid-transaction-item-timestamp`,
|
|
@@ -5617,11 +6285,11 @@ var Item = ({ data }) => {
|
|
|
5617
6285
|
)
|
|
5618
6286
|
] })
|
|
5619
6287
|
] }),
|
|
5620
|
-
/* @__PURE__ */ (0,
|
|
5621
|
-
/* @__PURE__ */ (0,
|
|
5622
|
-
status == "loading" && /* @__PURE__ */ (0,
|
|
5623
|
-
status == "success" && /* @__PURE__ */ (0,
|
|
5624
|
-
status == "error" && /* @__PURE__ */ (0,
|
|
6288
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
|
|
6289
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(NumberFormatter, { value: amount, tFixNum: 6, prefix: isOut ? "-" : "+", suffix: " " + symbol }),
|
|
6290
|
+
status == "loading" && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(LoadingIcon_default, { color: "#000000", size: 16, rotate: true }),
|
|
6291
|
+
status == "success" && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(CheckRoundIcon, { size: 16 }),
|
|
6292
|
+
status == "error" && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(InfoRoundIcon, { size: 16 })
|
|
5625
6293
|
] })
|
|
5626
6294
|
]
|
|
5627
6295
|
}
|
|
@@ -5631,19 +6299,19 @@ function TransactionList({
|
|
|
5631
6299
|
scrollableTarget
|
|
5632
6300
|
}) {
|
|
5633
6301
|
const { fetchMoreData, hasMore, items } = useMatchWalletRecords();
|
|
5634
|
-
return /* @__PURE__ */ (0,
|
|
6302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5635
6303
|
import_react_infinite_scroll_component.default,
|
|
5636
6304
|
{
|
|
5637
6305
|
scrollableTarget,
|
|
5638
6306
|
dataLength: items.length,
|
|
5639
6307
|
next: fetchMoreData,
|
|
5640
6308
|
hasMore,
|
|
5641
|
-
loader: /* @__PURE__ */ (0,
|
|
5642
|
-
/* @__PURE__ */ (0,
|
|
6309
|
+
loader: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "matchid-list-nomore", children: [
|
|
6310
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
|
|
5643
6311
|
"Loading..."
|
|
5644
6312
|
] }),
|
|
5645
|
-
endMessage: items.length > 0 ? /* @__PURE__ */ (0,
|
|
5646
|
-
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0,
|
|
6313
|
+
endMessage: items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl22.FormattedMessage, { id: "noMoreRecords" }) }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl22.FormattedMessage, { id: "noRecords" }) }),
|
|
6314
|
+
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "mt-[150px]" }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Item, { data: item }, index)) })
|
|
5647
6315
|
}
|
|
5648
6316
|
);
|
|
5649
6317
|
}
|
|
@@ -5651,6 +6319,7 @@ function TransactionList({
|
|
|
5651
6319
|
0 && (module.exports = {
|
|
5652
6320
|
BTCModal,
|
|
5653
6321
|
Button,
|
|
6322
|
+
EVMModal,
|
|
5654
6323
|
EmailModal,
|
|
5655
6324
|
Field,
|
|
5656
6325
|
Input,
|