@matchain/matchid-sdk-react 0.1.53-alpha.7 → 0.1.53-alpha.8
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 -146
- package/dist/assets/icon/index.d.ts +4 -146
- package/dist/assets/icon/index.js +35 -0
- package/dist/assets/icon/index.js.map +1 -1
- package/dist/assets/icon/index.mjs +3 -1
- package/dist/{chunk-3USZ4ZZY.mjs → chunk-FKXS2XRG.mjs} +96 -2
- package/dist/chunk-FKXS2XRG.mjs.map +1 -0
- package/dist/{chunk-OCQ2AIM3.mjs → chunk-IZOOVZAD.mjs} +5 -5
- package/dist/chunk-IZOOVZAD.mjs.map +1 -0
- package/dist/{chunk-W7CCPGOT.mjs → chunk-QTUR37B2.mjs} +310 -123
- package/dist/chunk-QTUR37B2.mjs.map +1 -0
- package/dist/{chunk-AYMVU44P.mjs → chunk-X5HGL3ZX.mjs} +2 -2
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +625 -406
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +7 -5
- package/dist/hooks/api/index.d.mts +3 -2
- package/dist/hooks/api/index.d.ts +3 -2
- package/dist/hooks/api/index.js +209 -92
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +5 -5
- package/dist/hooks/index.d.mts +3 -2
- package/dist/hooks/index.d.ts +3 -2
- package/dist/hooks/index.js +274 -256
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +5 -5
- package/dist/{index-BIvPr81B.d.ts → index-BDffLLM_.d.mts} +15 -18
- package/dist/index-BVfCh4l-.d.mts +203 -0
- package/dist/{index-DYkN9eDY.d.mts → index-BaFmUVw-.d.mts} +1 -1
- package/dist/{index-TVbqpk9T.d.mts → index-BsX-ovIl.d.ts} +15 -18
- package/dist/{index-C2-EMz0t.d.ts → index-C0UKUm0h.d.ts} +2 -2
- package/dist/{index-CZHjwqDb.d.ts → index-CQmN0dN4.d.ts} +1 -1
- package/dist/index-D3Kp05kW.d.ts +203 -0
- package/dist/{index-uhLehOUk.d.ts → index-D5WIVIkc.d.ts} +1 -1
- package/dist/{index-BXNFULAw.d.mts → index-D7S5DMUy.d.mts} +13 -6
- package/dist/{index-DKFnMFMm.d.mts → index-DC4F1u-w.d.mts} +2 -2
- package/dist/{index-DDCyj-Fl.d.ts → index-DQFQ39D9.d.ts} +13 -6
- package/dist/{index-tFT-63LO.d.ts → index-DjbH13zc.d.mts} +3 -1
- package/dist/{index-TsJwrYwh.d.mts → index-SOVt-ADK.d.mts} +1 -1
- package/dist/{index-BkWS_v10.d.mts → index-zc2GEzJ9.d.ts} +3 -1
- package/dist/index.css +9 -1
- package/dist/index.d.mts +9 -7
- package/dist/index.d.ts +9 -7
- package/dist/index.js +835 -524
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -10
- package/dist/request-B0CyrGFT.d.mts +15 -0
- package/dist/request-B0CyrGFT.d.ts +15 -0
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/{types-i_ugbm5B.d.mts → types-VrV1kYga.d.mts} +3 -1
- package/dist/{types-i_ugbm5B.d.ts → types-VrV1kYga.d.ts} +3 -1
- package/dist/ui/index.d.mts +3 -3
- package/dist/ui/index.d.ts +3 -3
- package/dist/ui/index.js +68 -65
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +2 -2
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +4 -4
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +1 -1
- package/example/package.json +3 -1
- package/example/src/pages/Contact/index.tsx +89 -3
- package/package.json +1 -1
- package/dist/chunk-3USZ4ZZY.mjs.map +0 -1
- package/dist/chunk-OCQ2AIM3.mjs.map +0 -1
- package/dist/chunk-W7CCPGOT.mjs.map +0 -1
- /package/dist/{chunk-AYMVU44P.mjs.map → chunk-X5HGL3ZX.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __export(src_exports, {
|
|
|
34
34
|
Chains: () => chains_exports,
|
|
35
35
|
Components: () => components_exports,
|
|
36
36
|
Hooks: () => hooks_exports,
|
|
37
|
+
Icon: () => icon_exports,
|
|
37
38
|
MatchProvider: () => MatchProvider,
|
|
38
39
|
ModalProvider: () => ModalProvider,
|
|
39
40
|
ToastProvider: () => ToastProvider,
|
|
@@ -44,7 +45,7 @@ __export(src_exports, {
|
|
|
44
45
|
module.exports = __toCommonJS(src_exports);
|
|
45
46
|
|
|
46
47
|
// src/MatchContext.tsx
|
|
47
|
-
var
|
|
48
|
+
var import_react43 = require("react");
|
|
48
49
|
|
|
49
50
|
// src/hooks/index.tsx
|
|
50
51
|
var hooks_exports = {};
|
|
@@ -486,6 +487,47 @@ var getContactListApi = (data) => {
|
|
|
486
487
|
data
|
|
487
488
|
});
|
|
488
489
|
};
|
|
490
|
+
var searchContactsApi = (data) => {
|
|
491
|
+
return request_default({
|
|
492
|
+
url: `/api/v1/contacts/search`,
|
|
493
|
+
method: "POST",
|
|
494
|
+
data
|
|
495
|
+
});
|
|
496
|
+
};
|
|
497
|
+
var addContactsApi = (data) => {
|
|
498
|
+
return request_default({
|
|
499
|
+
url: `/api/v1/contacts/add`,
|
|
500
|
+
method: "POST",
|
|
501
|
+
data
|
|
502
|
+
});
|
|
503
|
+
};
|
|
504
|
+
var acceptContactsApi = (data) => {
|
|
505
|
+
return request_default({
|
|
506
|
+
url: `/api/v1/contacts/accept`,
|
|
507
|
+
method: "POST",
|
|
508
|
+
data
|
|
509
|
+
});
|
|
510
|
+
};
|
|
511
|
+
var delContactsApi = (data) => {
|
|
512
|
+
return request_default({
|
|
513
|
+
url: `/api/v1/contacts/del`,
|
|
514
|
+
method: "POST",
|
|
515
|
+
data
|
|
516
|
+
});
|
|
517
|
+
};
|
|
518
|
+
var getContractsInfoApi = () => {
|
|
519
|
+
return retryRequest({
|
|
520
|
+
url: `/api/v1/contracts/info`,
|
|
521
|
+
method: "GET"
|
|
522
|
+
});
|
|
523
|
+
};
|
|
524
|
+
var userInviteApi = (data) => {
|
|
525
|
+
return request_default({
|
|
526
|
+
url: `/api/v1/user/invite`,
|
|
527
|
+
method: "POST",
|
|
528
|
+
data
|
|
529
|
+
});
|
|
530
|
+
};
|
|
489
531
|
|
|
490
532
|
// src/store/useLocalStore.ts
|
|
491
533
|
var persistedState = (0, import_middleware.persist)(
|
|
@@ -590,12 +632,12 @@ var isValidEmail = (email) => {
|
|
|
590
632
|
var isValidUsername = (username) => {
|
|
591
633
|
return /^[a-zA-Z0-9_-]+$/.test(username);
|
|
592
634
|
};
|
|
593
|
-
function truncateAddress(address) {
|
|
594
|
-
if (address.length <=
|
|
635
|
+
function truncateAddress(address, startLen = 4, endLen = 4) {
|
|
636
|
+
if (address.length <= startLen + endLen) {
|
|
595
637
|
return address;
|
|
596
638
|
}
|
|
597
|
-
const start = address.slice(0,
|
|
598
|
-
const end = address.slice(-
|
|
639
|
+
const start = address.slice(0, startLen);
|
|
640
|
+
const end = address.slice(-endLen);
|
|
599
641
|
return `${start}...${end}`;
|
|
600
642
|
}
|
|
601
643
|
function getAppClientId() {
|
|
@@ -690,11 +732,87 @@ function bytesToBase64(bytes) {
|
|
|
690
732
|
// src/store/useModalStore.ts
|
|
691
733
|
var import_zustand2 = require("zustand");
|
|
692
734
|
|
|
735
|
+
// src/assets/icon/index.tsx
|
|
736
|
+
var icon_exports = {};
|
|
737
|
+
__export(icon_exports, {
|
|
738
|
+
ArrowDownIcon: () => ArrowDownIcon,
|
|
739
|
+
ArrowLeftIcon: () => ArrowLeftIcon,
|
|
740
|
+
ArrowRightIcon: () => ArrowRightIcon,
|
|
741
|
+
ArrowSendIcon: () => ArrowSendIcon,
|
|
742
|
+
BTCDarkIcon: () => BTCDarkIcon,
|
|
743
|
+
BTCLightIcon: () => BTCLightIcon,
|
|
744
|
+
BackIcon: () => BackIcon,
|
|
745
|
+
BitgetIcon: () => BitgetIcon,
|
|
746
|
+
CheckIcon: () => CheckIcon,
|
|
747
|
+
CheckRoundIcon: () => CheckRoundIcon,
|
|
748
|
+
CloseEyeIcon: () => CloseEyeIcon,
|
|
749
|
+
CloseIcon: () => CloseIcon,
|
|
750
|
+
CloseRoundIcon: () => CloseRoundIcon,
|
|
751
|
+
CopyIcon: () => CopyIcon,
|
|
752
|
+
DeleteRoundIcon: () => DeleteRoundIcon,
|
|
753
|
+
DiscordIcon: () => DiscordIcon,
|
|
754
|
+
EVMDarkIcon: () => EVMDarkIcon,
|
|
755
|
+
EVMLightIcon: () => EVMLightIcon,
|
|
756
|
+
EmailIcon: () => EmailIcon,
|
|
757
|
+
EmailLineIcon: () => EmailLineIcon,
|
|
758
|
+
ErrorRoundIcon: () => ErrorRoundIcon,
|
|
759
|
+
FacebookIcon: () => FacebookIcon,
|
|
760
|
+
GithubIcon: () => GithubIcon,
|
|
761
|
+
GoogleIcon: () => GoogleIcon,
|
|
762
|
+
InfoLineIcon: () => InfoLineIcon,
|
|
763
|
+
InfoRoundIcon: () => InfoRoundIcon,
|
|
764
|
+
LeatherIcon: () => LeatherIcon,
|
|
765
|
+
LinkedinIcon: () => LinkedinIcon,
|
|
766
|
+
LoadingIcon: () => LoadingIcon_default,
|
|
767
|
+
LoginIcon: () => LoginIcon_default,
|
|
768
|
+
MoreIcon: () => MoreIcon,
|
|
769
|
+
OKXIcon: () => OKXIcon,
|
|
770
|
+
OpenEyeIcon: () => OpenEyeIcon,
|
|
771
|
+
PasswordRoundIcon: () => PasswordRoundIcon,
|
|
772
|
+
PhantomIcon: () => PhantomIcon,
|
|
773
|
+
SOLDarkIcon: () => SOLDarkIcon,
|
|
774
|
+
SOLLightIcon: () => SOLLightIcon,
|
|
775
|
+
TRXDarkIcon: () => TRXDarkIcon,
|
|
776
|
+
TRXLightIcon: () => TRXLightIcon,
|
|
777
|
+
TelegramIcon: () => TelegramIcon,
|
|
778
|
+
TonDarkIcon: () => TonLightIcon,
|
|
779
|
+
TonLightIcon: () => TonLightIcon2,
|
|
780
|
+
TransferIcon: () => TransferIcon,
|
|
781
|
+
TronLinkIcon: () => TronLinkIcon,
|
|
782
|
+
UnLoginIcon: () => UnLoginIcon_default,
|
|
783
|
+
UnisatIcon: () => UnisatIcon,
|
|
784
|
+
WalletIcon: () => WalletIcon,
|
|
785
|
+
XIcon: () => XIcon,
|
|
786
|
+
XverseIcon: () => XverseIcon,
|
|
787
|
+
YoutubeIcon: () => YoutubeIcon
|
|
788
|
+
});
|
|
789
|
+
|
|
693
790
|
// src/assets/icon/BackIcon.tsx
|
|
694
791
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
792
|
+
function BackIcon({
|
|
793
|
+
color = "#000",
|
|
794
|
+
size = 24,
|
|
795
|
+
className,
|
|
796
|
+
style
|
|
797
|
+
}) {
|
|
798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { className, style, width: size, height: size, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
799
|
+
"path",
|
|
800
|
+
{
|
|
801
|
+
d: "M11.2917 25.2926C11.1988 25.3855 11.1251 25.4958 11.0748 25.6172C11.0245 25.7386 10.9987 25.8687 10.9987 26.0001C10.9987 26.1315 11.0245 26.2616 11.0748 26.383C11.1251 26.5044 11.1988 26.6147 11.2917 26.7076C11.3846 26.8005 11.4949 26.8742 11.6163 26.9245C11.7377 26.9747 11.8678 27.0006 11.9992 27.0006C12.1306 27.0006 12.2607 26.9747 12.3821 26.9245C12.5035 26.8742 12.6138 26.8005 12.7067 26.7076L22.7067 16.7076C22.7997 16.6147 22.8734 16.5044 22.9238 16.383C22.9741 16.2616 23 16.1315 23 16.0001C23 15.8687 22.9741 15.7385 22.9238 15.6171C22.8734 15.4957 22.7997 15.3854 22.7067 15.2926L12.7067 5.29257C12.5191 5.10493 12.2646 4.99951 11.9992 4.99951C11.7338 4.99951 11.4794 5.10493 11.2917 5.29257C11.1041 5.48021 10.9987 5.7347 10.9987 6.00007C10.9987 6.26543 11.1041 6.51993 11.2917 6.70757L20.5855 16.0001L11.2917 25.2926Z",
|
|
802
|
+
fill: color
|
|
803
|
+
}
|
|
804
|
+
) });
|
|
805
|
+
}
|
|
695
806
|
|
|
696
807
|
// src/assets/icon/CloseIcon.tsx
|
|
697
808
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
809
|
+
function CloseIcon({
|
|
810
|
+
color = "#000",
|
|
811
|
+
size = 24,
|
|
812
|
+
style
|
|
813
|
+
}) {
|
|
814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { style, width: size, height: size, viewBox: "0 0 29 29", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M1 1L14.5 14.5M28 28L14.5 14.5M14.5 14.5L1 28L28 1", stroke: color, strokeWidth: "2" }) });
|
|
815
|
+
}
|
|
698
816
|
|
|
699
817
|
// src/assets/icon/XIcon.tsx
|
|
700
818
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
@@ -960,6 +1078,21 @@ function CheckRoundIcon({
|
|
|
960
1078
|
|
|
961
1079
|
// src/assets/icon/PasswordRoundIcon.tsx
|
|
962
1080
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1081
|
+
function PasswordRoundIcon() {
|
|
1082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("svg", { width: "40", height: "40", viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1083
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { x: "0.5", y: "0.5", width: "39", height: "39", rx: "7.5", fill: "white" }),
|
|
1084
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { x: "0.5", y: "0.5", width: "39", height: "39", rx: "7.5", stroke: "black" }),
|
|
1085
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1086
|
+
"path",
|
|
1087
|
+
{
|
|
1088
|
+
fillRule: "evenodd",
|
|
1089
|
+
clipRule: "evenodd",
|
|
1090
|
+
d: "M19.7673 16.1137C19.962 13.9479 21.7831 12.25 24 12.25C26.3472 12.25 28.25 14.1528 28.25 16.5C28.25 18.8472 26.3472 20.75 24 20.75C23.488 20.75 22.9987 20.6598 22.5461 20.495C21.9175 20.2662 21.1115 20.3279 20.5486 20.8908L19.2626 22.1768C19.2157 22.2237 19.1521 22.25 19.0858 22.25H18C17.3096 22.25 16.75 22.8096 16.75 23.5V24.25H15.5C14.8096 24.25 14.25 24.8096 14.25 25.5V26.5C14.25 26.6381 14.1381 26.75 14 26.75H12C11.8619 26.75 11.75 26.6381 11.75 26.5V23.9538C11.75 23.8817 11.7811 23.8131 11.8354 23.7656L19.1524 17.3632C19.5404 17.0238 19.7275 16.556 19.7673 16.1137ZM24 10.75C20.9997 10.75 18.5369 13.0473 18.2733 15.9794C18.2614 16.1115 18.2107 16.1941 18.1646 16.2344L10.8476 22.6368C10.4678 22.9691 10.25 23.4491 10.25 23.9538V26.5C10.25 27.4665 11.0335 28.25 12 28.25H14C14.9665 28.25 15.75 27.4665 15.75 26.5V25.75H17C17.6904 25.75 18.25 25.1904 18.25 24.5V23.75H19.0858C19.5499 23.75 19.995 23.5656 20.3232 23.2374L21.6092 21.9514C21.6738 21.8868 21.8277 21.8298 22.033 21.9045C22.6476 22.1283 23.3104 22.25 24 22.25C27.1756 22.25 29.75 19.6756 29.75 16.5C29.75 13.3244 27.1756 10.75 24 10.75ZM25 16.5C25.5523 16.5 26 16.0523 26 15.5C26 14.9477 25.5523 14.5 25 14.5C24.4477 14.5 24 14.9477 24 15.5C24 16.0523 24.4477 16.5 25 16.5Z",
|
|
1091
|
+
fill: "black"
|
|
1092
|
+
}
|
|
1093
|
+
)
|
|
1094
|
+
] });
|
|
1095
|
+
}
|
|
963
1096
|
|
|
964
1097
|
// src/assets/icon/CloseEyeIcon.tsx
|
|
965
1098
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
@@ -1854,6 +1987,39 @@ function PhantomIcon({
|
|
|
1854
1987
|
) });
|
|
1855
1988
|
}
|
|
1856
1989
|
|
|
1990
|
+
// src/assets/icon/MoreIcon.tsx
|
|
1991
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1992
|
+
function MoreIcon({
|
|
1993
|
+
width = "11",
|
|
1994
|
+
height = "3",
|
|
1995
|
+
color = "black",
|
|
1996
|
+
...props
|
|
1997
|
+
}) {
|
|
1998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width, height, viewBox: "0 0 11 3", fill: "none", ...props, children: [
|
|
1999
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2000
|
+
"path",
|
|
2001
|
+
{
|
|
2002
|
+
d: "M2.3335 1.33325C2.3335 1.88554 1.88578 2.33325 1.3335 2.33325C0.781211 2.33325 0.333496 1.88554 0.333496 1.33325C0.333496 0.780967 0.781211 0.333252 1.3335 0.333252C1.88578 0.333252 2.3335 0.780967 2.3335 1.33325Z",
|
|
2003
|
+
fill: color
|
|
2004
|
+
}
|
|
2005
|
+
),
|
|
2006
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2007
|
+
"path",
|
|
2008
|
+
{
|
|
2009
|
+
d: "M6.3335 1.33325C6.3335 1.88554 5.88578 2.33325 5.3335 2.33325C4.78121 2.33325 4.3335 1.88554 4.3335 1.33325C4.3335 0.780967 4.78121 0.333252 5.3335 0.333252C5.88578 0.333252 6.3335 0.780967 6.3335 1.33325Z",
|
|
2010
|
+
fill: color
|
|
2011
|
+
}
|
|
2012
|
+
),
|
|
2013
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2014
|
+
"path",
|
|
2015
|
+
{
|
|
2016
|
+
d: "M10.3335 1.33325C10.3335 1.88554 9.88578 2.33325 9.3335 2.33325C8.78121 2.33325 8.3335 1.88554 8.3335 1.33325C8.3335 0.780967 8.78121 0.333252 9.3335 0.333252C9.88578 0.333252 10.3335 0.780967 10.3335 1.33325Z",
|
|
2017
|
+
fill: color
|
|
2018
|
+
}
|
|
2019
|
+
)
|
|
2020
|
+
] });
|
|
2021
|
+
}
|
|
2022
|
+
|
|
1857
2023
|
// src/hooks/useLayout.tsx
|
|
1858
2024
|
var useLayout_exports = {};
|
|
1859
2025
|
__export(useLayout_exports, {
|
|
@@ -1875,39 +2041,39 @@ function useDownMd() {
|
|
|
1875
2041
|
}
|
|
1876
2042
|
|
|
1877
2043
|
// src/hooks/useConfig.tsx
|
|
1878
|
-
var
|
|
2044
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1879
2045
|
var DEFAULT_WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
1880
2046
|
var WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
1881
2047
|
function useWalletConfig() {
|
|
1882
2048
|
const isDownMd = useDownMd();
|
|
1883
2049
|
const walletMap = {
|
|
1884
2050
|
evm: {
|
|
1885
|
-
icon: /* @__PURE__ */ (0,
|
|
1886
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2051
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(EVMDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
2052
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(EVMLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
1887
2053
|
name: "EVM",
|
|
1888
2054
|
method: "evm"
|
|
1889
2055
|
},
|
|
1890
2056
|
sol: {
|
|
1891
|
-
icon: /* @__PURE__ */ (0,
|
|
1892
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2057
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SOLDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
2058
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SOLLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
1893
2059
|
name: "SOL",
|
|
1894
2060
|
method: "sol"
|
|
1895
2061
|
},
|
|
1896
2062
|
btc: {
|
|
1897
|
-
icon: /* @__PURE__ */ (0,
|
|
1898
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2063
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(BTCDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
2064
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(BTCLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
1899
2065
|
name: "BTC",
|
|
1900
2066
|
method: "btc"
|
|
1901
2067
|
},
|
|
1902
2068
|
tron: {
|
|
1903
|
-
icon: /* @__PURE__ */ (0,
|
|
1904
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2069
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TRXDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
2070
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TRXLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
1905
2071
|
name: "TRON",
|
|
1906
2072
|
method: "tron"
|
|
1907
2073
|
},
|
|
1908
2074
|
ton: {
|
|
1909
|
-
icon: /* @__PURE__ */ (0,
|
|
1910
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2075
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TonLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
2076
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TonLightIcon2, { size: isDownMd ? 36 : 40 }),
|
|
1911
2077
|
name: "TON",
|
|
1912
2078
|
method: "ton"
|
|
1913
2079
|
}
|
|
@@ -2232,6 +2398,11 @@ function useUserInfo() {
|
|
|
2232
2398
|
window.addEventListener("message", authMessageHandle);
|
|
2233
2399
|
});
|
|
2234
2400
|
};
|
|
2401
|
+
const invite = async (invite_code) => {
|
|
2402
|
+
return await userInviteApi({
|
|
2403
|
+
invite_code
|
|
2404
|
+
});
|
|
2405
|
+
};
|
|
2235
2406
|
return {
|
|
2236
2407
|
loginByMethod,
|
|
2237
2408
|
loginByTelegram,
|
|
@@ -2255,7 +2426,8 @@ function useUserInfo() {
|
|
|
2255
2426
|
auth,
|
|
2256
2427
|
login: loginMethod,
|
|
2257
2428
|
bind,
|
|
2258
|
-
getAuthInfo
|
|
2429
|
+
getAuthInfo,
|
|
2430
|
+
invite
|
|
2259
2431
|
};
|
|
2260
2432
|
}
|
|
2261
2433
|
|
|
@@ -2324,7 +2496,7 @@ __export(ui_exports, {
|
|
|
2324
2496
|
});
|
|
2325
2497
|
|
|
2326
2498
|
// src/ui/Button/index.tsx
|
|
2327
|
-
var
|
|
2499
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2328
2500
|
function Button({
|
|
2329
2501
|
size = "df",
|
|
2330
2502
|
disabled = false,
|
|
@@ -2343,7 +2515,7 @@ function Button({
|
|
|
2343
2515
|
onClick && onClick();
|
|
2344
2516
|
}
|
|
2345
2517
|
};
|
|
2346
|
-
return /* @__PURE__ */ (0,
|
|
2518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2347
2519
|
"button",
|
|
2348
2520
|
{
|
|
2349
2521
|
type,
|
|
@@ -2353,14 +2525,14 @@ function Button({
|
|
|
2353
2525
|
...style
|
|
2354
2526
|
},
|
|
2355
2527
|
onClick: onAction,
|
|
2356
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
2528
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
|
|
2357
2529
|
}
|
|
2358
2530
|
);
|
|
2359
2531
|
}
|
|
2360
2532
|
|
|
2361
2533
|
// src/ui/Overlay/index.tsx
|
|
2362
2534
|
var import_react4 = require("react");
|
|
2363
|
-
var
|
|
2535
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2364
2536
|
function Overlay({
|
|
2365
2537
|
isOpen = false,
|
|
2366
2538
|
children,
|
|
@@ -2376,7 +2548,7 @@ function Overlay({
|
|
|
2376
2548
|
document.body.style.overflow = "";
|
|
2377
2549
|
};
|
|
2378
2550
|
}, [isOpen]);
|
|
2379
|
-
return isOpen ? /* @__PURE__ */ (0,
|
|
2551
|
+
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2380
2552
|
"div",
|
|
2381
2553
|
{
|
|
2382
2554
|
className: "matchid-overlay",
|
|
@@ -2385,11 +2557,11 @@ function Overlay({
|
|
|
2385
2557
|
},
|
|
2386
2558
|
children
|
|
2387
2559
|
}
|
|
2388
|
-
) : /* @__PURE__ */ (0,
|
|
2560
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, {});
|
|
2389
2561
|
}
|
|
2390
2562
|
|
|
2391
2563
|
// src/ui/Drawer/index.tsx
|
|
2392
|
-
var
|
|
2564
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2393
2565
|
function Drawer({
|
|
2394
2566
|
children,
|
|
2395
2567
|
showClose = true,
|
|
@@ -2400,22 +2572,22 @@ function Drawer({
|
|
|
2400
2572
|
onBack
|
|
2401
2573
|
}) {
|
|
2402
2574
|
if (!isOpen) {
|
|
2403
|
-
return /* @__PURE__ */ (0,
|
|
2575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_jsx_runtime55.Fragment, {});
|
|
2404
2576
|
}
|
|
2405
|
-
return /* @__PURE__ */ (0,
|
|
2406
|
-
/* @__PURE__ */ (0,
|
|
2407
|
-
/* @__PURE__ */ (0,
|
|
2408
|
-
onBack && /* @__PURE__ */ (0,
|
|
2577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "matchid-drawer", children: [
|
|
2578
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: `matchid-drawer-header matchid-flex`, children: [
|
|
2579
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: `matchid-drawer-header-content matchid-flex`, children: [
|
|
2580
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ArrowLeftIcon, { height: 25, width: 24, className: "matchid-drawer-header-back", onClick: onBack }),
|
|
2409
2581
|
title
|
|
2410
2582
|
] }),
|
|
2411
|
-
showClose && /* @__PURE__ */ (0,
|
|
2583
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
|
|
2412
2584
|
] }),
|
|
2413
2585
|
children
|
|
2414
2586
|
] }) });
|
|
2415
2587
|
}
|
|
2416
2588
|
|
|
2417
2589
|
// src/ui/Field/index.tsx
|
|
2418
|
-
var
|
|
2590
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2419
2591
|
function Field({
|
|
2420
2592
|
label,
|
|
2421
2593
|
children,
|
|
@@ -2423,13 +2595,13 @@ function Field({
|
|
|
2423
2595
|
required,
|
|
2424
2596
|
className = ""
|
|
2425
2597
|
}) {
|
|
2426
|
-
return /* @__PURE__ */ (0,
|
|
2427
|
-
/* @__PURE__ */ (0,
|
|
2428
|
-
required && /* @__PURE__ */ (0,
|
|
2598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
|
|
2599
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "matchid-field-label", children: [
|
|
2600
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "matchid-field-required", children: "*" }),
|
|
2429
2601
|
label
|
|
2430
2602
|
] }),
|
|
2431
2603
|
children,
|
|
2432
|
-
error && /* @__PURE__ */ (0,
|
|
2604
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "matchid-field-error", children: error })
|
|
2433
2605
|
] });
|
|
2434
2606
|
}
|
|
2435
2607
|
|
|
@@ -2437,7 +2609,7 @@ function Field({
|
|
|
2437
2609
|
var import_react5 = require("react");
|
|
2438
2610
|
|
|
2439
2611
|
// src/ui/Modal/index.tsx
|
|
2440
|
-
var
|
|
2612
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2441
2613
|
function Modal({
|
|
2442
2614
|
children,
|
|
2443
2615
|
isOpen,
|
|
@@ -2445,10 +2617,10 @@ function Modal({
|
|
|
2445
2617
|
zIndex = 100,
|
|
2446
2618
|
className = ""
|
|
2447
2619
|
}) {
|
|
2448
|
-
return /* @__PURE__ */ (0,
|
|
2620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: `matchid-modal ${className}`, style: {
|
|
2449
2621
|
width
|
|
2450
2622
|
}, children: [
|
|
2451
|
-
/* @__PURE__ */ (0,
|
|
2623
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "matchid-modal-mobile-header" }),
|
|
2452
2624
|
children
|
|
2453
2625
|
] }) });
|
|
2454
2626
|
}
|
|
@@ -2462,20 +2634,20 @@ function ModalWithHeader({
|
|
|
2462
2634
|
...props
|
|
2463
2635
|
}) {
|
|
2464
2636
|
const isDownMd = useDownMd();
|
|
2465
|
-
return /* @__PURE__ */ (0,
|
|
2466
|
-
/* @__PURE__ */ (0,
|
|
2467
|
-
/* @__PURE__ */ (0,
|
|
2468
|
-
onBack && /* @__PURE__ */ (0,
|
|
2469
|
-
/* @__PURE__ */ (0,
|
|
2637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Modal, { ...props, children: [
|
|
2638
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
|
|
2639
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "matchid-modal-header-content", children: [
|
|
2640
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
|
|
2641
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "matchid-modal-header-title", children: title })
|
|
2470
2642
|
] }),
|
|
2471
|
-
onClose && /* @__PURE__ */ (0,
|
|
2643
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
|
|
2472
2644
|
] }),
|
|
2473
2645
|
children
|
|
2474
2646
|
] });
|
|
2475
2647
|
}
|
|
2476
2648
|
|
|
2477
2649
|
// src/ui/ModalDrawer/index.tsx
|
|
2478
|
-
var
|
|
2650
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2479
2651
|
function ModalDrawer({
|
|
2480
2652
|
title,
|
|
2481
2653
|
drawerTitleVisible = true,
|
|
@@ -2483,9 +2655,9 @@ function ModalDrawer({
|
|
|
2483
2655
|
}) {
|
|
2484
2656
|
const isDownMd = useDownMd();
|
|
2485
2657
|
if (isDownMd) {
|
|
2486
|
-
return /* @__PURE__ */ (0,
|
|
2658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ModalWithHeader, { ...props, title });
|
|
2487
2659
|
}
|
|
2488
|
-
return /* @__PURE__ */ (0,
|
|
2660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
|
|
2489
2661
|
}
|
|
2490
2662
|
|
|
2491
2663
|
// src/assets/img/confirm.gif
|
|
@@ -2541,7 +2713,7 @@ function useHash({
|
|
|
2541
2713
|
}
|
|
2542
2714
|
|
|
2543
2715
|
// src/ui/HashPanel/index.tsx
|
|
2544
|
-
var
|
|
2716
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2545
2717
|
function HashPanel({
|
|
2546
2718
|
hash,
|
|
2547
2719
|
chain,
|
|
@@ -2600,14 +2772,14 @@ function HashPanel({
|
|
|
2600
2772
|
}
|
|
2601
2773
|
}, [hashQuery.data]);
|
|
2602
2774
|
const link = chain ? `${chain?.blockExplorers?.default.url}/tx/${hash}` : "";
|
|
2603
|
-
return /* @__PURE__ */ (0,
|
|
2775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
2604
2776
|
ModalDrawer,
|
|
2605
2777
|
{
|
|
2606
2778
|
isOpen,
|
|
2607
2779
|
showClose: true,
|
|
2608
2780
|
onClose,
|
|
2609
2781
|
zIndex,
|
|
2610
|
-
title: /* @__PURE__ */ (0,
|
|
2782
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
2611
2783
|
"div",
|
|
2612
2784
|
{
|
|
2613
2785
|
className: "matchid-hashpanel-header",
|
|
@@ -2617,29 +2789,29 @@ function HashPanel({
|
|
|
2617
2789
|
children: statusValue.text
|
|
2618
2790
|
}
|
|
2619
2791
|
),
|
|
2620
|
-
children: /* @__PURE__ */ (0,
|
|
2621
|
-
/* @__PURE__ */ (0,
|
|
2622
|
-
/* @__PURE__ */ (0,
|
|
2792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "matchid-hashpanel-box", children: [
|
|
2793
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "matchid-hashpanel-content", children: [
|
|
2794
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: `matchid-hashpanel-status`, style: {
|
|
2623
2795
|
color: statusValue.color
|
|
2624
2796
|
}, children: statusValue.text }),
|
|
2625
|
-
/* @__PURE__ */ (0,
|
|
2626
|
-
hash && /* @__PURE__ */ (0,
|
|
2797
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("img", { src: statusValue.icon, alt: statusValue.text, className: `matchid-hashpanel-img` }),
|
|
2798
|
+
hash && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
|
|
2627
2799
|
"Hash:",
|
|
2628
|
-
/* @__PURE__ */ (0,
|
|
2800
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("a", { href: link, target: "_blank", children: hash })
|
|
2629
2801
|
] })
|
|
2630
2802
|
] }),
|
|
2631
|
-
/* @__PURE__ */ (0,
|
|
2803
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
|
|
2632
2804
|
] })
|
|
2633
2805
|
}
|
|
2634
2806
|
);
|
|
2635
2807
|
}
|
|
2636
2808
|
function HashPanel_default(props) {
|
|
2637
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
2809
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(HashPanel, { ...props });
|
|
2638
2810
|
}
|
|
2639
2811
|
|
|
2640
2812
|
// src/ui/Input/index.tsx
|
|
2641
2813
|
var import_react6 = require("react");
|
|
2642
|
-
var
|
|
2814
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2643
2815
|
function Input({
|
|
2644
2816
|
onChange,
|
|
2645
2817
|
type,
|
|
@@ -2649,17 +2821,17 @@ function Input({
|
|
|
2649
2821
|
}) {
|
|
2650
2822
|
const [inputType, setInputType] = (0, import_react6.useState)(type);
|
|
2651
2823
|
const isDownMd = useDownMd();
|
|
2652
|
-
return /* @__PURE__ */ (0,
|
|
2824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
2653
2825
|
"div",
|
|
2654
2826
|
{
|
|
2655
2827
|
className: `matchid-input-box ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
2656
2828
|
children: [
|
|
2657
|
-
/* @__PURE__ */ (0,
|
|
2658
|
-
props.value && props.value.length > 0 && /* @__PURE__ */ (0,
|
|
2829
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" }),
|
|
2830
|
+
props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
|
|
2659
2831
|
if (onChange) {
|
|
2660
2832
|
onChange({ target: { value: "" } });
|
|
2661
2833
|
}
|
|
2662
|
-
}, children: /* @__PURE__ */ (0,
|
|
2834
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2663
2835
|
DeleteRoundIcon,
|
|
2664
2836
|
{
|
|
2665
2837
|
height: isDownMd ? 16 : 21,
|
|
@@ -2667,9 +2839,9 @@ function Input({
|
|
|
2667
2839
|
color: "var(--matchid-input-delete-icon-color)"
|
|
2668
2840
|
}
|
|
2669
2841
|
) }),
|
|
2670
|
-
type === "password" && /* @__PURE__ */ (0,
|
|
2842
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
|
|
2671
2843
|
setInputType(inputType === "password" ? "text" : "password");
|
|
2672
|
-
}, children: inputType === "password" ? /* @__PURE__ */ (0,
|
|
2844
|
+
}, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
|
|
2673
2845
|
after
|
|
2674
2846
|
]
|
|
2675
2847
|
}
|
|
@@ -2678,7 +2850,7 @@ function Input({
|
|
|
2678
2850
|
|
|
2679
2851
|
// src/ui/Popover/index.tsx
|
|
2680
2852
|
var import_react7 = require("react");
|
|
2681
|
-
var
|
|
2853
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2682
2854
|
function Popover({
|
|
2683
2855
|
children,
|
|
2684
2856
|
content,
|
|
@@ -2688,7 +2860,7 @@ function Popover({
|
|
|
2688
2860
|
gap = "20px"
|
|
2689
2861
|
}) {
|
|
2690
2862
|
const [active, setActive] = (0, import_react7.useState)(false);
|
|
2691
|
-
return children && /* @__PURE__ */ (0,
|
|
2863
|
+
return children && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
2692
2864
|
"div",
|
|
2693
2865
|
{
|
|
2694
2866
|
onClick: () => {
|
|
@@ -2699,16 +2871,16 @@ function Popover({
|
|
|
2699
2871
|
className: `matchid-popover-box matchid-popover-${position} matchid-popover-${type} ${className} ${type == "click" && active ? "matchid-popover-click-active" : ""}`,
|
|
2700
2872
|
children: [
|
|
2701
2873
|
children,
|
|
2702
|
-
/* @__PURE__ */ (0,
|
|
2874
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { style: {
|
|
2703
2875
|
paddingTop: gap
|
|
2704
|
-
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0,
|
|
2876
|
+
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: `matchid-popover-content`, children: content }) })
|
|
2705
2877
|
]
|
|
2706
2878
|
}
|
|
2707
2879
|
);
|
|
2708
2880
|
}
|
|
2709
2881
|
|
|
2710
2882
|
// src/ui/Switch/index.tsx
|
|
2711
|
-
var
|
|
2883
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2712
2884
|
function Switch({
|
|
2713
2885
|
size = "default",
|
|
2714
2886
|
checked = false,
|
|
@@ -2723,12 +2895,12 @@ function Switch({
|
|
|
2723
2895
|
onChange && onChange(!checked);
|
|
2724
2896
|
}
|
|
2725
2897
|
};
|
|
2726
|
-
return /* @__PURE__ */ (0,
|
|
2898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { onClick, className: `matchid-switch matchid-switch-${size} ${checked ? "matchid-switch-checked" : ""} ${disabled ? "matchid-switch-disabled" : ""} ${loading ? "matchid-switch-loading" : ""}`, ...props, children: loading ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(LoadingIcon_default, { className: "matchid-switch-loading-icon", size: size == "default" ? 24 : 18, color: "var(--matchid-swicth-loading-color)" }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "matchid-switch-ball" }) });
|
|
2727
2899
|
}
|
|
2728
2900
|
|
|
2729
2901
|
// src/ui/AlphaAvatar/index.tsx
|
|
2730
2902
|
var import_react8 = require("react");
|
|
2731
|
-
var
|
|
2903
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2732
2904
|
function AlphaAvatar({
|
|
2733
2905
|
name,
|
|
2734
2906
|
size = "default",
|
|
@@ -2745,7 +2917,7 @@ function AlphaAvatar({
|
|
|
2745
2917
|
return "";
|
|
2746
2918
|
}, [name]);
|
|
2747
2919
|
const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
|
|
2748
|
-
return /* @__PURE__ */ (0,
|
|
2920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
2749
2921
|
width: numberSize,
|
|
2750
2922
|
height: numberSize,
|
|
2751
2923
|
fontSize: Math.ceil(numberSize / 2),
|
|
@@ -2754,7 +2926,7 @@ function AlphaAvatar({
|
|
|
2754
2926
|
}
|
|
2755
2927
|
|
|
2756
2928
|
// src/ui/Radio/index.tsx
|
|
2757
|
-
var
|
|
2929
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2758
2930
|
function Radio({
|
|
2759
2931
|
checked = false,
|
|
2760
2932
|
onChange,
|
|
@@ -2763,20 +2935,20 @@ function Radio({
|
|
|
2763
2935
|
className = "",
|
|
2764
2936
|
style = {}
|
|
2765
2937
|
}) {
|
|
2766
|
-
return /* @__PURE__ */ (0,
|
|
2938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
|
|
2767
2939
|
width: size,
|
|
2768
2940
|
height: size,
|
|
2769
2941
|
...style,
|
|
2770
2942
|
// @ts-ignore
|
|
2771
2943
|
"--matchid-radio-checked": color
|
|
2772
|
-
}, children: checked && /* @__PURE__ */ (0,
|
|
2944
|
+
}, children: checked && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: `matchid-radio-content`, style: {
|
|
2773
2945
|
width: Math.floor(size * 0.7),
|
|
2774
2946
|
height: Math.floor(size * 0.7)
|
|
2775
2947
|
} }) });
|
|
2776
2948
|
}
|
|
2777
2949
|
|
|
2778
2950
|
// src/ui/Skeleton/index.tsx
|
|
2779
|
-
var
|
|
2951
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2780
2952
|
var Skeleton = ({
|
|
2781
2953
|
style = {},
|
|
2782
2954
|
className = "",
|
|
@@ -2787,7 +2959,7 @@ var Skeleton = ({
|
|
|
2787
2959
|
children
|
|
2788
2960
|
}) => {
|
|
2789
2961
|
if (!loading) {
|
|
2790
|
-
return /* @__PURE__ */ (0,
|
|
2962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_jsx_runtime65.Fragment, { children });
|
|
2791
2963
|
}
|
|
2792
2964
|
const skeletonStyle = {
|
|
2793
2965
|
width,
|
|
@@ -2795,7 +2967,7 @@ var Skeleton = ({
|
|
|
2795
2967
|
borderRadius: radius,
|
|
2796
2968
|
...style
|
|
2797
2969
|
};
|
|
2798
|
-
return /* @__PURE__ */ (0,
|
|
2970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2799
2971
|
"div",
|
|
2800
2972
|
{
|
|
2801
2973
|
className: "matchid-skeleton " + className,
|
|
@@ -2806,15 +2978,15 @@ var Skeleton = ({
|
|
|
2806
2978
|
var Skeleton_default = Skeleton;
|
|
2807
2979
|
|
|
2808
2980
|
// src/ui/Tabs/index.tsx
|
|
2809
|
-
var
|
|
2981
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2810
2982
|
function Tabs(props) {
|
|
2811
|
-
return /* @__PURE__ */ (0,
|
|
2812
|
-
return /* @__PURE__ */ (0,
|
|
2983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: `matchid-tabs`, children: props.tabs.map((tab, index) => {
|
|
2984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { onClick: () => props.setActiveTab(index), className: `matchid-tab ${props.activeTab === index ? "matchid-tab-active" : ""}`, children: tab }, index);
|
|
2813
2985
|
}) });
|
|
2814
2986
|
}
|
|
2815
2987
|
|
|
2816
2988
|
// src/context/ModalContext.tsx
|
|
2817
|
-
var
|
|
2989
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2818
2990
|
var ModalContext = (0, import_react9.createContext)(null);
|
|
2819
2991
|
function ModalProvider({ children }) {
|
|
2820
2992
|
const [modalState, setModalState] = (0, import_react9.useState)({
|
|
@@ -2854,7 +3026,7 @@ function ModalProvider({ children }) {
|
|
|
2854
3026
|
visible: true,
|
|
2855
3027
|
index: modalIndex,
|
|
2856
3028
|
zIndex: newZIndex,
|
|
2857
|
-
content: /* @__PURE__ */ (0,
|
|
3029
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ModalDrawer, { showClose: true, isOpen: true, onClose: () => closeModal(modalIndex), title: props.title, zIndex: newZIndex, onBack: props.onBack, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(props.content, { close: () => closeModal(modalIndex), zIndex: newZIndex }) })
|
|
2858
3030
|
}],
|
|
2859
3031
|
highestZIndex: newZIndex
|
|
2860
3032
|
};
|
|
@@ -2866,7 +3038,7 @@ function ModalProvider({ children }) {
|
|
|
2866
3038
|
document.body
|
|
2867
3039
|
) : null
|
|
2868
3040
|
);
|
|
2869
|
-
return /* @__PURE__ */ (0,
|
|
3041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(ModalContext.Provider, { value: { show, open }, children: [
|
|
2870
3042
|
children,
|
|
2871
3043
|
modalElements
|
|
2872
3044
|
] });
|
|
@@ -2910,7 +3082,7 @@ var useTransactionStore = (0, import_zustand4.create)((0, import_middleware2.dev
|
|
|
2910
3082
|
var useTransactionStore_default = useTransactionStore;
|
|
2911
3083
|
|
|
2912
3084
|
// src/hooks/useWallet.tsx
|
|
2913
|
-
var
|
|
3085
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2914
3086
|
var AppClientId = "react-sdk-" + getVersion();
|
|
2915
3087
|
function useWallet() {
|
|
2916
3088
|
const { address, wallet: walletConfig } = useLocalStore_default();
|
|
@@ -3083,7 +3255,7 @@ function useWallet() {
|
|
|
3083
3255
|
address: evmAccount.address
|
|
3084
3256
|
});
|
|
3085
3257
|
modal.show((props) => {
|
|
3086
|
-
return /* @__PURE__ */ (0,
|
|
3258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
|
|
3087
3259
|
});
|
|
3088
3260
|
clearInterval(window.matchProvider.transactionMessageIntervalMap[transactionId].interval);
|
|
3089
3261
|
delete window.matchProvider.transactionMessageIntervalMap[transactionId];
|
|
@@ -3160,7 +3332,7 @@ function useCopyClipboard(timeout = 500) {
|
|
|
3160
3332
|
// src/context/ToastContext.tsx
|
|
3161
3333
|
var import_react12 = require("react");
|
|
3162
3334
|
var import_react_dom2 = require("react-dom");
|
|
3163
|
-
var
|
|
3335
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3164
3336
|
var ToastContext = (0, import_react12.createContext)(null);
|
|
3165
3337
|
function ToastProvider({ children, zIndex = 299 }) {
|
|
3166
3338
|
const [toasts, setToasts] = (0, import_react12.useState)([]);
|
|
@@ -3173,28 +3345,28 @@ function ToastProvider({ children, zIndex = 299 }) {
|
|
|
3173
3345
|
setTimeout(() => removeToast(id), timeout);
|
|
3174
3346
|
}, [removeToast]);
|
|
3175
3347
|
const success = (0, import_react12.useCallback)((text, timeout) => {
|
|
3176
|
-
show({ icon: /* @__PURE__ */ (0,
|
|
3348
|
+
show({ icon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(CheckRoundIcon, { color: "#2FCC00", size: 24 }), text, timeout });
|
|
3177
3349
|
}, [show]);
|
|
3178
3350
|
const error = (0, import_react12.useCallback)((text, timeout) => {
|
|
3179
|
-
show({ icon: /* @__PURE__ */ (0,
|
|
3351
|
+
show({ icon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ErrorRoundIcon, { size: 24 }), text, timeout });
|
|
3180
3352
|
}, [show]);
|
|
3181
3353
|
const ToastComponent = (0, import_react_dom2.createPortal)(
|
|
3182
|
-
/* @__PURE__ */ (0,
|
|
3354
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "matchid-toast-box", style: {
|
|
3183
3355
|
zIndex
|
|
3184
|
-
}, children: toasts.reverse().map(({ id, icon, text }) => /* @__PURE__ */ (0,
|
|
3356
|
+
}, children: toasts.reverse().map(({ id, icon, text }) => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
3185
3357
|
"div",
|
|
3186
3358
|
{
|
|
3187
3359
|
className: "matchid-toast",
|
|
3188
3360
|
children: [
|
|
3189
|
-
icon && /* @__PURE__ */ (0,
|
|
3190
|
-
/* @__PURE__ */ (0,
|
|
3361
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: icon }),
|
|
3362
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: text })
|
|
3191
3363
|
]
|
|
3192
3364
|
},
|
|
3193
3365
|
id
|
|
3194
3366
|
)) }),
|
|
3195
3367
|
document.body
|
|
3196
3368
|
);
|
|
3197
|
-
return /* @__PURE__ */ (0,
|
|
3369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(ToastContext.Provider, { value: { show, success, error }, children: [
|
|
3198
3370
|
children,
|
|
3199
3371
|
ToastComponent
|
|
3200
3372
|
] });
|
|
@@ -3339,7 +3511,7 @@ function useWalletAssetListQuery({
|
|
|
3339
3511
|
var import_react13 = require("react");
|
|
3340
3512
|
var import_viem5 = require("viem");
|
|
3341
3513
|
var import_react_intl = require("react-intl");
|
|
3342
|
-
var
|
|
3514
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3343
3515
|
function useMatchChain() {
|
|
3344
3516
|
const chainListQuery = useChainListQuery();
|
|
3345
3517
|
const modal = useModal();
|
|
@@ -3370,28 +3542,28 @@ function useMatchChain() {
|
|
|
3370
3542
|
const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
|
|
3371
3543
|
const [selectedChainId, setSelectedChainId] = (0, import_react13.useState)(storeChainId2);
|
|
3372
3544
|
const isDownMd = useDownMd();
|
|
3373
|
-
return /* @__PURE__ */ (0,
|
|
3374
|
-
/* @__PURE__ */ (0,
|
|
3375
|
-
return /* @__PURE__ */ (0,
|
|
3545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: `matchid-change-network-box`, children: [
|
|
3546
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
|
|
3547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
3376
3548
|
"div",
|
|
3377
3549
|
{
|
|
3378
3550
|
onClick: () => setSelectedChainId(item.id),
|
|
3379
3551
|
className: `matchid-change-network-item ${selectedChainId == item.id ? "matchid-change-network-selected" : ""}`,
|
|
3380
3552
|
children: [
|
|
3381
|
-
/* @__PURE__ */ (0,
|
|
3382
|
-
/* @__PURE__ */ (0,
|
|
3383
|
-
/* @__PURE__ */ (0,
|
|
3553
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
|
|
3554
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
|
|
3555
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
|
|
3384
3556
|
] }),
|
|
3385
|
-
/* @__PURE__ */ (0,
|
|
3557
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
|
|
3386
3558
|
]
|
|
3387
3559
|
},
|
|
3388
3560
|
index
|
|
3389
3561
|
);
|
|
3390
3562
|
}) }),
|
|
3391
|
-
/* @__PURE__ */ (0,
|
|
3563
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
|
|
3392
3564
|
setChainId2(selectedChainId || 0);
|
|
3393
3565
|
close();
|
|
3394
|
-
}, block: true, children: /* @__PURE__ */ (0,
|
|
3566
|
+
}, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react_intl.FormattedMessage, { id: "confirm" }) })
|
|
3395
3567
|
] });
|
|
3396
3568
|
}
|
|
3397
3569
|
const showChangeNetwork = () => {
|
|
@@ -3431,6 +3603,7 @@ var components_exports = {};
|
|
|
3431
3603
|
__export(components_exports, {
|
|
3432
3604
|
BTCModal: () => BTCModal,
|
|
3433
3605
|
Button: () => Button,
|
|
3606
|
+
ContactCard: () => ContactCard,
|
|
3434
3607
|
ContactList: () => ContactList,
|
|
3435
3608
|
EVMModal: () => EVMModal,
|
|
3436
3609
|
EmailModal: () => EmailModal,
|
|
@@ -3461,7 +3634,7 @@ var import_react16 = require("react");
|
|
|
3461
3634
|
// src/components/EmailModal/StepEmail.tsx
|
|
3462
3635
|
var import_react14 = require("react");
|
|
3463
3636
|
var import_react_intl2 = require("react-intl");
|
|
3464
|
-
var
|
|
3637
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3465
3638
|
function StepEmail(props) {
|
|
3466
3639
|
const intl = (0, import_react_intl2.useIntl)();
|
|
3467
3640
|
const [emailVal, setEmailVal] = (0, import_react14.useState)("");
|
|
@@ -3476,10 +3649,10 @@ function StepEmail(props) {
|
|
|
3476
3649
|
const onContinue = async () => {
|
|
3477
3650
|
props.onContinue(emailVal);
|
|
3478
3651
|
};
|
|
3479
|
-
return /* @__PURE__ */ (0,
|
|
3480
|
-
/* @__PURE__ */ (0,
|
|
3652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "matchid-email-email-box", children: [
|
|
3653
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Field, { label: intl.formatMessage({
|
|
3481
3654
|
id: "emailAddress"
|
|
3482
|
-
}), children: /* @__PURE__ */ (0,
|
|
3655
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3483
3656
|
Input,
|
|
3484
3657
|
{
|
|
3485
3658
|
placeholder: intl.formatMessage({
|
|
@@ -3489,9 +3662,9 @@ function StepEmail(props) {
|
|
|
3489
3662
|
value: emailVal
|
|
3490
3663
|
}
|
|
3491
3664
|
) }),
|
|
3492
|
-
/* @__PURE__ */ (0,
|
|
3665
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Button, { disabled: !canContinue, style: {
|
|
3493
3666
|
marginTop: "64px"
|
|
3494
|
-
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
3667
|
+
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react_intl2.FormattedMessage, { id: "continue" }) })
|
|
3495
3668
|
] });
|
|
3496
3669
|
}
|
|
3497
3670
|
|
|
@@ -3505,7 +3678,7 @@ var NATIVE_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
|
3505
3678
|
|
|
3506
3679
|
// src/components/EmailModal/StepVerify.tsx
|
|
3507
3680
|
var import_react_intl3 = require("react-intl");
|
|
3508
|
-
var
|
|
3681
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3509
3682
|
function StepVerify(props) {
|
|
3510
3683
|
const intl = (0, import_react_intl3.useIntl)();
|
|
3511
3684
|
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
@@ -3582,17 +3755,17 @@ function StepVerify(props) {
|
|
|
3582
3755
|
setSubmitting(false);
|
|
3583
3756
|
}
|
|
3584
3757
|
};
|
|
3585
|
-
return /* @__PURE__ */ (0,
|
|
3586
|
-
/* @__PURE__ */ (0,
|
|
3587
|
-
/* @__PURE__ */ (0,
|
|
3588
|
-
/* @__PURE__ */ (0,
|
|
3589
|
-
/* @__PURE__ */ (0,
|
|
3590
|
-
/* @__PURE__ */ (0,
|
|
3758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "matchid-email-verify-box", children: [
|
|
3759
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "matchid-email-verify-header", children: [
|
|
3760
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
|
|
3761
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "matchid-email-verify-header-content", children: [
|
|
3762
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "matchid-email-verify-header-value", children: props.email }),
|
|
3763
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react_intl3.FormattedMessage, { id: "sendEmailTips" }) })
|
|
3591
3764
|
] })
|
|
3592
3765
|
] }),
|
|
3593
|
-
/* @__PURE__ */ (0,
|
|
3766
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Field, { label: intl.formatMessage({
|
|
3594
3767
|
id: "verificationCode"
|
|
3595
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
3768
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3596
3769
|
Input,
|
|
3597
3770
|
{
|
|
3598
3771
|
placeholder: intl.formatMessage({
|
|
@@ -3602,7 +3775,7 @@ function StepVerify(props) {
|
|
|
3602
3775
|
maxLength: codeLength,
|
|
3603
3776
|
onChange: (e) => setCode(e.target.value),
|
|
3604
3777
|
value: code,
|
|
3605
|
-
after: /* @__PURE__ */ (0,
|
|
3778
|
+
after: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3606
3779
|
Button,
|
|
3607
3780
|
{
|
|
3608
3781
|
highlight: true,
|
|
@@ -3621,13 +3794,13 @@ function StepVerify(props) {
|
|
|
3621
3794
|
)
|
|
3622
3795
|
}
|
|
3623
3796
|
) }),
|
|
3624
|
-
/* @__PURE__ */ (0,
|
|
3797
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Button, { disabled: !canContinue, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react_intl3.FormattedMessage, { id: "continue" }) })
|
|
3625
3798
|
] });
|
|
3626
3799
|
}
|
|
3627
3800
|
|
|
3628
3801
|
// src/components/EmailModal/index.tsx
|
|
3629
3802
|
var import_react_intl4 = require("react-intl");
|
|
3630
|
-
var
|
|
3803
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3631
3804
|
function EmailModal({
|
|
3632
3805
|
isOpen = false,
|
|
3633
3806
|
width = 480,
|
|
@@ -3644,7 +3817,7 @@ function EmailModal({
|
|
|
3644
3817
|
setEmailVal("");
|
|
3645
3818
|
}
|
|
3646
3819
|
}, [isOpen]);
|
|
3647
|
-
return /* @__PURE__ */ (0,
|
|
3820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3648
3821
|
ModalWithHeader,
|
|
3649
3822
|
{
|
|
3650
3823
|
isOpen,
|
|
@@ -3654,10 +3827,10 @@ function EmailModal({
|
|
|
3654
3827
|
id: "email"
|
|
3655
3828
|
}),
|
|
3656
3829
|
onBack: step == "verify" ? () => setStep("input") : onBack,
|
|
3657
|
-
children: step === "input" ? /* @__PURE__ */ (0,
|
|
3830
|
+
children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
|
|
3658
3831
|
setEmailVal(email);
|
|
3659
3832
|
setStep("verify");
|
|
3660
|
-
} }) : /* @__PURE__ */ (0,
|
|
3833
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(StepVerify, { email: emailVal, onSuccess: onLogin })
|
|
3661
3834
|
}
|
|
3662
3835
|
);
|
|
3663
3836
|
}
|
|
@@ -3687,7 +3860,7 @@ function useAppConfig() {
|
|
|
3687
3860
|
}
|
|
3688
3861
|
|
|
3689
3862
|
// src/components/LoginBox/index.tsx
|
|
3690
|
-
var
|
|
3863
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3691
3864
|
var RecommendItem = ({
|
|
3692
3865
|
icon,
|
|
3693
3866
|
name,
|
|
@@ -3696,20 +3869,20 @@ var RecommendItem = ({
|
|
|
3696
3869
|
children,
|
|
3697
3870
|
footer
|
|
3698
3871
|
}) => {
|
|
3699
|
-
return /* @__PURE__ */ (0,
|
|
3700
|
-
/* @__PURE__ */ (0,
|
|
3701
|
-
/* @__PURE__ */ (0,
|
|
3702
|
-
/* @__PURE__ */ (0,
|
|
3703
|
-
/* @__PURE__ */ (0,
|
|
3872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "matchid-login-recommend-method", children: [
|
|
3873
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "matchid-login-recommend-method-item", onClick, children: [
|
|
3874
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "matchid-login-recommend-method-content", children: [
|
|
3875
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "matchid-login-recommend-method-icon", children: icon }),
|
|
3876
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "matchid-login-recommend-method-name", children: name })
|
|
3704
3877
|
] }),
|
|
3705
|
-
footer ? footer : children ? /* @__PURE__ */ (0,
|
|
3878
|
+
footer ? footer : children ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3706
3879
|
ArrowDownIcon,
|
|
3707
3880
|
{
|
|
3708
3881
|
className: `matchid-login-recommend-method-arrow ${showChildren ? "matchid-login-recommend-method-arrow-active" : ""}`,
|
|
3709
3882
|
size: 20,
|
|
3710
3883
|
color: "var(--matchid-arrow-color)"
|
|
3711
3884
|
}
|
|
3712
|
-
) : /* @__PURE__ */ (0,
|
|
3885
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3713
3886
|
ArrowRightIcon,
|
|
3714
3887
|
{
|
|
3715
3888
|
className: "matchid-login-recommend-method-arrow",
|
|
@@ -3718,7 +3891,7 @@ var RecommendItem = ({
|
|
|
3718
3891
|
}
|
|
3719
3892
|
)
|
|
3720
3893
|
] }),
|
|
3721
|
-
children && /* @__PURE__ */ (0,
|
|
3894
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3722
3895
|
"div",
|
|
3723
3896
|
{
|
|
3724
3897
|
className: `matchid-login-recommend-method-popover ${showChildren ? "matchid-login-recommend-method-popover-active" : ""}`,
|
|
@@ -3783,75 +3956,75 @@ function LoginBox({
|
|
|
3783
3956
|
const isDownMd = useDownMd();
|
|
3784
3957
|
const methodMap = {
|
|
3785
3958
|
wallet: {
|
|
3786
|
-
icon: /* @__PURE__ */ (0,
|
|
3959
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(WalletIcon, { size: isDownMd ? 36 : 40 }),
|
|
3787
3960
|
name: intl.formatMessage({ id: "wallet" }),
|
|
3788
3961
|
onClick: () => setShowWallet(!showWallet),
|
|
3789
3962
|
type: "wallet"
|
|
3790
3963
|
},
|
|
3791
3964
|
email: {
|
|
3792
|
-
icon: /* @__PURE__ */ (0,
|
|
3965
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
|
|
3793
3966
|
name: intl.formatMessage({ id: "email" }),
|
|
3794
3967
|
onClick: () => {
|
|
3795
3968
|
setEmailOpen(true);
|
|
3796
3969
|
}
|
|
3797
3970
|
},
|
|
3798
3971
|
google: {
|
|
3799
|
-
icon: /* @__PURE__ */ (0,
|
|
3972
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(GoogleIcon, { size: isDownMd ? 36 : 40 }),
|
|
3800
3973
|
name: "Google",
|
|
3801
3974
|
onClick: () => login("google")
|
|
3802
3975
|
},
|
|
3803
3976
|
twitter: {
|
|
3804
|
-
icon: /* @__PURE__ */ (0,
|
|
3977
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(XIcon, { size: isDownMd ? 36 : 40 }),
|
|
3805
3978
|
name: "X",
|
|
3806
3979
|
onClick: () => login("twitter")
|
|
3807
3980
|
},
|
|
3808
3981
|
telegram: {
|
|
3809
|
-
icon: /* @__PURE__ */ (0,
|
|
3982
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TelegramIcon, { size: isDownMd ? 36 : 40 }),
|
|
3810
3983
|
name: "Telegram",
|
|
3811
3984
|
onClick: () => login("telegram")
|
|
3812
3985
|
},
|
|
3813
3986
|
github: {
|
|
3814
|
-
icon: /* @__PURE__ */ (0,
|
|
3987
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(GithubIcon, { size: isDownMd ? 36 : 40 }),
|
|
3815
3988
|
name: "Github",
|
|
3816
3989
|
onClick: () => login("github")
|
|
3817
3990
|
},
|
|
3818
3991
|
discord: {
|
|
3819
|
-
icon: /* @__PURE__ */ (0,
|
|
3992
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(DiscordIcon, { size: isDownMd ? 36 : 40 }),
|
|
3820
3993
|
name: "Discord",
|
|
3821
3994
|
onClick: () => login("discord")
|
|
3822
3995
|
},
|
|
3823
3996
|
linkedin: {
|
|
3824
|
-
icon: /* @__PURE__ */ (0,
|
|
3997
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
|
|
3825
3998
|
name: "LinkedIn",
|
|
3826
3999
|
onClick: () => login("linkedin")
|
|
3827
4000
|
},
|
|
3828
4001
|
facebook: {
|
|
3829
|
-
icon: /* @__PURE__ */ (0,
|
|
4002
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(FacebookIcon, { size: isDownMd ? 36 : 40 }),
|
|
3830
4003
|
name: "Facebook",
|
|
3831
4004
|
onClick: () => login("facebook")
|
|
3832
4005
|
},
|
|
3833
4006
|
youtube: {
|
|
3834
|
-
icon: /* @__PURE__ */ (0,
|
|
4007
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
|
|
3835
4008
|
name: "Youtube",
|
|
3836
4009
|
onClick: () => login("youtube")
|
|
3837
4010
|
}
|
|
3838
4011
|
};
|
|
3839
4012
|
const { walletMap } = useWalletConfig();
|
|
3840
|
-
return /* @__PURE__ */ (0,
|
|
3841
|
-
(!inModal || !emailOpen) && /* @__PURE__ */ (0,
|
|
3842
|
-
/* @__PURE__ */ (0,
|
|
3843
|
-
return /* @__PURE__ */ (0,
|
|
4013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
|
|
4014
|
+
(!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "matchid-login-box", children: [
|
|
4015
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
|
|
4016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3844
4017
|
RecommendItem,
|
|
3845
4018
|
{
|
|
3846
4019
|
icon: methodMap[m]?.icon,
|
|
3847
4020
|
name: methodMap[m]?.name,
|
|
3848
4021
|
onClick: methodMap[m]?.onClick,
|
|
3849
4022
|
showChildren: m == "wallet" && showWallet,
|
|
3850
|
-
children: m == "wallet" && /* @__PURE__ */ (0,
|
|
3851
|
-
/* @__PURE__ */ (0,
|
|
3852
|
-
/* @__PURE__ */ (0,
|
|
4023
|
+
children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
|
|
4024
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
|
|
4025
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
|
|
3853
4026
|
const m2 = walletMap[n];
|
|
3854
|
-
return /* @__PURE__ */ (0,
|
|
4027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
3855
4028
|
"div",
|
|
3856
4029
|
{
|
|
3857
4030
|
className: "matchid-login-recommend-wallet-item",
|
|
@@ -3859,16 +4032,16 @@ function LoginBox({
|
|
|
3859
4032
|
login(m2.method);
|
|
3860
4033
|
},
|
|
3861
4034
|
children: [
|
|
3862
|
-
/* @__PURE__ */ (0,
|
|
3863
|
-
/* @__PURE__ */ (0,
|
|
3864
|
-
/* @__PURE__ */ (0,
|
|
4035
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
|
|
4036
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
|
|
4037
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3865
4038
|
"div",
|
|
3866
4039
|
{
|
|
3867
4040
|
className: "matchid-login-recommend-wallet-item-hover-icon",
|
|
3868
4041
|
children: m2.activeIcon
|
|
3869
4042
|
}
|
|
3870
4043
|
),
|
|
3871
|
-
/* @__PURE__ */ (0,
|
|
4044
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3872
4045
|
"span",
|
|
3873
4046
|
{
|
|
3874
4047
|
className: "matchid-login-recommend-wallet-item-name",
|
|
@@ -3876,7 +4049,7 @@ function LoginBox({
|
|
|
3876
4049
|
}
|
|
3877
4050
|
)
|
|
3878
4051
|
] }),
|
|
3879
|
-
/* @__PURE__ */ (0,
|
|
4052
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3880
4053
|
ArrowRightIcon,
|
|
3881
4054
|
{
|
|
3882
4055
|
className: "matchid-login-recommend-wallet-item-arrow",
|
|
@@ -3894,10 +4067,10 @@ function LoginBox({
|
|
|
3894
4067
|
m
|
|
3895
4068
|
);
|
|
3896
4069
|
}) }),
|
|
3897
|
-
methodConfig.methods.length > 0 && /* @__PURE__ */ (0,
|
|
3898
|
-
/* @__PURE__ */ (0,
|
|
3899
|
-
/* @__PURE__ */ (0,
|
|
3900
|
-
return /* @__PURE__ */ (0,
|
|
4070
|
+
methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "matchid-login-other", children: [
|
|
4071
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react_intl5.FormattedMessage, { id: "otherLoginMethods" }) }),
|
|
4072
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
4073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3901
4074
|
"div",
|
|
3902
4075
|
{
|
|
3903
4076
|
className: "matchid-login-method-item",
|
|
@@ -3910,7 +4083,7 @@ function LoginBox({
|
|
|
3910
4083
|
}) })
|
|
3911
4084
|
] })
|
|
3912
4085
|
] }),
|
|
3913
|
-
/* @__PURE__ */ (0,
|
|
4086
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3914
4087
|
EmailModal,
|
|
3915
4088
|
{
|
|
3916
4089
|
isOpen: emailOpen,
|
|
@@ -3930,40 +4103,40 @@ var import_react19 = require("react");
|
|
|
3930
4103
|
|
|
3931
4104
|
// src/components/LoginPanel/index.tsx
|
|
3932
4105
|
var import_react_intl6 = require("react-intl");
|
|
3933
|
-
var
|
|
4106
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
3934
4107
|
function LoginPanel({
|
|
3935
4108
|
header,
|
|
3936
4109
|
onClose,
|
|
3937
4110
|
...props
|
|
3938
4111
|
}) {
|
|
3939
4112
|
const isDownMd = useDownMd();
|
|
3940
|
-
return /* @__PURE__ */ (0,
|
|
3941
|
-
header ? header : /* @__PURE__ */ (0,
|
|
3942
|
-
/* @__PURE__ */ (0,
|
|
3943
|
-
/* @__PURE__ */ (0,
|
|
3944
|
-
/* @__PURE__ */ (0,
|
|
4113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "matchid-login-panel", children: [
|
|
4114
|
+
header ? header : /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "matchid-login-panel-header", children: [
|
|
4115
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "matchid-login-panel-header-content", children: [
|
|
4116
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react_intl6.FormattedMessage, { id: "loginTitle" }) }),
|
|
4117
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react_intl6.FormattedMessage, { id: "loginTips" }) })
|
|
3945
4118
|
] }),
|
|
3946
|
-
onClose && /* @__PURE__ */ (0,
|
|
4119
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
|
|
3947
4120
|
] }),
|
|
3948
|
-
/* @__PURE__ */ (0,
|
|
3949
|
-
/* @__PURE__ */ (0,
|
|
4121
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "matchid-login-panel-divide" }),
|
|
4122
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(LoginBox, { ...props }) })
|
|
3950
4123
|
] });
|
|
3951
4124
|
}
|
|
3952
4125
|
|
|
3953
4126
|
// src/components/LoginModal/index.tsx
|
|
3954
|
-
var
|
|
4127
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
3955
4128
|
function LoginModal({
|
|
3956
4129
|
isOpen = false,
|
|
3957
4130
|
width = 480,
|
|
3958
4131
|
...props
|
|
3959
4132
|
}) {
|
|
3960
4133
|
const { isLogin } = useUserInfo();
|
|
3961
|
-
return /* @__PURE__ */ (0,
|
|
4134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3962
4135
|
Modal,
|
|
3963
4136
|
{
|
|
3964
4137
|
isOpen: isOpen && !isLogin,
|
|
3965
4138
|
width,
|
|
3966
|
-
children: /* @__PURE__ */ (0,
|
|
4139
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(LoginPanel, { ...props, inModal: true })
|
|
3967
4140
|
}
|
|
3968
4141
|
);
|
|
3969
4142
|
}
|
|
@@ -3972,10 +4145,10 @@ function LoginModal({
|
|
|
3972
4145
|
var import_react18 = require("react");
|
|
3973
4146
|
|
|
3974
4147
|
// src/assets/icon/ProfileIcon.tsx
|
|
3975
|
-
var
|
|
4148
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
3976
4149
|
function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
3977
|
-
return /* @__PURE__ */ (0,
|
|
3978
|
-
/* @__PURE__ */ (0,
|
|
4150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
4151
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3979
4152
|
"path",
|
|
3980
4153
|
{
|
|
3981
4154
|
fillRule: "evenodd",
|
|
@@ -3984,7 +4157,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
3984
4157
|
fill: color
|
|
3985
4158
|
}
|
|
3986
4159
|
),
|
|
3987
|
-
/* @__PURE__ */ (0,
|
|
4160
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3988
4161
|
"path",
|
|
3989
4162
|
{
|
|
3990
4163
|
fillRule: "evenodd",
|
|
@@ -3998,7 +4171,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
3998
4171
|
|
|
3999
4172
|
// src/components/UserPopover/index.tsx
|
|
4000
4173
|
var import_react_intl7 = require("react-intl");
|
|
4001
|
-
var
|
|
4174
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
4002
4175
|
function UserContent() {
|
|
4003
4176
|
const { logout, address, username } = useUserInfo();
|
|
4004
4177
|
const [logouting, setLogouting] = (0, import_react18.useState)(false);
|
|
@@ -4019,34 +4192,34 @@ function UserContent() {
|
|
|
4019
4192
|
rightIcon,
|
|
4020
4193
|
onClick
|
|
4021
4194
|
}) => {
|
|
4022
|
-
return /* @__PURE__ */ (0,
|
|
4023
|
-
/* @__PURE__ */ (0,
|
|
4195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-user-popover-item", onClick, children: [
|
|
4196
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: `matchid-user-popover-item-content`, children: [
|
|
4024
4197
|
icon,
|
|
4025
|
-
/* @__PURE__ */ (0,
|
|
4198
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-user-popover-item-text", children })
|
|
4026
4199
|
] }),
|
|
4027
4200
|
rightIcon
|
|
4028
4201
|
] });
|
|
4029
4202
|
};
|
|
4030
4203
|
const UserDivider = () => {
|
|
4031
|
-
return /* @__PURE__ */ (0,
|
|
4204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: `matchid-user-popover-divider` });
|
|
4032
4205
|
};
|
|
4033
4206
|
const [usernameOpen, setUsernameOpen] = (0, import_react18.useState)(false);
|
|
4034
4207
|
const [copied, setCopied] = useCopyClipboard();
|
|
4035
4208
|
const intl = (0, import_react_intl7.useIntl)();
|
|
4036
|
-
return /* @__PURE__ */ (0,
|
|
4037
|
-
/* @__PURE__ */ (0,
|
|
4038
|
-
/* @__PURE__ */ (0,
|
|
4209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-user-popover-content", children: [
|
|
4210
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-user-popover-list", children: [
|
|
4211
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(UserItem, { onClick: () => {
|
|
4039
4212
|
setCopied(address);
|
|
4040
|
-
}, icon: copied ? /* @__PURE__ */ (0,
|
|
4041
|
-
/* @__PURE__ */ (0,
|
|
4042
|
-
/* @__PURE__ */ (0,
|
|
4213
|
+
}, icon: copied ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(CheckIcon, { size: 20, color: "#0ecb81" }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(CopyIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(CheckIcon, { size: 20, color: "var(--icon-color)" }), children: truncateAddress(address) }),
|
|
4214
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(UserDivider, {}),
|
|
4215
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(UserItem, { onClick: () => {
|
|
4043
4216
|
setUsernameOpen(true);
|
|
4044
|
-
}, icon: /* @__PURE__ */ (0,
|
|
4217
|
+
}, icon: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ProfileIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ArrowRightIcon, { size: 20, color: "var(--icon-color)" }), children: username || intl.formatMessage({
|
|
4045
4218
|
id: "setUsername"
|
|
4046
4219
|
}) })
|
|
4047
4220
|
] }),
|
|
4048
|
-
/* @__PURE__ */ (0,
|
|
4049
|
-
/* @__PURE__ */ (0,
|
|
4221
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react_intl7.FormattedMessage, { id: "disconnect" }) }),
|
|
4222
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(UsernameModal, { isOpen: usernameOpen, onClose: () => {
|
|
4050
4223
|
setUsernameOpen(false);
|
|
4051
4224
|
}, onSuccess: () => {
|
|
4052
4225
|
setUsernameOpen(false);
|
|
@@ -4057,12 +4230,12 @@ function UserPopover({
|
|
|
4057
4230
|
children,
|
|
4058
4231
|
...props
|
|
4059
4232
|
}) {
|
|
4060
|
-
return /* @__PURE__ */ (0,
|
|
4233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Popover, { ...props, content: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(UserContent, {}), children });
|
|
4061
4234
|
}
|
|
4062
4235
|
|
|
4063
4236
|
// src/components/LoginButton/index.tsx
|
|
4064
4237
|
var import_react_intl8 = require("react-intl");
|
|
4065
|
-
var
|
|
4238
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
4066
4239
|
function LoginButton({
|
|
4067
4240
|
loginRender,
|
|
4068
4241
|
methods,
|
|
@@ -4078,8 +4251,8 @@ function LoginButton({
|
|
|
4078
4251
|
const { isLogin, username } = useUserInfo();
|
|
4079
4252
|
const [loginOpen, setLoginOpen] = (0, import_react19.useState)(false);
|
|
4080
4253
|
if (!isLogin) {
|
|
4081
|
-
return /* @__PURE__ */ (0,
|
|
4082
|
-
/* @__PURE__ */ (0,
|
|
4254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
|
|
4255
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4083
4256
|
LoginModal,
|
|
4084
4257
|
{
|
|
4085
4258
|
methods,
|
|
@@ -4089,15 +4262,15 @@ function LoginButton({
|
|
|
4089
4262
|
onClose: () => setLoginOpen(false)
|
|
4090
4263
|
}
|
|
4091
4264
|
),
|
|
4092
|
-
/* @__PURE__ */ (0,
|
|
4093
|
-
/* @__PURE__ */ (0,
|
|
4094
|
-
/* @__PURE__ */ (0,
|
|
4265
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
|
|
4266
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(UnLoginIcon_default, {}),
|
|
4267
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react_intl8.FormattedMessage, { id: "login" }) })
|
|
4095
4268
|
] })
|
|
4096
4269
|
] });
|
|
4097
4270
|
}
|
|
4098
|
-
return loginRender ? /* @__PURE__ */ (0,
|
|
4099
|
-
/* @__PURE__ */ (0,
|
|
4100
|
-
/* @__PURE__ */ (0,
|
|
4271
|
+
return loginRender ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_jsx_runtime79.Fragment, { children: loginRender }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(UserPopover, { position: popoverPosition, type: popoverType, gap: popoverGap, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(Button, { onClick: onLoginClick, className: "matchid-login-btn", ...props, children: [
|
|
4272
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(LoginIcon_default, {}),
|
|
4273
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { children: username ? truncateAddress(username) : "MatchID " + intl.formatMessage({
|
|
4101
4274
|
id: "user"
|
|
4102
4275
|
}) })
|
|
4103
4276
|
] }) });
|
|
@@ -4106,15 +4279,15 @@ function LoginButton({
|
|
|
4106
4279
|
// src/components/UsernameModal/index.tsx
|
|
4107
4280
|
var import_react20 = require("react");
|
|
4108
4281
|
var import_react_intl9 = require("react-intl");
|
|
4109
|
-
var
|
|
4282
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
4110
4283
|
var ValidItem = ({
|
|
4111
4284
|
success = false,
|
|
4112
4285
|
text
|
|
4113
4286
|
}) => {
|
|
4114
4287
|
const isDownMd = useDownMd();
|
|
4115
|
-
return /* @__PURE__ */ (0,
|
|
4116
|
-
success ? /* @__PURE__ */ (0,
|
|
4117
|
-
/* @__PURE__ */ (0,
|
|
4288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
|
|
4289
|
+
success ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
|
|
4290
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: text })
|
|
4118
4291
|
] });
|
|
4119
4292
|
};
|
|
4120
4293
|
function UsernameModal({
|
|
@@ -4162,12 +4335,12 @@ function UsernameModal({
|
|
|
4162
4335
|
}
|
|
4163
4336
|
};
|
|
4164
4337
|
const intl = (0, import_react_intl9.useIntl)();
|
|
4165
|
-
return /* @__PURE__ */ (0,
|
|
4338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
|
|
4166
4339
|
id: username ? "editUsernameTitle" : "setUsernameTitle"
|
|
4167
|
-
}), children: /* @__PURE__ */ (0,
|
|
4168
|
-
/* @__PURE__ */ (0,
|
|
4340
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-username-box", children: [
|
|
4341
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Field, { label: intl.formatMessage({
|
|
4169
4342
|
id: "username"
|
|
4170
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
4343
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4171
4344
|
Input,
|
|
4172
4345
|
{
|
|
4173
4346
|
placeholder: intl.formatMessage({
|
|
@@ -4180,8 +4353,8 @@ function UsernameModal({
|
|
|
4180
4353
|
value: val
|
|
4181
4354
|
}
|
|
4182
4355
|
) }),
|
|
4183
|
-
/* @__PURE__ */ (0,
|
|
4184
|
-
/* @__PURE__ */ (0,
|
|
4356
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-valid", children: [
|
|
4357
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4185
4358
|
ValidItem,
|
|
4186
4359
|
{
|
|
4187
4360
|
success: isValid,
|
|
@@ -4190,16 +4363,16 @@ function UsernameModal({
|
|
|
4190
4363
|
})
|
|
4191
4364
|
}
|
|
4192
4365
|
),
|
|
4193
|
-
/* @__PURE__ */ (0,
|
|
4366
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(ValidItem, { success: isLength, text: intl.formatMessage({
|
|
4194
4367
|
id: "usernameLengthError"
|
|
4195
4368
|
}) })
|
|
4196
4369
|
] }),
|
|
4197
|
-
/* @__PURE__ */ (0,
|
|
4370
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Button, { disabled: !isSafe, loading: isSubmitting, style: {
|
|
4198
4371
|
marginTop: isDownMd ? "36px" : "64px"
|
|
4199
|
-
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
4200
|
-
/* @__PURE__ */ (0,
|
|
4372
|
+
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl9.FormattedMessage, { id: "confirm" }) }),
|
|
4373
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Button, { style: {
|
|
4201
4374
|
marginTop: isDownMd ? "12px" : "24px"
|
|
4202
|
-
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0,
|
|
4375
|
+
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl9.FormattedMessage, { id: "cancel" }) })
|
|
4203
4376
|
] }) });
|
|
4204
4377
|
}
|
|
4205
4378
|
|
|
@@ -4218,7 +4391,7 @@ var walletConnectImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEA
|
|
|
4218
4391
|
var walletSigningImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAABAsUlEQVR4Xu19CXQUx7X2vCUveS/vJdgx+yaJHQwI8G4wzWIbG2LLNrbxPgnY7CC0SyNpJBAIECAZAbLB8gAyKGGxiFnkGJwmz47xsU0mvyEWoGW0D0jgSeK88L84/7l/fS2V3GrNaDRCEiPpfud8p3qqu6tnpvt+favqVp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cOGCto20sLBQo3gz8P4ust/Bk3kwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDN/x/wHjsXZ4EUApzgAAAABJRU5ErkJggg==";
|
|
4219
4392
|
|
|
4220
4393
|
// src/components/WalletModalContent/index.tsx
|
|
4221
|
-
var
|
|
4394
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
4222
4395
|
function WalletModalContent({
|
|
4223
4396
|
status,
|
|
4224
4397
|
error,
|
|
@@ -4288,12 +4461,12 @@ function WalletModalContent({
|
|
|
4288
4461
|
statusImage: walletConnectImage
|
|
4289
4462
|
};
|
|
4290
4463
|
}, [visible, connected, status, error, address]);
|
|
4291
|
-
return /* @__PURE__ */ (0,
|
|
4292
|
-
/* @__PURE__ */ (0,
|
|
4293
|
-
/* @__PURE__ */ (0,
|
|
4294
|
-
/* @__PURE__ */ (0,
|
|
4464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
4465
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
4466
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("img", { src: pageData.statusImage }),
|
|
4467
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: pageData.isError ? "matchid-error" : "", children: pageData.text })
|
|
4295
4468
|
] }),
|
|
4296
|
-
/* @__PURE__ */ (0,
|
|
4469
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
4297
4470
|
Button,
|
|
4298
4471
|
{
|
|
4299
4472
|
block: true,
|
|
@@ -4369,12 +4542,12 @@ function WalletModalContentV2(props) {
|
|
|
4369
4542
|
statusImage: walletConnectImage
|
|
4370
4543
|
};
|
|
4371
4544
|
}, [props, submitting]);
|
|
4372
|
-
return /* @__PURE__ */ (0,
|
|
4373
|
-
/* @__PURE__ */ (0,
|
|
4374
|
-
/* @__PURE__ */ (0,
|
|
4375
|
-
/* @__PURE__ */ (0,
|
|
4545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
4546
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
4547
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("img", { src: pageData.statusImage }),
|
|
4548
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: props.status == "error" ? "matchid-error" : "", children: pageData.text })
|
|
4376
4549
|
] }),
|
|
4377
|
-
/* @__PURE__ */ (0,
|
|
4550
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
4378
4551
|
Button,
|
|
4379
4552
|
{
|
|
4380
4553
|
block: true,
|
|
@@ -4715,7 +4888,7 @@ async function getEthersSigner(config, { chainId } = {}) {
|
|
|
4715
4888
|
// src/components/EVMModal/index.tsx
|
|
4716
4889
|
var import_siwe = require("siwe");
|
|
4717
4890
|
var import_styles = require("@rainbow-me/rainbowkit/styles.css");
|
|
4718
|
-
var
|
|
4891
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
4719
4892
|
function WalletContent({
|
|
4720
4893
|
onSuccess,
|
|
4721
4894
|
type
|
|
@@ -4873,7 +5046,7 @@ function WalletContent({
|
|
|
4873
5046
|
setNonce(void 0);
|
|
4874
5047
|
setStatus("start");
|
|
4875
5048
|
};
|
|
4876
|
-
return /* @__PURE__ */ (0,
|
|
5049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4877
5050
|
WalletModalContentV2,
|
|
4878
5051
|
{
|
|
4879
5052
|
status,
|
|
@@ -4908,14 +5081,14 @@ function EVMConnectModal({
|
|
|
4908
5081
|
...props
|
|
4909
5082
|
}) {
|
|
4910
5083
|
const intl = (0, import_react_intl10.useIntl)();
|
|
4911
|
-
return /* @__PURE__ */ (0,
|
|
5084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4912
5085
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4913
5086
|
}, {
|
|
4914
5087
|
name: "EVM"
|
|
4915
|
-
}), children: /* @__PURE__ */ (0,
|
|
5088
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_wagmi2.WagmiProvider, { config: wagmiConfig, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_rainbowkit.RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(WalletContent, { onSuccess, type }) }) }) });
|
|
4916
5089
|
}
|
|
4917
5090
|
function EVMModal(props) {
|
|
4918
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5091
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(EVMConnectModal, { ...props });
|
|
4919
5092
|
}
|
|
4920
5093
|
|
|
4921
5094
|
// src/components/TRONModal/index.tsx
|
|
@@ -5030,7 +5203,7 @@ var useTRONWallet = () => {
|
|
|
5030
5203
|
};
|
|
5031
5204
|
|
|
5032
5205
|
// src/components/TRONModal/index.tsx
|
|
5033
|
-
var
|
|
5206
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
5034
5207
|
function TRONConnectModal({
|
|
5035
5208
|
type = "login",
|
|
5036
5209
|
onSuccess,
|
|
@@ -5040,9 +5213,9 @@ function TRONConnectModal({
|
|
|
5040
5213
|
const intl = (0, import_react_intl11.useIntl)();
|
|
5041
5214
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
|
|
5042
5215
|
const iconMaps = {
|
|
5043
|
-
tronlink: /* @__PURE__ */ (0,
|
|
5044
|
-
bitget: /* @__PURE__ */ (0,
|
|
5045
|
-
okx: /* @__PURE__ */ (0,
|
|
5216
|
+
tronlink: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
|
|
5217
|
+
bitget: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(BitgetIcon, { size: isDownMd ? 36 : 40 }),
|
|
5218
|
+
okx: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(OKXIcon, { size: isDownMd ? 36 : 40 })
|
|
5046
5219
|
};
|
|
5047
5220
|
const { events, login } = useMatch();
|
|
5048
5221
|
const [status, setStatus] = (0, import_react25.useState)("");
|
|
@@ -5134,11 +5307,11 @@ function TRONConnectModal({
|
|
|
5134
5307
|
disconnect();
|
|
5135
5308
|
}
|
|
5136
5309
|
}, [props.isOpen]);
|
|
5137
|
-
return /* @__PURE__ */ (0,
|
|
5310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5138
5311
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5139
5312
|
}, {
|
|
5140
5313
|
name: "TRON"
|
|
5141
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5314
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
5142
5315
|
WalletModalContent,
|
|
5143
5316
|
{
|
|
5144
5317
|
error,
|
|
@@ -5151,9 +5324,9 @@ function TRONConnectModal({
|
|
|
5151
5324
|
setVisible: () => {
|
|
5152
5325
|
}
|
|
5153
5326
|
}
|
|
5154
|
-
) : /* @__PURE__ */ (0,
|
|
5327
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
5155
5328
|
installedWallets.map((wallet2) => {
|
|
5156
|
-
return /* @__PURE__ */ (0,
|
|
5329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
5157
5330
|
RecommendItem,
|
|
5158
5331
|
{
|
|
5159
5332
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -5166,14 +5339,14 @@ function TRONConnectModal({
|
|
|
5166
5339
|
);
|
|
5167
5340
|
}),
|
|
5168
5341
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
5169
|
-
return /* @__PURE__ */ (0,
|
|
5342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
5170
5343
|
RecommendItem,
|
|
5171
5344
|
{
|
|
5172
5345
|
icon: iconMaps[wallet2.walletKey],
|
|
5173
5346
|
name: wallet2.name,
|
|
5174
5347
|
onClick: () => {
|
|
5175
5348
|
},
|
|
5176
|
-
footer: /* @__PURE__ */ (0,
|
|
5349
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Button, { size: "sm", onClick: () => {
|
|
5177
5350
|
window.open(wallet2.website);
|
|
5178
5351
|
}, children: "Install" })
|
|
5179
5352
|
},
|
|
@@ -5183,14 +5356,14 @@ function TRONConnectModal({
|
|
|
5183
5356
|
] }) }) });
|
|
5184
5357
|
}
|
|
5185
5358
|
function TRONModal(props) {
|
|
5186
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5359
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TRONConnectModal, { ...props, type: props.type });
|
|
5187
5360
|
}
|
|
5188
5361
|
|
|
5189
5362
|
// src/components/TONModal/index.tsx
|
|
5190
5363
|
var import_react26 = __toESM(require("react"));
|
|
5191
5364
|
var import_react_intl12 = require("react-intl");
|
|
5192
5365
|
var import_ui_react = require("@tonconnect/ui-react");
|
|
5193
|
-
var
|
|
5366
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
5194
5367
|
function WalletContent2({
|
|
5195
5368
|
onSuccess,
|
|
5196
5369
|
type
|
|
@@ -5317,7 +5490,7 @@ function WalletContent2({
|
|
|
5317
5490
|
}
|
|
5318
5491
|
}
|
|
5319
5492
|
}, [state]);
|
|
5320
|
-
return /* @__PURE__ */ (0,
|
|
5493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
5321
5494
|
WalletModalContent,
|
|
5322
5495
|
{
|
|
5323
5496
|
connected,
|
|
@@ -5351,20 +5524,20 @@ function TONConnectModal({
|
|
|
5351
5524
|
const intl = (0, import_react_intl12.useIntl)();
|
|
5352
5525
|
const { endpoints, appid } = useLocalStore_default();
|
|
5353
5526
|
const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
|
|
5354
|
-
return /* @__PURE__ */ (0,
|
|
5527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5355
5528
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5356
5529
|
}, {
|
|
5357
5530
|
name: "TON"
|
|
5358
|
-
}), children: /* @__PURE__ */ (0,
|
|
5531
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
5359
5532
|
import_ui_react.TonConnectUIProvider,
|
|
5360
5533
|
{
|
|
5361
5534
|
manifestUrl,
|
|
5362
|
-
children: /* @__PURE__ */ (0,
|
|
5535
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(WalletContent2, { onSuccess, type })
|
|
5363
5536
|
}
|
|
5364
5537
|
) });
|
|
5365
5538
|
}
|
|
5366
5539
|
function TONModal(props) {
|
|
5367
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5540
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TONConnectModal, { ...props });
|
|
5368
5541
|
}
|
|
5369
5542
|
|
|
5370
5543
|
// src/components/BTCModal/index.tsx
|
|
@@ -5587,7 +5760,7 @@ var useBTCWallet = () => {
|
|
|
5587
5760
|
};
|
|
5588
5761
|
|
|
5589
5762
|
// src/components/BTCModal/index.tsx
|
|
5590
|
-
var
|
|
5763
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
5591
5764
|
function BTCConnectModal({
|
|
5592
5765
|
type = "login",
|
|
5593
5766
|
onSuccess,
|
|
@@ -5597,10 +5770,10 @@ function BTCConnectModal({
|
|
|
5597
5770
|
const intl = (0, import_react_intl13.useIntl)();
|
|
5598
5771
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
|
|
5599
5772
|
const iconMaps = {
|
|
5600
|
-
leather: /* @__PURE__ */ (0,
|
|
5601
|
-
unisat: /* @__PURE__ */ (0,
|
|
5602
|
-
xverse: /* @__PURE__ */ (0,
|
|
5603
|
-
phantom: /* @__PURE__ */ (0,
|
|
5773
|
+
leather: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(LeatherIcon, { size: isDownMd ? 36 : 40 }),
|
|
5774
|
+
unisat: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(UnisatIcon, { size: isDownMd ? 36 : 40 }),
|
|
5775
|
+
xverse: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(XverseIcon, { size: isDownMd ? 36 : 40 }),
|
|
5776
|
+
phantom: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(PhantomIcon, { size: isDownMd ? 36 : 40 })
|
|
5604
5777
|
};
|
|
5605
5778
|
const { events, login } = useMatch();
|
|
5606
5779
|
const [status, setStatus] = (0, import_react28.useState)("");
|
|
@@ -5700,11 +5873,11 @@ function BTCConnectModal({
|
|
|
5700
5873
|
statusRef.current = "";
|
|
5701
5874
|
setError("");
|
|
5702
5875
|
};
|
|
5703
|
-
return /* @__PURE__ */ (0,
|
|
5876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5704
5877
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5705
5878
|
}, {
|
|
5706
5879
|
name: "BTC"
|
|
5707
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5880
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5708
5881
|
WalletModalContent,
|
|
5709
5882
|
{
|
|
5710
5883
|
error,
|
|
@@ -5717,9 +5890,9 @@ function BTCConnectModal({
|
|
|
5717
5890
|
setVisible: () => {
|
|
5718
5891
|
}
|
|
5719
5892
|
}
|
|
5720
|
-
) : /* @__PURE__ */ (0,
|
|
5893
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
5721
5894
|
installedWallets.map((wallet2) => {
|
|
5722
|
-
return /* @__PURE__ */ (0,
|
|
5895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5723
5896
|
RecommendItem,
|
|
5724
5897
|
{
|
|
5725
5898
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -5732,14 +5905,14 @@ function BTCConnectModal({
|
|
|
5732
5905
|
);
|
|
5733
5906
|
}),
|
|
5734
5907
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
5735
|
-
return /* @__PURE__ */ (0,
|
|
5908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5736
5909
|
RecommendItem,
|
|
5737
5910
|
{
|
|
5738
5911
|
icon: iconMaps[wallet2.walletKey],
|
|
5739
5912
|
name: wallet2.name,
|
|
5740
5913
|
onClick: () => {
|
|
5741
5914
|
},
|
|
5742
|
-
footer: /* @__PURE__ */ (0,
|
|
5915
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Button, { size: "sm", onClick: () => {
|
|
5743
5916
|
window.open(wallet2.website);
|
|
5744
5917
|
}, children: "Install" })
|
|
5745
5918
|
},
|
|
@@ -5749,13 +5922,13 @@ function BTCConnectModal({
|
|
|
5749
5922
|
] }) }) });
|
|
5750
5923
|
}
|
|
5751
5924
|
function BTCModal(props) {
|
|
5752
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5925
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(BTCConnectModal, { ...props });
|
|
5753
5926
|
}
|
|
5754
5927
|
|
|
5755
5928
|
// src/components/WalletModal/index.tsx
|
|
5756
5929
|
var import_react29 = require("react");
|
|
5757
5930
|
var import_react_intl14 = require("react-intl");
|
|
5758
|
-
var
|
|
5931
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
5759
5932
|
function WalletConnectModal({
|
|
5760
5933
|
type,
|
|
5761
5934
|
methods: _methods,
|
|
@@ -5773,13 +5946,13 @@ function WalletConnectModal({
|
|
|
5773
5946
|
const platform = config.platform.map((p) => p.toLowerCase());
|
|
5774
5947
|
return WALLET_METHODS.filter((m) => platform.includes(m));
|
|
5775
5948
|
}, [config.platform, _methods]);
|
|
5776
|
-
return /* @__PURE__ */ (0,
|
|
5949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5777
5950
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5778
5951
|
}, {
|
|
5779
5952
|
name: ""
|
|
5780
|
-
}), children: /* @__PURE__ */ (0,
|
|
5953
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-login-recommend-list", children: methods.map((method, index) => {
|
|
5781
5954
|
const m = walletMap[method];
|
|
5782
|
-
return /* @__PURE__ */ (0,
|
|
5955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5783
5956
|
RecommendItem,
|
|
5784
5957
|
{
|
|
5785
5958
|
icon: m?.icon,
|
|
@@ -5793,12 +5966,12 @@ function WalletConnectModal({
|
|
|
5793
5966
|
}) }) }) });
|
|
5794
5967
|
}
|
|
5795
5968
|
function WalletModal(props) {
|
|
5796
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5969
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(WalletConnectModal, { ...props });
|
|
5797
5970
|
}
|
|
5798
5971
|
|
|
5799
5972
|
// src/components/AlphaAvatar/index.tsx
|
|
5800
5973
|
var import_react30 = require("react");
|
|
5801
|
-
var
|
|
5974
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
5802
5975
|
function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
5803
5976
|
const [avatar, setAvatar] = (0, import_react30.useState)(void 0);
|
|
5804
5977
|
(0, import_react30.useEffect)(() => {
|
|
@@ -5807,7 +5980,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
5807
5980
|
setAvatar(char);
|
|
5808
5981
|
}
|
|
5809
5982
|
}, [name]);
|
|
5810
|
-
return /* @__PURE__ */ (0,
|
|
5983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
5811
5984
|
width: size,
|
|
5812
5985
|
height: size,
|
|
5813
5986
|
fontSize: Math.ceil(size / 2)
|
|
@@ -5815,7 +5988,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
5815
5988
|
}
|
|
5816
5989
|
|
|
5817
5990
|
// src/components/WalletAsset/index.tsx
|
|
5818
|
-
var
|
|
5991
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
5819
5992
|
function WalletAsset({
|
|
5820
5993
|
onAssetClick,
|
|
5821
5994
|
matchWalletAssetsOptions
|
|
@@ -5825,7 +5998,7 @@ function WalletAsset({
|
|
|
5825
5998
|
list: walletAssets.mergedAssets
|
|
5826
5999
|
});
|
|
5827
6000
|
const { list } = useMatchChain();
|
|
5828
|
-
return /* @__PURE__ */ (0,
|
|
6001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5829
6002
|
const clickFunc = onAssetClick && onAssetClick(n);
|
|
5830
6003
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5831
6004
|
const getFooterColor = () => {
|
|
@@ -5840,11 +6013,11 @@ function WalletAsset({
|
|
|
5840
6013
|
}
|
|
5841
6014
|
return "";
|
|
5842
6015
|
};
|
|
5843
|
-
return /* @__PURE__ */ (0,
|
|
6016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: `matchid-wallet-asset-item`, onClick: clickFunc, style: {
|
|
5844
6017
|
cursor: clickFunc ? "pointer" : "default"
|
|
5845
6018
|
}, children: [
|
|
5846
|
-
/* @__PURE__ */ (0,
|
|
5847
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
6019
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
|
|
6020
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-wallet-asset-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
5848
6021
|
AlphaAvatar2,
|
|
5849
6022
|
{
|
|
5850
6023
|
className: `matchid-wallet-asset-icon`,
|
|
@@ -5852,12 +6025,12 @@ function WalletAsset({
|
|
|
5852
6025
|
name: n.symbol || n.name || ""
|
|
5853
6026
|
}
|
|
5854
6027
|
),
|
|
5855
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6028
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
|
|
5856
6029
|
] }),
|
|
5857
|
-
/* @__PURE__ */ (0,
|
|
5858
|
-
/* @__PURE__ */ (0,
|
|
5859
|
-
"price" in n && /* @__PURE__ */ (0,
|
|
5860
|
-
/* @__PURE__ */ (0,
|
|
6030
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: `matchid-wallet-asset-info`, children: [
|
|
6031
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
|
|
6032
|
+
"price" in n && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: `matchid-wallet-asset-content`, children: [
|
|
6033
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
5861
6034
|
NumberFormatter,
|
|
5862
6035
|
{
|
|
5863
6036
|
value: n.price,
|
|
@@ -5865,7 +6038,7 @@ function WalletAsset({
|
|
|
5865
6038
|
tFixNum: 2
|
|
5866
6039
|
}
|
|
5867
6040
|
) }),
|
|
5868
|
-
/* @__PURE__ */ (0,
|
|
6041
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
5869
6042
|
NumberFormatter,
|
|
5870
6043
|
{
|
|
5871
6044
|
value: n.value,
|
|
@@ -5874,15 +6047,15 @@ function WalletAsset({
|
|
|
5874
6047
|
}
|
|
5875
6048
|
) })
|
|
5876
6049
|
] }),
|
|
5877
|
-
/* @__PURE__ */ (0,
|
|
5878
|
-
/* @__PURE__ */ (0,
|
|
6050
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: `matchid-wallet-asset-footer`, children: [
|
|
6051
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
5879
6052
|
NumberFormatter,
|
|
5880
6053
|
{
|
|
5881
6054
|
value: n.balance,
|
|
5882
6055
|
tFixNum: 3
|
|
5883
6056
|
}
|
|
5884
6057
|
) }),
|
|
5885
|
-
"price_change_24h" in n && /* @__PURE__ */ (0,
|
|
6058
|
+
"price_change_24h" in n && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: `matchid-wallet-asset-change ${getFooterColor()}`, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
5886
6059
|
NumberFormatter,
|
|
5887
6060
|
{
|
|
5888
6061
|
prefix: `${(n?.price_change_24h || 0) < 0 ? "-" : "+"} `,
|
|
@@ -5901,7 +6074,7 @@ function WalletAsset({
|
|
|
5901
6074
|
var import_react31 = require("react");
|
|
5902
6075
|
var import_viem10 = require("viem");
|
|
5903
6076
|
var import_react_intl15 = require("react-intl");
|
|
5904
|
-
var
|
|
6077
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
5905
6078
|
function Input2({
|
|
5906
6079
|
onChange,
|
|
5907
6080
|
placeholder,
|
|
@@ -5911,8 +6084,8 @@ function Input2({
|
|
|
5911
6084
|
error,
|
|
5912
6085
|
size = "df"
|
|
5913
6086
|
}) {
|
|
5914
|
-
return /* @__PURE__ */ (0,
|
|
5915
|
-
/* @__PURE__ */ (0,
|
|
6087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
|
|
6088
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
5916
6089
|
"input",
|
|
5917
6090
|
{
|
|
5918
6091
|
placeholder,
|
|
@@ -5923,7 +6096,7 @@ function Input2({
|
|
|
5923
6096
|
className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
|
|
5924
6097
|
}
|
|
5925
6098
|
),
|
|
5926
|
-
error && /* @__PURE__ */ (0,
|
|
6099
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "matchid-token-input-error-text", children: error })
|
|
5927
6100
|
] });
|
|
5928
6101
|
}
|
|
5929
6102
|
function TokenSend({
|
|
@@ -6051,24 +6224,24 @@ function TokenSend({
|
|
|
6051
6224
|
window.removeEventListener("message", receiveMessage);
|
|
6052
6225
|
};
|
|
6053
6226
|
}, []);
|
|
6054
|
-
return /* @__PURE__ */ (0,
|
|
6055
|
-
/* @__PURE__ */ (0,
|
|
6056
|
-
/* @__PURE__ */ (0,
|
|
6057
|
-
/* @__PURE__ */ (0,
|
|
6058
|
-
/* @__PURE__ */ (0,
|
|
6059
|
-
/* @__PURE__ */ (0,
|
|
6060
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
6227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react_intl15.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `matchid-token-send-box`, children: [
|
|
6228
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
6229
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `matchid-token-amount-content`, children: [
|
|
6230
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `matchid-token-amount-header`, children: [
|
|
6231
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react_intl15.FormattedMessage, { id: "amount" }) }),
|
|
6232
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
|
|
6233
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
6061
6234
|
"img",
|
|
6062
6235
|
{
|
|
6063
6236
|
src: token?.icon,
|
|
6064
6237
|
alt: token?.symbol,
|
|
6065
6238
|
className: `matchid-token-amount-chain-icon`
|
|
6066
6239
|
}
|
|
6067
|
-
) : /* @__PURE__ */ (0,
|
|
6068
|
-
/* @__PURE__ */ (0,
|
|
6240
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
|
|
6241
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { children: token?.symbol })
|
|
6069
6242
|
] })
|
|
6070
6243
|
] }),
|
|
6071
|
-
/* @__PURE__ */ (0,
|
|
6244
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
6072
6245
|
Input2,
|
|
6073
6246
|
{
|
|
6074
6247
|
type: "text",
|
|
@@ -6081,18 +6254,18 @@ function TokenSend({
|
|
|
6081
6254
|
error: error.amount || txError
|
|
6082
6255
|
}
|
|
6083
6256
|
),
|
|
6084
|
-
/* @__PURE__ */ (0,
|
|
6085
|
-
/* @__PURE__ */ (0,
|
|
6086
|
-
/* @__PURE__ */ (0,
|
|
6257
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
|
|
6258
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `matchid-token-amount-title`, children: [
|
|
6259
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react_intl15.FormattedMessage, { id: "balance" }),
|
|
6087
6260
|
":"
|
|
6088
6261
|
] }),
|
|
6089
|
-
/* @__PURE__ */ (0,
|
|
6262
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
|
|
6090
6263
|
] }),
|
|
6091
|
-
/* @__PURE__ */ (0,
|
|
6264
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
6092
6265
|
] }),
|
|
6093
|
-
/* @__PURE__ */ (0,
|
|
6094
|
-
/* @__PURE__ */ (0,
|
|
6095
|
-
/* @__PURE__ */ (0,
|
|
6266
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `matchid-token-address-content`, children: [
|
|
6267
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react_intl15.FormattedMessage, { id: "receiveTitle" }) }) }),
|
|
6268
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
6096
6269
|
Input2,
|
|
6097
6270
|
{
|
|
6098
6271
|
type: "text",
|
|
@@ -6108,7 +6281,7 @@ function TokenSend({
|
|
|
6108
6281
|
)
|
|
6109
6282
|
] })
|
|
6110
6283
|
] }),
|
|
6111
|
-
/* @__PURE__ */ (0,
|
|
6284
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
6112
6285
|
Button,
|
|
6113
6286
|
{
|
|
6114
6287
|
size: "lg",
|
|
@@ -6117,7 +6290,7 @@ function TokenSend({
|
|
|
6117
6290
|
disabled: !canSend || !!txError,
|
|
6118
6291
|
onClick: onNext,
|
|
6119
6292
|
loading: loading || sending,
|
|
6120
|
-
children: /* @__PURE__ */ (0,
|
|
6293
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react_intl15.FormattedMessage, { id: "next" })
|
|
6121
6294
|
}
|
|
6122
6295
|
)
|
|
6123
6296
|
] }) });
|
|
@@ -6125,7 +6298,7 @@ function TokenSend({
|
|
|
6125
6298
|
|
|
6126
6299
|
// src/components/TokenDetail/index.tsx
|
|
6127
6300
|
var import_react_intl16 = require("react-intl");
|
|
6128
|
-
var
|
|
6301
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
6129
6302
|
function TokenDetail({
|
|
6130
6303
|
onClose,
|
|
6131
6304
|
token
|
|
@@ -6135,41 +6308,41 @@ function TokenDetail({
|
|
|
6135
6308
|
const chain = chainList?.find((m) => m.id.toString() === token.chain_id);
|
|
6136
6309
|
const onSend = () => {
|
|
6137
6310
|
modal.show((props) => {
|
|
6138
|
-
return /* @__PURE__ */ (0,
|
|
6311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(TokenSend, { onClose: () => {
|
|
6139
6312
|
props.close();
|
|
6140
6313
|
onClose();
|
|
6141
6314
|
}, onBack: props.close, zIndex: props.zIndex, token });
|
|
6142
6315
|
});
|
|
6143
6316
|
};
|
|
6144
6317
|
const intl = (0, import_react_intl16.useIntl)();
|
|
6145
|
-
return /* @__PURE__ */ (0,
|
|
6318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ModalDrawer, { isOpen: true, title: intl.formatMessage({
|
|
6146
6319
|
id: "tokenDetails"
|
|
6147
|
-
}), onClose, children: /* @__PURE__ */ (0,
|
|
6148
|
-
/* @__PURE__ */ (0,
|
|
6149
|
-
/* @__PURE__ */ (0,
|
|
6150
|
-
/* @__PURE__ */ (0,
|
|
6151
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
6152
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6320
|
+
}), onClose, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `matchid-token-detail`, children: [
|
|
6321
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `matchid-token-main`, children: [
|
|
6322
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `matchid-token-info`, children: [
|
|
6323
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `matchid-token-logo`, children: [
|
|
6324
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("img", { src: token.icon, alt: token.symbol, className: `matchid-token-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(AlphaAvatar, { className: `matchid-token-icon`, size: 48, name: token.symbol || token.name || "" }),
|
|
6325
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-token-chain` })
|
|
6153
6326
|
] }),
|
|
6154
|
-
/* @__PURE__ */ (0,
|
|
6155
|
-
/* @__PURE__ */ (0,
|
|
6327
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `matchid-token-name`, children: [
|
|
6328
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10 }),
|
|
6156
6329
|
" ",
|
|
6157
6330
|
token.symbol
|
|
6158
6331
|
] })
|
|
6159
6332
|
] }),
|
|
6160
|
-
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0,
|
|
6161
|
-
/* @__PURE__ */ (0,
|
|
6162
|
-
/* @__PURE__ */ (0,
|
|
6333
|
+
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `matchid-token-contract`, children: [
|
|
6334
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "matchid-token-contract-title", children: "Contract address" }),
|
|
6335
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "matchid-token-contract-address", children: token.address })
|
|
6163
6336
|
] })
|
|
6164
6337
|
] }),
|
|
6165
|
-
/* @__PURE__ */ (0,
|
|
6338
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react_intl16.FormattedMessage, { id: "send" }) })
|
|
6166
6339
|
] }) });
|
|
6167
6340
|
}
|
|
6168
6341
|
|
|
6169
6342
|
// src/components/TokenSendList/index.tsx
|
|
6170
6343
|
var import_react32 = require("react");
|
|
6171
6344
|
var import_react_intl17 = require("react-intl");
|
|
6172
|
-
var
|
|
6345
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
6173
6346
|
function TokenSendList({ close }) {
|
|
6174
6347
|
const isDownMd = useDownMd();
|
|
6175
6348
|
const walletAssets = useMatchWalletAssets();
|
|
@@ -6181,16 +6354,16 @@ function TokenSendList({ close }) {
|
|
|
6181
6354
|
const modal = useModal();
|
|
6182
6355
|
const onNext = () => {
|
|
6183
6356
|
checked && modal.show((props) => {
|
|
6184
|
-
return /* @__PURE__ */ (0,
|
|
6357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(TokenSend, { onClose: () => {
|
|
6185
6358
|
props.close();
|
|
6186
6359
|
close();
|
|
6187
6360
|
}, onBack: props.close, zIndex: props.zIndex, token: checked });
|
|
6188
6361
|
});
|
|
6189
6362
|
};
|
|
6190
|
-
return /* @__PURE__ */ (0,
|
|
6191
|
-
/* @__PURE__ */ (0,
|
|
6363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-token-send-list-box", children: [
|
|
6364
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
6192
6365
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
6193
|
-
return /* @__PURE__ */ (0,
|
|
6366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6194
6367
|
"div",
|
|
6195
6368
|
{
|
|
6196
6369
|
className: `matchid-token-send-item ${checked?.address == n.address ? "matchid-token-send-chekced" : ""}`,
|
|
@@ -6198,10 +6371,10 @@ function TokenSendList({ close }) {
|
|
|
6198
6371
|
setChecked(n);
|
|
6199
6372
|
},
|
|
6200
6373
|
children: [
|
|
6201
|
-
/* @__PURE__ */ (0,
|
|
6202
|
-
/* @__PURE__ */ (0,
|
|
6203
|
-
/* @__PURE__ */ (0,
|
|
6204
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
6374
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
|
|
6375
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
6376
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-token-send-logo", children: [
|
|
6377
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6205
6378
|
AlphaAvatar2,
|
|
6206
6379
|
{
|
|
6207
6380
|
className: `matchid-token-send-icon`,
|
|
@@ -6209,7 +6382,7 @@ function TokenSendList({ close }) {
|
|
|
6209
6382
|
name: n.symbol || n.name || ""
|
|
6210
6383
|
}
|
|
6211
6384
|
),
|
|
6212
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6385
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6213
6386
|
"img",
|
|
6214
6387
|
{
|
|
6215
6388
|
src: chain.iconUrl,
|
|
@@ -6218,9 +6391,9 @@ function TokenSendList({ close }) {
|
|
|
6218
6391
|
}
|
|
6219
6392
|
)
|
|
6220
6393
|
] }),
|
|
6221
|
-
/* @__PURE__ */ (0,
|
|
6222
|
-
/* @__PURE__ */ (0,
|
|
6223
|
-
/* @__PURE__ */ (0,
|
|
6394
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-send-info`, children: [
|
|
6395
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
|
|
6396
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
|
|
6224
6397
|
] })
|
|
6225
6398
|
] })
|
|
6226
6399
|
]
|
|
@@ -6228,7 +6401,7 @@ function TokenSendList({ close }) {
|
|
|
6228
6401
|
index
|
|
6229
6402
|
);
|
|
6230
6403
|
}) }),
|
|
6231
|
-
/* @__PURE__ */ (0,
|
|
6404
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl17.FormattedMessage, { id: "next" }) })
|
|
6232
6405
|
] });
|
|
6233
6406
|
}
|
|
6234
6407
|
|
|
@@ -6296,7 +6469,7 @@ var useContractStore_default = useContractStore;
|
|
|
6296
6469
|
|
|
6297
6470
|
// src/components/TransactionList/index.tsx
|
|
6298
6471
|
var import_react_intl18 = require("react-intl");
|
|
6299
|
-
var
|
|
6472
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
6300
6473
|
var Item = ({ data }) => {
|
|
6301
6474
|
const { address } = useWallet();
|
|
6302
6475
|
const isOut = data.from.toLowerCase() == address.toLowerCase();
|
|
@@ -6383,18 +6556,18 @@ var Item = ({ data }) => {
|
|
|
6383
6556
|
}
|
|
6384
6557
|
return chain?.nativeCurrency.symbol || chain?.nativeCurrency.name;
|
|
6385
6558
|
}, [transferType, chain, contracts, chainId, data.to]);
|
|
6386
|
-
return /* @__PURE__ */ (0,
|
|
6559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
6387
6560
|
"a",
|
|
6388
6561
|
{
|
|
6389
6562
|
href: explorerLink(`tx/${data.hash}`),
|
|
6390
6563
|
target: "_blank",
|
|
6391
6564
|
className: `matchid-transaction-item`,
|
|
6392
6565
|
children: [
|
|
6393
|
-
/* @__PURE__ */ (0,
|
|
6394
|
-
/* @__PURE__ */ (0,
|
|
6395
|
-
/* @__PURE__ */ (0,
|
|
6396
|
-
/* @__PURE__ */ (0,
|
|
6397
|
-
/* @__PURE__ */ (0,
|
|
6566
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-transacton-item-container`, children: [
|
|
6567
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
|
|
6568
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-transaction-item-details`, children: [
|
|
6569
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
|
|
6570
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
6398
6571
|
"div",
|
|
6399
6572
|
{
|
|
6400
6573
|
className: `matchid-transaction-item-timestamp`,
|
|
@@ -6403,11 +6576,11 @@ var Item = ({ data }) => {
|
|
|
6403
6576
|
)
|
|
6404
6577
|
] })
|
|
6405
6578
|
] }),
|
|
6406
|
-
/* @__PURE__ */ (0,
|
|
6407
|
-
/* @__PURE__ */ (0,
|
|
6408
|
-
status == "loading" && /* @__PURE__ */ (0,
|
|
6409
|
-
status == "success" && /* @__PURE__ */ (0,
|
|
6410
|
-
status == "error" && /* @__PURE__ */ (0,
|
|
6579
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
|
|
6580
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(NumberFormatter, { value: amount, tFixNum: 6, prefix: isOut ? "-" : "+", suffix: " " + symbol }),
|
|
6581
|
+
status == "loading" && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(LoadingIcon_default, { color: "#000000", size: 16, rotate: true }),
|
|
6582
|
+
status == "success" && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(CheckRoundIcon, { size: 16 }),
|
|
6583
|
+
status == "error" && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(InfoRoundIcon, { size: 16 })
|
|
6411
6584
|
] })
|
|
6412
6585
|
]
|
|
6413
6586
|
}
|
|
@@ -6417,19 +6590,19 @@ function TransactionList({
|
|
|
6417
6590
|
scrollableTarget
|
|
6418
6591
|
}) {
|
|
6419
6592
|
const { fetchMoreData, hasMore, items } = useMatchWalletRecords();
|
|
6420
|
-
return /* @__PURE__ */ (0,
|
|
6593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
6421
6594
|
import_react_infinite_scroll_component.default,
|
|
6422
6595
|
{
|
|
6423
6596
|
scrollableTarget,
|
|
6424
6597
|
dataLength: items.length,
|
|
6425
6598
|
next: fetchMoreData,
|
|
6426
6599
|
hasMore,
|
|
6427
|
-
loader: /* @__PURE__ */ (0,
|
|
6428
|
-
/* @__PURE__ */ (0,
|
|
6600
|
+
loader: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "matchid-list-nomore", children: [
|
|
6601
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
|
|
6429
6602
|
"Loading..."
|
|
6430
6603
|
] }),
|
|
6431
|
-
endMessage: items.length > 0 ? /* @__PURE__ */ (0,
|
|
6432
|
-
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0,
|
|
6604
|
+
endMessage: items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl18.FormattedMessage, { id: "noMoreRecords" }) }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl18.FormattedMessage, { id: "noRecords" }) }),
|
|
6605
|
+
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "mt-[150px]" }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Item, { data: item }, index)) })
|
|
6433
6606
|
}
|
|
6434
6607
|
);
|
|
6435
6608
|
}
|
|
@@ -6510,27 +6683,31 @@ __export(user_exports, {
|
|
|
6510
6683
|
// src/hooks/api/contact.ts
|
|
6511
6684
|
var contact_exports = {};
|
|
6512
6685
|
__export(contact_exports, {
|
|
6513
|
-
|
|
6686
|
+
acceptContact: () => acceptContact,
|
|
6687
|
+
addContact: () => addContact,
|
|
6688
|
+
delContact: () => delContact,
|
|
6689
|
+
useContactInfo: () => useContactInfo,
|
|
6690
|
+
useContactList: () => useContactList,
|
|
6691
|
+
useContactSearch: () => useContactSearch
|
|
6514
6692
|
});
|
|
6515
6693
|
var import_react_query6 = require("@tanstack/react-query");
|
|
6516
|
-
var import_uniqBy = __toESM(require("lodash/uniqBy"));
|
|
6517
6694
|
var import_last = __toESM(require("lodash/last"));
|
|
6695
|
+
var import_react34 = require("react");
|
|
6518
6696
|
function useContactList(page_size = 10, type = "Friend") {
|
|
6519
6697
|
const { token } = useLocalStore_default();
|
|
6520
|
-
const
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
isLoading,
|
|
6525
|
-
isError,
|
|
6526
|
-
isFetchingNextPage
|
|
6527
|
-
} = (0, import_react_query6.useInfiniteQuery)({
|
|
6528
|
-
queryKey: ["contacts", type, token],
|
|
6698
|
+
const limitIdRef = (0, import_react34.useRef)(0);
|
|
6699
|
+
const queryClient2 = (0, import_react_query6.useQueryClient)();
|
|
6700
|
+
const contactQuery = (0, import_react_query6.useInfiniteQuery)({
|
|
6701
|
+
queryKey: ["matchid-contacts-list", type, token],
|
|
6529
6702
|
initialPageParam: 1,
|
|
6530
|
-
queryFn: async (
|
|
6703
|
+
queryFn: async (args) => {
|
|
6704
|
+
console.log(args);
|
|
6705
|
+
if (args.pageParam <= 1) {
|
|
6706
|
+
limitIdRef.current = 0;
|
|
6707
|
+
}
|
|
6531
6708
|
return (await getContactListApi({
|
|
6532
|
-
|
|
6533
|
-
|
|
6709
|
+
limit: page_size,
|
|
6710
|
+
limit_id: limitIdRef.current,
|
|
6534
6711
|
type
|
|
6535
6712
|
})).data;
|
|
6536
6713
|
},
|
|
@@ -6540,49 +6717,162 @@ function useContactList(page_size = 10, type = "Friend") {
|
|
|
6540
6717
|
return allPages.length >= lastPageNum ? void 0 : allPages.length + 1;
|
|
6541
6718
|
}
|
|
6542
6719
|
});
|
|
6720
|
+
(0, import_react34.useEffect)(() => {
|
|
6721
|
+
if (!contactQuery.data?.pages || contactQuery.data?.pages.length == 0) {
|
|
6722
|
+
limitIdRef.current = 0;
|
|
6723
|
+
} else {
|
|
6724
|
+
const lastPage = (0, import_last.default)(contactQuery.data?.pages);
|
|
6725
|
+
const items = lastPage?.items;
|
|
6726
|
+
if (!items || items.length == 0) {
|
|
6727
|
+
limitIdRef.current = 0;
|
|
6728
|
+
return;
|
|
6729
|
+
}
|
|
6730
|
+
const lastItem = (0, import_last.default)(items);
|
|
6731
|
+
limitIdRef.current = lastItem?.limit_id || 0;
|
|
6732
|
+
}
|
|
6733
|
+
}, [contactQuery.data?.pages]);
|
|
6543
6734
|
return {
|
|
6544
|
-
data: (
|
|
6545
|
-
(
|
|
6546
|
-
(
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
[]
|
|
6550
|
-
),
|
|
6551
|
-
"address"
|
|
6735
|
+
data: (contactQuery.data?.pages ?? []).reduce(
|
|
6736
|
+
(a, b) => {
|
|
6737
|
+
return a.concat(b?.items ?? []);
|
|
6738
|
+
},
|
|
6739
|
+
[]
|
|
6552
6740
|
),
|
|
6553
|
-
totalCount: hasNextPage ? ((0, import_last.default)(data?.pages ?? [])?.meta.total ?? 0) + 1 : (0, import_last.default)(data?.pages ?? [])?.meta.total ?? 0,
|
|
6554
|
-
loading: isLoading,
|
|
6555
|
-
loadingNextPage: isFetchingNextPage,
|
|
6556
|
-
hasNextPage,
|
|
6557
|
-
onLoadMore: fetchNextPage
|
|
6741
|
+
totalCount: contactQuery.hasNextPage ? ((0, import_last.default)(contactQuery.data?.pages ?? [])?.meta.total ?? 0) + 1 : (0, import_last.default)(contactQuery.data?.pages ?? [])?.meta.total ?? 0,
|
|
6742
|
+
loading: contactQuery.isLoading,
|
|
6743
|
+
loadingNextPage: contactQuery.isFetchingNextPage,
|
|
6744
|
+
hasNextPage: contactQuery.hasNextPage,
|
|
6745
|
+
onLoadMore: contactQuery.fetchNextPage
|
|
6558
6746
|
};
|
|
6559
6747
|
}
|
|
6748
|
+
function useContactSearch(keyword, options) {
|
|
6749
|
+
return (0, import_react_query6.useQuery)({
|
|
6750
|
+
queryKey: ["matchid-contacts-search", keyword],
|
|
6751
|
+
enabled: !!keyword,
|
|
6752
|
+
queryFn: async () => {
|
|
6753
|
+
return (await searchContactsApi({
|
|
6754
|
+
address: keyword
|
|
6755
|
+
})).data;
|
|
6756
|
+
},
|
|
6757
|
+
...options
|
|
6758
|
+
});
|
|
6759
|
+
}
|
|
6760
|
+
function useContactInfo(options) {
|
|
6761
|
+
const { token } = useUserInfo();
|
|
6762
|
+
return (0, import_react_query6.useQuery)({
|
|
6763
|
+
queryKey: ["matchid-contacts-info", token],
|
|
6764
|
+
enabled: !!token,
|
|
6765
|
+
queryFn: async () => {
|
|
6766
|
+
return (await getContractsInfoApi()).data;
|
|
6767
|
+
},
|
|
6768
|
+
...options
|
|
6769
|
+
});
|
|
6770
|
+
}
|
|
6771
|
+
var addContact = async (friend_id) => {
|
|
6772
|
+
const res = await addContactsApi({
|
|
6773
|
+
friend_id: typeof friend_id === "string" ? friend_id : friend_id.did
|
|
6774
|
+
});
|
|
6775
|
+
if (isSuccess(res)) {
|
|
6776
|
+
return true;
|
|
6777
|
+
}
|
|
6778
|
+
throw new Error(res.message);
|
|
6779
|
+
};
|
|
6780
|
+
var acceptContact = async (friend_id) => {
|
|
6781
|
+
const res = await acceptContactsApi({
|
|
6782
|
+
friend_id: typeof friend_id === "string" ? friend_id : friend_id.did
|
|
6783
|
+
});
|
|
6784
|
+
if (isSuccess(res)) {
|
|
6785
|
+
return true;
|
|
6786
|
+
}
|
|
6787
|
+
throw new Error(res.message);
|
|
6788
|
+
};
|
|
6789
|
+
var delContact = async (friend_id) => {
|
|
6790
|
+
const res = await delContactsApi({
|
|
6791
|
+
friend_id: typeof friend_id === "string" ? friend_id : friend_id.did
|
|
6792
|
+
});
|
|
6793
|
+
if (isSuccess(res)) {
|
|
6794
|
+
return true;
|
|
6795
|
+
}
|
|
6796
|
+
throw new Error(res.message);
|
|
6797
|
+
};
|
|
6560
6798
|
|
|
6561
6799
|
// src/components/ContactList/index.tsx
|
|
6562
6800
|
var import_react_virtuoso = require("react-virtuoso");
|
|
6563
|
-
var
|
|
6801
|
+
var import_react35 = require("react");
|
|
6802
|
+
var import_react_intl19 = require("react-intl");
|
|
6803
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
6564
6804
|
function ContactCard({
|
|
6565
6805
|
loading = false,
|
|
6566
|
-
data
|
|
6806
|
+
data,
|
|
6807
|
+
action
|
|
6567
6808
|
}) {
|
|
6568
|
-
return /* @__PURE__ */ (0,
|
|
6569
|
-
/* @__PURE__ */ (0,
|
|
6570
|
-
/* @__PURE__ */ (0,
|
|
6571
|
-
/* @__PURE__ */ (0,
|
|
6572
|
-
/* @__PURE__ */ (0,
|
|
6573
|
-
/* @__PURE__ */ (0,
|
|
6809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-flex matchid-contact-item", children: [
|
|
6810
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-contact-item-content", children: [
|
|
6811
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Skeleton_default, { width: 48, height: 48, radius: 100, loading, children: data?.avatar ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("img", { src: data?.avatar, className: "matchid-contact-item-avatar" }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(AlphaAvatar, { size: 48, name: data?.name || "MatchID" }) }),
|
|
6812
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-contact-item-info", children: [
|
|
6813
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "matchid-contact-item-name", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Skeleton_default, { width: 80, height: 20, loading, children: data?.name || "MatchID User" }) }),
|
|
6814
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "matchid-contact-item-address", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Skeleton_default, { width: 80, height: 16, loading, children: truncateAddress(data?.address || "", 6, 6) }) })
|
|
6574
6815
|
] })
|
|
6575
6816
|
] }),
|
|
6576
|
-
/* @__PURE__ */ (0,
|
|
6817
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "matchid-contact-item-action", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Skeleton_default, { width: 20, height: 20, loading, children: action() }) })
|
|
6577
6818
|
] });
|
|
6578
6819
|
}
|
|
6820
|
+
function RequestAction({ data, onSuccess }) {
|
|
6821
|
+
const [loading, setLoading] = (0, import_react35.useState)(false);
|
|
6822
|
+
const toast = useToast();
|
|
6823
|
+
const intl = (0, import_react_intl19.useIntl)();
|
|
6824
|
+
const onApprove = async () => {
|
|
6825
|
+
setLoading(true);
|
|
6826
|
+
try {
|
|
6827
|
+
await contact_exports.acceptContact(data);
|
|
6828
|
+
toast.success(intl.formatMessage({
|
|
6829
|
+
id: "approveSuccess"
|
|
6830
|
+
}));
|
|
6831
|
+
onSuccess && onSuccess(data);
|
|
6832
|
+
} catch (e) {
|
|
6833
|
+
console.error(e);
|
|
6834
|
+
toast.error(e.message);
|
|
6835
|
+
} finally {
|
|
6836
|
+
setLoading(false);
|
|
6837
|
+
}
|
|
6838
|
+
};
|
|
6839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { size: "sm", onClick: onApprove, loading, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl19.FormattedMessage, { id: "Approve" }) });
|
|
6840
|
+
}
|
|
6841
|
+
function FriendsAction({
|
|
6842
|
+
data,
|
|
6843
|
+
onSuccess
|
|
6844
|
+
}) {
|
|
6845
|
+
const [loading, setLoading] = (0, import_react35.useState)(false);
|
|
6846
|
+
const toast = useToast();
|
|
6847
|
+
const intl = (0, import_react_intl19.useIntl)();
|
|
6848
|
+
const onRemove = async () => {
|
|
6849
|
+
setLoading(true);
|
|
6850
|
+
try {
|
|
6851
|
+
await contact_exports.delContact(data);
|
|
6852
|
+
toast.success(intl.formatMessage({
|
|
6853
|
+
id: "removeSuccess"
|
|
6854
|
+
}));
|
|
6855
|
+
onSuccess && onSuccess(data);
|
|
6856
|
+
} catch (e) {
|
|
6857
|
+
console.error(e);
|
|
6858
|
+
toast.error(e.message);
|
|
6859
|
+
} finally {
|
|
6860
|
+
setLoading(false);
|
|
6861
|
+
}
|
|
6862
|
+
};
|
|
6863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "matchid-remove-box", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { size: "sm", loading, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl19.FormattedMessage, { id: "Remove" }) }) }), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(MoreIcon, { className: "matchid-cursor-pointer" }) });
|
|
6864
|
+
}
|
|
6579
6865
|
function ContactList({
|
|
6866
|
+
limit = 10,
|
|
6580
6867
|
height = 660,
|
|
6581
6868
|
type = "Friend"
|
|
6582
6869
|
}) {
|
|
6583
|
-
const { loading, totalCount, data, onLoadMore } = contact_exports.useContactList(
|
|
6584
|
-
|
|
6585
|
-
|
|
6870
|
+
const { loading, totalCount, data, onLoadMore } = contact_exports.useContactList(limit, type);
|
|
6871
|
+
const [hiddenList, setHiddenList] = (0, import_react35.useState)([]);
|
|
6872
|
+
(0, import_react35.useEffect)(() => {
|
|
6873
|
+
setHiddenList([]);
|
|
6874
|
+
}, [type]);
|
|
6875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
6586
6876
|
import_react_virtuoso.Virtuoso,
|
|
6587
6877
|
{
|
|
6588
6878
|
style: {
|
|
@@ -6591,16 +6881,29 @@ function ContactList({
|
|
|
6591
6881
|
totalCount: loading ? 10 : totalCount,
|
|
6592
6882
|
itemContent: (index) => {
|
|
6593
6883
|
if (loading || !data[index]) {
|
|
6594
|
-
return /* @__PURE__ */ (0,
|
|
6884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ContactCard, { loading: true });
|
|
6885
|
+
}
|
|
6886
|
+
if (hiddenList.includes(data[index].limit_id || 0)) {
|
|
6887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_jsx_runtime93.Fragment, {});
|
|
6595
6888
|
}
|
|
6596
6889
|
const item = data[index];
|
|
6597
|
-
return /* @__PURE__ */ (0,
|
|
6890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ContactCard, { data: item, action: () => {
|
|
6891
|
+
if (type == "Requests") {
|
|
6892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(RequestAction, { data: item, onSuccess: (data2) => {
|
|
6893
|
+
setHiddenList([...hiddenList, data2.limit_id || 0]);
|
|
6894
|
+
} });
|
|
6895
|
+
}
|
|
6896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(FriendsAction, { data: item, onSuccess: (data2) => {
|
|
6897
|
+
setHiddenList([...hiddenList, data2.limit_id || 0]);
|
|
6898
|
+
} });
|
|
6899
|
+
} });
|
|
6598
6900
|
},
|
|
6599
6901
|
endReached: () => {
|
|
6600
6902
|
onLoadMore();
|
|
6601
6903
|
},
|
|
6602
6904
|
components: {
|
|
6603
|
-
|
|
6905
|
+
EmptyPlaceholder: () => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "matchid-nomore", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl19.FormattedMessage, { id: type == "Friend" ? "noFriends" : "noRequests" }) }),
|
|
6906
|
+
Footer: data.length > 0 ? () => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "matchid-nomore", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl19.FormattedMessage, { id: "noMore" }) }) : void 0
|
|
6604
6907
|
}
|
|
6605
6908
|
}
|
|
6606
6909
|
);
|
|
@@ -6608,14 +6911,14 @@ function ContactList({
|
|
|
6608
6911
|
|
|
6609
6912
|
// src/hooks/useMatchWallet.tsx
|
|
6610
6913
|
var import_react_qrcode = require("react-qrcode");
|
|
6611
|
-
var
|
|
6914
|
+
var import_react37 = require("react");
|
|
6612
6915
|
var import_react_query9 = require("@tanstack/react-query");
|
|
6613
6916
|
var import_viem15 = require("viem");
|
|
6614
|
-
var
|
|
6917
|
+
var import_react_intl21 = require("react-intl");
|
|
6615
6918
|
|
|
6616
6919
|
// src/components/ImportToken/index.tsx
|
|
6617
|
-
var
|
|
6618
|
-
var
|
|
6920
|
+
var import_react36 = require("react");
|
|
6921
|
+
var import_react_intl20 = require("react-intl");
|
|
6619
6922
|
var import_react_query8 = require("@tanstack/react-query");
|
|
6620
6923
|
var import_viem14 = require("viem");
|
|
6621
6924
|
|
|
@@ -6644,14 +6947,14 @@ function useIsContract({
|
|
|
6644
6947
|
}
|
|
6645
6948
|
|
|
6646
6949
|
// src/components/ImportToken/index.tsx
|
|
6647
|
-
var
|
|
6950
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
6648
6951
|
function ImportToken({ close }) {
|
|
6649
|
-
const [status, setStatus] = (0,
|
|
6952
|
+
const [status, setStatus] = (0, import_react36.useState)("");
|
|
6650
6953
|
const { token } = useUserInfo();
|
|
6651
|
-
const [address, setAddress] = (0,
|
|
6652
|
-
const [symbol, setSymbol] = (0,
|
|
6653
|
-
const [decimals, setDecimals] = (0,
|
|
6654
|
-
const [error, setError] = (0,
|
|
6954
|
+
const [address, setAddress] = (0, import_react36.useState)("");
|
|
6955
|
+
const [symbol, setSymbol] = (0, import_react36.useState)("");
|
|
6956
|
+
const [decimals, setDecimals] = (0, import_react36.useState)("");
|
|
6957
|
+
const [error, setError] = (0, import_react36.useState)({});
|
|
6655
6958
|
const { publicClient, chainId, chain } = useMatchChain();
|
|
6656
6959
|
const getContractInfo = async () => {
|
|
6657
6960
|
if (!publicClient) return;
|
|
@@ -6684,8 +6987,8 @@ function ImportToken({ close }) {
|
|
|
6684
6987
|
});
|
|
6685
6988
|
}
|
|
6686
6989
|
};
|
|
6687
|
-
const intl = (0,
|
|
6688
|
-
(0,
|
|
6990
|
+
const intl = (0, import_react_intl20.useIntl)();
|
|
6991
|
+
(0, import_react36.useEffect)(() => {
|
|
6689
6992
|
if (address.length === 42) {
|
|
6690
6993
|
const reg = /^0x[0-9a-fA-F]{40}$/;
|
|
6691
6994
|
if (!reg.test(address)) {
|
|
@@ -6704,7 +7007,7 @@ function ImportToken({ close }) {
|
|
|
6704
7007
|
}
|
|
6705
7008
|
}
|
|
6706
7009
|
}, [address, publicClient]);
|
|
6707
|
-
const [loading, setLoading] = (0,
|
|
7010
|
+
const [loading, setLoading] = (0, import_react36.useState)(false);
|
|
6708
7011
|
const toast = useToast();
|
|
6709
7012
|
const queryClient2 = (0, import_react_query8.useQueryClient)();
|
|
6710
7013
|
const onImport = async () => {
|
|
@@ -6732,7 +7035,7 @@ function ImportToken({ close }) {
|
|
|
6732
7035
|
setLoading(false);
|
|
6733
7036
|
}
|
|
6734
7037
|
};
|
|
6735
|
-
const canImport = (0,
|
|
7038
|
+
const canImport = (0, import_react36.useMemo)(() => {
|
|
6736
7039
|
if (!address) {
|
|
6737
7040
|
return false;
|
|
6738
7041
|
}
|
|
@@ -6755,19 +7058,19 @@ function ImportToken({ close }) {
|
|
|
6755
7058
|
enabled: canImport
|
|
6756
7059
|
});
|
|
6757
7060
|
if (status == "success" || status == "fail") {
|
|
6758
|
-
return /* @__PURE__ */ (0,
|
|
6759
|
-
/* @__PURE__ */ (0,
|
|
6760
|
-
/* @__PURE__ */ (0,
|
|
6761
|
-
/* @__PURE__ */ (0,
|
|
7061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-import-token-result matchid-flex`, children: [
|
|
7062
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-import-token-result-box matchid-flex`, children: [
|
|
7063
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("img", { src: status == "success" ? success_default : fail_default, alt: status == "success" ? "success" : "fail", className: `matchid-import-token-result-img` }),
|
|
7064
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-import-token-result-text matchid-import-token-result-text-${status}`, children: status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl20.FormattedMessage, { id: "importSuccess" }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl20.FormattedMessage, { id: "importFail" }) })
|
|
6762
7065
|
] }),
|
|
6763
|
-
status == "success" ? /* @__PURE__ */ (0,
|
|
7066
|
+
status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Button, { size: "lg", onClick: close, block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl20.FormattedMessage, { id: "close" }) }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Button, { size: "lg", onClick: () => setStatus(""), block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl20.FormattedMessage, { id: "back" }) })
|
|
6764
7067
|
] });
|
|
6765
7068
|
}
|
|
6766
|
-
return /* @__PURE__ */ (0,
|
|
6767
|
-
/* @__PURE__ */ (0,
|
|
6768
|
-
/* @__PURE__ */ (0,
|
|
7069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-import-token`, children: [
|
|
7070
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "matchid-import-token-form", children: [
|
|
7071
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Field, { label: intl.formatMessage({
|
|
6769
7072
|
id: "tokenSmartContract"
|
|
6770
|
-
}), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0,
|
|
7073
|
+
}), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
6771
7074
|
Input,
|
|
6772
7075
|
{
|
|
6773
7076
|
placeholder: intl.formatMessage({
|
|
@@ -6778,9 +7081,9 @@ function ImportToken({ close }) {
|
|
|
6778
7081
|
maxLength: 42
|
|
6779
7082
|
}
|
|
6780
7083
|
) }),
|
|
6781
|
-
/* @__PURE__ */ (0,
|
|
7084
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Field, { label: intl.formatMessage({
|
|
6782
7085
|
id: "tokenSymbol"
|
|
6783
|
-
}), error: error.symbol, children: /* @__PURE__ */ (0,
|
|
7086
|
+
}), error: error.symbol, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
6784
7087
|
Input,
|
|
6785
7088
|
{
|
|
6786
7089
|
placeholder: intl.formatMessage({
|
|
@@ -6791,9 +7094,9 @@ function ImportToken({ close }) {
|
|
|
6791
7094
|
maxLength: 16
|
|
6792
7095
|
}
|
|
6793
7096
|
) }),
|
|
6794
|
-
/* @__PURE__ */ (0,
|
|
7097
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Field, { label: intl.formatMessage({
|
|
6795
7098
|
id: "tokenDecimals"
|
|
6796
|
-
}), error: error.decimals, children: /* @__PURE__ */ (0,
|
|
7099
|
+
}), error: error.decimals, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
6797
7100
|
Input,
|
|
6798
7101
|
{
|
|
6799
7102
|
placeholder: intl.formatMessage({
|
|
@@ -6805,7 +7108,7 @@ function ImportToken({ close }) {
|
|
|
6805
7108
|
}
|
|
6806
7109
|
) })
|
|
6807
7110
|
] }),
|
|
6808
|
-
/* @__PURE__ */ (0,
|
|
7111
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
6809
7112
|
Button,
|
|
6810
7113
|
{
|
|
6811
7114
|
size: "lg",
|
|
@@ -6814,20 +7117,20 @@ function ImportToken({ close }) {
|
|
|
6814
7117
|
loading: loading || isContractQuery.isLoading,
|
|
6815
7118
|
disabled: !canImport || !isContractQuery.data,
|
|
6816
7119
|
highlight: true,
|
|
6817
|
-
children: /* @__PURE__ */ (0,
|
|
7120
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl20.FormattedMessage, { id: "import" })
|
|
6818
7121
|
}
|
|
6819
7122
|
)
|
|
6820
7123
|
] });
|
|
6821
7124
|
}
|
|
6822
7125
|
|
|
6823
7126
|
// src/hooks/useMatchWallet.tsx
|
|
6824
|
-
var
|
|
7127
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
6825
7128
|
var ReceiveModal = () => {
|
|
6826
7129
|
const chain = useMatchChain();
|
|
6827
7130
|
const { address } = useWallet();
|
|
6828
7131
|
const [copied, setCopied] = useCopyClipboard();
|
|
6829
7132
|
const toast = useToast();
|
|
6830
|
-
const intl = (0,
|
|
7133
|
+
const intl = (0, import_react_intl21.useIntl)();
|
|
6831
7134
|
const onCopy = () => {
|
|
6832
7135
|
setCopied(address);
|
|
6833
7136
|
toast.success(intl.formatMessage({
|
|
@@ -6835,10 +7138,10 @@ var ReceiveModal = () => {
|
|
|
6835
7138
|
}));
|
|
6836
7139
|
};
|
|
6837
7140
|
const chainLink = chain.explorerLink("address/" + address);
|
|
6838
|
-
return /* @__PURE__ */ (0,
|
|
6839
|
-
/* @__PURE__ */ (0,
|
|
6840
|
-
/* @__PURE__ */ (0,
|
|
6841
|
-
/* @__PURE__ */ (0,
|
|
7141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-receive-modal`, children: [
|
|
7142
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "matchid-receive-container", children: [
|
|
7143
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl21.FormattedMessage, { id: "receiveQrcode" }) }),
|
|
7144
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-qr-container`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
6842
7145
|
import_react_qrcode.QRCode,
|
|
6843
7146
|
{
|
|
6844
7147
|
margin: "0",
|
|
@@ -6846,7 +7149,7 @@ var ReceiveModal = () => {
|
|
|
6846
7149
|
value: address
|
|
6847
7150
|
}
|
|
6848
7151
|
) }),
|
|
6849
|
-
/* @__PURE__ */ (0,
|
|
7152
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
6850
7153
|
"a",
|
|
6851
7154
|
{
|
|
6852
7155
|
href: chainLink,
|
|
@@ -6856,8 +7159,8 @@ var ReceiveModal = () => {
|
|
|
6856
7159
|
}
|
|
6857
7160
|
)
|
|
6858
7161
|
] }),
|
|
6859
|
-
/* @__PURE__ */ (0,
|
|
6860
|
-
|
|
7162
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Button, { size: "lg", onClick: onCopy, block: true, highlight: true, disabled: copied, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
7163
|
+
import_react_intl21.FormattedMessage,
|
|
6861
7164
|
{
|
|
6862
7165
|
id: "copyAddress"
|
|
6863
7166
|
}
|
|
@@ -6866,7 +7169,7 @@ var ReceiveModal = () => {
|
|
|
6866
7169
|
};
|
|
6867
7170
|
function useMatchWallet() {
|
|
6868
7171
|
const modal = useModal();
|
|
6869
|
-
const intl = (0,
|
|
7172
|
+
const intl = (0, import_react_intl21.useIntl)();
|
|
6870
7173
|
const showReceiveModal = () => {
|
|
6871
7174
|
modal.open({
|
|
6872
7175
|
title: intl.formatMessage({
|
|
@@ -6898,12 +7201,12 @@ function useMatchWallet() {
|
|
|
6898
7201
|
};
|
|
6899
7202
|
}
|
|
6900
7203
|
function useMatchWalletRecords() {
|
|
6901
|
-
const [hasMore, setHasMore] = (0,
|
|
6902
|
-
const [items, setItems] = (0,
|
|
7204
|
+
const [hasMore, setHasMore] = (0, import_react37.useState)(true);
|
|
7205
|
+
const [items, setItems] = (0, import_react37.useState)([]);
|
|
6903
7206
|
const { chainId, publicClient } = useMatchChain();
|
|
6904
7207
|
const { address } = useWallet();
|
|
6905
|
-
const hasMoreRef = (0,
|
|
6906
|
-
const nextPageParamsRef = (0,
|
|
7208
|
+
const hasMoreRef = (0, import_react37.useRef)(hasMore);
|
|
7209
|
+
const nextPageParamsRef = (0, import_react37.useRef)(void 0);
|
|
6907
7210
|
const { contracts, setContracts } = useContractStore_default();
|
|
6908
7211
|
const fetchMoreData = async () => {
|
|
6909
7212
|
const chainIdStr = chainId ? chainId.toString() : "";
|
|
@@ -6930,7 +7233,7 @@ function useMatchWalletRecords() {
|
|
|
6930
7233
|
hasMoreRef.current = true;
|
|
6931
7234
|
fetchMoreData();
|
|
6932
7235
|
};
|
|
6933
|
-
(0,
|
|
7236
|
+
(0, import_react37.useEffect)(() => {
|
|
6934
7237
|
if (chainId && address) {
|
|
6935
7238
|
onInit();
|
|
6936
7239
|
}
|
|
@@ -6986,7 +7289,7 @@ function useMatchWalletRecords() {
|
|
|
6986
7289
|
setContracts(contractMap);
|
|
6987
7290
|
}
|
|
6988
7291
|
};
|
|
6989
|
-
const list = (0,
|
|
7292
|
+
const list = (0, import_react37.useMemo)(() => {
|
|
6990
7293
|
const localTransactions = transactions[`${chainId}-${address}`] || [];
|
|
6991
7294
|
const removeList = localTransactions.filter((n) => items.findIndex((m) => m.hash == n.hash) >= 0);
|
|
6992
7295
|
removeList.forEach((item) => {
|
|
@@ -7028,7 +7331,7 @@ function useMatchWalletAssets({
|
|
|
7028
7331
|
chainId: chainId || 0,
|
|
7029
7332
|
...assetListOptions
|
|
7030
7333
|
});
|
|
7031
|
-
const mergedAssets = (0,
|
|
7334
|
+
const mergedAssets = (0, import_react37.useMemo)(() => {
|
|
7032
7335
|
if (!assetListQuery.data && !importTokenQuery.data) return [];
|
|
7033
7336
|
const assetList = (assetListQuery.data || []).map((asset) => ({
|
|
7034
7337
|
...asset,
|
|
@@ -7115,7 +7418,7 @@ function useMatchWalletAssetList({
|
|
|
7115
7418
|
retry: 3
|
|
7116
7419
|
// Retry up to 3 times if failed
|
|
7117
7420
|
});
|
|
7118
|
-
const erc20Tokens = (0,
|
|
7421
|
+
const erc20Tokens = (0, import_react37.useMemo)(() => list.filter((asset) => asset.address !== NATIVE_TOKEN_ADDRESS), [list]);
|
|
7119
7422
|
const erc20BalanceQuery = (0, import_react_query9.useQuery)({
|
|
7120
7423
|
queryKey: ["erc20Balances", erc20Tokens.map((token) => token.address)],
|
|
7121
7424
|
queryFn: async () => {
|
|
@@ -7143,7 +7446,7 @@ function useMatchWalletAssetList({
|
|
|
7143
7446
|
// Refresh every 15 seconds
|
|
7144
7447
|
retry: 3
|
|
7145
7448
|
});
|
|
7146
|
-
const enrichedAssets = (0,
|
|
7449
|
+
const enrichedAssets = (0, import_react37.useMemo)(() => {
|
|
7147
7450
|
if (!list) return [];
|
|
7148
7451
|
const erc20Balances = erc20BalanceQuery.data || [];
|
|
7149
7452
|
return list.map((asset) => {
|
|
@@ -7165,7 +7468,7 @@ function useMatchWalletAssetList({
|
|
|
7165
7468
|
return { ...asset, balance, value, balanceValue };
|
|
7166
7469
|
});
|
|
7167
7470
|
}, [list, nativeBalanceQuery.data, erc20BalanceQuery.data]);
|
|
7168
|
-
(0,
|
|
7471
|
+
(0, import_react37.useEffect)(() => {
|
|
7169
7472
|
const list2 = enrichedAssets.sort((a, b) => {
|
|
7170
7473
|
if (a.address === NATIVE_TOKEN_ADDRESS) return -1;
|
|
7171
7474
|
if (b.address === NATIVE_TOKEN_ADDRESS) return 1;
|
|
@@ -7190,14 +7493,14 @@ function useMatchWalletAssetList({
|
|
|
7190
7493
|
}
|
|
7191
7494
|
|
|
7192
7495
|
// src/hooks/useReceipt.tsx
|
|
7193
|
-
var
|
|
7496
|
+
var import_react38 = require("react");
|
|
7194
7497
|
var import_react_query10 = require("@tanstack/react-query");
|
|
7195
7498
|
var import_viem16 = require("viem");
|
|
7196
7499
|
var CACHE_TTL = 86400 * 30 * 1e3;
|
|
7197
7500
|
var MAX_CACHE_SIZE = 500;
|
|
7198
7501
|
var STORAGE_KEY = "match_receipt_logs";
|
|
7199
7502
|
function useReceiptCache() {
|
|
7200
|
-
const [cache, setCache] = (0,
|
|
7503
|
+
const [cache, setCache] = (0, import_react38.useState)(/* @__PURE__ */ new Map());
|
|
7201
7504
|
const isLocalStorageAvailable = (() => {
|
|
7202
7505
|
try {
|
|
7203
7506
|
const testKey = "__test__";
|
|
@@ -7208,7 +7511,7 @@ function useReceiptCache() {
|
|
|
7208
7511
|
return false;
|
|
7209
7512
|
}
|
|
7210
7513
|
})();
|
|
7211
|
-
(0,
|
|
7514
|
+
(0, import_react38.useEffect)(() => {
|
|
7212
7515
|
if (isLocalStorageAvailable) {
|
|
7213
7516
|
try {
|
|
7214
7517
|
const storedData = localStorage.getItem(STORAGE_KEY);
|
|
@@ -7227,7 +7530,7 @@ function useReceiptCache() {
|
|
|
7227
7530
|
}
|
|
7228
7531
|
}
|
|
7229
7532
|
}, []);
|
|
7230
|
-
const updateLocalStorage = (0,
|
|
7533
|
+
const updateLocalStorage = (0, import_react38.useCallback)((updatedCache) => {
|
|
7231
7534
|
if (isLocalStorageAvailable) {
|
|
7232
7535
|
try {
|
|
7233
7536
|
const storedData = localStorage.getItem(STORAGE_KEY);
|
|
@@ -7244,7 +7547,7 @@ function useReceiptCache() {
|
|
|
7244
7547
|
}
|
|
7245
7548
|
}
|
|
7246
7549
|
}, []);
|
|
7247
|
-
const set = (0,
|
|
7550
|
+
const set = (0, import_react38.useCallback)((key, value) => {
|
|
7248
7551
|
const now = Date.now();
|
|
7249
7552
|
const newCache = new Map(cache);
|
|
7250
7553
|
newCache.forEach((entry, k) => {
|
|
@@ -7262,7 +7565,7 @@ function useReceiptCache() {
|
|
|
7262
7565
|
setCache(newCache);
|
|
7263
7566
|
updateLocalStorage(newCache);
|
|
7264
7567
|
}, [cache, updateLocalStorage]);
|
|
7265
|
-
const get = (0,
|
|
7568
|
+
const get = (0, import_react38.useCallback)((key) => {
|
|
7266
7569
|
const entry = cache.get(key);
|
|
7267
7570
|
if (entry) {
|
|
7268
7571
|
if (Date.now() - entry.timestamp > CACHE_TTL) {
|
|
@@ -7276,7 +7579,7 @@ function useReceiptCache() {
|
|
|
7276
7579
|
}
|
|
7277
7580
|
return void 0;
|
|
7278
7581
|
}, [cache, updateLocalStorage]);
|
|
7279
|
-
const del = (0,
|
|
7582
|
+
const del = (0, import_react38.useCallback)((key) => {
|
|
7280
7583
|
if (cache.has(key)) {
|
|
7281
7584
|
const newCache = new Map(cache);
|
|
7282
7585
|
newCache.delete(key);
|
|
@@ -7284,7 +7587,7 @@ function useReceiptCache() {
|
|
|
7284
7587
|
updateLocalStorage(newCache);
|
|
7285
7588
|
}
|
|
7286
7589
|
}, [cache, updateLocalStorage]);
|
|
7287
|
-
const clear = (0,
|
|
7590
|
+
const clear = (0, import_react38.useCallback)(() => {
|
|
7288
7591
|
setCache(/* @__PURE__ */ new Map());
|
|
7289
7592
|
if (isLocalStorageAvailable) {
|
|
7290
7593
|
localStorage.removeItem(STORAGE_KEY);
|
|
@@ -7299,7 +7602,7 @@ function useReceipt2({
|
|
|
7299
7602
|
const { list } = useMatchChain();
|
|
7300
7603
|
const cache = useReceiptCache();
|
|
7301
7604
|
const chain = list?.find((item) => item.id === chainId);
|
|
7302
|
-
const [shouldRefetch, setShouldRefetch] = (0,
|
|
7605
|
+
const [shouldRefetch, setShouldRefetch] = (0, import_react38.useState)(true);
|
|
7303
7606
|
const query = (0, import_react_query10.useQuery)({
|
|
7304
7607
|
queryKey: ["match-tx-receipt", hash, chain],
|
|
7305
7608
|
queryFn: async () => {
|
|
@@ -7325,7 +7628,7 @@ function useReceipt2({
|
|
|
7325
7628
|
},
|
|
7326
7629
|
refetchInterval: shouldRefetch ? 1e4 : false
|
|
7327
7630
|
});
|
|
7328
|
-
(0,
|
|
7631
|
+
(0, import_react38.useEffect)(() => {
|
|
7329
7632
|
if (query.data) {
|
|
7330
7633
|
setShouldRefetch(false);
|
|
7331
7634
|
}
|
|
@@ -7334,14 +7637,14 @@ function useReceipt2({
|
|
|
7334
7637
|
}
|
|
7335
7638
|
|
|
7336
7639
|
// src/hooks/useTransaction.tsx
|
|
7337
|
-
var
|
|
7640
|
+
var import_react39 = require("react");
|
|
7338
7641
|
var import_react_query11 = require("@tanstack/react-query");
|
|
7339
7642
|
var import_viem17 = require("viem");
|
|
7340
7643
|
var CACHE_TTL2 = 86400 * 30 * 1e3;
|
|
7341
7644
|
var MAX_CACHE_SIZE2 = 500;
|
|
7342
7645
|
var STORAGE_KEY2 = "match_transaction_logs";
|
|
7343
7646
|
function useTransactionCache() {
|
|
7344
|
-
const [cache, setCache] = (0,
|
|
7647
|
+
const [cache, setCache] = (0, import_react39.useState)(/* @__PURE__ */ new Map());
|
|
7345
7648
|
const isLocalStorageAvailable = (() => {
|
|
7346
7649
|
try {
|
|
7347
7650
|
const testKey = "__test__";
|
|
@@ -7352,7 +7655,7 @@ function useTransactionCache() {
|
|
|
7352
7655
|
return false;
|
|
7353
7656
|
}
|
|
7354
7657
|
})();
|
|
7355
|
-
(0,
|
|
7658
|
+
(0, import_react39.useEffect)(() => {
|
|
7356
7659
|
if (isLocalStorageAvailable) {
|
|
7357
7660
|
try {
|
|
7358
7661
|
const storedData = localStorage.getItem(STORAGE_KEY2);
|
|
@@ -7371,7 +7674,7 @@ function useTransactionCache() {
|
|
|
7371
7674
|
}
|
|
7372
7675
|
}
|
|
7373
7676
|
}, []);
|
|
7374
|
-
const updateLocalStorage = (0,
|
|
7677
|
+
const updateLocalStorage = (0, import_react39.useCallback)((updatedCache) => {
|
|
7375
7678
|
if (isLocalStorageAvailable) {
|
|
7376
7679
|
try {
|
|
7377
7680
|
const storedData = localStorage.getItem(STORAGE_KEY2);
|
|
@@ -7388,7 +7691,7 @@ function useTransactionCache() {
|
|
|
7388
7691
|
}
|
|
7389
7692
|
}
|
|
7390
7693
|
}, []);
|
|
7391
|
-
const set = (0,
|
|
7694
|
+
const set = (0, import_react39.useCallback)((key, value) => {
|
|
7392
7695
|
const now = Date.now();
|
|
7393
7696
|
const newCache = new Map(cache);
|
|
7394
7697
|
newCache.forEach((entry, k) => {
|
|
@@ -7406,7 +7709,7 @@ function useTransactionCache() {
|
|
|
7406
7709
|
setCache(newCache);
|
|
7407
7710
|
updateLocalStorage(newCache);
|
|
7408
7711
|
}, [cache, updateLocalStorage]);
|
|
7409
|
-
const get = (0,
|
|
7712
|
+
const get = (0, import_react39.useCallback)((key) => {
|
|
7410
7713
|
const entry = cache.get(key);
|
|
7411
7714
|
if (entry) {
|
|
7412
7715
|
if (Date.now() - entry.timestamp > CACHE_TTL2) {
|
|
@@ -7420,7 +7723,7 @@ function useTransactionCache() {
|
|
|
7420
7723
|
}
|
|
7421
7724
|
return void 0;
|
|
7422
7725
|
}, [cache, updateLocalStorage]);
|
|
7423
|
-
const del = (0,
|
|
7726
|
+
const del = (0, import_react39.useCallback)((key) => {
|
|
7424
7727
|
if (cache.has(key)) {
|
|
7425
7728
|
const newCache = new Map(cache);
|
|
7426
7729
|
newCache.delete(key);
|
|
@@ -7428,7 +7731,7 @@ function useTransactionCache() {
|
|
|
7428
7731
|
updateLocalStorage(newCache);
|
|
7429
7732
|
}
|
|
7430
7733
|
}, [cache, updateLocalStorage]);
|
|
7431
|
-
const clear = (0,
|
|
7734
|
+
const clear = (0, import_react39.useCallback)(() => {
|
|
7432
7735
|
setCache(/* @__PURE__ */ new Map());
|
|
7433
7736
|
if (isLocalStorageAvailable) {
|
|
7434
7737
|
localStorage.removeItem(STORAGE_KEY2);
|
|
@@ -7443,7 +7746,7 @@ function useTransaction({
|
|
|
7443
7746
|
const { list } = useMatchChain();
|
|
7444
7747
|
const cache = useTransactionCache();
|
|
7445
7748
|
const chain = list?.find((item) => item.id === chainId);
|
|
7446
|
-
const [shouldRefetch, setShouldRefetch] = (0,
|
|
7749
|
+
const [shouldRefetch, setShouldRefetch] = (0, import_react39.useState)(true);
|
|
7447
7750
|
const query = (0, import_react_query11.useQuery)({
|
|
7448
7751
|
queryKey: ["match-tx-transaction", hash, chain],
|
|
7449
7752
|
queryFn: async () => {
|
|
@@ -7469,7 +7772,7 @@ function useTransaction({
|
|
|
7469
7772
|
},
|
|
7470
7773
|
refetchInterval: shouldRefetch ? 1e4 : false
|
|
7471
7774
|
});
|
|
7472
|
-
(0,
|
|
7775
|
+
(0, import_react39.useEffect)(() => {
|
|
7473
7776
|
if (query.data) {
|
|
7474
7777
|
setShouldRefetch(false);
|
|
7475
7778
|
}
|
|
@@ -7478,27 +7781,27 @@ function useTransaction({
|
|
|
7478
7781
|
}
|
|
7479
7782
|
|
|
7480
7783
|
// src/components/CEXBindModal/index.tsx
|
|
7481
|
-
var
|
|
7482
|
-
var
|
|
7483
|
-
var
|
|
7784
|
+
var import_react40 = require("react");
|
|
7785
|
+
var import_react_intl22 = require("react-intl");
|
|
7786
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
7484
7787
|
function CEXBindModal({
|
|
7485
7788
|
onClose,
|
|
7486
7789
|
type,
|
|
7487
7790
|
isOpen = false,
|
|
7488
7791
|
...props
|
|
7489
7792
|
}) {
|
|
7490
|
-
const intl = (0,
|
|
7793
|
+
const intl = (0, import_react_intl22.useIntl)();
|
|
7491
7794
|
const { events } = useMatch();
|
|
7492
|
-
const [APIPassphrase, setAPIPassphrase] = (0,
|
|
7795
|
+
const [APIPassphrase, setAPIPassphrase] = (0, import_react40.useState)("");
|
|
7493
7796
|
const { refreshOverview } = useUserInfo();
|
|
7494
|
-
const [loading, setLoading] = (0,
|
|
7495
|
-
const [key, setKey] = (0,
|
|
7496
|
-
const [secret, setSecret] = (0,
|
|
7497
|
-
const [error, setError] = (0,
|
|
7498
|
-
const needPassphrase = (0,
|
|
7797
|
+
const [loading, setLoading] = (0, import_react40.useState)(false);
|
|
7798
|
+
const [key, setKey] = (0, import_react40.useState)("");
|
|
7799
|
+
const [secret, setSecret] = (0, import_react40.useState)("");
|
|
7800
|
+
const [error, setError] = (0, import_react40.useState)("");
|
|
7801
|
+
const needPassphrase = (0, import_react40.useMemo)(() => {
|
|
7499
7802
|
return ["bitget", "okx"].includes(type.toLowerCase());
|
|
7500
7803
|
}, [type]);
|
|
7501
|
-
(0,
|
|
7804
|
+
(0, import_react40.useEffect)(() => {
|
|
7502
7805
|
if (isOpen) {
|
|
7503
7806
|
setSecret("");
|
|
7504
7807
|
setKey("");
|
|
@@ -7535,20 +7838,20 @@ function CEXBindModal({
|
|
|
7535
7838
|
setLoading(false);
|
|
7536
7839
|
}
|
|
7537
7840
|
};
|
|
7538
|
-
return /* @__PURE__ */ (0,
|
|
7841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ModalWithHeader, { showClose: true, isOpen, onClose, title: intl.formatMessage({
|
|
7539
7842
|
id: "CEXBindTitle"
|
|
7540
7843
|
}, {
|
|
7541
7844
|
type
|
|
7542
|
-
}), ...props, children: /* @__PURE__ */ (0,
|
|
7543
|
-
/* @__PURE__ */ (0,
|
|
7544
|
-
/* @__PURE__ */ (0,
|
|
7545
|
-
/* @__PURE__ */ (0,
|
|
7546
|
-
/* @__PURE__ */ (0,
|
|
7547
|
-
/* @__PURE__ */ (0,
|
|
7845
|
+
}), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "matchid-cex-modal", children: [
|
|
7846
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { children: [
|
|
7847
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindAttention" }) }),
|
|
7848
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips1" }) }),
|
|
7849
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips2" }) }),
|
|
7850
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips3" }) })
|
|
7548
7851
|
] }),
|
|
7549
|
-
/* @__PURE__ */ (0,
|
|
7852
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Field, { label: intl.formatMessage({
|
|
7550
7853
|
id: "CEXBindApiKey"
|
|
7551
|
-
}), children: /* @__PURE__ */ (0,
|
|
7854
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
7552
7855
|
Input,
|
|
7553
7856
|
{
|
|
7554
7857
|
value: key,
|
|
@@ -7556,9 +7859,9 @@ function CEXBindModal({
|
|
|
7556
7859
|
placeholder: "**** **** ****"
|
|
7557
7860
|
}
|
|
7558
7861
|
) }),
|
|
7559
|
-
/* @__PURE__ */ (0,
|
|
7862
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Field, { label: intl.formatMessage({
|
|
7560
7863
|
id: "CEXBindApiSecretKey"
|
|
7561
|
-
}), error: !needPassphrase && error, children: /* @__PURE__ */ (0,
|
|
7864
|
+
}), error: !needPassphrase && error, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
7562
7865
|
Input,
|
|
7563
7866
|
{
|
|
7564
7867
|
value: secret,
|
|
@@ -7566,9 +7869,9 @@ function CEXBindModal({
|
|
|
7566
7869
|
placeholder: "**** **** ****"
|
|
7567
7870
|
}
|
|
7568
7871
|
) }),
|
|
7569
|
-
needPassphrase && /* @__PURE__ */ (0,
|
|
7872
|
+
needPassphrase && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Field, { error, label: intl.formatMessage({
|
|
7570
7873
|
id: "CEXBindApiPassphrase"
|
|
7571
|
-
}), children: /* @__PURE__ */ (0,
|
|
7874
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
7572
7875
|
Input,
|
|
7573
7876
|
{
|
|
7574
7877
|
value: APIPassphrase,
|
|
@@ -7576,7 +7879,7 @@ function CEXBindModal({
|
|
|
7576
7879
|
placeholder: "**** **** ****"
|
|
7577
7880
|
}
|
|
7578
7881
|
) }),
|
|
7579
|
-
/* @__PURE__ */ (0,
|
|
7882
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
7580
7883
|
Button,
|
|
7581
7884
|
{
|
|
7582
7885
|
onClick: SubmitApi,
|
|
@@ -7584,7 +7887,7 @@ function CEXBindModal({
|
|
|
7584
7887
|
block: true,
|
|
7585
7888
|
loading,
|
|
7586
7889
|
disabled: !key || !secret,
|
|
7587
|
-
children: /* @__PURE__ */ (0,
|
|
7890
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl22.FormattedMessage, { id: "continue" })
|
|
7588
7891
|
}
|
|
7589
7892
|
)
|
|
7590
7893
|
] }) });
|
|
@@ -7592,7 +7895,7 @@ function CEXBindModal({
|
|
|
7592
7895
|
|
|
7593
7896
|
// src/context/BusinessProvider.tsx
|
|
7594
7897
|
var import_react_query12 = require("@tanstack/react-query");
|
|
7595
|
-
var
|
|
7898
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
7596
7899
|
function BusinessProvider({ children }) {
|
|
7597
7900
|
const { overview, token } = useUserInfo();
|
|
7598
7901
|
const { type: EVMType, isOpen: EVMIsOpen, close: EVMClose } = useEVMModalStore();
|
|
@@ -7626,8 +7929,8 @@ function BusinessProvider({ children }) {
|
|
|
7626
7929
|
enabled: !!tgAppAuthCode,
|
|
7627
7930
|
refetchInterval: 1e3 * 5
|
|
7628
7931
|
});
|
|
7629
|
-
return /* @__PURE__ */ (0,
|
|
7630
|
-
/* @__PURE__ */ (0,
|
|
7932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
|
|
7933
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
7631
7934
|
EVMModal,
|
|
7632
7935
|
{
|
|
7633
7936
|
isOpen: EVMIsOpen && (EVMType == "login" && !overview && !token || EVMType == "bind" && !!token && !!overview),
|
|
@@ -7637,7 +7940,7 @@ function BusinessProvider({ children }) {
|
|
|
7637
7940
|
zIndex: 199
|
|
7638
7941
|
}
|
|
7639
7942
|
),
|
|
7640
|
-
/* @__PURE__ */ (0,
|
|
7943
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
7641
7944
|
TRONModal,
|
|
7642
7945
|
{
|
|
7643
7946
|
isOpen: TRONIsOpen && (TRONType == "login" && !overview && !token || TRONType == "bind" && !!token && !!overview),
|
|
@@ -7647,7 +7950,7 @@ function BusinessProvider({ children }) {
|
|
|
7647
7950
|
zIndex: 199
|
|
7648
7951
|
}
|
|
7649
7952
|
),
|
|
7650
|
-
/* @__PURE__ */ (0,
|
|
7953
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
7651
7954
|
TONModal,
|
|
7652
7955
|
{
|
|
7653
7956
|
isOpen: TONIsOpen && (TONType == "login" && !overview && !token || TONType == "bind" && !!token && !!overview),
|
|
@@ -7657,7 +7960,7 @@ function BusinessProvider({ children }) {
|
|
|
7657
7960
|
zIndex: 199
|
|
7658
7961
|
}
|
|
7659
7962
|
),
|
|
7660
|
-
/* @__PURE__ */ (0,
|
|
7963
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
7661
7964
|
BTCModal,
|
|
7662
7965
|
{
|
|
7663
7966
|
isOpen: BTCIsOpen && (BTCType == "login" && !overview && !token || BTCType == "bind" && !!token && !!overview),
|
|
@@ -7667,7 +7970,7 @@ function BusinessProvider({ children }) {
|
|
|
7667
7970
|
zIndex: 199
|
|
7668
7971
|
}
|
|
7669
7972
|
),
|
|
7670
|
-
/* @__PURE__ */ (0,
|
|
7973
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
7671
7974
|
CEXBindModal,
|
|
7672
7975
|
{
|
|
7673
7976
|
isOpen: CEXIsOpen && (!!token && !!overview),
|
|
@@ -7676,7 +7979,7 @@ function BusinessProvider({ children }) {
|
|
|
7676
7979
|
zIndex: 199
|
|
7677
7980
|
}
|
|
7678
7981
|
),
|
|
7679
|
-
/* @__PURE__ */ (0,
|
|
7982
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
7680
7983
|
WalletModal,
|
|
7681
7984
|
{
|
|
7682
7985
|
isOpen: WalletModalStore.isOpen && (WalletModalStore.type == "login" && !overview && !token || WalletModalStore.type == "bind" && !!token && !!overview),
|
|
@@ -7691,14 +7994,14 @@ function BusinessProvider({ children }) {
|
|
|
7691
7994
|
}
|
|
7692
7995
|
|
|
7693
7996
|
// src/context/index.tsx
|
|
7694
|
-
var
|
|
7997
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
7695
7998
|
var Providers = ({ children }) => {
|
|
7696
|
-
return /* @__PURE__ */ (0,
|
|
7999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ModalProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(BusinessProvider, { children }) }) });
|
|
7697
8000
|
};
|
|
7698
8001
|
var context_default = Providers;
|
|
7699
8002
|
|
|
7700
8003
|
// src/hooks/useWalletInit.ts
|
|
7701
|
-
var
|
|
8004
|
+
var import_react41 = require("react");
|
|
7702
8005
|
|
|
7703
8006
|
// src/utils/wallet.ts
|
|
7704
8007
|
var sendMessage = ({ method, data, resolve, reject, timeout }) => {
|
|
@@ -7731,11 +8034,11 @@ function useWalletInit({
|
|
|
7731
8034
|
}) {
|
|
7732
8035
|
const { endpoints, token, setWallet, appid, refreshOverview } = useLocalStore_default();
|
|
7733
8036
|
const { setWalletReady, walletReady } = useStore_default();
|
|
7734
|
-
const iframeReadyRef = (0,
|
|
7735
|
-
(0,
|
|
8037
|
+
const iframeReadyRef = (0, import_react41.useRef)(walletReady);
|
|
8038
|
+
(0, import_react41.useEffect)(() => {
|
|
7736
8039
|
setWallet(config);
|
|
7737
8040
|
}, [config]);
|
|
7738
|
-
(0,
|
|
8041
|
+
(0, import_react41.useEffect)(() => {
|
|
7739
8042
|
matchlog_default.log("sdk.mpc.status", walletReady, iframeReadyRef.current);
|
|
7740
8043
|
iframeReadyRef.current = walletReady;
|
|
7741
8044
|
if (iframeReadyRef.current) {
|
|
@@ -7752,7 +8055,7 @@ function useWalletInit({
|
|
|
7752
8055
|
onReady();
|
|
7753
8056
|
}
|
|
7754
8057
|
}, [walletReady]);
|
|
7755
|
-
(0,
|
|
8058
|
+
(0, import_react41.useEffect)(() => {
|
|
7756
8059
|
if (!endpoints.auth || !appid || !token || !config) {
|
|
7757
8060
|
const existingIframe = getWalletIframe();
|
|
7758
8061
|
if (existingIframe) {
|
|
@@ -7852,7 +8155,7 @@ function useWalletInit({
|
|
|
7852
8155
|
}
|
|
7853
8156
|
}
|
|
7854
8157
|
}, [endpoints.auth, appid, token, config]);
|
|
7855
|
-
(0,
|
|
8158
|
+
(0, import_react41.useEffect)(() => {
|
|
7856
8159
|
const messageHandle = async (e) => {
|
|
7857
8160
|
if (e.origin !== endpoints.auth.substring(0, endpoints.auth.length - 1)) {
|
|
7858
8161
|
return;
|
|
@@ -7933,7 +8236,7 @@ function useWalletInit({
|
|
|
7933
8236
|
}
|
|
7934
8237
|
|
|
7935
8238
|
// src/hooks/useInit.tsx
|
|
7936
|
-
var
|
|
8239
|
+
var import_react42 = require("react");
|
|
7937
8240
|
function useInit({
|
|
7938
8241
|
theme,
|
|
7939
8242
|
appid,
|
|
@@ -7953,24 +8256,24 @@ function useInit({
|
|
|
7953
8256
|
locale: realLocale
|
|
7954
8257
|
} = useLocalStore_default();
|
|
7955
8258
|
const walletModalStore = useWalletModalStore();
|
|
7956
|
-
const overviewLoadingRef = (0,
|
|
8259
|
+
const overviewLoadingRef = (0, import_react42.useRef)(false);
|
|
7957
8260
|
const searchParams = new URLSearchParams(window.location.search);
|
|
7958
8261
|
const matchToken = searchParams.get("matchToken");
|
|
7959
8262
|
const matchidt = searchParams.get("matchidt");
|
|
7960
8263
|
const realEndpoints = endpoints || env_default.endpoints;
|
|
7961
|
-
(0,
|
|
8264
|
+
(0, import_react42.useEffect)(() => {
|
|
7962
8265
|
setTheme(theme);
|
|
7963
8266
|
}, [theme]);
|
|
7964
|
-
(0,
|
|
8267
|
+
(0, import_react42.useEffect)(() => {
|
|
7965
8268
|
setAppid(appid);
|
|
7966
8269
|
}, [appid]);
|
|
7967
|
-
(0,
|
|
8270
|
+
(0, import_react42.useEffect)(() => {
|
|
7968
8271
|
setEndpoints(realEndpoints);
|
|
7969
8272
|
}, [realEndpoints]);
|
|
7970
|
-
(0,
|
|
8273
|
+
(0, import_react42.useEffect)(() => {
|
|
7971
8274
|
setLocale(locale || "en");
|
|
7972
8275
|
}, [locale]);
|
|
7973
|
-
(0,
|
|
8276
|
+
(0, import_react42.useEffect)(() => {
|
|
7974
8277
|
if (matchToken) {
|
|
7975
8278
|
const tokenData = JSON.parse(atob(matchToken));
|
|
7976
8279
|
if (tokenData && tokenData.mid && tokenData.token) {
|
|
@@ -7981,7 +8284,7 @@ function useInit({
|
|
|
7981
8284
|
}
|
|
7982
8285
|
}
|
|
7983
8286
|
}, [matchToken]);
|
|
7984
|
-
(0,
|
|
8287
|
+
(0, import_react42.useEffect)(() => {
|
|
7985
8288
|
if (matchidt) {
|
|
7986
8289
|
const tokenData = decodeURIComponent(matchidt);
|
|
7987
8290
|
const data = JSON.parse(decodeBase64(tokenData));
|
|
@@ -8011,7 +8314,7 @@ function useInit({
|
|
|
8011
8314
|
}
|
|
8012
8315
|
}
|
|
8013
8316
|
}, [matchidt]);
|
|
8014
|
-
(0,
|
|
8317
|
+
(0, import_react42.useEffect)(() => {
|
|
8015
8318
|
const onLoginMessage = (event) => {
|
|
8016
8319
|
const res = event.data;
|
|
8017
8320
|
if (res.event === "login" && res.data && (res.data.token || res.data.token_type && res.data.access_token)) {
|
|
@@ -8048,7 +8351,7 @@ function useInit({
|
|
|
8048
8351
|
overviewLoadingRef.current = false;
|
|
8049
8352
|
}
|
|
8050
8353
|
};
|
|
8051
|
-
(0,
|
|
8354
|
+
(0, import_react42.useEffect)(() => {
|
|
8052
8355
|
if (token) {
|
|
8053
8356
|
loadOverview();
|
|
8054
8357
|
}
|
|
@@ -8079,7 +8382,7 @@ function useInit({
|
|
|
8079
8382
|
|
|
8080
8383
|
// src/MatchContext.tsx
|
|
8081
8384
|
var import_react_query13 = require("@tanstack/react-query");
|
|
8082
|
-
var
|
|
8385
|
+
var import_react_intl23 = require("react-intl");
|
|
8083
8386
|
|
|
8084
8387
|
// src/i18n/en.json
|
|
8085
8388
|
var en_default = {
|
|
@@ -8159,7 +8462,14 @@ var en_default = {
|
|
|
8159
8462
|
back: "Back",
|
|
8160
8463
|
importSuccess: "Import Token Successfully",
|
|
8161
8464
|
importFail: "Failed to import Token",
|
|
8162
|
-
changeNetwork: "Change Network"
|
|
8465
|
+
changeNetwork: "Change Network",
|
|
8466
|
+
approveSuccess: "Approve Successfully",
|
|
8467
|
+
Approve: "Approve",
|
|
8468
|
+
noFriends: "No Friends yet",
|
|
8469
|
+
noRequests: "No Requests yet",
|
|
8470
|
+
noMore: "No more",
|
|
8471
|
+
Remove: "Remove",
|
|
8472
|
+
removeSuccess: "Remove Successfully"
|
|
8163
8473
|
};
|
|
8164
8474
|
|
|
8165
8475
|
// src/i18n/zh.json
|
|
@@ -8824,9 +9134,9 @@ var messages = {
|
|
|
8824
9134
|
};
|
|
8825
9135
|
|
|
8826
9136
|
// src/MatchContext.tsx
|
|
8827
|
-
var
|
|
9137
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
8828
9138
|
var queryClient = new import_react_query13.QueryClient();
|
|
8829
|
-
var MatchContext = (0,
|
|
9139
|
+
var MatchContext = (0, import_react43.createContext)(void 0);
|
|
8830
9140
|
var MatchProvider = ({
|
|
8831
9141
|
children,
|
|
8832
9142
|
appid,
|
|
@@ -8846,7 +9156,7 @@ var MatchProvider = ({
|
|
|
8846
9156
|
useWalletInit({
|
|
8847
9157
|
config: wallet
|
|
8848
9158
|
});
|
|
8849
|
-
return /* @__PURE__ */ (0,
|
|
9159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl23.IntlProvider, { locale: realLocale, messages: messages[realLocale], children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_query13.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
8850
9160
|
MatchContext.Provider,
|
|
8851
9161
|
{
|
|
8852
9162
|
value: {
|
|
@@ -8857,12 +9167,12 @@ var MatchProvider = ({
|
|
|
8857
9167
|
theme,
|
|
8858
9168
|
locale: realLocale
|
|
8859
9169
|
},
|
|
8860
|
-
children: /* @__PURE__ */ (0,
|
|
9170
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(context_default, { children })
|
|
8861
9171
|
}
|
|
8862
9172
|
) }) });
|
|
8863
9173
|
};
|
|
8864
9174
|
var useMatch = () => {
|
|
8865
|
-
const context = (0,
|
|
9175
|
+
const context = (0, import_react43.useContext)(MatchContext);
|
|
8866
9176
|
if (context === void 0) {
|
|
8867
9177
|
throw new Error("useMatch must be used within a MatchProvider");
|
|
8868
9178
|
}
|
|
@@ -8888,6 +9198,7 @@ __export(types_exports, {
|
|
|
8888
9198
|
Chains,
|
|
8889
9199
|
Components,
|
|
8890
9200
|
Hooks,
|
|
9201
|
+
Icon,
|
|
8891
9202
|
MatchProvider,
|
|
8892
9203
|
ModalProvider,
|
|
8893
9204
|
ToastProvider,
|