@matchain/matchid-sdk-react 0.1.56-alpha.2 → 0.1.56-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.js +57 -48
- package/dist/api.js.map +1 -1
- package/dist/api.mjs +3 -3
- package/dist/{chunk-NIGHV7RT.mjs → chunk-2HVTQUPR.mjs} +358 -343
- package/dist/chunk-2HVTQUPR.mjs.map +1 -0
- package/dist/{chunk-SPVA3A6Z.mjs → chunk-NGNJ44SH.mjs} +2 -2
- package/dist/{chunk-FKXS2XRG.mjs → chunk-OSY7MTZY.mjs} +34 -1
- package/dist/chunk-OSY7MTZY.mjs.map +1 -0
- package/dist/components.js +369 -360
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +2 -2
- package/dist/hooks.js +187 -178
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.mjs +2 -2
- package/dist/icon.d.mts +1 -1
- package/dist/icon.d.ts +1 -1
- package/dist/icon.js +33 -0
- package/dist/icon.js.map +1 -1
- package/dist/icon.mjs +5 -1
- package/dist/{index-C82WIWvx.d.ts → index-AtpUyTIk.d.ts} +9 -2
- package/dist/{index-D7E317WV.d.mts → index-CRLiCVf9.d.mts} +9 -2
- package/dist/{index-DK7l3lsH.d.ts → index-nwqg5fYH.d.ts} +8 -2
- package/dist/{index-YPRyEYt6.d.mts → index-zmJl2a0q.d.mts} +8 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +456 -413
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/ui.d.mts +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +145 -105
- package/dist/ui.js.map +1 -1
- package/dist/ui.mjs +4 -2
- package/example/src/pages/UI/components/Checkbox.tsx +10 -0
- package/example/src/pages/UI/components/Modal.tsx +38 -0
- package/example/src/pages/UI/index.tsx +4 -0
- package/package.json +1 -1
- package/dist/chunk-FKXS2XRG.mjs.map +0 -1
- package/dist/chunk-NIGHV7RT.mjs.map +0 -1
- /package/dist/{chunk-SPVA3A6Z.mjs.map → chunk-NGNJ44SH.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -707,6 +707,8 @@ __export(icon_exports, {
|
|
|
707
707
|
BitgetIcon: () => BitgetIcon,
|
|
708
708
|
CheckIcon: () => CheckIcon,
|
|
709
709
|
CheckRoundIcon: () => CheckRoundIcon,
|
|
710
|
+
CheckboxCheckedIcon: () => CheckboxCheckedIcon,
|
|
711
|
+
CheckboxIcon: () => CheckboxIcon,
|
|
710
712
|
CloseEyeIcon: () => CloseEyeIcon,
|
|
711
713
|
CloseIcon: () => CloseIcon,
|
|
712
714
|
CloseRoundIcon: () => CloseRoundIcon,
|
|
@@ -1982,6 +1984,35 @@ function MoreIcon({
|
|
|
1982
1984
|
] });
|
|
1983
1985
|
}
|
|
1984
1986
|
|
|
1987
|
+
// src/assets/icon/CheckboxIcon.tsx
|
|
1988
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1989
|
+
function CheckboxIcon({
|
|
1990
|
+
size = 16,
|
|
1991
|
+
color = "#E3E3E3",
|
|
1992
|
+
...props
|
|
1993
|
+
}) {
|
|
1994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("svg", { width: size, height: size, viewBox: "0 0 16 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("rect", { x: "2.08203", y: "2.58325", width: "11.8333", height: "11.8333", rx: "3.25", stroke: color, strokeWidth: "1.5" }) });
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
// src/assets/icon/CheckboxCheckedIcon.tsx
|
|
1998
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1999
|
+
function CheckboxCheckedIcon({
|
|
2000
|
+
size = 16,
|
|
2001
|
+
color = "#FC802D",
|
|
2002
|
+
...props
|
|
2003
|
+
}) {
|
|
2004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("svg", { width: size, height: size, viewBox: "0 0 16 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
2005
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("rect", { x: "1.33203", y: "1.83325", width: "13.3333", height: "13.3333", rx: "4", fill: color }),
|
|
2006
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2007
|
+
"path",
|
|
2008
|
+
{
|
|
2009
|
+
d: "M5.96094 7.63565L7.23226 8.90697L9.87499 6.26424C10.113 6.02621 10.4989 6.02621 10.737 6.26424C10.975 6.50227 10.975 6.8882 10.737 7.12623L7.80211 10.0611C7.48739 10.3758 6.97714 10.3758 6.66242 10.0611L5.09896 8.49764C4.86093 8.25961 4.86093 7.87368 5.09896 7.63565C5.33699 7.39762 5.72291 7.39762 5.96094 7.63565Z",
|
|
2010
|
+
fill: "white"
|
|
2011
|
+
}
|
|
2012
|
+
)
|
|
2013
|
+
] });
|
|
2014
|
+
}
|
|
2015
|
+
|
|
1985
2016
|
// src/hooks/useLayout.tsx
|
|
1986
2017
|
var useLayout_exports = {};
|
|
1987
2018
|
__export(useLayout_exports, {
|
|
@@ -2003,39 +2034,39 @@ function useDownMd() {
|
|
|
2003
2034
|
}
|
|
2004
2035
|
|
|
2005
2036
|
// src/hooks/useConfig.tsx
|
|
2006
|
-
var
|
|
2037
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2007
2038
|
var DEFAULT_WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
2008
2039
|
var WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
2009
2040
|
function useWalletConfig() {
|
|
2010
2041
|
const isDownMd = useDownMd();
|
|
2011
2042
|
const walletMap = {
|
|
2012
2043
|
evm: {
|
|
2013
|
-
icon: /* @__PURE__ */ (0,
|
|
2014
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2044
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(EVMDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
2045
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(EVMLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
2015
2046
|
name: "EVM",
|
|
2016
2047
|
method: "evm"
|
|
2017
2048
|
},
|
|
2018
2049
|
sol: {
|
|
2019
|
-
icon: /* @__PURE__ */ (0,
|
|
2020
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2050
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SOLDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
2051
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SOLLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
2021
2052
|
name: "SOL",
|
|
2022
2053
|
method: "sol"
|
|
2023
2054
|
},
|
|
2024
2055
|
btc: {
|
|
2025
|
-
icon: /* @__PURE__ */ (0,
|
|
2026
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2056
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(BTCDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
2057
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(BTCLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
2027
2058
|
name: "BTC",
|
|
2028
2059
|
method: "btc"
|
|
2029
2060
|
},
|
|
2030
2061
|
tron: {
|
|
2031
|
-
icon: /* @__PURE__ */ (0,
|
|
2032
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2062
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TRXDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
2063
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TRXLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
2033
2064
|
name: "TRON",
|
|
2034
2065
|
method: "tron"
|
|
2035
2066
|
},
|
|
2036
2067
|
ton: {
|
|
2037
|
-
icon: /* @__PURE__ */ (0,
|
|
2038
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2068
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TonLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
2069
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TonLightIcon2, { size: isDownMd ? 36 : 40 }),
|
|
2039
2070
|
name: "TON",
|
|
2040
2071
|
method: "ton"
|
|
2041
2072
|
}
|
|
@@ -2434,7 +2465,7 @@ var import_react31 = require("react");
|
|
|
2434
2465
|
var import_viem9 = require("viem");
|
|
2435
2466
|
|
|
2436
2467
|
// src/context/ModalContext.tsx
|
|
2437
|
-
var import_react30 =
|
|
2468
|
+
var import_react30 = require("react");
|
|
2438
2469
|
var import_react_dom = require("react-dom");
|
|
2439
2470
|
|
|
2440
2471
|
// src/ui/index.ts
|
|
@@ -2442,6 +2473,7 @@ var ui_exports = {};
|
|
|
2442
2473
|
__export(ui_exports, {
|
|
2443
2474
|
AlphaAvatar: () => AlphaAvatar2,
|
|
2444
2475
|
Button: () => Button,
|
|
2476
|
+
Checkbox: () => Checkbox,
|
|
2445
2477
|
ConfirmModal: () => ConfirmModal,
|
|
2446
2478
|
Drawer: () => Drawer,
|
|
2447
2479
|
Field: () => Field,
|
|
@@ -2460,7 +2492,7 @@ __export(ui_exports, {
|
|
|
2460
2492
|
});
|
|
2461
2493
|
|
|
2462
2494
|
// src/ui/Button/index.tsx
|
|
2463
|
-
var
|
|
2495
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2464
2496
|
function Button({
|
|
2465
2497
|
size = "df",
|
|
2466
2498
|
disabled = false,
|
|
@@ -2480,7 +2512,7 @@ function Button({
|
|
|
2480
2512
|
onClick && onClick();
|
|
2481
2513
|
}
|
|
2482
2514
|
};
|
|
2483
|
-
return /* @__PURE__ */ (0,
|
|
2515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2484
2516
|
"button",
|
|
2485
2517
|
{
|
|
2486
2518
|
type,
|
|
@@ -2491,14 +2523,14 @@ function Button({
|
|
|
2491
2523
|
},
|
|
2492
2524
|
onClick: onAction,
|
|
2493
2525
|
...dataset,
|
|
2494
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
2526
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
|
|
2495
2527
|
}
|
|
2496
2528
|
);
|
|
2497
2529
|
}
|
|
2498
2530
|
|
|
2499
2531
|
// src/ui/Overlay/index.tsx
|
|
2500
2532
|
var import_react4 = require("react");
|
|
2501
|
-
var
|
|
2533
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2502
2534
|
function Overlay({
|
|
2503
2535
|
isOpen = false,
|
|
2504
2536
|
children,
|
|
@@ -2514,7 +2546,7 @@ function Overlay({
|
|
|
2514
2546
|
document.body.style.overflow = "";
|
|
2515
2547
|
};
|
|
2516
2548
|
}, [isOpen]);
|
|
2517
|
-
return isOpen ? /* @__PURE__ */ (0,
|
|
2549
|
+
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2518
2550
|
"div",
|
|
2519
2551
|
{
|
|
2520
2552
|
className: "matchid-overlay",
|
|
@@ -2523,11 +2555,11 @@ function Overlay({
|
|
|
2523
2555
|
},
|
|
2524
2556
|
children
|
|
2525
2557
|
}
|
|
2526
|
-
) : /* @__PURE__ */ (0,
|
|
2558
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_jsx_runtime56.Fragment, {});
|
|
2527
2559
|
}
|
|
2528
2560
|
|
|
2529
2561
|
// src/ui/Drawer/index.tsx
|
|
2530
|
-
var
|
|
2562
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2531
2563
|
function Drawer({
|
|
2532
2564
|
children,
|
|
2533
2565
|
showClose = true,
|
|
@@ -2538,22 +2570,22 @@ function Drawer({
|
|
|
2538
2570
|
onBack
|
|
2539
2571
|
}) {
|
|
2540
2572
|
if (!isOpen) {
|
|
2541
|
-
return /* @__PURE__ */ (0,
|
|
2573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_jsx_runtime57.Fragment, {});
|
|
2542
2574
|
}
|
|
2543
|
-
return /* @__PURE__ */ (0,
|
|
2544
|
-
/* @__PURE__ */ (0,
|
|
2545
|
-
/* @__PURE__ */ (0,
|
|
2546
|
-
onBack && /* @__PURE__ */ (0,
|
|
2575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "matchid-drawer", children: [
|
|
2576
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: `matchid-drawer-header matchid-flex`, children: [
|
|
2577
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: `matchid-drawer-header-content matchid-flex`, children: [
|
|
2578
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ArrowLeftIcon, { height: 25, width: 24, className: "matchid-drawer-header-back", onClick: onBack }),
|
|
2547
2579
|
title
|
|
2548
2580
|
] }),
|
|
2549
|
-
showClose && /* @__PURE__ */ (0,
|
|
2581
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
|
|
2550
2582
|
] }),
|
|
2551
2583
|
children
|
|
2552
2584
|
] }) });
|
|
2553
2585
|
}
|
|
2554
2586
|
|
|
2555
2587
|
// src/ui/Field/index.tsx
|
|
2556
|
-
var
|
|
2588
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2557
2589
|
function Field({
|
|
2558
2590
|
label,
|
|
2559
2591
|
children,
|
|
@@ -2561,13 +2593,13 @@ function Field({
|
|
|
2561
2593
|
required,
|
|
2562
2594
|
className = ""
|
|
2563
2595
|
}) {
|
|
2564
|
-
return /* @__PURE__ */ (0,
|
|
2565
|
-
/* @__PURE__ */ (0,
|
|
2566
|
-
required && /* @__PURE__ */ (0,
|
|
2596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
|
|
2597
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "matchid-field-label", children: [
|
|
2598
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "matchid-field-required", children: "*" }),
|
|
2567
2599
|
label
|
|
2568
2600
|
] }),
|
|
2569
2601
|
children,
|
|
2570
|
-
error && /* @__PURE__ */ (0,
|
|
2602
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "matchid-field-error", children: error })
|
|
2571
2603
|
] });
|
|
2572
2604
|
}
|
|
2573
2605
|
|
|
@@ -2613,7 +2645,7 @@ var import_react6 = require("react");
|
|
|
2613
2645
|
|
|
2614
2646
|
// src/ui/Input/index.tsx
|
|
2615
2647
|
var import_react5 = require("react");
|
|
2616
|
-
var
|
|
2648
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2617
2649
|
function Input({
|
|
2618
2650
|
onChange,
|
|
2619
2651
|
type,
|
|
@@ -2623,17 +2655,17 @@ function Input({
|
|
|
2623
2655
|
}) {
|
|
2624
2656
|
const [inputType, setInputType] = (0, import_react5.useState)(type);
|
|
2625
2657
|
const isDownMd = useDownMd();
|
|
2626
|
-
return /* @__PURE__ */ (0,
|
|
2658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
2627
2659
|
"div",
|
|
2628
2660
|
{
|
|
2629
2661
|
className: `matchid-input-box ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
2630
2662
|
children: [
|
|
2631
|
-
/* @__PURE__ */ (0,
|
|
2632
|
-
props.value && props.value.length > 0 && /* @__PURE__ */ (0,
|
|
2663
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" }),
|
|
2664
|
+
props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
|
|
2633
2665
|
if (onChange) {
|
|
2634
2666
|
onChange({ target: { value: "" } });
|
|
2635
2667
|
}
|
|
2636
|
-
}, children: /* @__PURE__ */ (0,
|
|
2668
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
2637
2669
|
DeleteRoundIcon,
|
|
2638
2670
|
{
|
|
2639
2671
|
height: isDownMd ? 16 : 21,
|
|
@@ -2641,9 +2673,9 @@ function Input({
|
|
|
2641
2673
|
color: "var(--matchid-input-delete-icon-color)"
|
|
2642
2674
|
}
|
|
2643
2675
|
) }),
|
|
2644
|
-
type === "password" && /* @__PURE__ */ (0,
|
|
2676
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
|
|
2645
2677
|
setInputType(inputType === "password" ? "text" : "password");
|
|
2646
|
-
}, children: inputType === "password" ? /* @__PURE__ */ (0,
|
|
2678
|
+
}, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
|
|
2647
2679
|
after
|
|
2648
2680
|
]
|
|
2649
2681
|
}
|
|
@@ -2652,7 +2684,7 @@ function Input({
|
|
|
2652
2684
|
|
|
2653
2685
|
// src/components/EmailModal/StepEmail.tsx
|
|
2654
2686
|
var import_react_intl = require("react-intl");
|
|
2655
|
-
var
|
|
2687
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2656
2688
|
function StepEmail(props) {
|
|
2657
2689
|
const intl = (0, import_react_intl.useIntl)();
|
|
2658
2690
|
const [emailVal, setEmailVal] = (0, import_react6.useState)("");
|
|
@@ -2667,10 +2699,10 @@ function StepEmail(props) {
|
|
|
2667
2699
|
const onContinue = async () => {
|
|
2668
2700
|
props.onContinue(emailVal);
|
|
2669
2701
|
};
|
|
2670
|
-
return /* @__PURE__ */ (0,
|
|
2671
|
-
/* @__PURE__ */ (0,
|
|
2702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "matchid-email-email-box", children: [
|
|
2703
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Field, { label: intl.formatMessage({
|
|
2672
2704
|
id: "emailAddress"
|
|
2673
|
-
}), children: /* @__PURE__ */ (0,
|
|
2705
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2674
2706
|
Input,
|
|
2675
2707
|
{
|
|
2676
2708
|
placeholder: intl.formatMessage({
|
|
@@ -2680,9 +2712,9 @@ function StepEmail(props) {
|
|
|
2680
2712
|
value: emailVal
|
|
2681
2713
|
}
|
|
2682
2714
|
) }),
|
|
2683
|
-
/* @__PURE__ */ (0,
|
|
2715
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Button, { disabled: !canContinue, style: {
|
|
2684
2716
|
marginTop: "64px"
|
|
2685
|
-
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
2717
|
+
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react_intl.FormattedMessage, { id: "continue" }) })
|
|
2686
2718
|
] });
|
|
2687
2719
|
}
|
|
2688
2720
|
|
|
@@ -2696,7 +2728,7 @@ var NATIVE_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
|
2696
2728
|
|
|
2697
2729
|
// src/components/EmailModal/StepVerify.tsx
|
|
2698
2730
|
var import_react_intl2 = require("react-intl");
|
|
2699
|
-
var
|
|
2731
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2700
2732
|
function StepVerify(props) {
|
|
2701
2733
|
const intl = (0, import_react_intl2.useIntl)();
|
|
2702
2734
|
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
@@ -2773,17 +2805,17 @@ function StepVerify(props) {
|
|
|
2773
2805
|
setSubmitting(false);
|
|
2774
2806
|
}
|
|
2775
2807
|
};
|
|
2776
|
-
return /* @__PURE__ */ (0,
|
|
2777
|
-
/* @__PURE__ */ (0,
|
|
2778
|
-
/* @__PURE__ */ (0,
|
|
2779
|
-
/* @__PURE__ */ (0,
|
|
2780
|
-
/* @__PURE__ */ (0,
|
|
2781
|
-
/* @__PURE__ */ (0,
|
|
2808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "matchid-email-verify-box", children: [
|
|
2809
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "matchid-email-verify-header", children: [
|
|
2810
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
|
|
2811
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "matchid-email-verify-header-content", children: [
|
|
2812
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "matchid-email-verify-header-value", children: props.email }),
|
|
2813
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react_intl2.FormattedMessage, { id: "sendEmailTips" }) })
|
|
2782
2814
|
] })
|
|
2783
2815
|
] }),
|
|
2784
|
-
/* @__PURE__ */ (0,
|
|
2816
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Field, { label: intl.formatMessage({
|
|
2785
2817
|
id: "verificationCode"
|
|
2786
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
2818
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2787
2819
|
Input,
|
|
2788
2820
|
{
|
|
2789
2821
|
placeholder: intl.formatMessage({
|
|
@@ -2793,7 +2825,7 @@ function StepVerify(props) {
|
|
|
2793
2825
|
maxLength: codeLength,
|
|
2794
2826
|
onChange: (e) => setCode(e.target.value),
|
|
2795
2827
|
value: code,
|
|
2796
|
-
after: /* @__PURE__ */ (0,
|
|
2828
|
+
after: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2797
2829
|
Button,
|
|
2798
2830
|
{
|
|
2799
2831
|
highlight: true,
|
|
@@ -2812,13 +2844,13 @@ function StepVerify(props) {
|
|
|
2812
2844
|
)
|
|
2813
2845
|
}
|
|
2814
2846
|
) }),
|
|
2815
|
-
/* @__PURE__ */ (0,
|
|
2847
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Button, { disabled: !canContinue, loading: submitting, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react_intl2.FormattedMessage, { id: "continue" }) })
|
|
2816
2848
|
] });
|
|
2817
2849
|
}
|
|
2818
2850
|
|
|
2819
2851
|
// src/components/EmailModal/index.tsx
|
|
2820
2852
|
var import_react_intl3 = require("react-intl");
|
|
2821
|
-
var
|
|
2853
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2822
2854
|
function EmailModal({
|
|
2823
2855
|
isOpen = false,
|
|
2824
2856
|
width = 480,
|
|
@@ -2835,7 +2867,7 @@ function EmailModal({
|
|
|
2835
2867
|
setEmailVal("");
|
|
2836
2868
|
}
|
|
2837
2869
|
}, [isOpen]);
|
|
2838
|
-
return /* @__PURE__ */ (0,
|
|
2870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2839
2871
|
ModalWithHeader,
|
|
2840
2872
|
{
|
|
2841
2873
|
isOpen,
|
|
@@ -2845,17 +2877,17 @@ function EmailModal({
|
|
|
2845
2877
|
id: "email"
|
|
2846
2878
|
}),
|
|
2847
2879
|
onBack: step == "verify" ? () => setStep("input") : onBack,
|
|
2848
|
-
children: step === "input" ? /* @__PURE__ */ (0,
|
|
2880
|
+
children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
|
|
2849
2881
|
setEmailVal(email);
|
|
2850
2882
|
setStep("verify");
|
|
2851
|
-
} }) : /* @__PURE__ */ (0,
|
|
2883
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(StepVerify, { email: emailVal, onSuccess: onLogin })
|
|
2852
2884
|
}
|
|
2853
2885
|
);
|
|
2854
2886
|
}
|
|
2855
2887
|
|
|
2856
2888
|
// src/ui/Popover/index.tsx
|
|
2857
2889
|
var import_react9 = require("react");
|
|
2858
|
-
var
|
|
2890
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2859
2891
|
function Popover({
|
|
2860
2892
|
children,
|
|
2861
2893
|
content,
|
|
@@ -2865,7 +2897,7 @@ function Popover({
|
|
|
2865
2897
|
gap = "20px"
|
|
2866
2898
|
}) {
|
|
2867
2899
|
const [active, setActive] = (0, import_react9.useState)(false);
|
|
2868
|
-
return children && /* @__PURE__ */ (0,
|
|
2900
|
+
return children && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
2869
2901
|
"div",
|
|
2870
2902
|
{
|
|
2871
2903
|
onClick: () => {
|
|
@@ -2876,9 +2908,9 @@ function Popover({
|
|
|
2876
2908
|
className: `matchid-popover-box matchid-popover-${position} matchid-popover-${type} ${className} ${type == "click" && active ? "matchid-popover-click-active" : ""}`,
|
|
2877
2909
|
children: [
|
|
2878
2910
|
children,
|
|
2879
|
-
/* @__PURE__ */ (0,
|
|
2911
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { style: {
|
|
2880
2912
|
paddingTop: gap
|
|
2881
|
-
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0,
|
|
2913
|
+
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: `matchid-popover-content`, children: content }) })
|
|
2882
2914
|
]
|
|
2883
2915
|
}
|
|
2884
2916
|
);
|
|
@@ -2909,7 +2941,7 @@ function useAppConfig() {
|
|
|
2909
2941
|
}
|
|
2910
2942
|
|
|
2911
2943
|
// src/components/LoginBox/index.tsx
|
|
2912
|
-
var
|
|
2944
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2913
2945
|
var RecommendItem = ({
|
|
2914
2946
|
icon,
|
|
2915
2947
|
name,
|
|
@@ -2918,20 +2950,20 @@ var RecommendItem = ({
|
|
|
2918
2950
|
children,
|
|
2919
2951
|
footer
|
|
2920
2952
|
}) => {
|
|
2921
|
-
return /* @__PURE__ */ (0,
|
|
2922
|
-
/* @__PURE__ */ (0,
|
|
2923
|
-
/* @__PURE__ */ (0,
|
|
2924
|
-
/* @__PURE__ */ (0,
|
|
2925
|
-
/* @__PURE__ */ (0,
|
|
2953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "matchid-login-recommend-method", children: [
|
|
2954
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "matchid-login-recommend-method-item", onClick, children: [
|
|
2955
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "matchid-login-recommend-method-content", children: [
|
|
2956
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "matchid-login-recommend-method-icon", children: icon }),
|
|
2957
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "matchid-login-recommend-method-name", children: name })
|
|
2926
2958
|
] }),
|
|
2927
|
-
footer ? footer : children ? /* @__PURE__ */ (0,
|
|
2959
|
+
footer ? footer : children ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
2928
2960
|
ArrowDownIcon,
|
|
2929
2961
|
{
|
|
2930
2962
|
className: `matchid-login-recommend-method-arrow ${showChildren ? "matchid-login-recommend-method-arrow-active" : ""}`,
|
|
2931
2963
|
size: 20,
|
|
2932
2964
|
color: "var(--matchid-arrow-color)"
|
|
2933
2965
|
}
|
|
2934
|
-
) : /* @__PURE__ */ (0,
|
|
2966
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
2935
2967
|
ArrowRightIcon,
|
|
2936
2968
|
{
|
|
2937
2969
|
className: "matchid-login-recommend-method-arrow",
|
|
@@ -2940,7 +2972,7 @@ var RecommendItem = ({
|
|
|
2940
2972
|
}
|
|
2941
2973
|
)
|
|
2942
2974
|
] }),
|
|
2943
|
-
children && /* @__PURE__ */ (0,
|
|
2975
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
2944
2976
|
"div",
|
|
2945
2977
|
{
|
|
2946
2978
|
className: `matchid-login-recommend-method-popover ${showChildren ? "matchid-login-recommend-method-popover-active" : ""}`,
|
|
@@ -3005,75 +3037,75 @@ function LoginBox({
|
|
|
3005
3037
|
const isDownMd = useDownMd();
|
|
3006
3038
|
const methodMap = {
|
|
3007
3039
|
wallet: {
|
|
3008
|
-
icon: /* @__PURE__ */ (0,
|
|
3040
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(WalletIcon, { size: isDownMd ? 36 : 40 }),
|
|
3009
3041
|
name: intl.formatMessage({ id: "wallet" }),
|
|
3010
3042
|
onClick: () => setShowWallet(!showWallet),
|
|
3011
3043
|
type: "wallet"
|
|
3012
3044
|
},
|
|
3013
3045
|
email: {
|
|
3014
|
-
icon: /* @__PURE__ */ (0,
|
|
3046
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
|
|
3015
3047
|
name: intl.formatMessage({ id: "email" }),
|
|
3016
3048
|
onClick: () => {
|
|
3017
3049
|
setEmailOpen(true);
|
|
3018
3050
|
}
|
|
3019
3051
|
},
|
|
3020
3052
|
google: {
|
|
3021
|
-
icon: /* @__PURE__ */ (0,
|
|
3053
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(GoogleIcon, { size: isDownMd ? 36 : 40 }),
|
|
3022
3054
|
name: "Google",
|
|
3023
3055
|
onClick: () => login("google")
|
|
3024
3056
|
},
|
|
3025
3057
|
twitter: {
|
|
3026
|
-
icon: /* @__PURE__ */ (0,
|
|
3058
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(XIcon, { size: isDownMd ? 36 : 40 }),
|
|
3027
3059
|
name: "X",
|
|
3028
3060
|
onClick: () => login("twitter")
|
|
3029
3061
|
},
|
|
3030
3062
|
telegram: {
|
|
3031
|
-
icon: /* @__PURE__ */ (0,
|
|
3063
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(TelegramIcon, { size: isDownMd ? 36 : 40 }),
|
|
3032
3064
|
name: "Telegram",
|
|
3033
3065
|
onClick: () => login("telegram")
|
|
3034
3066
|
},
|
|
3035
3067
|
github: {
|
|
3036
|
-
icon: /* @__PURE__ */ (0,
|
|
3068
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(GithubIcon, { size: isDownMd ? 36 : 40 }),
|
|
3037
3069
|
name: "Github",
|
|
3038
3070
|
onClick: () => login("github")
|
|
3039
3071
|
},
|
|
3040
3072
|
discord: {
|
|
3041
|
-
icon: /* @__PURE__ */ (0,
|
|
3073
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(DiscordIcon, { size: isDownMd ? 36 : 40 }),
|
|
3042
3074
|
name: "Discord",
|
|
3043
3075
|
onClick: () => login("discord")
|
|
3044
3076
|
},
|
|
3045
3077
|
linkedin: {
|
|
3046
|
-
icon: /* @__PURE__ */ (0,
|
|
3078
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
|
|
3047
3079
|
name: "LinkedIn",
|
|
3048
3080
|
onClick: () => login("linkedin")
|
|
3049
3081
|
},
|
|
3050
3082
|
facebook: {
|
|
3051
|
-
icon: /* @__PURE__ */ (0,
|
|
3083
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(FacebookIcon, { size: isDownMd ? 36 : 40 }),
|
|
3052
3084
|
name: "Facebook",
|
|
3053
3085
|
onClick: () => login("facebook")
|
|
3054
3086
|
},
|
|
3055
3087
|
youtube: {
|
|
3056
|
-
icon: /* @__PURE__ */ (0,
|
|
3088
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
|
|
3057
3089
|
name: "Youtube",
|
|
3058
3090
|
onClick: () => login("youtube")
|
|
3059
3091
|
}
|
|
3060
3092
|
};
|
|
3061
3093
|
const { walletMap } = useWalletConfig();
|
|
3062
|
-
return /* @__PURE__ */ (0,
|
|
3063
|
-
(!inModal || !emailOpen) && /* @__PURE__ */ (0,
|
|
3064
|
-
/* @__PURE__ */ (0,
|
|
3065
|
-
return /* @__PURE__ */ (0,
|
|
3094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
|
3095
|
+
(!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "matchid-login-box", children: [
|
|
3096
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
|
|
3097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3066
3098
|
RecommendItem,
|
|
3067
3099
|
{
|
|
3068
3100
|
icon: methodMap[m]?.icon,
|
|
3069
3101
|
name: methodMap[m]?.name,
|
|
3070
3102
|
onClick: methodMap[m]?.onClick,
|
|
3071
3103
|
showChildren: m == "wallet" && showWallet,
|
|
3072
|
-
children: m == "wallet" && /* @__PURE__ */ (0,
|
|
3073
|
-
/* @__PURE__ */ (0,
|
|
3074
|
-
/* @__PURE__ */ (0,
|
|
3104
|
+
children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
|
3105
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
|
|
3106
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
|
|
3075
3107
|
const m2 = walletMap[n];
|
|
3076
|
-
return /* @__PURE__ */ (0,
|
|
3108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
3077
3109
|
"div",
|
|
3078
3110
|
{
|
|
3079
3111
|
className: "matchid-login-recommend-wallet-item",
|
|
@@ -3081,16 +3113,16 @@ function LoginBox({
|
|
|
3081
3113
|
login(m2.method);
|
|
3082
3114
|
},
|
|
3083
3115
|
children: [
|
|
3084
|
-
/* @__PURE__ */ (0,
|
|
3085
|
-
/* @__PURE__ */ (0,
|
|
3086
|
-
/* @__PURE__ */ (0,
|
|
3116
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
|
|
3117
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
|
|
3118
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3087
3119
|
"div",
|
|
3088
3120
|
{
|
|
3089
3121
|
className: "matchid-login-recommend-wallet-item-hover-icon",
|
|
3090
3122
|
children: m2.activeIcon
|
|
3091
3123
|
}
|
|
3092
3124
|
),
|
|
3093
|
-
/* @__PURE__ */ (0,
|
|
3125
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3094
3126
|
"span",
|
|
3095
3127
|
{
|
|
3096
3128
|
className: "matchid-login-recommend-wallet-item-name",
|
|
@@ -3098,7 +3130,7 @@ function LoginBox({
|
|
|
3098
3130
|
}
|
|
3099
3131
|
)
|
|
3100
3132
|
] }),
|
|
3101
|
-
/* @__PURE__ */ (0,
|
|
3133
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3102
3134
|
ArrowRightIcon,
|
|
3103
3135
|
{
|
|
3104
3136
|
className: "matchid-login-recommend-wallet-item-arrow",
|
|
@@ -3116,10 +3148,10 @@ function LoginBox({
|
|
|
3116
3148
|
m
|
|
3117
3149
|
);
|
|
3118
3150
|
}) }),
|
|
3119
|
-
methodConfig.methods.length > 0 && /* @__PURE__ */ (0,
|
|
3120
|
-
/* @__PURE__ */ (0,
|
|
3121
|
-
/* @__PURE__ */ (0,
|
|
3122
|
-
return /* @__PURE__ */ (0,
|
|
3151
|
+
methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "matchid-login-other", children: [
|
|
3152
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react_intl4.FormattedMessage, { id: "otherLoginMethods" }) }),
|
|
3153
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
3154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3123
3155
|
"div",
|
|
3124
3156
|
{
|
|
3125
3157
|
className: "matchid-login-method-item",
|
|
@@ -3132,7 +3164,7 @@ function LoginBox({
|
|
|
3132
3164
|
}) })
|
|
3133
3165
|
] })
|
|
3134
3166
|
] }),
|
|
3135
|
-
/* @__PURE__ */ (0,
|
|
3167
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3136
3168
|
EmailModal,
|
|
3137
3169
|
{
|
|
3138
3170
|
isOpen: emailOpen,
|
|
@@ -3152,40 +3184,40 @@ var import_react12 = require("react");
|
|
|
3152
3184
|
|
|
3153
3185
|
// src/components/LoginPanel/index.tsx
|
|
3154
3186
|
var import_react_intl5 = require("react-intl");
|
|
3155
|
-
var
|
|
3187
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3156
3188
|
function LoginPanel({
|
|
3157
3189
|
header,
|
|
3158
3190
|
onClose,
|
|
3159
3191
|
...props
|
|
3160
3192
|
}) {
|
|
3161
3193
|
const isDownMd = useDownMd();
|
|
3162
|
-
return /* @__PURE__ */ (0,
|
|
3163
|
-
header ? header : /* @__PURE__ */ (0,
|
|
3164
|
-
/* @__PURE__ */ (0,
|
|
3165
|
-
/* @__PURE__ */ (0,
|
|
3166
|
-
/* @__PURE__ */ (0,
|
|
3194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "matchid-login-panel", children: [
|
|
3195
|
+
header ? header : /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "matchid-login-panel-header", children: [
|
|
3196
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "matchid-login-panel-header-content", children: [
|
|
3197
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react_intl5.FormattedMessage, { id: "loginTitle" }) }),
|
|
3198
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react_intl5.FormattedMessage, { id: "loginTips" }) })
|
|
3167
3199
|
] }),
|
|
3168
|
-
onClose && /* @__PURE__ */ (0,
|
|
3200
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
|
|
3169
3201
|
] }),
|
|
3170
|
-
/* @__PURE__ */ (0,
|
|
3171
|
-
/* @__PURE__ */ (0,
|
|
3202
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "matchid-login-panel-divide" }),
|
|
3203
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(LoginBox, { ...props }) })
|
|
3172
3204
|
] });
|
|
3173
3205
|
}
|
|
3174
3206
|
|
|
3175
3207
|
// src/components/LoginModal/index.tsx
|
|
3176
|
-
var
|
|
3208
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3177
3209
|
function LoginModal({
|
|
3178
3210
|
isOpen = false,
|
|
3179
3211
|
width = 480,
|
|
3180
3212
|
...props
|
|
3181
3213
|
}) {
|
|
3182
3214
|
const { isLogin } = useUserInfo();
|
|
3183
|
-
return /* @__PURE__ */ (0,
|
|
3215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3184
3216
|
Modal,
|
|
3185
3217
|
{
|
|
3186
3218
|
isOpen: isOpen && !isLogin,
|
|
3187
3219
|
width,
|
|
3188
|
-
children: /* @__PURE__ */ (0,
|
|
3220
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(LoginPanel, { ...props, inModal: true })
|
|
3189
3221
|
}
|
|
3190
3222
|
);
|
|
3191
3223
|
}
|
|
@@ -3194,10 +3226,10 @@ function LoginModal({
|
|
|
3194
3226
|
var import_react11 = require("react");
|
|
3195
3227
|
|
|
3196
3228
|
// src/assets/icon/ProfileIcon.tsx
|
|
3197
|
-
var
|
|
3229
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3198
3230
|
function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
3199
|
-
return /* @__PURE__ */ (0,
|
|
3200
|
-
/* @__PURE__ */ (0,
|
|
3231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
3232
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3201
3233
|
"path",
|
|
3202
3234
|
{
|
|
3203
3235
|
fillRule: "evenodd",
|
|
@@ -3206,7 +3238,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
3206
3238
|
fill: color
|
|
3207
3239
|
}
|
|
3208
3240
|
),
|
|
3209
|
-
/* @__PURE__ */ (0,
|
|
3241
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3210
3242
|
"path",
|
|
3211
3243
|
{
|
|
3212
3244
|
fillRule: "evenodd",
|
|
@@ -3220,7 +3252,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
3220
3252
|
|
|
3221
3253
|
// src/components/UserPopover/index.tsx
|
|
3222
3254
|
var import_react_intl6 = require("react-intl");
|
|
3223
|
-
var
|
|
3255
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3224
3256
|
function UserContent() {
|
|
3225
3257
|
const { logout, address, username } = useUserInfo();
|
|
3226
3258
|
const [logouting, setLogouting] = (0, import_react11.useState)(false);
|
|
@@ -3241,34 +3273,34 @@ function UserContent() {
|
|
|
3241
3273
|
rightIcon,
|
|
3242
3274
|
onClick
|
|
3243
3275
|
}) => {
|
|
3244
|
-
return /* @__PURE__ */ (0,
|
|
3245
|
-
/* @__PURE__ */ (0,
|
|
3276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "matchid-user-popover-item", onClick, children: [
|
|
3277
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: `matchid-user-popover-item-content`, children: [
|
|
3246
3278
|
icon,
|
|
3247
|
-
/* @__PURE__ */ (0,
|
|
3279
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "matchid-user-popover-item-text", children })
|
|
3248
3280
|
] }),
|
|
3249
3281
|
rightIcon
|
|
3250
3282
|
] });
|
|
3251
3283
|
};
|
|
3252
3284
|
const UserDivider = () => {
|
|
3253
|
-
return /* @__PURE__ */ (0,
|
|
3285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: `matchid-user-popover-divider` });
|
|
3254
3286
|
};
|
|
3255
3287
|
const [usernameOpen, setUsernameOpen] = (0, import_react11.useState)(false);
|
|
3256
3288
|
const [copied, setCopied] = useCopyClipboard();
|
|
3257
3289
|
const intl = (0, import_react_intl6.useIntl)();
|
|
3258
|
-
return /* @__PURE__ */ (0,
|
|
3259
|
-
/* @__PURE__ */ (0,
|
|
3260
|
-
/* @__PURE__ */ (0,
|
|
3290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "matchid-user-popover-content", children: [
|
|
3291
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "matchid-user-popover-list", children: [
|
|
3292
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(UserItem, { onClick: () => {
|
|
3261
3293
|
setCopied(address);
|
|
3262
|
-
}, icon: copied ? /* @__PURE__ */ (0,
|
|
3263
|
-
/* @__PURE__ */ (0,
|
|
3264
|
-
/* @__PURE__ */ (0,
|
|
3294
|
+
}, icon: copied ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(CheckIcon, { size: 20, color: "#0ecb81" }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(CopyIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(CheckIcon, { size: 20, color: "var(--icon-color)" }), children: truncateAddress(address) }),
|
|
3295
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(UserDivider, {}),
|
|
3296
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(UserItem, { onClick: () => {
|
|
3265
3297
|
setUsernameOpen(true);
|
|
3266
|
-
}, icon: /* @__PURE__ */ (0,
|
|
3298
|
+
}, icon: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ProfileIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ArrowRightIcon, { size: 20, color: "var(--icon-color)" }), children: username || intl.formatMessage({
|
|
3267
3299
|
id: "setUsername"
|
|
3268
3300
|
}) })
|
|
3269
3301
|
] }),
|
|
3270
|
-
/* @__PURE__ */ (0,
|
|
3271
|
-
/* @__PURE__ */ (0,
|
|
3302
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react_intl6.FormattedMessage, { id: "disconnect" }) }),
|
|
3303
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(UsernameModal, { isOpen: usernameOpen, onClose: () => {
|
|
3272
3304
|
setUsernameOpen(false);
|
|
3273
3305
|
}, onSuccess: () => {
|
|
3274
3306
|
setUsernameOpen(false);
|
|
@@ -3279,12 +3311,12 @@ function UserPopover({
|
|
|
3279
3311
|
children,
|
|
3280
3312
|
...props
|
|
3281
3313
|
}) {
|
|
3282
|
-
return /* @__PURE__ */ (0,
|
|
3314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Popover, { ...props, content: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(UserContent, {}), children });
|
|
3283
3315
|
}
|
|
3284
3316
|
|
|
3285
3317
|
// src/components/LoginButton/index.tsx
|
|
3286
3318
|
var import_react_intl7 = require("react-intl");
|
|
3287
|
-
var
|
|
3319
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3288
3320
|
function LoginButton({
|
|
3289
3321
|
loginRender,
|
|
3290
3322
|
methods,
|
|
@@ -3300,8 +3332,8 @@ function LoginButton({
|
|
|
3300
3332
|
const { isLogin, username } = useUserInfo();
|
|
3301
3333
|
const [loginOpen, setLoginOpen] = (0, import_react12.useState)(false);
|
|
3302
3334
|
if (!isLogin) {
|
|
3303
|
-
return /* @__PURE__ */ (0,
|
|
3304
|
-
/* @__PURE__ */ (0,
|
|
3335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
|
|
3336
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3305
3337
|
LoginModal,
|
|
3306
3338
|
{
|
|
3307
3339
|
methods,
|
|
@@ -3311,15 +3343,15 @@ function LoginButton({
|
|
|
3311
3343
|
onClose: () => setLoginOpen(false)
|
|
3312
3344
|
}
|
|
3313
3345
|
),
|
|
3314
|
-
/* @__PURE__ */ (0,
|
|
3315
|
-
/* @__PURE__ */ (0,
|
|
3316
|
-
/* @__PURE__ */ (0,
|
|
3346
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
|
|
3347
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(UnLoginIcon_default, {}),
|
|
3348
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react_intl7.FormattedMessage, { id: "login" }) })
|
|
3317
3349
|
] })
|
|
3318
3350
|
] });
|
|
3319
3351
|
}
|
|
3320
|
-
return loginRender ? /* @__PURE__ */ (0,
|
|
3321
|
-
/* @__PURE__ */ (0,
|
|
3322
|
-
/* @__PURE__ */ (0,
|
|
3352
|
+
return loginRender ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children: loginRender }) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(UserPopover, { position: popoverPosition, type: popoverType, gap: popoverGap, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Button, { onClick: onLoginClick, className: "matchid-login-btn", ...props, children: [
|
|
3353
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(LoginIcon_default, {}),
|
|
3354
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: username ? truncateAddress(username) : "MatchID " + intl.formatMessage({
|
|
3323
3355
|
id: "user"
|
|
3324
3356
|
}) })
|
|
3325
3357
|
] }) });
|
|
@@ -3328,15 +3360,15 @@ function LoginButton({
|
|
|
3328
3360
|
// src/components/UsernameModal/index.tsx
|
|
3329
3361
|
var import_react13 = require("react");
|
|
3330
3362
|
var import_react_intl8 = require("react-intl");
|
|
3331
|
-
var
|
|
3363
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3332
3364
|
var ValidItem = ({
|
|
3333
3365
|
success = false,
|
|
3334
3366
|
text
|
|
3335
3367
|
}) => {
|
|
3336
3368
|
const isDownMd = useDownMd();
|
|
3337
|
-
return /* @__PURE__ */ (0,
|
|
3338
|
-
success ? /* @__PURE__ */ (0,
|
|
3339
|
-
/* @__PURE__ */ (0,
|
|
3369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
|
|
3370
|
+
success ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
|
|
3371
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { children: text })
|
|
3340
3372
|
] });
|
|
3341
3373
|
};
|
|
3342
3374
|
function UsernameModal({
|
|
@@ -3384,12 +3416,12 @@ function UsernameModal({
|
|
|
3384
3416
|
}
|
|
3385
3417
|
};
|
|
3386
3418
|
const intl = (0, import_react_intl8.useIntl)();
|
|
3387
|
-
return /* @__PURE__ */ (0,
|
|
3419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
|
|
3388
3420
|
id: username ? "editUsernameTitle" : "setUsernameTitle"
|
|
3389
|
-
}), children: /* @__PURE__ */ (0,
|
|
3390
|
-
/* @__PURE__ */ (0,
|
|
3421
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "matchid-username-box", children: [
|
|
3422
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Field, { label: intl.formatMessage({
|
|
3391
3423
|
id: "username"
|
|
3392
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
3424
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3393
3425
|
Input,
|
|
3394
3426
|
{
|
|
3395
3427
|
placeholder: intl.formatMessage({
|
|
@@ -3402,8 +3434,8 @@ function UsernameModal({
|
|
|
3402
3434
|
value: val
|
|
3403
3435
|
}
|
|
3404
3436
|
) }),
|
|
3405
|
-
/* @__PURE__ */ (0,
|
|
3406
|
-
/* @__PURE__ */ (0,
|
|
3437
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "matchid-valid", children: [
|
|
3438
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3407
3439
|
ValidItem,
|
|
3408
3440
|
{
|
|
3409
3441
|
success: isValid,
|
|
@@ -3412,16 +3444,16 @@ function UsernameModal({
|
|
|
3412
3444
|
})
|
|
3413
3445
|
}
|
|
3414
3446
|
),
|
|
3415
|
-
/* @__PURE__ */ (0,
|
|
3447
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(ValidItem, { success: isLength, text: intl.formatMessage({
|
|
3416
3448
|
id: "usernameLengthError"
|
|
3417
3449
|
}) })
|
|
3418
3450
|
] }),
|
|
3419
|
-
/* @__PURE__ */ (0,
|
|
3451
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Button, { disabled: !isSafe, loading: isSubmitting, style: {
|
|
3420
3452
|
marginTop: isDownMd ? "36px" : "64px"
|
|
3421
|
-
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
3422
|
-
/* @__PURE__ */ (0,
|
|
3453
|
+
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react_intl8.FormattedMessage, { id: "confirm" }) }),
|
|
3454
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Button, { style: {
|
|
3423
3455
|
marginTop: isDownMd ? "12px" : "24px"
|
|
3424
|
-
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0,
|
|
3456
|
+
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react_intl8.FormattedMessage, { id: "cancel" }) })
|
|
3425
3457
|
] }) });
|
|
3426
3458
|
}
|
|
3427
3459
|
|
|
@@ -3477,7 +3509,7 @@ var walletConnectImage = wallet_default;
|
|
|
3477
3509
|
var walletSigningImage = signing_default;
|
|
3478
3510
|
|
|
3479
3511
|
// src/components/WalletModalContent/index.tsx
|
|
3480
|
-
var
|
|
3512
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3481
3513
|
function WalletModalContent({
|
|
3482
3514
|
status,
|
|
3483
3515
|
error,
|
|
@@ -3547,15 +3579,15 @@ function WalletModalContent({
|
|
|
3547
3579
|
statusImage: walletConnectImage
|
|
3548
3580
|
};
|
|
3549
3581
|
}, [visible, connected, status, error, address]);
|
|
3550
|
-
return /* @__PURE__ */ (0,
|
|
3551
|
-
/* @__PURE__ */ (0,
|
|
3552
|
-
/* @__PURE__ */ (0,
|
|
3582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
3583
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
3584
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
3553
3585
|
width: 128,
|
|
3554
3586
|
height: 128
|
|
3555
3587
|
} }),
|
|
3556
|
-
/* @__PURE__ */ (0,
|
|
3588
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: pageData.isError ? "matchid-error" : "", children: pageData.text })
|
|
3557
3589
|
] }),
|
|
3558
|
-
/* @__PURE__ */ (0,
|
|
3590
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3559
3591
|
Button,
|
|
3560
3592
|
{
|
|
3561
3593
|
block: true,
|
|
@@ -3631,15 +3663,15 @@ function WalletModalContentV2(props) {
|
|
|
3631
3663
|
statusImage: walletConnectImage
|
|
3632
3664
|
};
|
|
3633
3665
|
}, [props, submitting]);
|
|
3634
|
-
return /* @__PURE__ */ (0,
|
|
3635
|
-
/* @__PURE__ */ (0,
|
|
3636
|
-
/* @__PURE__ */ (0,
|
|
3666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
3667
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
3668
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
3637
3669
|
width: 128,
|
|
3638
3670
|
height: 128
|
|
3639
3671
|
} }),
|
|
3640
|
-
/* @__PURE__ */ (0,
|
|
3672
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: props.status == "error" ? "matchid-error" : "", children: pageData.text })
|
|
3641
3673
|
] }),
|
|
3642
|
-
/* @__PURE__ */ (0,
|
|
3674
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3643
3675
|
Button,
|
|
3644
3676
|
{
|
|
3645
3677
|
block: true,
|
|
@@ -3921,7 +3953,7 @@ async function getEthersSigner(config, { chainId } = {}) {
|
|
|
3921
3953
|
// src/components/EVMModal/index.tsx
|
|
3922
3954
|
var import_siwe = require("siwe");
|
|
3923
3955
|
var import_styles = require("@rainbow-me/rainbowkit/styles.css");
|
|
3924
|
-
var
|
|
3956
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3925
3957
|
function WalletContent({
|
|
3926
3958
|
onSuccess,
|
|
3927
3959
|
type
|
|
@@ -4079,7 +4111,7 @@ function WalletContent({
|
|
|
4079
4111
|
setNonce(void 0);
|
|
4080
4112
|
setStatus("start");
|
|
4081
4113
|
};
|
|
4082
|
-
return /* @__PURE__ */ (0,
|
|
4114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
4083
4115
|
WalletModalContentV2,
|
|
4084
4116
|
{
|
|
4085
4117
|
status,
|
|
@@ -4097,14 +4129,14 @@ function EVMConnectModal({
|
|
|
4097
4129
|
...props
|
|
4098
4130
|
}) {
|
|
4099
4131
|
const intl = (0, import_react_intl9.useIntl)();
|
|
4100
|
-
return /* @__PURE__ */ (0,
|
|
4132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4101
4133
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4102
4134
|
}, {
|
|
4103
4135
|
name: "EVM"
|
|
4104
|
-
}), children: /* @__PURE__ */ (0,
|
|
4136
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(WalletContent, { onSuccess, type }) });
|
|
4105
4137
|
}
|
|
4106
4138
|
function EVMModal(props) {
|
|
4107
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
4139
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_rainbowkit.RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(EVMConnectModal, { ...props }) });
|
|
4108
4140
|
}
|
|
4109
4141
|
|
|
4110
4142
|
// src/components/TRONModal/index.tsx
|
|
@@ -4219,7 +4251,7 @@ var useTRONWallet = () => {
|
|
|
4219
4251
|
};
|
|
4220
4252
|
|
|
4221
4253
|
// src/components/TRONModal/index.tsx
|
|
4222
|
-
var
|
|
4254
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
4223
4255
|
function TRONConnectModal({
|
|
4224
4256
|
type = "login",
|
|
4225
4257
|
onSuccess,
|
|
@@ -4229,9 +4261,9 @@ function TRONConnectModal({
|
|
|
4229
4261
|
const intl = (0, import_react_intl10.useIntl)();
|
|
4230
4262
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
|
|
4231
4263
|
const iconMaps = {
|
|
4232
|
-
tronlink: /* @__PURE__ */ (0,
|
|
4233
|
-
bitget: /* @__PURE__ */ (0,
|
|
4234
|
-
okx: /* @__PURE__ */ (0,
|
|
4264
|
+
tronlink: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
|
|
4265
|
+
bitget: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(BitgetIcon, { size: isDownMd ? 36 : 40 }),
|
|
4266
|
+
okx: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(OKXIcon, { size: isDownMd ? 36 : 40 })
|
|
4235
4267
|
};
|
|
4236
4268
|
const { events, login } = useMatch();
|
|
4237
4269
|
const [status, setStatus] = (0, import_react18.useState)("");
|
|
@@ -4323,11 +4355,11 @@ function TRONConnectModal({
|
|
|
4323
4355
|
disconnect();
|
|
4324
4356
|
}
|
|
4325
4357
|
}, [props.isOpen]);
|
|
4326
|
-
return /* @__PURE__ */ (0,
|
|
4358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4327
4359
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4328
4360
|
}, {
|
|
4329
4361
|
name: "TRON"
|
|
4330
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
4362
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
4331
4363
|
WalletModalContent,
|
|
4332
4364
|
{
|
|
4333
4365
|
error,
|
|
@@ -4340,9 +4372,9 @@ function TRONConnectModal({
|
|
|
4340
4372
|
setVisible: () => {
|
|
4341
4373
|
}
|
|
4342
4374
|
}
|
|
4343
|
-
) : /* @__PURE__ */ (0,
|
|
4375
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
4344
4376
|
installedWallets.map((wallet2) => {
|
|
4345
|
-
return /* @__PURE__ */ (0,
|
|
4377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
4346
4378
|
RecommendItem,
|
|
4347
4379
|
{
|
|
4348
4380
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -4355,14 +4387,14 @@ function TRONConnectModal({
|
|
|
4355
4387
|
);
|
|
4356
4388
|
}),
|
|
4357
4389
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
4358
|
-
return /* @__PURE__ */ (0,
|
|
4390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
4359
4391
|
RecommendItem,
|
|
4360
4392
|
{
|
|
4361
4393
|
icon: iconMaps[wallet2.walletKey],
|
|
4362
4394
|
name: wallet2.name,
|
|
4363
4395
|
onClick: () => {
|
|
4364
4396
|
},
|
|
4365
|
-
footer: /* @__PURE__ */ (0,
|
|
4397
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Button, { size: "sm", onClick: () => {
|
|
4366
4398
|
window.open(wallet2.website);
|
|
4367
4399
|
}, children: "Install" })
|
|
4368
4400
|
},
|
|
@@ -4372,14 +4404,14 @@ function TRONConnectModal({
|
|
|
4372
4404
|
] }) }) });
|
|
4373
4405
|
}
|
|
4374
4406
|
function TRONModal(props) {
|
|
4375
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
4407
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TRONConnectModal, { ...props, type: props.type });
|
|
4376
4408
|
}
|
|
4377
4409
|
|
|
4378
4410
|
// src/components/TONModal/index.tsx
|
|
4379
4411
|
var import_react19 = __toESM(require("react"));
|
|
4380
4412
|
var import_react_intl11 = require("react-intl");
|
|
4381
4413
|
var import_ui_react = require("@tonconnect/ui-react");
|
|
4382
|
-
var
|
|
4414
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
4383
4415
|
function WalletContent2({
|
|
4384
4416
|
onSuccess,
|
|
4385
4417
|
type
|
|
@@ -4506,7 +4538,7 @@ function WalletContent2({
|
|
|
4506
4538
|
}
|
|
4507
4539
|
}
|
|
4508
4540
|
}, [state]);
|
|
4509
|
-
return /* @__PURE__ */ (0,
|
|
4541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4510
4542
|
WalletModalContent,
|
|
4511
4543
|
{
|
|
4512
4544
|
connected,
|
|
@@ -4540,20 +4572,20 @@ function TONConnectModal({
|
|
|
4540
4572
|
const intl = (0, import_react_intl11.useIntl)();
|
|
4541
4573
|
const { endpoints, appid } = useLocalStore_default();
|
|
4542
4574
|
const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
|
|
4543
|
-
return /* @__PURE__ */ (0,
|
|
4575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4544
4576
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4545
4577
|
}, {
|
|
4546
4578
|
name: "TON"
|
|
4547
|
-
}), children: /* @__PURE__ */ (0,
|
|
4579
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4548
4580
|
import_ui_react.TonConnectUIProvider,
|
|
4549
4581
|
{
|
|
4550
4582
|
manifestUrl,
|
|
4551
|
-
children: /* @__PURE__ */ (0,
|
|
4583
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(WalletContent2, { onSuccess, type })
|
|
4552
4584
|
}
|
|
4553
4585
|
) });
|
|
4554
4586
|
}
|
|
4555
4587
|
function TONModal(props) {
|
|
4556
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
4588
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TONConnectModal, { ...props });
|
|
4557
4589
|
}
|
|
4558
4590
|
|
|
4559
4591
|
// src/components/BTCModal/index.tsx
|
|
@@ -4776,7 +4808,7 @@ var useBTCWallet = () => {
|
|
|
4776
4808
|
};
|
|
4777
4809
|
|
|
4778
4810
|
// src/components/BTCModal/index.tsx
|
|
4779
|
-
var
|
|
4811
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
4780
4812
|
function BTCConnectModal({
|
|
4781
4813
|
type = "login",
|
|
4782
4814
|
onSuccess,
|
|
@@ -4786,10 +4818,10 @@ function BTCConnectModal({
|
|
|
4786
4818
|
const intl = (0, import_react_intl12.useIntl)();
|
|
4787
4819
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
|
|
4788
4820
|
const iconMaps = {
|
|
4789
|
-
leather: /* @__PURE__ */ (0,
|
|
4790
|
-
unisat: /* @__PURE__ */ (0,
|
|
4791
|
-
xverse: /* @__PURE__ */ (0,
|
|
4792
|
-
phantom: /* @__PURE__ */ (0,
|
|
4821
|
+
leather: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(LeatherIcon, { size: isDownMd ? 36 : 40 }),
|
|
4822
|
+
unisat: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(UnisatIcon, { size: isDownMd ? 36 : 40 }),
|
|
4823
|
+
xverse: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(XverseIcon, { size: isDownMd ? 36 : 40 }),
|
|
4824
|
+
phantom: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(PhantomIcon, { size: isDownMd ? 36 : 40 })
|
|
4793
4825
|
};
|
|
4794
4826
|
const { events, login } = useMatch();
|
|
4795
4827
|
const [status, setStatus] = (0, import_react21.useState)("");
|
|
@@ -4889,11 +4921,11 @@ function BTCConnectModal({
|
|
|
4889
4921
|
statusRef.current = "";
|
|
4890
4922
|
setError("");
|
|
4891
4923
|
};
|
|
4892
|
-
return /* @__PURE__ */ (0,
|
|
4924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4893
4925
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4894
4926
|
}, {
|
|
4895
4927
|
name: "BTC"
|
|
4896
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
4928
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4897
4929
|
WalletModalContent,
|
|
4898
4930
|
{
|
|
4899
4931
|
error,
|
|
@@ -4906,9 +4938,9 @@ function BTCConnectModal({
|
|
|
4906
4938
|
setVisible: () => {
|
|
4907
4939
|
}
|
|
4908
4940
|
}
|
|
4909
|
-
) : /* @__PURE__ */ (0,
|
|
4941
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
4910
4942
|
installedWallets.map((wallet2) => {
|
|
4911
|
-
return /* @__PURE__ */ (0,
|
|
4943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4912
4944
|
RecommendItem,
|
|
4913
4945
|
{
|
|
4914
4946
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -4921,14 +4953,14 @@ function BTCConnectModal({
|
|
|
4921
4953
|
);
|
|
4922
4954
|
}),
|
|
4923
4955
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
4924
|
-
return /* @__PURE__ */ (0,
|
|
4956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4925
4957
|
RecommendItem,
|
|
4926
4958
|
{
|
|
4927
4959
|
icon: iconMaps[wallet2.walletKey],
|
|
4928
4960
|
name: wallet2.name,
|
|
4929
4961
|
onClick: () => {
|
|
4930
4962
|
},
|
|
4931
|
-
footer: /* @__PURE__ */ (0,
|
|
4963
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Button, { size: "sm", onClick: () => {
|
|
4932
4964
|
window.open(wallet2.website);
|
|
4933
4965
|
}, children: "Install" })
|
|
4934
4966
|
},
|
|
@@ -4938,13 +4970,13 @@ function BTCConnectModal({
|
|
|
4938
4970
|
] }) }) });
|
|
4939
4971
|
}
|
|
4940
4972
|
function BTCModal(props) {
|
|
4941
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
4973
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(BTCConnectModal, { ...props });
|
|
4942
4974
|
}
|
|
4943
4975
|
|
|
4944
4976
|
// src/components/WalletModal/index.tsx
|
|
4945
4977
|
var import_react22 = require("react");
|
|
4946
4978
|
var import_react_intl13 = require("react-intl");
|
|
4947
|
-
var
|
|
4979
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4948
4980
|
function WalletConnectModal({
|
|
4949
4981
|
type,
|
|
4950
4982
|
methods: _methods,
|
|
@@ -4962,13 +4994,13 @@ function WalletConnectModal({
|
|
|
4962
4994
|
const platform = config.platform.map((p) => p.toLowerCase());
|
|
4963
4995
|
return WALLET_METHODS.filter((m) => platform.includes(m));
|
|
4964
4996
|
}, [config.platform, _methods]);
|
|
4965
|
-
return /* @__PURE__ */ (0,
|
|
4997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4966
4998
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4967
4999
|
}, {
|
|
4968
5000
|
name: ""
|
|
4969
|
-
}), children: /* @__PURE__ */ (0,
|
|
5001
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "matchid-login-recommend-list", children: methods.map((method, index) => {
|
|
4970
5002
|
const m = walletMap[method];
|
|
4971
|
-
return /* @__PURE__ */ (0,
|
|
5003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4972
5004
|
RecommendItem,
|
|
4973
5005
|
{
|
|
4974
5006
|
icon: m?.icon,
|
|
@@ -4982,12 +5014,12 @@ function WalletConnectModal({
|
|
|
4982
5014
|
}) }) }) });
|
|
4983
5015
|
}
|
|
4984
5016
|
function WalletModal(props) {
|
|
4985
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5017
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(WalletConnectModal, { ...props });
|
|
4986
5018
|
}
|
|
4987
5019
|
|
|
4988
5020
|
// src/components/AlphaAvatar/index.tsx
|
|
4989
5021
|
var import_react23 = require("react");
|
|
4990
|
-
var
|
|
5022
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4991
5023
|
function AlphaAvatar({ name, size = 40, className = "" }) {
|
|
4992
5024
|
const [avatar, setAvatar] = (0, import_react23.useState)(void 0);
|
|
4993
5025
|
(0, import_react23.useEffect)(() => {
|
|
@@ -4996,7 +5028,7 @@ function AlphaAvatar({ name, size = 40, className = "" }) {
|
|
|
4996
5028
|
setAvatar(char);
|
|
4997
5029
|
}
|
|
4998
5030
|
}, [name]);
|
|
4999
|
-
return /* @__PURE__ */ (0,
|
|
5031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
5000
5032
|
width: size,
|
|
5001
5033
|
height: size,
|
|
5002
5034
|
fontSize: Math.ceil(size / 2)
|
|
@@ -5004,7 +5036,7 @@ function AlphaAvatar({ name, size = 40, className = "" }) {
|
|
|
5004
5036
|
}
|
|
5005
5037
|
|
|
5006
5038
|
// src/components/WalletAsset/index.tsx
|
|
5007
|
-
var
|
|
5039
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
5008
5040
|
function WalletAsset({
|
|
5009
5041
|
onAssetClick,
|
|
5010
5042
|
matchWalletAssetsOptions
|
|
@@ -5014,7 +5046,7 @@ function WalletAsset({
|
|
|
5014
5046
|
list: walletAssets.mergedAssets
|
|
5015
5047
|
});
|
|
5016
5048
|
const { list } = useMatchChain();
|
|
5017
|
-
return /* @__PURE__ */ (0,
|
|
5049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5018
5050
|
const clickFunc = onAssetClick && onAssetClick(n);
|
|
5019
5051
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5020
5052
|
const getFooterColor = () => {
|
|
@@ -5029,11 +5061,11 @@ function WalletAsset({
|
|
|
5029
5061
|
}
|
|
5030
5062
|
return "";
|
|
5031
5063
|
};
|
|
5032
|
-
return /* @__PURE__ */ (0,
|
|
5064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: `matchid-wallet-asset-item`, onClick: clickFunc, style: {
|
|
5033
5065
|
cursor: clickFunc ? "pointer" : "default"
|
|
5034
5066
|
}, children: [
|
|
5035
|
-
/* @__PURE__ */ (0,
|
|
5036
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
5067
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
|
|
5068
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-wallet-asset-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5037
5069
|
AlphaAvatar,
|
|
5038
5070
|
{
|
|
5039
5071
|
className: `matchid-wallet-asset-icon`,
|
|
@@ -5041,12 +5073,12 @@ function WalletAsset({
|
|
|
5041
5073
|
name: n.symbol || n.name || ""
|
|
5042
5074
|
}
|
|
5043
5075
|
),
|
|
5044
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
5076
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
|
|
5045
5077
|
] }),
|
|
5046
|
-
/* @__PURE__ */ (0,
|
|
5047
|
-
/* @__PURE__ */ (0,
|
|
5048
|
-
"price" in n && /* @__PURE__ */ (0,
|
|
5049
|
-
/* @__PURE__ */ (0,
|
|
5078
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: `matchid-wallet-asset-info`, children: [
|
|
5079
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
|
|
5080
|
+
"price" in n && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: `matchid-wallet-asset-content`, children: [
|
|
5081
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5050
5082
|
NumberFormatter,
|
|
5051
5083
|
{
|
|
5052
5084
|
value: n.price,
|
|
@@ -5054,7 +5086,7 @@ function WalletAsset({
|
|
|
5054
5086
|
tFixNum: 2
|
|
5055
5087
|
}
|
|
5056
5088
|
) }),
|
|
5057
|
-
/* @__PURE__ */ (0,
|
|
5089
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5058
5090
|
NumberFormatter,
|
|
5059
5091
|
{
|
|
5060
5092
|
value: n.value,
|
|
@@ -5063,15 +5095,15 @@ function WalletAsset({
|
|
|
5063
5095
|
}
|
|
5064
5096
|
) })
|
|
5065
5097
|
] }),
|
|
5066
|
-
/* @__PURE__ */ (0,
|
|
5067
|
-
/* @__PURE__ */ (0,
|
|
5098
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: `matchid-wallet-asset-footer`, children: [
|
|
5099
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5068
5100
|
NumberFormatter,
|
|
5069
5101
|
{
|
|
5070
5102
|
value: n.balance,
|
|
5071
5103
|
tFixNum: 3
|
|
5072
5104
|
}
|
|
5073
5105
|
) }),
|
|
5074
|
-
"price_change_24h" in n && /* @__PURE__ */ (0,
|
|
5106
|
+
"price_change_24h" in n && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: `matchid-wallet-asset-change ${getFooterColor()}`, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5075
5107
|
NumberFormatter,
|
|
5076
5108
|
{
|
|
5077
5109
|
prefix: `${(n?.price_change_24h || 0) < 0 ? "-" : "+"} `,
|
|
@@ -5090,7 +5122,7 @@ function WalletAsset({
|
|
|
5090
5122
|
var import_react24 = require("react");
|
|
5091
5123
|
var import_viem3 = require("viem");
|
|
5092
5124
|
var import_react_intl14 = require("react-intl");
|
|
5093
|
-
var
|
|
5125
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
5094
5126
|
function Input2({
|
|
5095
5127
|
onChange,
|
|
5096
5128
|
placeholder,
|
|
@@ -5100,8 +5132,8 @@ function Input2({
|
|
|
5100
5132
|
error,
|
|
5101
5133
|
size = "df"
|
|
5102
5134
|
}) {
|
|
5103
|
-
return /* @__PURE__ */ (0,
|
|
5104
|
-
/* @__PURE__ */ (0,
|
|
5135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
|
|
5136
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
5105
5137
|
"input",
|
|
5106
5138
|
{
|
|
5107
5139
|
placeholder,
|
|
@@ -5112,7 +5144,7 @@ function Input2({
|
|
|
5112
5144
|
className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
|
|
5113
5145
|
}
|
|
5114
5146
|
),
|
|
5115
|
-
error && /* @__PURE__ */ (0,
|
|
5147
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "matchid-token-input-error-text", children: error })
|
|
5116
5148
|
] });
|
|
5117
5149
|
}
|
|
5118
5150
|
function TokenSend({
|
|
@@ -5240,24 +5272,24 @@ function TokenSend({
|
|
|
5240
5272
|
window.removeEventListener("message", receiveMessage);
|
|
5241
5273
|
};
|
|
5242
5274
|
}, []);
|
|
5243
|
-
return /* @__PURE__ */ (0,
|
|
5244
|
-
/* @__PURE__ */ (0,
|
|
5245
|
-
/* @__PURE__ */ (0,
|
|
5246
|
-
/* @__PURE__ */ (0,
|
|
5247
|
-
/* @__PURE__ */ (0,
|
|
5248
|
-
/* @__PURE__ */ (0,
|
|
5249
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
5275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react_intl14.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: `matchid-token-send-box`, children: [
|
|
5276
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
5277
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: `matchid-token-amount-content`, children: [
|
|
5278
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: `matchid-token-amount-header`, children: [
|
|
5279
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react_intl14.FormattedMessage, { id: "amount" }) }),
|
|
5280
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
|
|
5281
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
5250
5282
|
"img",
|
|
5251
5283
|
{
|
|
5252
5284
|
src: token?.icon,
|
|
5253
5285
|
alt: token?.symbol,
|
|
5254
5286
|
className: `matchid-token-amount-chain-icon`
|
|
5255
5287
|
}
|
|
5256
|
-
) : /* @__PURE__ */ (0,
|
|
5257
|
-
/* @__PURE__ */ (0,
|
|
5288
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(AlphaAvatar2, { name: token.symbol || token.name || "", size: 16 }),
|
|
5289
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { children: token?.symbol })
|
|
5258
5290
|
] })
|
|
5259
5291
|
] }),
|
|
5260
|
-
/* @__PURE__ */ (0,
|
|
5292
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
5261
5293
|
Input2,
|
|
5262
5294
|
{
|
|
5263
5295
|
type: "text",
|
|
@@ -5270,18 +5302,18 @@ function TokenSend({
|
|
|
5270
5302
|
error: error.amount || txError
|
|
5271
5303
|
}
|
|
5272
5304
|
),
|
|
5273
|
-
/* @__PURE__ */ (0,
|
|
5274
|
-
/* @__PURE__ */ (0,
|
|
5275
|
-
/* @__PURE__ */ (0,
|
|
5305
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
|
|
5306
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: `matchid-token-amount-title`, children: [
|
|
5307
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react_intl14.FormattedMessage, { id: "balance" }),
|
|
5276
5308
|
":"
|
|
5277
5309
|
] }),
|
|
5278
|
-
/* @__PURE__ */ (0,
|
|
5310
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
|
|
5279
5311
|
] }),
|
|
5280
|
-
/* @__PURE__ */ (0,
|
|
5312
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
5281
5313
|
] }),
|
|
5282
|
-
/* @__PURE__ */ (0,
|
|
5283
|
-
/* @__PURE__ */ (0,
|
|
5284
|
-
/* @__PURE__ */ (0,
|
|
5314
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: `matchid-token-address-content`, children: [
|
|
5315
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react_intl14.FormattedMessage, { id: "receiveTitle" }) }) }),
|
|
5316
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
5285
5317
|
Input2,
|
|
5286
5318
|
{
|
|
5287
5319
|
type: "text",
|
|
@@ -5297,7 +5329,7 @@ function TokenSend({
|
|
|
5297
5329
|
)
|
|
5298
5330
|
] })
|
|
5299
5331
|
] }),
|
|
5300
|
-
/* @__PURE__ */ (0,
|
|
5332
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
5301
5333
|
Button,
|
|
5302
5334
|
{
|
|
5303
5335
|
size: "lg",
|
|
@@ -5306,7 +5338,7 @@ function TokenSend({
|
|
|
5306
5338
|
disabled: !canSend || !!txError,
|
|
5307
5339
|
onClick: onNext,
|
|
5308
5340
|
loading: loading || sending,
|
|
5309
|
-
children: /* @__PURE__ */ (0,
|
|
5341
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react_intl14.FormattedMessage, { id: "next" })
|
|
5310
5342
|
}
|
|
5311
5343
|
)
|
|
5312
5344
|
] }) });
|
|
@@ -5314,7 +5346,7 @@ function TokenSend({
|
|
|
5314
5346
|
|
|
5315
5347
|
// src/components/TokenDetail/index.tsx
|
|
5316
5348
|
var import_react_intl15 = require("react-intl");
|
|
5317
|
-
var
|
|
5349
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
5318
5350
|
function TokenDetail({
|
|
5319
5351
|
onClose,
|
|
5320
5352
|
token
|
|
@@ -5324,41 +5356,41 @@ function TokenDetail({
|
|
|
5324
5356
|
const chain = chainList?.find((m) => m.id.toString() === token.chain_id);
|
|
5325
5357
|
const onSend = () => {
|
|
5326
5358
|
modal.show((props) => {
|
|
5327
|
-
return /* @__PURE__ */ (0,
|
|
5359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TokenSend, { onClose: () => {
|
|
5328
5360
|
props.close();
|
|
5329
5361
|
onClose();
|
|
5330
5362
|
}, onBack: props.close, zIndex: props.zIndex, token });
|
|
5331
5363
|
});
|
|
5332
5364
|
};
|
|
5333
5365
|
const intl = (0, import_react_intl15.useIntl)();
|
|
5334
|
-
return /* @__PURE__ */ (0,
|
|
5366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(ModalDrawer, { isOpen: true, title: intl.formatMessage({
|
|
5335
5367
|
id: "tokenDetails"
|
|
5336
|
-
}), onClose, children: /* @__PURE__ */ (0,
|
|
5337
|
-
/* @__PURE__ */ (0,
|
|
5338
|
-
/* @__PURE__ */ (0,
|
|
5339
|
-
/* @__PURE__ */ (0,
|
|
5340
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
5341
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
5368
|
+
}), onClose, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-detail`, children: [
|
|
5369
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-main`, children: [
|
|
5370
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-info`, children: [
|
|
5371
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-logo`, children: [
|
|
5372
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("img", { src: token.icon, alt: token.symbol, className: `matchid-token-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(AlphaAvatar2, { className: `matchid-token-icon`, size: 48, name: token.symbol || token.name || "" }),
|
|
5373
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-token-chain` })
|
|
5342
5374
|
] }),
|
|
5343
|
-
/* @__PURE__ */ (0,
|
|
5344
|
-
/* @__PURE__ */ (0,
|
|
5375
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-name`, children: [
|
|
5376
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10 }),
|
|
5345
5377
|
" ",
|
|
5346
5378
|
token.symbol
|
|
5347
5379
|
] })
|
|
5348
5380
|
] }),
|
|
5349
|
-
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0,
|
|
5350
|
-
/* @__PURE__ */ (0,
|
|
5351
|
-
/* @__PURE__ */ (0,
|
|
5381
|
+
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-contract`, children: [
|
|
5382
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-token-contract-title", children: "Contract address" }),
|
|
5383
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-token-contract-address", children: token.address })
|
|
5352
5384
|
] })
|
|
5353
5385
|
] }),
|
|
5354
|
-
/* @__PURE__ */ (0,
|
|
5386
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl15.FormattedMessage, { id: "send" }) })
|
|
5355
5387
|
] }) });
|
|
5356
5388
|
}
|
|
5357
5389
|
|
|
5358
5390
|
// src/components/TokenSendList/index.tsx
|
|
5359
5391
|
var import_react25 = require("react");
|
|
5360
5392
|
var import_react_intl16 = require("react-intl");
|
|
5361
|
-
var
|
|
5393
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
5362
5394
|
function TokenSendList({ close }) {
|
|
5363
5395
|
const isDownMd = useDownMd();
|
|
5364
5396
|
const walletAssets = useMatchWalletAssets();
|
|
@@ -5370,16 +5402,16 @@ function TokenSendList({ close }) {
|
|
|
5370
5402
|
const modal = useModal();
|
|
5371
5403
|
const onNext = () => {
|
|
5372
5404
|
checked && modal.show((props) => {
|
|
5373
|
-
return /* @__PURE__ */ (0,
|
|
5405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(TokenSend, { onClose: () => {
|
|
5374
5406
|
props.close();
|
|
5375
5407
|
close();
|
|
5376
5408
|
}, onBack: props.close, zIndex: props.zIndex, token: checked });
|
|
5377
5409
|
});
|
|
5378
5410
|
};
|
|
5379
|
-
return /* @__PURE__ */ (0,
|
|
5380
|
-
/* @__PURE__ */ (0,
|
|
5411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-token-send-list-box", children: [
|
|
5412
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5381
5413
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5382
|
-
return /* @__PURE__ */ (0,
|
|
5414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
5383
5415
|
"div",
|
|
5384
5416
|
{
|
|
5385
5417
|
className: `matchid-token-send-item ${checked?.address == n.address ? "matchid-token-send-chekced" : ""}`,
|
|
@@ -5387,10 +5419,10 @@ function TokenSendList({ close }) {
|
|
|
5387
5419
|
setChecked(n);
|
|
5388
5420
|
},
|
|
5389
5421
|
children: [
|
|
5390
|
-
/* @__PURE__ */ (0,
|
|
5391
|
-
/* @__PURE__ */ (0,
|
|
5392
|
-
/* @__PURE__ */ (0,
|
|
5393
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
5422
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
|
|
5423
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
5424
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-token-send-logo", children: [
|
|
5425
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
5394
5426
|
AlphaAvatar,
|
|
5395
5427
|
{
|
|
5396
5428
|
className: `matchid-token-send-icon`,
|
|
@@ -5398,7 +5430,7 @@ function TokenSendList({ close }) {
|
|
|
5398
5430
|
name: n.symbol || n.name || ""
|
|
5399
5431
|
}
|
|
5400
5432
|
),
|
|
5401
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
5433
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
5402
5434
|
"img",
|
|
5403
5435
|
{
|
|
5404
5436
|
src: chain.iconUrl,
|
|
@@ -5407,9 +5439,9 @@ function TokenSendList({ close }) {
|
|
|
5407
5439
|
}
|
|
5408
5440
|
)
|
|
5409
5441
|
] }),
|
|
5410
|
-
/* @__PURE__ */ (0,
|
|
5411
|
-
/* @__PURE__ */ (0,
|
|
5412
|
-
/* @__PURE__ */ (0,
|
|
5442
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-token-send-info`, children: [
|
|
5443
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
|
|
5444
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
|
|
5413
5445
|
] })
|
|
5414
5446
|
] })
|
|
5415
5447
|
]
|
|
@@ -5417,7 +5449,7 @@ function TokenSendList({ close }) {
|
|
|
5417
5449
|
index
|
|
5418
5450
|
);
|
|
5419
5451
|
}) }),
|
|
5420
|
-
/* @__PURE__ */ (0,
|
|
5452
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl16.FormattedMessage, { id: "next" }) })
|
|
5421
5453
|
] });
|
|
5422
5454
|
}
|
|
5423
5455
|
|
|
@@ -5525,7 +5557,7 @@ function useHash({
|
|
|
5525
5557
|
|
|
5526
5558
|
// src/components/TransactionList/index.tsx
|
|
5527
5559
|
var import_react_intl17 = require("react-intl");
|
|
5528
|
-
var
|
|
5560
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
5529
5561
|
var Item = ({ data }) => {
|
|
5530
5562
|
const { address } = useWallet();
|
|
5531
5563
|
const isOut = data.from.toLowerCase() == address.toLowerCase();
|
|
@@ -5612,18 +5644,18 @@ var Item = ({ data }) => {
|
|
|
5612
5644
|
}
|
|
5613
5645
|
return chain?.nativeCurrency.symbol || chain?.nativeCurrency.name;
|
|
5614
5646
|
}, [transferType, chain, contracts, chainId, data.to]);
|
|
5615
|
-
return /* @__PURE__ */ (0,
|
|
5647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
5616
5648
|
"a",
|
|
5617
5649
|
{
|
|
5618
5650
|
href: explorerLink(`tx/${data.hash}`),
|
|
5619
5651
|
target: "_blank",
|
|
5620
5652
|
className: `matchid-transaction-item`,
|
|
5621
5653
|
children: [
|
|
5622
|
-
/* @__PURE__ */ (0,
|
|
5623
|
-
/* @__PURE__ */ (0,
|
|
5624
|
-
/* @__PURE__ */ (0,
|
|
5625
|
-
/* @__PURE__ */ (0,
|
|
5626
|
-
/* @__PURE__ */ (0,
|
|
5654
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: `matchid-transacton-item-container`, children: [
|
|
5655
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
|
|
5656
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: `matchid-transaction-item-details`, children: [
|
|
5657
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
|
|
5658
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
5627
5659
|
"div",
|
|
5628
5660
|
{
|
|
5629
5661
|
className: `matchid-transaction-item-timestamp`,
|
|
@@ -5632,11 +5664,11 @@ var Item = ({ data }) => {
|
|
|
5632
5664
|
)
|
|
5633
5665
|
] })
|
|
5634
5666
|
] }),
|
|
5635
|
-
/* @__PURE__ */ (0,
|
|
5636
|
-
/* @__PURE__ */ (0,
|
|
5637
|
-
status == "loading" && /* @__PURE__ */ (0,
|
|
5638
|
-
status == "success" && /* @__PURE__ */ (0,
|
|
5639
|
-
status == "error" && /* @__PURE__ */ (0,
|
|
5667
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
|
|
5668
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(NumberFormatter, { value: amount, tFixNum: 6, prefix: isOut ? "-" : "+", suffix: " " + symbol }),
|
|
5669
|
+
status == "loading" && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(LoadingIcon_default, { color: "#000000", size: 16, rotate: true }),
|
|
5670
|
+
status == "success" && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CheckRoundIcon, { size: 16 }),
|
|
5671
|
+
status == "error" && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(InfoRoundIcon, { size: 16 })
|
|
5640
5672
|
] })
|
|
5641
5673
|
]
|
|
5642
5674
|
}
|
|
@@ -5646,26 +5678,26 @@ function TransactionList({
|
|
|
5646
5678
|
scrollableTarget
|
|
5647
5679
|
}) {
|
|
5648
5680
|
const { fetchMoreData, hasMore, items } = useMatchWalletRecords();
|
|
5649
|
-
return /* @__PURE__ */ (0,
|
|
5681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
5650
5682
|
import_react_infinite_scroll_component.default,
|
|
5651
5683
|
{
|
|
5652
5684
|
scrollableTarget,
|
|
5653
5685
|
dataLength: items.length,
|
|
5654
5686
|
next: fetchMoreData,
|
|
5655
5687
|
hasMore,
|
|
5656
|
-
loader: /* @__PURE__ */ (0,
|
|
5657
|
-
/* @__PURE__ */ (0,
|
|
5688
|
+
loader: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "matchid-list-nomore", children: [
|
|
5689
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
|
|
5658
5690
|
"Loading..."
|
|
5659
5691
|
] }),
|
|
5660
|
-
endMessage: items.length > 0 ? /* @__PURE__ */ (0,
|
|
5661
|
-
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0,
|
|
5692
|
+
endMessage: items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react_intl17.FormattedMessage, { id: "noMoreRecords" }) }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react_intl17.FormattedMessage, { id: "noRecords" }) }),
|
|
5693
|
+
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "mt-[150px]" }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Item, { data: item }, index)) })
|
|
5662
5694
|
}
|
|
5663
5695
|
);
|
|
5664
5696
|
}
|
|
5665
5697
|
|
|
5666
5698
|
// src/ui/Modal/index.tsx
|
|
5667
5699
|
var import_react_intl18 = require("react-intl");
|
|
5668
|
-
var
|
|
5700
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
5669
5701
|
function Modal({
|
|
5670
5702
|
children,
|
|
5671
5703
|
isOpen,
|
|
@@ -5673,10 +5705,10 @@ function Modal({
|
|
|
5673
5705
|
zIndex = 100,
|
|
5674
5706
|
className = ""
|
|
5675
5707
|
}) {
|
|
5676
|
-
return /* @__PURE__ */ (0,
|
|
5708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: `matchid-modal ${className}`, style: {
|
|
5677
5709
|
width
|
|
5678
5710
|
}, children: [
|
|
5679
|
-
/* @__PURE__ */ (0,
|
|
5711
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "matchid-modal-mobile-header" }),
|
|
5680
5712
|
children
|
|
5681
5713
|
] }) });
|
|
5682
5714
|
}
|
|
@@ -5690,13 +5722,13 @@ function ModalWithHeader({
|
|
|
5690
5722
|
...props
|
|
5691
5723
|
}) {
|
|
5692
5724
|
const isDownMd = useDownMd();
|
|
5693
|
-
return /* @__PURE__ */ (0,
|
|
5694
|
-
/* @__PURE__ */ (0,
|
|
5695
|
-
/* @__PURE__ */ (0,
|
|
5696
|
-
onBack && /* @__PURE__ */ (0,
|
|
5697
|
-
/* @__PURE__ */ (0,
|
|
5725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(Modal, { ...props, children: [
|
|
5726
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
|
|
5727
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "matchid-modal-header-content", children: [
|
|
5728
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
|
|
5729
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "matchid-modal-header-title", children: title })
|
|
5698
5730
|
] }),
|
|
5699
|
-
onClose && /* @__PURE__ */ (0,
|
|
5731
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
|
|
5700
5732
|
] }),
|
|
5701
5733
|
children
|
|
5702
5734
|
] });
|
|
@@ -5731,17 +5763,17 @@ function ConfirmModal({
|
|
|
5731
5763
|
setLoading(false);
|
|
5732
5764
|
}
|
|
5733
5765
|
};
|
|
5734
|
-
return /* @__PURE__ */ (0,
|
|
5735
|
-
/* @__PURE__ */ (0,
|
|
5736
|
-
error && /* @__PURE__ */ (0,
|
|
5737
|
-
/* @__PURE__ */ (0,
|
|
5766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ModalWithHeader, { isOpen, onClose, title, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "matchid-confirm-modal", children: [
|
|
5767
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "matchid-w-full", children }),
|
|
5768
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: `matchid-error`, children: error }),
|
|
5769
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Button, { size: "lg", onClick: onSubmit, loading, block: true, highlight: true, children: confirmText ?? intl.formatMessage({
|
|
5738
5770
|
id: "Confirm"
|
|
5739
5771
|
}) })
|
|
5740
5772
|
] }) });
|
|
5741
5773
|
}
|
|
5742
5774
|
|
|
5743
5775
|
// src/ui/ModalDrawer/index.tsx
|
|
5744
|
-
var
|
|
5776
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
5745
5777
|
function ModalDrawer({
|
|
5746
5778
|
title,
|
|
5747
5779
|
drawerTitleVisible = true,
|
|
@@ -5749,13 +5781,13 @@ function ModalDrawer({
|
|
|
5749
5781
|
}) {
|
|
5750
5782
|
const isDownMd = useDownMd();
|
|
5751
5783
|
if (isDownMd) {
|
|
5752
|
-
return /* @__PURE__ */ (0,
|
|
5784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ModalWithHeader, { ...props, title });
|
|
5753
5785
|
}
|
|
5754
|
-
return /* @__PURE__ */ (0,
|
|
5786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
|
|
5755
5787
|
}
|
|
5756
5788
|
|
|
5757
5789
|
// src/ui/HashPanel/index.tsx
|
|
5758
|
-
var
|
|
5790
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
5759
5791
|
function HashPanel({
|
|
5760
5792
|
hash,
|
|
5761
5793
|
chain,
|
|
@@ -5815,14 +5847,14 @@ function HashPanel({
|
|
|
5815
5847
|
}
|
|
5816
5848
|
}, [hashQuery.data]);
|
|
5817
5849
|
const link = chain ? `${chain?.blockExplorers?.default.url}/tx/${hash}` : "";
|
|
5818
|
-
return /* @__PURE__ */ (0,
|
|
5850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5819
5851
|
ModalDrawer,
|
|
5820
5852
|
{
|
|
5821
5853
|
isOpen,
|
|
5822
5854
|
showClose: true,
|
|
5823
5855
|
onClose,
|
|
5824
5856
|
zIndex,
|
|
5825
|
-
title: /* @__PURE__ */ (0,
|
|
5857
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5826
5858
|
"div",
|
|
5827
5859
|
{
|
|
5828
5860
|
className: "matchid-hashpanel-header",
|
|
@@ -5832,32 +5864,32 @@ function HashPanel({
|
|
|
5832
5864
|
children: statusValue.text
|
|
5833
5865
|
}
|
|
5834
5866
|
),
|
|
5835
|
-
children: /* @__PURE__ */ (0,
|
|
5836
|
-
/* @__PURE__ */ (0,
|
|
5837
|
-
/* @__PURE__ */ (0,
|
|
5867
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-hashpanel-box", children: [
|
|
5868
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-hashpanel-content", children: [
|
|
5869
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: `matchid-hashpanel-status`, style: {
|
|
5838
5870
|
color: statusValue.color
|
|
5839
5871
|
}, children: statusValue.text }),
|
|
5840
|
-
statusValue.lottie && /* @__PURE__ */ (0,
|
|
5872
|
+
statusValue.lottie && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Lottie_default, { animationData: statusValue.lottie, style: {
|
|
5841
5873
|
width: "96px",
|
|
5842
5874
|
height: "96px"
|
|
5843
5875
|
} }),
|
|
5844
|
-
hash && /* @__PURE__ */ (0,
|
|
5876
|
+
hash && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
|
|
5845
5877
|
"Hash:",
|
|
5846
|
-
/* @__PURE__ */ (0,
|
|
5878
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("a", { href: link, target: "_blank", children: hash })
|
|
5847
5879
|
] }),
|
|
5848
|
-
error && /* @__PURE__ */ (0,
|
|
5880
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-hashpanel-text", children: error })
|
|
5849
5881
|
] }),
|
|
5850
|
-
/* @__PURE__ */ (0,
|
|
5882
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
|
|
5851
5883
|
] })
|
|
5852
5884
|
}
|
|
5853
5885
|
);
|
|
5854
5886
|
}
|
|
5855
5887
|
function HashPanel_default(props) {
|
|
5856
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5888
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(HashPanel, { ...props });
|
|
5857
5889
|
}
|
|
5858
5890
|
|
|
5859
5891
|
// src/ui/Switch/index.tsx
|
|
5860
|
-
var
|
|
5892
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
5861
5893
|
function Switch({
|
|
5862
5894
|
size = "default",
|
|
5863
5895
|
checked = false,
|
|
@@ -5872,12 +5904,12 @@ function Switch({
|
|
|
5872
5904
|
onChange && onChange(!checked);
|
|
5873
5905
|
}
|
|
5874
5906
|
};
|
|
5875
|
-
return /* @__PURE__ */ (0,
|
|
5907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.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_runtime86.jsx)(LoadingIcon_default, { className: "matchid-switch-loading-icon", size: size == "default" ? 24 : 18, color: "var(--matchid-swicth-loading-color)" }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-switch-ball" }) });
|
|
5876
5908
|
}
|
|
5877
5909
|
|
|
5878
5910
|
// src/ui/AlphaAvatar/index.tsx
|
|
5879
5911
|
var import_react29 = require("react");
|
|
5880
|
-
var
|
|
5912
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
5881
5913
|
function AlphaAvatar2({
|
|
5882
5914
|
name,
|
|
5883
5915
|
size = "default",
|
|
@@ -5894,7 +5926,7 @@ function AlphaAvatar2({
|
|
|
5894
5926
|
return "";
|
|
5895
5927
|
}, [name]);
|
|
5896
5928
|
const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
|
|
5897
|
-
return /* @__PURE__ */ (0,
|
|
5929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
5898
5930
|
width: numberSize,
|
|
5899
5931
|
height: numberSize,
|
|
5900
5932
|
fontSize: Math.ceil(numberSize / 2),
|
|
@@ -5903,7 +5935,7 @@ function AlphaAvatar2({
|
|
|
5903
5935
|
}
|
|
5904
5936
|
|
|
5905
5937
|
// src/ui/Radio/index.tsx
|
|
5906
|
-
var
|
|
5938
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
5907
5939
|
function Radio({
|
|
5908
5940
|
checked = false,
|
|
5909
5941
|
onChange,
|
|
@@ -5912,20 +5944,20 @@ function Radio({
|
|
|
5912
5944
|
className = "",
|
|
5913
5945
|
style = {}
|
|
5914
5946
|
}) {
|
|
5915
|
-
return /* @__PURE__ */ (0,
|
|
5947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
|
|
5916
5948
|
width: size,
|
|
5917
5949
|
height: size,
|
|
5918
5950
|
...style,
|
|
5919
5951
|
// @ts-ignore
|
|
5920
5952
|
"--matchid-radio-checked": color
|
|
5921
|
-
}, children: checked && /* @__PURE__ */ (0,
|
|
5953
|
+
}, children: checked && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: `matchid-radio-content`, style: {
|
|
5922
5954
|
width: Math.floor(size * 0.7),
|
|
5923
5955
|
height: Math.floor(size * 0.7)
|
|
5924
5956
|
} }) });
|
|
5925
5957
|
}
|
|
5926
5958
|
|
|
5927
5959
|
// src/ui/Skeleton/index.tsx
|
|
5928
|
-
var
|
|
5960
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
5929
5961
|
var Skeleton = ({
|
|
5930
5962
|
style = {},
|
|
5931
5963
|
className = "",
|
|
@@ -5936,7 +5968,7 @@ var Skeleton = ({
|
|
|
5936
5968
|
children
|
|
5937
5969
|
}) => {
|
|
5938
5970
|
if (!loading) {
|
|
5939
|
-
return /* @__PURE__ */ (0,
|
|
5971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_jsx_runtime89.Fragment, { children });
|
|
5940
5972
|
}
|
|
5941
5973
|
const skeletonStyle = {
|
|
5942
5974
|
width,
|
|
@@ -5944,7 +5976,7 @@ var Skeleton = ({
|
|
|
5944
5976
|
borderRadius: radius,
|
|
5945
5977
|
...style
|
|
5946
5978
|
};
|
|
5947
|
-
return /* @__PURE__ */ (0,
|
|
5979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
5948
5980
|
"div",
|
|
5949
5981
|
{
|
|
5950
5982
|
className: "matchid-skeleton " + className,
|
|
@@ -5955,10 +5987,10 @@ var Skeleton = ({
|
|
|
5955
5987
|
var Skeleton_default = Skeleton;
|
|
5956
5988
|
|
|
5957
5989
|
// src/ui/Tabs/index.tsx
|
|
5958
|
-
var
|
|
5990
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
5959
5991
|
function Tabs(props) {
|
|
5960
|
-
return /* @__PURE__ */ (0,
|
|
5961
|
-
return /* @__PURE__ */ (0,
|
|
5992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: `matchid-tabs`, children: props.tabs.map((tab, index) => {
|
|
5993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { onClick: () => props.setActiveTab(index), className: `matchid-tab ${props.activeTab === index ? "matchid-tab-active" : ""}`, children: tab }, index);
|
|
5962
5994
|
}) });
|
|
5963
5995
|
}
|
|
5964
5996
|
|
|
@@ -5975,17 +6007,28 @@ var LazyLottie = (props) => {
|
|
|
5975
6007
|
};
|
|
5976
6008
|
var Lottie_default = LazyLottie;
|
|
5977
6009
|
|
|
6010
|
+
// src/ui/Checkbox/index.tsx
|
|
6011
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
6012
|
+
function Checkbox({
|
|
6013
|
+
checked = false,
|
|
6014
|
+
onChange
|
|
6015
|
+
}) {
|
|
6016
|
+
return checked ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CheckboxCheckedIcon, { onClick: () => onChange?.(false) }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CheckboxIcon, { onClick: () => onChange?.(true) });
|
|
6017
|
+
}
|
|
6018
|
+
|
|
5978
6019
|
// src/context/ModalContext.tsx
|
|
5979
|
-
var
|
|
6020
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
5980
6021
|
var ModalContext = (0, import_react30.createContext)(null);
|
|
5981
6022
|
function ModalProvider({ children }) {
|
|
5982
6023
|
const [modalState, setModalState] = (0, import_react30.useState)({
|
|
5983
6024
|
modals: [],
|
|
5984
6025
|
highestZIndex: 100
|
|
5985
6026
|
});
|
|
6027
|
+
const highestIndexRef = (0, import_react30.useRef)(100);
|
|
5986
6028
|
const getNextIndex = (0, import_react30.useCallback)(() => {
|
|
5987
|
-
|
|
5988
|
-
|
|
6029
|
+
highestIndexRef.current += 1;
|
|
6030
|
+
return highestIndexRef.current;
|
|
6031
|
+
}, []);
|
|
5989
6032
|
const closeModal = (0, import_react30.useCallback)((index) => {
|
|
5990
6033
|
setModalState((prevState) => ({
|
|
5991
6034
|
modals: prevState.modals.filter((modal) => modal.index !== index),
|
|
@@ -5994,7 +6037,7 @@ function ModalProvider({ children }) {
|
|
|
5994
6037
|
}, []);
|
|
5995
6038
|
const show = (0, import_react30.useCallback)((content, index) => {
|
|
5996
6039
|
setModalState((prevState) => {
|
|
5997
|
-
const modalIndex = index
|
|
6040
|
+
const modalIndex = index ?? getNextIndex();
|
|
5998
6041
|
const newZIndex = prevState.highestZIndex + 1;
|
|
5999
6042
|
return {
|
|
6000
6043
|
modals: [...prevState.modals, {
|
|
@@ -6010,7 +6053,7 @@ function ModalProvider({ children }) {
|
|
|
6010
6053
|
}, [getNextIndex, closeModal]);
|
|
6011
6054
|
const open = (0, import_react30.useCallback)((props) => {
|
|
6012
6055
|
setModalState((prevState) => {
|
|
6013
|
-
const modalIndex = props.index
|
|
6056
|
+
const modalIndex = props.index ?? getNextIndex();
|
|
6014
6057
|
const newZIndex = prevState.highestZIndex + 1;
|
|
6015
6058
|
return {
|
|
6016
6059
|
modals: [...prevState.modals, {
|
|
@@ -6018,19 +6061,19 @@ function ModalProvider({ children }) {
|
|
|
6018
6061
|
index: modalIndex,
|
|
6019
6062
|
zIndex: newZIndex,
|
|
6020
6063
|
close: () => closeModal(modalIndex),
|
|
6021
|
-
content: ({ close, zIndex }) => /* @__PURE__ */ (0,
|
|
6064
|
+
content: ({ close, zIndex }) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ModalDrawer, { showClose: true, isOpen: true, onClose: close, title: props.title, zIndex, onBack: props.onBack, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(props.content, { close, zIndex }) })
|
|
6022
6065
|
}],
|
|
6023
6066
|
highestZIndex: newZIndex
|
|
6024
6067
|
};
|
|
6025
6068
|
});
|
|
6026
6069
|
}, [getNextIndex, closeModal]);
|
|
6027
|
-
const modalElements = modalState.modals.
|
|
6070
|
+
const modalElements = modalState.modals.map(
|
|
6028
6071
|
(modal) => modal.visible ? (0, import_react_dom.createPortal)(
|
|
6029
|
-
|
|
6072
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(modal.content, { zIndex: modal.zIndex, close: modal.close }, modal.index),
|
|
6030
6073
|
document.body
|
|
6031
6074
|
) : null
|
|
6032
6075
|
);
|
|
6033
|
-
return /* @__PURE__ */ (0,
|
|
6076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ModalContext.Provider, { value: { show, open }, children: [
|
|
6034
6077
|
children,
|
|
6035
6078
|
modalElements
|
|
6036
6079
|
] });
|
|
@@ -6074,7 +6117,7 @@ var useTransactionStore = (0, import_zustand5.create)((0, import_middleware3.dev
|
|
|
6074
6117
|
var useTransactionStore_default = useTransactionStore;
|
|
6075
6118
|
|
|
6076
6119
|
// src/hooks/useWallet.tsx
|
|
6077
|
-
var
|
|
6120
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
6078
6121
|
var AppClientId = "react-sdk-" + getVersion();
|
|
6079
6122
|
function useWallet() {
|
|
6080
6123
|
const { address, wallet: walletConfig } = useLocalStore_default();
|
|
@@ -6248,12 +6291,12 @@ function useWallet() {
|
|
|
6248
6291
|
address: evmAccount.address
|
|
6249
6292
|
});
|
|
6250
6293
|
modal.show((props) => {
|
|
6251
|
-
return /* @__PURE__ */ (0,
|
|
6294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
|
|
6252
6295
|
});
|
|
6253
6296
|
return txHash;
|
|
6254
6297
|
} catch (error) {
|
|
6255
6298
|
modal.show((props) => {
|
|
6256
|
-
return /* @__PURE__ */ (0,
|
|
6299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, error: typeof error == "string" ? error : error.details || error.message, chain: _chain });
|
|
6257
6300
|
});
|
|
6258
6301
|
throw error;
|
|
6259
6302
|
}
|
|
@@ -6331,7 +6374,7 @@ function useCopyClipboard(timeout = 500) {
|
|
|
6331
6374
|
// src/context/ToastContext.tsx
|
|
6332
6375
|
var import_react33 = require("react");
|
|
6333
6376
|
var import_react_dom2 = require("react-dom");
|
|
6334
|
-
var
|
|
6377
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
6335
6378
|
var ToastContext = (0, import_react33.createContext)(null);
|
|
6336
6379
|
function ToastProvider({ children, zIndex = 299 }) {
|
|
6337
6380
|
const [toasts, setToasts] = (0, import_react33.useState)([]);
|
|
@@ -6344,28 +6387,28 @@ function ToastProvider({ children, zIndex = 299 }) {
|
|
|
6344
6387
|
setTimeout(() => removeToast(id), timeout);
|
|
6345
6388
|
}, [removeToast]);
|
|
6346
6389
|
const success = (0, import_react33.useCallback)((text, timeout) => {
|
|
6347
|
-
show({ icon: /* @__PURE__ */ (0,
|
|
6390
|
+
show({ icon: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(CheckRoundIcon, { color: "#2FCC00", size: 24 }), text, timeout });
|
|
6348
6391
|
}, [show]);
|
|
6349
6392
|
const error = (0, import_react33.useCallback)((text, timeout) => {
|
|
6350
|
-
show({ icon: /* @__PURE__ */ (0,
|
|
6393
|
+
show({ icon: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ErrorRoundIcon, { size: 24 }), text, timeout });
|
|
6351
6394
|
}, [show]);
|
|
6352
6395
|
const ToastComponent = (0, import_react_dom2.createPortal)(
|
|
6353
|
-
/* @__PURE__ */ (0,
|
|
6396
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "matchid-toast-box", style: {
|
|
6354
6397
|
zIndex
|
|
6355
|
-
}, children: toasts.reverse().map(({ id, icon, text }) => /* @__PURE__ */ (0,
|
|
6398
|
+
}, children: toasts.reverse().map(({ id, icon, text }) => /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
6356
6399
|
"div",
|
|
6357
6400
|
{
|
|
6358
6401
|
className: "matchid-toast",
|
|
6359
6402
|
children: [
|
|
6360
|
-
icon && /* @__PURE__ */ (0,
|
|
6361
|
-
/* @__PURE__ */ (0,
|
|
6403
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { children: icon }),
|
|
6404
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { children: text })
|
|
6362
6405
|
]
|
|
6363
6406
|
},
|
|
6364
6407
|
id
|
|
6365
6408
|
)) }),
|
|
6366
6409
|
document.body
|
|
6367
6410
|
);
|
|
6368
|
-
return /* @__PURE__ */ (0,
|
|
6411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(ToastContext.Provider, { value: { show, success, error }, children: [
|
|
6369
6412
|
children,
|
|
6370
6413
|
ToastComponent
|
|
6371
6414
|
] });
|
|
@@ -6510,7 +6553,7 @@ function useWalletAssetListQuery({
|
|
|
6510
6553
|
var import_react34 = require("react");
|
|
6511
6554
|
var import_viem10 = require("viem");
|
|
6512
6555
|
var import_react_intl19 = require("react-intl");
|
|
6513
|
-
var
|
|
6556
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
6514
6557
|
function useMatchChain() {
|
|
6515
6558
|
const chainListQuery = useChainListQuery();
|
|
6516
6559
|
const modal = useModal();
|
|
@@ -6541,28 +6584,28 @@ function useMatchChain() {
|
|
|
6541
6584
|
const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
|
|
6542
6585
|
const [selectedChainId, setSelectedChainId] = (0, import_react34.useState)(storeChainId2);
|
|
6543
6586
|
const isDownMd = useDownMd();
|
|
6544
|
-
return /* @__PURE__ */ (0,
|
|
6545
|
-
/* @__PURE__ */ (0,
|
|
6546
|
-
return /* @__PURE__ */ (0,
|
|
6587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-change-network-box`, children: [
|
|
6588
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
|
|
6589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
6547
6590
|
"div",
|
|
6548
6591
|
{
|
|
6549
6592
|
onClick: () => setSelectedChainId(item.id),
|
|
6550
6593
|
className: `matchid-change-network-item ${selectedChainId == item.id ? "matchid-change-network-selected" : ""}`,
|
|
6551
6594
|
children: [
|
|
6552
|
-
/* @__PURE__ */ (0,
|
|
6553
|
-
/* @__PURE__ */ (0,
|
|
6554
|
-
/* @__PURE__ */ (0,
|
|
6595
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
|
|
6596
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
|
|
6597
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
|
|
6555
6598
|
] }),
|
|
6556
|
-
/* @__PURE__ */ (0,
|
|
6599
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
|
|
6557
6600
|
]
|
|
6558
6601
|
},
|
|
6559
6602
|
index
|
|
6560
6603
|
);
|
|
6561
6604
|
}) }),
|
|
6562
|
-
/* @__PURE__ */ (0,
|
|
6605
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
|
|
6563
6606
|
setChainId2(selectedChainId || 0);
|
|
6564
6607
|
close();
|
|
6565
|
-
}, block: true, children: /* @__PURE__ */ (0,
|
|
6608
|
+
}, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl19.FormattedMessage, { id: "confirm" }) })
|
|
6566
6609
|
] });
|
|
6567
6610
|
}
|
|
6568
6611
|
const showChangeNetwork = () => {
|
|
@@ -6635,7 +6678,7 @@ function useIsContract({
|
|
|
6635
6678
|
}
|
|
6636
6679
|
|
|
6637
6680
|
// src/components/ImportToken/index.tsx
|
|
6638
|
-
var
|
|
6681
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
6639
6682
|
function ImportToken({ close }) {
|
|
6640
6683
|
const [status, setStatus] = (0, import_react35.useState)("");
|
|
6641
6684
|
const { token } = useUserInfo();
|
|
@@ -6746,22 +6789,22 @@ function ImportToken({ close }) {
|
|
|
6746
6789
|
enabled: canImport
|
|
6747
6790
|
});
|
|
6748
6791
|
if (status == "success" || status == "fail") {
|
|
6749
|
-
return /* @__PURE__ */ (0,
|
|
6750
|
-
/* @__PURE__ */ (0,
|
|
6751
|
-
/* @__PURE__ */ (0,
|
|
6792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-import-token-result matchid-flex`, children: [
|
|
6793
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-import-token-result-box matchid-flex`, children: [
|
|
6794
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: `matchid-import-token-result-img`, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Lottie_default, { animationData: status == "success" ? success_default : fail_default, style: {
|
|
6752
6795
|
width: "96px",
|
|
6753
6796
|
height: "96px"
|
|
6754
6797
|
} }) }),
|
|
6755
|
-
/* @__PURE__ */ (0,
|
|
6798
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: `matchid-import-token-result-text matchid-import-token-result-text-${status}`, children: status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl20.FormattedMessage, { id: "importSuccess" }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl20.FormattedMessage, { id: "importFail" }) })
|
|
6756
6799
|
] }),
|
|
6757
|
-
status == "success" ? /* @__PURE__ */ (0,
|
|
6800
|
+
status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Button, { size: "lg", onClick: close, block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl20.FormattedMessage, { id: "close" }) }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Button, { size: "lg", onClick: () => setStatus(""), block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl20.FormattedMessage, { id: "back" }) })
|
|
6758
6801
|
] });
|
|
6759
6802
|
}
|
|
6760
|
-
return /* @__PURE__ */ (0,
|
|
6761
|
-
/* @__PURE__ */ (0,
|
|
6762
|
-
/* @__PURE__ */ (0,
|
|
6803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-import-token`, children: [
|
|
6804
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "matchid-import-token-form", children: [
|
|
6805
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Field, { label: intl.formatMessage({
|
|
6763
6806
|
id: "tokenSmartContract"
|
|
6764
|
-
}), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0,
|
|
6807
|
+
}), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
6765
6808
|
Input,
|
|
6766
6809
|
{
|
|
6767
6810
|
placeholder: intl.formatMessage({
|
|
@@ -6772,9 +6815,9 @@ function ImportToken({ close }) {
|
|
|
6772
6815
|
maxLength: 42
|
|
6773
6816
|
}
|
|
6774
6817
|
) }),
|
|
6775
|
-
/* @__PURE__ */ (0,
|
|
6818
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Field, { label: intl.formatMessage({
|
|
6776
6819
|
id: "tokenSymbol"
|
|
6777
|
-
}), error: error.symbol, children: /* @__PURE__ */ (0,
|
|
6820
|
+
}), error: error.symbol, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
6778
6821
|
Input,
|
|
6779
6822
|
{
|
|
6780
6823
|
placeholder: intl.formatMessage({
|
|
@@ -6785,9 +6828,9 @@ function ImportToken({ close }) {
|
|
|
6785
6828
|
maxLength: 16
|
|
6786
6829
|
}
|
|
6787
6830
|
) }),
|
|
6788
|
-
/* @__PURE__ */ (0,
|
|
6831
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Field, { label: intl.formatMessage({
|
|
6789
6832
|
id: "tokenDecimals"
|
|
6790
|
-
}), error: error.decimals, children: /* @__PURE__ */ (0,
|
|
6833
|
+
}), error: error.decimals, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
6791
6834
|
Input,
|
|
6792
6835
|
{
|
|
6793
6836
|
placeholder: intl.formatMessage({
|
|
@@ -6799,7 +6842,7 @@ function ImportToken({ close }) {
|
|
|
6799
6842
|
}
|
|
6800
6843
|
) })
|
|
6801
6844
|
] }),
|
|
6802
|
-
/* @__PURE__ */ (0,
|
|
6845
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
6803
6846
|
Button,
|
|
6804
6847
|
{
|
|
6805
6848
|
size: "lg",
|
|
@@ -6808,14 +6851,14 @@ function ImportToken({ close }) {
|
|
|
6808
6851
|
loading: loading || isContractQuery.isLoading,
|
|
6809
6852
|
disabled: !canImport || !isContractQuery.data,
|
|
6810
6853
|
highlight: true,
|
|
6811
|
-
children: /* @__PURE__ */ (0,
|
|
6854
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl20.FormattedMessage, { id: "import" })
|
|
6812
6855
|
}
|
|
6813
6856
|
)
|
|
6814
6857
|
] });
|
|
6815
6858
|
}
|
|
6816
6859
|
|
|
6817
6860
|
// src/hooks/useMatchWallet.tsx
|
|
6818
|
-
var
|
|
6861
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
6819
6862
|
var ReceiveModal = () => {
|
|
6820
6863
|
const chain = useMatchChain();
|
|
6821
6864
|
const { address } = useWallet();
|
|
@@ -6829,10 +6872,10 @@ var ReceiveModal = () => {
|
|
|
6829
6872
|
}));
|
|
6830
6873
|
};
|
|
6831
6874
|
const chainLink = chain.explorerLink("address/" + address);
|
|
6832
|
-
return /* @__PURE__ */ (0,
|
|
6833
|
-
/* @__PURE__ */ (0,
|
|
6834
|
-
/* @__PURE__ */ (0,
|
|
6835
|
-
/* @__PURE__ */ (0,
|
|
6875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: `matchid-receive-modal`, children: [
|
|
6876
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "matchid-receive-container", children: [
|
|
6877
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_intl21.FormattedMessage, { id: "receiveQrcode" }) }),
|
|
6878
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: `matchid-qr-container`, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
6836
6879
|
import_react_qrcode.QRCode,
|
|
6837
6880
|
{
|
|
6838
6881
|
margin: "0",
|
|
@@ -6840,7 +6883,7 @@ var ReceiveModal = () => {
|
|
|
6840
6883
|
value: address
|
|
6841
6884
|
}
|
|
6842
6885
|
) }),
|
|
6843
|
-
/* @__PURE__ */ (0,
|
|
6886
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
6844
6887
|
"a",
|
|
6845
6888
|
{
|
|
6846
6889
|
href: chainLink,
|
|
@@ -6850,7 +6893,7 @@ var ReceiveModal = () => {
|
|
|
6850
6893
|
}
|
|
6851
6894
|
)
|
|
6852
6895
|
] }),
|
|
6853
|
-
/* @__PURE__ */ (0,
|
|
6896
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Button, { size: "lg", onClick: onCopy, block: true, highlight: true, disabled: copied, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
6854
6897
|
import_react_intl21.FormattedMessage,
|
|
6855
6898
|
{
|
|
6856
6899
|
id: "copyAddress"
|
|
@@ -7474,7 +7517,7 @@ function useTransaction({
|
|
|
7474
7517
|
// src/components/CEXBindModal/index.tsx
|
|
7475
7518
|
var import_react39 = require("react");
|
|
7476
7519
|
var import_react_intl22 = require("react-intl");
|
|
7477
|
-
var
|
|
7520
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
7478
7521
|
function CEXBindModal({
|
|
7479
7522
|
onClose,
|
|
7480
7523
|
type,
|
|
@@ -7529,20 +7572,20 @@ function CEXBindModal({
|
|
|
7529
7572
|
setLoading(false);
|
|
7530
7573
|
}
|
|
7531
7574
|
};
|
|
7532
|
-
return /* @__PURE__ */ (0,
|
|
7575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ModalWithHeader, { showClose: true, isOpen, onClose, title: intl.formatMessage({
|
|
7533
7576
|
id: "CEXBindTitle"
|
|
7534
7577
|
}, {
|
|
7535
7578
|
type
|
|
7536
|
-
}), ...props, children: /* @__PURE__ */ (0,
|
|
7537
|
-
/* @__PURE__ */ (0,
|
|
7538
|
-
/* @__PURE__ */ (0,
|
|
7539
|
-
/* @__PURE__ */ (0,
|
|
7540
|
-
/* @__PURE__ */ (0,
|
|
7541
|
-
/* @__PURE__ */ (0,
|
|
7579
|
+
}), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "matchid-cex-modal", children: [
|
|
7580
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { children: [
|
|
7581
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindAttention" }) }),
|
|
7582
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips1" }) }),
|
|
7583
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips2" }) }),
|
|
7584
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips3" }) })
|
|
7542
7585
|
] }),
|
|
7543
|
-
/* @__PURE__ */ (0,
|
|
7586
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Field, { label: intl.formatMessage({
|
|
7544
7587
|
id: "CEXBindApiKey"
|
|
7545
|
-
}), children: /* @__PURE__ */ (0,
|
|
7588
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
7546
7589
|
Input,
|
|
7547
7590
|
{
|
|
7548
7591
|
value: key,
|
|
@@ -7550,9 +7593,9 @@ function CEXBindModal({
|
|
|
7550
7593
|
placeholder: "**** **** ****"
|
|
7551
7594
|
}
|
|
7552
7595
|
) }),
|
|
7553
|
-
/* @__PURE__ */ (0,
|
|
7596
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Field, { label: intl.formatMessage({
|
|
7554
7597
|
id: "CEXBindApiSecretKey"
|
|
7555
|
-
}), error: !needPassphrase && error, children: /* @__PURE__ */ (0,
|
|
7598
|
+
}), error: !needPassphrase && error, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
7556
7599
|
Input,
|
|
7557
7600
|
{
|
|
7558
7601
|
value: secret,
|
|
@@ -7560,9 +7603,9 @@ function CEXBindModal({
|
|
|
7560
7603
|
placeholder: "**** **** ****"
|
|
7561
7604
|
}
|
|
7562
7605
|
) }),
|
|
7563
|
-
needPassphrase && /* @__PURE__ */ (0,
|
|
7606
|
+
needPassphrase && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Field, { error, label: intl.formatMessage({
|
|
7564
7607
|
id: "CEXBindApiPassphrase"
|
|
7565
|
-
}), children: /* @__PURE__ */ (0,
|
|
7608
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
7566
7609
|
Input,
|
|
7567
7610
|
{
|
|
7568
7611
|
value: APIPassphrase,
|
|
@@ -7570,7 +7613,7 @@ function CEXBindModal({
|
|
|
7570
7613
|
placeholder: "**** **** ****"
|
|
7571
7614
|
}
|
|
7572
7615
|
) }),
|
|
7573
|
-
/* @__PURE__ */ (0,
|
|
7616
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
7574
7617
|
Button,
|
|
7575
7618
|
{
|
|
7576
7619
|
onClick: SubmitApi,
|
|
@@ -7578,7 +7621,7 @@ function CEXBindModal({
|
|
|
7578
7621
|
block: true,
|
|
7579
7622
|
loading,
|
|
7580
7623
|
disabled: !key || !secret,
|
|
7581
|
-
children: /* @__PURE__ */ (0,
|
|
7624
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl22.FormattedMessage, { id: "continue" })
|
|
7582
7625
|
}
|
|
7583
7626
|
)
|
|
7584
7627
|
] }) });
|
|
@@ -7586,7 +7629,7 @@ function CEXBindModal({
|
|
|
7586
7629
|
|
|
7587
7630
|
// src/context/BusinessProvider.tsx
|
|
7588
7631
|
var import_react_query9 = require("@tanstack/react-query");
|
|
7589
|
-
var
|
|
7632
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
7590
7633
|
function BusinessProvider({ children }) {
|
|
7591
7634
|
const { overview, token } = useUserInfo();
|
|
7592
7635
|
const { type: EVMType, isOpen: EVMIsOpen, close: EVMClose } = useEVMModalStore();
|
|
@@ -7620,8 +7663,8 @@ function BusinessProvider({ children }) {
|
|
|
7620
7663
|
enabled: !!tgAppAuthCode,
|
|
7621
7664
|
refetchInterval: 1e3 * 5
|
|
7622
7665
|
});
|
|
7623
|
-
return /* @__PURE__ */ (0,
|
|
7624
|
-
/* @__PURE__ */ (0,
|
|
7666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
|
|
7667
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
7625
7668
|
EVMModal,
|
|
7626
7669
|
{
|
|
7627
7670
|
isOpen: EVMIsOpen && (EVMType == "login" && !overview && !token || EVMType == "bind" && !!token && !!overview),
|
|
@@ -7631,7 +7674,7 @@ function BusinessProvider({ children }) {
|
|
|
7631
7674
|
zIndex: 199
|
|
7632
7675
|
}
|
|
7633
7676
|
),
|
|
7634
|
-
/* @__PURE__ */ (0,
|
|
7677
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
7635
7678
|
TRONModal,
|
|
7636
7679
|
{
|
|
7637
7680
|
isOpen: TRONIsOpen && (TRONType == "login" && !overview && !token || TRONType == "bind" && !!token && !!overview),
|
|
@@ -7641,7 +7684,7 @@ function BusinessProvider({ children }) {
|
|
|
7641
7684
|
zIndex: 199
|
|
7642
7685
|
}
|
|
7643
7686
|
),
|
|
7644
|
-
/* @__PURE__ */ (0,
|
|
7687
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
7645
7688
|
TONModal,
|
|
7646
7689
|
{
|
|
7647
7690
|
isOpen: TONIsOpen && (TONType == "login" && !overview && !token || TONType == "bind" && !!token && !!overview),
|
|
@@ -7651,7 +7694,7 @@ function BusinessProvider({ children }) {
|
|
|
7651
7694
|
zIndex: 199
|
|
7652
7695
|
}
|
|
7653
7696
|
),
|
|
7654
|
-
/* @__PURE__ */ (0,
|
|
7697
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
7655
7698
|
BTCModal,
|
|
7656
7699
|
{
|
|
7657
7700
|
isOpen: BTCIsOpen && (BTCType == "login" && !overview && !token || BTCType == "bind" && !!token && !!overview),
|
|
@@ -7661,7 +7704,7 @@ function BusinessProvider({ children }) {
|
|
|
7661
7704
|
zIndex: 199
|
|
7662
7705
|
}
|
|
7663
7706
|
),
|
|
7664
|
-
/* @__PURE__ */ (0,
|
|
7707
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
7665
7708
|
CEXBindModal,
|
|
7666
7709
|
{
|
|
7667
7710
|
isOpen: CEXIsOpen && (!!token && !!overview),
|
|
@@ -7670,7 +7713,7 @@ function BusinessProvider({ children }) {
|
|
|
7670
7713
|
zIndex: 199
|
|
7671
7714
|
}
|
|
7672
7715
|
),
|
|
7673
|
-
/* @__PURE__ */ (0,
|
|
7716
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
7674
7717
|
WalletModal,
|
|
7675
7718
|
{
|
|
7676
7719
|
isOpen: WalletModalStore.isOpen && (WalletModalStore.type == "login" && !overview && !token || WalletModalStore.type == "bind" && !!token && !!overview),
|
|
@@ -7685,9 +7728,9 @@ function BusinessProvider({ children }) {
|
|
|
7685
7728
|
}
|
|
7686
7729
|
|
|
7687
7730
|
// src/context/index.tsx
|
|
7688
|
-
var
|
|
7731
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
7689
7732
|
var Providers = ({ children }) => {
|
|
7690
|
-
return /* @__PURE__ */ (0,
|
|
7733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ModalProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(BusinessProvider, { children }) }) });
|
|
7691
7734
|
};
|
|
7692
7735
|
var context_default = Providers;
|
|
7693
7736
|
|
|
@@ -8949,7 +8992,7 @@ var matchTest = /* @__PURE__ */ (0, import_viem17.defineChain)({
|
|
|
8949
8992
|
|
|
8950
8993
|
// src/MatchContext.tsx
|
|
8951
8994
|
var import_wagmi3 = require("wagmi");
|
|
8952
|
-
var
|
|
8995
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
8953
8996
|
var queryClient = new import_react_query10.QueryClient();
|
|
8954
8997
|
var wagmiConfig = (0, import_rainbowkit2.getDefaultConfig)({
|
|
8955
8998
|
appName: "MatchID",
|
|
@@ -8988,7 +9031,7 @@ var MatchProvider = ({
|
|
|
8988
9031
|
useWalletInit({
|
|
8989
9032
|
config: wallet
|
|
8990
9033
|
});
|
|
8991
|
-
return /* @__PURE__ */ (0,
|
|
9034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react_intl23.IntlProvider, { locale: realLocale, messages: messages[realLocale], children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_wagmi3.WagmiProvider, { config: wagmiConfig, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react_query10.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
8992
9035
|
MatchContext.Provider,
|
|
8993
9036
|
{
|
|
8994
9037
|
value: {
|
|
@@ -8999,7 +9042,7 @@ var MatchProvider = ({
|
|
|
8999
9042
|
theme,
|
|
9000
9043
|
locale: realLocale
|
|
9001
9044
|
},
|
|
9002
|
-
children: /* @__PURE__ */ (0,
|
|
9045
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(context_default, { children })
|
|
9003
9046
|
}
|
|
9004
9047
|
) }) }) });
|
|
9005
9048
|
};
|