@matchain/matchid-sdk-react 0.1.56-alpha.4 → 0.1.56-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.mts +2 -2
- package/dist/api.d.ts +2 -2
- package/dist/api.js +51 -48
- package/dist/api.js.map +1 -1
- package/dist/api.mjs +3 -3
- package/dist/{chunk-OSY7MTZY.mjs → chunk-GD7URBBZ.mjs} +21 -1
- package/dist/chunk-GD7URBBZ.mjs.map +1 -0
- package/dist/{chunk-2HVTQUPR.mjs → chunk-KFB23MLQ.mjs} +120 -90
- package/dist/chunk-KFB23MLQ.mjs.map +1 -0
- package/dist/{chunk-NGNJ44SH.mjs → chunk-NYE6DBEZ.mjs} +2 -2
- package/dist/components.d.mts +3 -3
- package/dist/components.d.ts +3 -3
- package/dist/components.js +408 -361
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +2 -2
- package/dist/hooks.d.mts +2 -2
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +226 -179
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.mjs +2 -2
- package/dist/icon.d.mts +2 -2
- package/dist/icon.d.ts +2 -2
- package/dist/icon.js +20 -0
- package/dist/icon.js.map +1 -1
- package/dist/icon.mjs +3 -1
- package/dist/{index-CsUEaGtM.d.ts → index-BcuSCgol.d.ts} +2 -2
- package/dist/{index-CPTgrfjn.d.mts → index-BlMLqmS2.d.mts} +1 -1
- package/dist/{index-B7ZEyP1j.d.ts → index-C1Nyy5zx.d.ts} +1 -1
- package/dist/{index-FKxw4Vaa.d.mts → index-CBcBTQyU.d.mts} +1 -1
- package/dist/{index-BXbfmVoU.d.mts → index-CD0dACxf.d.mts} +2 -2
- package/dist/{index-TjbO7d74.d.mts → index-CER00guz.d.mts} +1 -1
- package/dist/{index-BtjgRcNJ.d.ts → index-CjekOYJl.d.mts} +2 -2
- package/dist/{index-AtpUyTIk.d.ts → index-DN-jrh8-.d.ts} +6 -3
- package/dist/{index-BKSGbw7b.d.mts → index-DdN22cwf.d.ts} +2 -2
- package/dist/{index-nwqg5fYH.d.ts → index-DkIIQLbh.d.ts} +2 -2
- package/dist/{index-4dZbgWG2.d.ts → index-DlaCsN95.d.ts} +1 -1
- package/dist/{index-zmJl2a0q.d.mts → index-lh6qBAf_.d.mts} +2 -2
- package/dist/{index-CwHXzvvB.d.ts → index-o0WW1c5O.d.ts} +1 -1
- package/dist/{index-CRLiCVf9.d.mts → index-xThRnNN3.d.mts} +6 -3
- package/dist/index.css +35 -1
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +458 -410
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{types-DEsY_CPH.d.mts → types-CheN9vHJ.d.mts} +4 -0
- package/dist/{types-DEsY_CPH.d.ts → types-CheN9vHJ.d.ts} +4 -0
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/ui.d.mts +3 -3
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +154 -107
- package/dist/ui.js.map +1 -1
- package/dist/ui.mjs +2 -2
- package/example/src/pages/UI/components/Input.tsx +12 -0
- package/example/src/pages/UI/index.tsx +2 -0
- package/package.json +1 -1
- package/dist/chunk-2HVTQUPR.mjs.map +0 -1
- package/dist/chunk-OSY7MTZY.mjs.map +0 -1
- /package/dist/{chunk-NGNJ44SH.mjs.map → chunk-NYE6DBEZ.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -725,6 +725,7 @@ __export(icon_exports, {
|
|
|
725
725
|
GoogleIcon: () => GoogleIcon,
|
|
726
726
|
InfoLineIcon: () => InfoLineIcon,
|
|
727
727
|
InfoRoundIcon: () => InfoRoundIcon,
|
|
728
|
+
InputLengthIcon: () => InputLengthIcon,
|
|
728
729
|
LeatherIcon: () => LeatherIcon,
|
|
729
730
|
LinkedinIcon: () => LinkedinIcon,
|
|
730
731
|
LoadingIcon: () => LoadingIcon_default,
|
|
@@ -2013,6 +2014,24 @@ function CheckboxCheckedIcon({
|
|
|
2013
2014
|
] });
|
|
2014
2015
|
}
|
|
2015
2016
|
|
|
2017
|
+
// src/assets/icon/InputLengthIcon.tsx
|
|
2018
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2019
|
+
function InputLengthIcon({
|
|
2020
|
+
size = 12,
|
|
2021
|
+
color = "#B6B6B6",
|
|
2022
|
+
...props
|
|
2023
|
+
}) {
|
|
2024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("svg", { width: size, height: size, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2025
|
+
"path",
|
|
2026
|
+
{
|
|
2027
|
+
"fill-rule": "evenodd",
|
|
2028
|
+
"clip-rule": "evenodd",
|
|
2029
|
+
d: "M1.10097 12L12 1.10097L10.899 0L0 10.899L1.10097 12ZM7.19277 11.4594L11.6684 6.98378L10.5675 5.88281L6.0918 10.3585L7.19277 11.4594Z",
|
|
2030
|
+
fill: color
|
|
2031
|
+
}
|
|
2032
|
+
) });
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2016
2035
|
// src/hooks/useLayout.tsx
|
|
2017
2036
|
var useLayout_exports = {};
|
|
2018
2037
|
__export(useLayout_exports, {
|
|
@@ -2034,39 +2053,39 @@ function useDownMd() {
|
|
|
2034
2053
|
}
|
|
2035
2054
|
|
|
2036
2055
|
// src/hooks/useConfig.tsx
|
|
2037
|
-
var
|
|
2056
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2038
2057
|
var DEFAULT_WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
2039
2058
|
var WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
2040
2059
|
function useWalletConfig() {
|
|
2041
2060
|
const isDownMd = useDownMd();
|
|
2042
2061
|
const walletMap = {
|
|
2043
2062
|
evm: {
|
|
2044
|
-
icon: /* @__PURE__ */ (0,
|
|
2045
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2063
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(EVMDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
2064
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(EVMLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
2046
2065
|
name: "EVM",
|
|
2047
2066
|
method: "evm"
|
|
2048
2067
|
},
|
|
2049
2068
|
sol: {
|
|
2050
|
-
icon: /* @__PURE__ */ (0,
|
|
2051
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2069
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SOLDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
2070
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SOLLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
2052
2071
|
name: "SOL",
|
|
2053
2072
|
method: "sol"
|
|
2054
2073
|
},
|
|
2055
2074
|
btc: {
|
|
2056
|
-
icon: /* @__PURE__ */ (0,
|
|
2057
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2075
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(BTCDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
2076
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(BTCLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
2058
2077
|
name: "BTC",
|
|
2059
2078
|
method: "btc"
|
|
2060
2079
|
},
|
|
2061
2080
|
tron: {
|
|
2062
|
-
icon: /* @__PURE__ */ (0,
|
|
2063
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2081
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TRXDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
2082
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TRXLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
2064
2083
|
name: "TRON",
|
|
2065
2084
|
method: "tron"
|
|
2066
2085
|
},
|
|
2067
2086
|
ton: {
|
|
2068
|
-
icon: /* @__PURE__ */ (0,
|
|
2069
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2087
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TonLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
2088
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TonLightIcon2, { size: isDownMd ? 36 : 40 }),
|
|
2070
2089
|
name: "TON",
|
|
2071
2090
|
method: "ton"
|
|
2072
2091
|
}
|
|
@@ -2492,7 +2511,7 @@ __export(ui_exports, {
|
|
|
2492
2511
|
});
|
|
2493
2512
|
|
|
2494
2513
|
// src/ui/Button/index.tsx
|
|
2495
|
-
var
|
|
2514
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2496
2515
|
function Button({
|
|
2497
2516
|
size = "df",
|
|
2498
2517
|
disabled = false,
|
|
@@ -2512,7 +2531,7 @@ function Button({
|
|
|
2512
2531
|
onClick && onClick();
|
|
2513
2532
|
}
|
|
2514
2533
|
};
|
|
2515
|
-
return /* @__PURE__ */ (0,
|
|
2534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2516
2535
|
"button",
|
|
2517
2536
|
{
|
|
2518
2537
|
type,
|
|
@@ -2523,14 +2542,14 @@ function Button({
|
|
|
2523
2542
|
},
|
|
2524
2543
|
onClick: onAction,
|
|
2525
2544
|
...dataset,
|
|
2526
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
2545
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
|
|
2527
2546
|
}
|
|
2528
2547
|
);
|
|
2529
2548
|
}
|
|
2530
2549
|
|
|
2531
2550
|
// src/ui/Overlay/index.tsx
|
|
2532
2551
|
var import_react4 = require("react");
|
|
2533
|
-
var
|
|
2552
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2534
2553
|
function Overlay({
|
|
2535
2554
|
isOpen = false,
|
|
2536
2555
|
children,
|
|
@@ -2546,7 +2565,7 @@ function Overlay({
|
|
|
2546
2565
|
document.body.style.overflow = "";
|
|
2547
2566
|
};
|
|
2548
2567
|
}, [isOpen]);
|
|
2549
|
-
return isOpen ? /* @__PURE__ */ (0,
|
|
2568
|
+
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2550
2569
|
"div",
|
|
2551
2570
|
{
|
|
2552
2571
|
className: "matchid-overlay",
|
|
@@ -2555,11 +2574,11 @@ function Overlay({
|
|
|
2555
2574
|
},
|
|
2556
2575
|
children
|
|
2557
2576
|
}
|
|
2558
|
-
) : /* @__PURE__ */ (0,
|
|
2577
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_jsx_runtime57.Fragment, {});
|
|
2559
2578
|
}
|
|
2560
2579
|
|
|
2561
2580
|
// src/ui/Drawer/index.tsx
|
|
2562
|
-
var
|
|
2581
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2563
2582
|
function Drawer({
|
|
2564
2583
|
children,
|
|
2565
2584
|
showClose = true,
|
|
@@ -2570,22 +2589,22 @@ function Drawer({
|
|
|
2570
2589
|
onBack
|
|
2571
2590
|
}) {
|
|
2572
2591
|
if (!isOpen) {
|
|
2573
|
-
return /* @__PURE__ */ (0,
|
|
2592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, {});
|
|
2574
2593
|
}
|
|
2575
|
-
return /* @__PURE__ */ (0,
|
|
2576
|
-
/* @__PURE__ */ (0,
|
|
2577
|
-
/* @__PURE__ */ (0,
|
|
2578
|
-
onBack && /* @__PURE__ */ (0,
|
|
2594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "matchid-drawer", children: [
|
|
2595
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: `matchid-drawer-header matchid-flex`, children: [
|
|
2596
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: `matchid-drawer-header-content matchid-flex`, children: [
|
|
2597
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ArrowLeftIcon, { height: 25, width: 24, className: "matchid-drawer-header-back", onClick: onBack }),
|
|
2579
2598
|
title
|
|
2580
2599
|
] }),
|
|
2581
|
-
showClose && /* @__PURE__ */ (0,
|
|
2600
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
|
|
2582
2601
|
] }),
|
|
2583
2602
|
children
|
|
2584
2603
|
] }) });
|
|
2585
2604
|
}
|
|
2586
2605
|
|
|
2587
2606
|
// src/ui/Field/index.tsx
|
|
2588
|
-
var
|
|
2607
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2589
2608
|
function Field({
|
|
2590
2609
|
label,
|
|
2591
2610
|
children,
|
|
@@ -2593,13 +2612,13 @@ function Field({
|
|
|
2593
2612
|
required,
|
|
2594
2613
|
className = ""
|
|
2595
2614
|
}) {
|
|
2596
|
-
return /* @__PURE__ */ (0,
|
|
2597
|
-
/* @__PURE__ */ (0,
|
|
2598
|
-
required && /* @__PURE__ */ (0,
|
|
2615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
|
|
2616
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "matchid-field-label", children: [
|
|
2617
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "matchid-field-required", children: "*" }),
|
|
2599
2618
|
label
|
|
2600
2619
|
] }),
|
|
2601
2620
|
children,
|
|
2602
|
-
error && /* @__PURE__ */ (0,
|
|
2621
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "matchid-field-error", children: error })
|
|
2603
2622
|
] });
|
|
2604
2623
|
}
|
|
2605
2624
|
|
|
@@ -2645,27 +2664,48 @@ var import_react6 = require("react");
|
|
|
2645
2664
|
|
|
2646
2665
|
// src/ui/Input/index.tsx
|
|
2647
2666
|
var import_react5 = require("react");
|
|
2648
|
-
var
|
|
2667
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2649
2668
|
function Input({
|
|
2650
2669
|
onChange,
|
|
2651
2670
|
type,
|
|
2652
2671
|
after,
|
|
2672
|
+
showLength = false,
|
|
2673
|
+
showClear = true,
|
|
2653
2674
|
className = "",
|
|
2675
|
+
rows = 1,
|
|
2676
|
+
maxRows = 4,
|
|
2677
|
+
children,
|
|
2654
2678
|
...props
|
|
2655
2679
|
}) {
|
|
2656
2680
|
const [inputType, setInputType] = (0, import_react5.useState)(type);
|
|
2657
2681
|
const isDownMd = useDownMd();
|
|
2658
|
-
|
|
2682
|
+
const textareaRef = (0, import_react5.useRef)(null);
|
|
2683
|
+
(0, import_react5.useEffect)(() => {
|
|
2684
|
+
const textarea = textareaRef.current;
|
|
2685
|
+
if (textarea) {
|
|
2686
|
+
textarea.style.height = "auto";
|
|
2687
|
+
const lineHeight = 24;
|
|
2688
|
+
const maxHeight = lineHeight * 4;
|
|
2689
|
+
textarea.style.height = Math.min(textarea.scrollHeight, maxHeight) + "px";
|
|
2690
|
+
}
|
|
2691
|
+
}, [props.value]);
|
|
2692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
2659
2693
|
"div",
|
|
2660
2694
|
{
|
|
2661
|
-
className: `matchid-input-box ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
2695
|
+
className: `matchid-input-box matchid-input-${type} ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
2696
|
+
style: {
|
|
2697
|
+
// @ts-ignore
|
|
2698
|
+
"--max-rows": maxRows
|
|
2699
|
+
},
|
|
2662
2700
|
children: [
|
|
2663
|
-
/* @__PURE__ */ (0,
|
|
2664
|
-
|
|
2701
|
+
children ?? (type == "textarea" ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("textarea", { rows: 1, onChange, ...props, className: "matchid-input-field", ref: textareaRef, style: {
|
|
2702
|
+
maxHeight: maxRows * 24 + "px"
|
|
2703
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" })),
|
|
2704
|
+
type != "textarea" && showClear && props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
|
|
2665
2705
|
if (onChange) {
|
|
2666
2706
|
onChange({ target: { value: "" } });
|
|
2667
2707
|
}
|
|
2668
|
-
}, children: /* @__PURE__ */ (0,
|
|
2708
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2669
2709
|
DeleteRoundIcon,
|
|
2670
2710
|
{
|
|
2671
2711
|
height: isDownMd ? 16 : 21,
|
|
@@ -2673,9 +2713,17 @@ function Input({
|
|
|
2673
2713
|
color: "var(--matchid-input-delete-icon-color)"
|
|
2674
2714
|
}
|
|
2675
2715
|
) }),
|
|
2676
|
-
type === "password" && /* @__PURE__ */ (0,
|
|
2716
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
|
|
2677
2717
|
setInputType(inputType === "password" ? "text" : "password");
|
|
2678
|
-
}, children: inputType === "password" ? /* @__PURE__ */ (0,
|
|
2718
|
+
}, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
|
|
2719
|
+
showLength && props.maxLength && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: `matchid-input-length`, children: [
|
|
2720
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { children: [
|
|
2721
|
+
props.value?.length || 0,
|
|
2722
|
+
"/",
|
|
2723
|
+
props.maxLength
|
|
2724
|
+
] }),
|
|
2725
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(InputLengthIcon, { color: "var(--icon-color)" })
|
|
2726
|
+
] }),
|
|
2679
2727
|
after
|
|
2680
2728
|
]
|
|
2681
2729
|
}
|
|
@@ -2684,7 +2732,7 @@ function Input({
|
|
|
2684
2732
|
|
|
2685
2733
|
// src/components/EmailModal/StepEmail.tsx
|
|
2686
2734
|
var import_react_intl = require("react-intl");
|
|
2687
|
-
var
|
|
2735
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2688
2736
|
function StepEmail(props) {
|
|
2689
2737
|
const intl = (0, import_react_intl.useIntl)();
|
|
2690
2738
|
const [emailVal, setEmailVal] = (0, import_react6.useState)("");
|
|
@@ -2699,10 +2747,10 @@ function StepEmail(props) {
|
|
|
2699
2747
|
const onContinue = async () => {
|
|
2700
2748
|
props.onContinue(emailVal);
|
|
2701
2749
|
};
|
|
2702
|
-
return /* @__PURE__ */ (0,
|
|
2703
|
-
/* @__PURE__ */ (0,
|
|
2750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "matchid-email-email-box", children: [
|
|
2751
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Field, { label: intl.formatMessage({
|
|
2704
2752
|
id: "emailAddress"
|
|
2705
|
-
}), children: /* @__PURE__ */ (0,
|
|
2753
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2706
2754
|
Input,
|
|
2707
2755
|
{
|
|
2708
2756
|
placeholder: intl.formatMessage({
|
|
@@ -2712,9 +2760,9 @@ function StepEmail(props) {
|
|
|
2712
2760
|
value: emailVal
|
|
2713
2761
|
}
|
|
2714
2762
|
) }),
|
|
2715
|
-
/* @__PURE__ */ (0,
|
|
2763
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Button, { disabled: !canContinue, style: {
|
|
2716
2764
|
marginTop: "64px"
|
|
2717
|
-
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
2765
|
+
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react_intl.FormattedMessage, { id: "continue" }) })
|
|
2718
2766
|
] });
|
|
2719
2767
|
}
|
|
2720
2768
|
|
|
@@ -2728,7 +2776,7 @@ var NATIVE_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
|
2728
2776
|
|
|
2729
2777
|
// src/components/EmailModal/StepVerify.tsx
|
|
2730
2778
|
var import_react_intl2 = require("react-intl");
|
|
2731
|
-
var
|
|
2779
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2732
2780
|
function StepVerify(props) {
|
|
2733
2781
|
const intl = (0, import_react_intl2.useIntl)();
|
|
2734
2782
|
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
@@ -2805,17 +2853,17 @@ function StepVerify(props) {
|
|
|
2805
2853
|
setSubmitting(false);
|
|
2806
2854
|
}
|
|
2807
2855
|
};
|
|
2808
|
-
return /* @__PURE__ */ (0,
|
|
2809
|
-
/* @__PURE__ */ (0,
|
|
2810
|
-
/* @__PURE__ */ (0,
|
|
2811
|
-
/* @__PURE__ */ (0,
|
|
2812
|
-
/* @__PURE__ */ (0,
|
|
2813
|
-
/* @__PURE__ */ (0,
|
|
2856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "matchid-email-verify-box", children: [
|
|
2857
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "matchid-email-verify-header", children: [
|
|
2858
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
|
|
2859
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "matchid-email-verify-header-content", children: [
|
|
2860
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "matchid-email-verify-header-value", children: props.email }),
|
|
2861
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react_intl2.FormattedMessage, { id: "sendEmailTips" }) })
|
|
2814
2862
|
] })
|
|
2815
2863
|
] }),
|
|
2816
|
-
/* @__PURE__ */ (0,
|
|
2864
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Field, { label: intl.formatMessage({
|
|
2817
2865
|
id: "verificationCode"
|
|
2818
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
2866
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2819
2867
|
Input,
|
|
2820
2868
|
{
|
|
2821
2869
|
placeholder: intl.formatMessage({
|
|
@@ -2825,7 +2873,7 @@ function StepVerify(props) {
|
|
|
2825
2873
|
maxLength: codeLength,
|
|
2826
2874
|
onChange: (e) => setCode(e.target.value),
|
|
2827
2875
|
value: code,
|
|
2828
|
-
after: /* @__PURE__ */ (0,
|
|
2876
|
+
after: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2829
2877
|
Button,
|
|
2830
2878
|
{
|
|
2831
2879
|
highlight: true,
|
|
@@ -2844,13 +2892,13 @@ function StepVerify(props) {
|
|
|
2844
2892
|
)
|
|
2845
2893
|
}
|
|
2846
2894
|
) }),
|
|
2847
|
-
/* @__PURE__ */ (0,
|
|
2895
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Button, { disabled: !canContinue, loading: submitting, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react_intl2.FormattedMessage, { id: "continue" }) })
|
|
2848
2896
|
] });
|
|
2849
2897
|
}
|
|
2850
2898
|
|
|
2851
2899
|
// src/components/EmailModal/index.tsx
|
|
2852
2900
|
var import_react_intl3 = require("react-intl");
|
|
2853
|
-
var
|
|
2901
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2854
2902
|
function EmailModal({
|
|
2855
2903
|
isOpen = false,
|
|
2856
2904
|
width = 480,
|
|
@@ -2867,7 +2915,7 @@ function EmailModal({
|
|
|
2867
2915
|
setEmailVal("");
|
|
2868
2916
|
}
|
|
2869
2917
|
}, [isOpen]);
|
|
2870
|
-
return /* @__PURE__ */ (0,
|
|
2918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2871
2919
|
ModalWithHeader,
|
|
2872
2920
|
{
|
|
2873
2921
|
isOpen,
|
|
@@ -2877,17 +2925,17 @@ function EmailModal({
|
|
|
2877
2925
|
id: "email"
|
|
2878
2926
|
}),
|
|
2879
2927
|
onBack: step == "verify" ? () => setStep("input") : onBack,
|
|
2880
|
-
children: step === "input" ? /* @__PURE__ */ (0,
|
|
2928
|
+
children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
|
|
2881
2929
|
setEmailVal(email);
|
|
2882
2930
|
setStep("verify");
|
|
2883
|
-
} }) : /* @__PURE__ */ (0,
|
|
2931
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(StepVerify, { email: emailVal, onSuccess: onLogin })
|
|
2884
2932
|
}
|
|
2885
2933
|
);
|
|
2886
2934
|
}
|
|
2887
2935
|
|
|
2888
2936
|
// src/ui/Popover/index.tsx
|
|
2889
2937
|
var import_react9 = require("react");
|
|
2890
|
-
var
|
|
2938
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2891
2939
|
function Popover({
|
|
2892
2940
|
children,
|
|
2893
2941
|
content,
|
|
@@ -2897,7 +2945,7 @@ function Popover({
|
|
|
2897
2945
|
gap = "20px"
|
|
2898
2946
|
}) {
|
|
2899
2947
|
const [active, setActive] = (0, import_react9.useState)(false);
|
|
2900
|
-
return children && /* @__PURE__ */ (0,
|
|
2948
|
+
return children && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
2901
2949
|
"div",
|
|
2902
2950
|
{
|
|
2903
2951
|
onClick: () => {
|
|
@@ -2908,9 +2956,9 @@ function Popover({
|
|
|
2908
2956
|
className: `matchid-popover-box matchid-popover-${position} matchid-popover-${type} ${className} ${type == "click" && active ? "matchid-popover-click-active" : ""}`,
|
|
2909
2957
|
children: [
|
|
2910
2958
|
children,
|
|
2911
|
-
/* @__PURE__ */ (0,
|
|
2959
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { style: {
|
|
2912
2960
|
paddingTop: gap
|
|
2913
|
-
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0,
|
|
2961
|
+
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: `matchid-popover-content`, children: content }) })
|
|
2914
2962
|
]
|
|
2915
2963
|
}
|
|
2916
2964
|
);
|
|
@@ -2941,7 +2989,7 @@ function useAppConfig() {
|
|
|
2941
2989
|
}
|
|
2942
2990
|
|
|
2943
2991
|
// src/components/LoginBox/index.tsx
|
|
2944
|
-
var
|
|
2992
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2945
2993
|
var RecommendItem = ({
|
|
2946
2994
|
icon,
|
|
2947
2995
|
name,
|
|
@@ -2950,20 +2998,20 @@ var RecommendItem = ({
|
|
|
2950
2998
|
children,
|
|
2951
2999
|
footer
|
|
2952
3000
|
}) => {
|
|
2953
|
-
return /* @__PURE__ */ (0,
|
|
2954
|
-
/* @__PURE__ */ (0,
|
|
2955
|
-
/* @__PURE__ */ (0,
|
|
2956
|
-
/* @__PURE__ */ (0,
|
|
2957
|
-
/* @__PURE__ */ (0,
|
|
3001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "matchid-login-recommend-method", children: [
|
|
3002
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "matchid-login-recommend-method-item", onClick, children: [
|
|
3003
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "matchid-login-recommend-method-content", children: [
|
|
3004
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "matchid-login-recommend-method-icon", children: icon }),
|
|
3005
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "matchid-login-recommend-method-name", children: name })
|
|
2958
3006
|
] }),
|
|
2959
|
-
footer ? footer : children ? /* @__PURE__ */ (0,
|
|
3007
|
+
footer ? footer : children ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2960
3008
|
ArrowDownIcon,
|
|
2961
3009
|
{
|
|
2962
3010
|
className: `matchid-login-recommend-method-arrow ${showChildren ? "matchid-login-recommend-method-arrow-active" : ""}`,
|
|
2963
3011
|
size: 20,
|
|
2964
3012
|
color: "var(--matchid-arrow-color)"
|
|
2965
3013
|
}
|
|
2966
|
-
) : /* @__PURE__ */ (0,
|
|
3014
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2967
3015
|
ArrowRightIcon,
|
|
2968
3016
|
{
|
|
2969
3017
|
className: "matchid-login-recommend-method-arrow",
|
|
@@ -2972,7 +3020,7 @@ var RecommendItem = ({
|
|
|
2972
3020
|
}
|
|
2973
3021
|
)
|
|
2974
3022
|
] }),
|
|
2975
|
-
children && /* @__PURE__ */ (0,
|
|
3023
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2976
3024
|
"div",
|
|
2977
3025
|
{
|
|
2978
3026
|
className: `matchid-login-recommend-method-popover ${showChildren ? "matchid-login-recommend-method-popover-active" : ""}`,
|
|
@@ -3037,75 +3085,75 @@ function LoginBox({
|
|
|
3037
3085
|
const isDownMd = useDownMd();
|
|
3038
3086
|
const methodMap = {
|
|
3039
3087
|
wallet: {
|
|
3040
|
-
icon: /* @__PURE__ */ (0,
|
|
3088
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(WalletIcon, { size: isDownMd ? 36 : 40 }),
|
|
3041
3089
|
name: intl.formatMessage({ id: "wallet" }),
|
|
3042
3090
|
onClick: () => setShowWallet(!showWallet),
|
|
3043
3091
|
type: "wallet"
|
|
3044
3092
|
},
|
|
3045
3093
|
email: {
|
|
3046
|
-
icon: /* @__PURE__ */ (0,
|
|
3094
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
|
|
3047
3095
|
name: intl.formatMessage({ id: "email" }),
|
|
3048
3096
|
onClick: () => {
|
|
3049
3097
|
setEmailOpen(true);
|
|
3050
3098
|
}
|
|
3051
3099
|
},
|
|
3052
3100
|
google: {
|
|
3053
|
-
icon: /* @__PURE__ */ (0,
|
|
3101
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(GoogleIcon, { size: isDownMd ? 36 : 40 }),
|
|
3054
3102
|
name: "Google",
|
|
3055
3103
|
onClick: () => login("google")
|
|
3056
3104
|
},
|
|
3057
3105
|
twitter: {
|
|
3058
|
-
icon: /* @__PURE__ */ (0,
|
|
3106
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(XIcon, { size: isDownMd ? 36 : 40 }),
|
|
3059
3107
|
name: "X",
|
|
3060
3108
|
onClick: () => login("twitter")
|
|
3061
3109
|
},
|
|
3062
3110
|
telegram: {
|
|
3063
|
-
icon: /* @__PURE__ */ (0,
|
|
3111
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(TelegramIcon, { size: isDownMd ? 36 : 40 }),
|
|
3064
3112
|
name: "Telegram",
|
|
3065
3113
|
onClick: () => login("telegram")
|
|
3066
3114
|
},
|
|
3067
3115
|
github: {
|
|
3068
|
-
icon: /* @__PURE__ */ (0,
|
|
3116
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(GithubIcon, { size: isDownMd ? 36 : 40 }),
|
|
3069
3117
|
name: "Github",
|
|
3070
3118
|
onClick: () => login("github")
|
|
3071
3119
|
},
|
|
3072
3120
|
discord: {
|
|
3073
|
-
icon: /* @__PURE__ */ (0,
|
|
3121
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DiscordIcon, { size: isDownMd ? 36 : 40 }),
|
|
3074
3122
|
name: "Discord",
|
|
3075
3123
|
onClick: () => login("discord")
|
|
3076
3124
|
},
|
|
3077
3125
|
linkedin: {
|
|
3078
|
-
icon: /* @__PURE__ */ (0,
|
|
3126
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
|
|
3079
3127
|
name: "LinkedIn",
|
|
3080
3128
|
onClick: () => login("linkedin")
|
|
3081
3129
|
},
|
|
3082
3130
|
facebook: {
|
|
3083
|
-
icon: /* @__PURE__ */ (0,
|
|
3131
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(FacebookIcon, { size: isDownMd ? 36 : 40 }),
|
|
3084
3132
|
name: "Facebook",
|
|
3085
3133
|
onClick: () => login("facebook")
|
|
3086
3134
|
},
|
|
3087
3135
|
youtube: {
|
|
3088
|
-
icon: /* @__PURE__ */ (0,
|
|
3136
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
|
|
3089
3137
|
name: "Youtube",
|
|
3090
3138
|
onClick: () => login("youtube")
|
|
3091
3139
|
}
|
|
3092
3140
|
};
|
|
3093
3141
|
const { walletMap } = useWalletConfig();
|
|
3094
|
-
return /* @__PURE__ */ (0,
|
|
3095
|
-
(!inModal || !emailOpen) && /* @__PURE__ */ (0,
|
|
3096
|
-
/* @__PURE__ */ (0,
|
|
3097
|
-
return /* @__PURE__ */ (0,
|
|
3142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
3143
|
+
(!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "matchid-login-box", children: [
|
|
3144
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
|
|
3145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3098
3146
|
RecommendItem,
|
|
3099
3147
|
{
|
|
3100
3148
|
icon: methodMap[m]?.icon,
|
|
3101
3149
|
name: methodMap[m]?.name,
|
|
3102
3150
|
onClick: methodMap[m]?.onClick,
|
|
3103
3151
|
showChildren: m == "wallet" && showWallet,
|
|
3104
|
-
children: m == "wallet" && /* @__PURE__ */ (0,
|
|
3105
|
-
/* @__PURE__ */ (0,
|
|
3106
|
-
/* @__PURE__ */ (0,
|
|
3152
|
+
children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
3153
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
|
|
3154
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
|
|
3107
3155
|
const m2 = walletMap[n];
|
|
3108
|
-
return /* @__PURE__ */ (0,
|
|
3156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
3109
3157
|
"div",
|
|
3110
3158
|
{
|
|
3111
3159
|
className: "matchid-login-recommend-wallet-item",
|
|
@@ -3113,16 +3161,16 @@ function LoginBox({
|
|
|
3113
3161
|
login(m2.method);
|
|
3114
3162
|
},
|
|
3115
3163
|
children: [
|
|
3116
|
-
/* @__PURE__ */ (0,
|
|
3117
|
-
/* @__PURE__ */ (0,
|
|
3118
|
-
/* @__PURE__ */ (0,
|
|
3164
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
|
|
3165
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
|
|
3166
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3119
3167
|
"div",
|
|
3120
3168
|
{
|
|
3121
3169
|
className: "matchid-login-recommend-wallet-item-hover-icon",
|
|
3122
3170
|
children: m2.activeIcon
|
|
3123
3171
|
}
|
|
3124
3172
|
),
|
|
3125
|
-
/* @__PURE__ */ (0,
|
|
3173
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3126
3174
|
"span",
|
|
3127
3175
|
{
|
|
3128
3176
|
className: "matchid-login-recommend-wallet-item-name",
|
|
@@ -3130,7 +3178,7 @@ function LoginBox({
|
|
|
3130
3178
|
}
|
|
3131
3179
|
)
|
|
3132
3180
|
] }),
|
|
3133
|
-
/* @__PURE__ */ (0,
|
|
3181
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3134
3182
|
ArrowRightIcon,
|
|
3135
3183
|
{
|
|
3136
3184
|
className: "matchid-login-recommend-wallet-item-arrow",
|
|
@@ -3148,10 +3196,10 @@ function LoginBox({
|
|
|
3148
3196
|
m
|
|
3149
3197
|
);
|
|
3150
3198
|
}) }),
|
|
3151
|
-
methodConfig.methods.length > 0 && /* @__PURE__ */ (0,
|
|
3152
|
-
/* @__PURE__ */ (0,
|
|
3153
|
-
/* @__PURE__ */ (0,
|
|
3154
|
-
return /* @__PURE__ */ (0,
|
|
3199
|
+
methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "matchid-login-other", children: [
|
|
3200
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react_intl4.FormattedMessage, { id: "otherLoginMethods" }) }),
|
|
3201
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
3202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3155
3203
|
"div",
|
|
3156
3204
|
{
|
|
3157
3205
|
className: "matchid-login-method-item",
|
|
@@ -3164,7 +3212,7 @@ function LoginBox({
|
|
|
3164
3212
|
}) })
|
|
3165
3213
|
] })
|
|
3166
3214
|
] }),
|
|
3167
|
-
/* @__PURE__ */ (0,
|
|
3215
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3168
3216
|
EmailModal,
|
|
3169
3217
|
{
|
|
3170
3218
|
isOpen: emailOpen,
|
|
@@ -3184,40 +3232,40 @@ var import_react12 = require("react");
|
|
|
3184
3232
|
|
|
3185
3233
|
// src/components/LoginPanel/index.tsx
|
|
3186
3234
|
var import_react_intl5 = require("react-intl");
|
|
3187
|
-
var
|
|
3235
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3188
3236
|
function LoginPanel({
|
|
3189
3237
|
header,
|
|
3190
3238
|
onClose,
|
|
3191
3239
|
...props
|
|
3192
3240
|
}) {
|
|
3193
3241
|
const isDownMd = useDownMd();
|
|
3194
|
-
return /* @__PURE__ */ (0,
|
|
3195
|
-
header ? header : /* @__PURE__ */ (0,
|
|
3196
|
-
/* @__PURE__ */ (0,
|
|
3197
|
-
/* @__PURE__ */ (0,
|
|
3198
|
-
/* @__PURE__ */ (0,
|
|
3242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "matchid-login-panel", children: [
|
|
3243
|
+
header ? header : /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "matchid-login-panel-header", children: [
|
|
3244
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "matchid-login-panel-header-content", children: [
|
|
3245
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react_intl5.FormattedMessage, { id: "loginTitle" }) }),
|
|
3246
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react_intl5.FormattedMessage, { id: "loginTips" }) })
|
|
3199
3247
|
] }),
|
|
3200
|
-
onClose && /* @__PURE__ */ (0,
|
|
3248
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
|
|
3201
3249
|
] }),
|
|
3202
|
-
/* @__PURE__ */ (0,
|
|
3203
|
-
/* @__PURE__ */ (0,
|
|
3250
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "matchid-login-panel-divide" }),
|
|
3251
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(LoginBox, { ...props }) })
|
|
3204
3252
|
] });
|
|
3205
3253
|
}
|
|
3206
3254
|
|
|
3207
3255
|
// src/components/LoginModal/index.tsx
|
|
3208
|
-
var
|
|
3256
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3209
3257
|
function LoginModal({
|
|
3210
3258
|
isOpen = false,
|
|
3211
3259
|
width = 480,
|
|
3212
3260
|
...props
|
|
3213
3261
|
}) {
|
|
3214
3262
|
const { isLogin } = useUserInfo();
|
|
3215
|
-
return /* @__PURE__ */ (0,
|
|
3263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3216
3264
|
Modal,
|
|
3217
3265
|
{
|
|
3218
3266
|
isOpen: isOpen && !isLogin,
|
|
3219
3267
|
width,
|
|
3220
|
-
children: /* @__PURE__ */ (0,
|
|
3268
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(LoginPanel, { ...props, inModal: true })
|
|
3221
3269
|
}
|
|
3222
3270
|
);
|
|
3223
3271
|
}
|
|
@@ -3226,10 +3274,10 @@ function LoginModal({
|
|
|
3226
3274
|
var import_react11 = require("react");
|
|
3227
3275
|
|
|
3228
3276
|
// src/assets/icon/ProfileIcon.tsx
|
|
3229
|
-
var
|
|
3277
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3230
3278
|
function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
3231
|
-
return /* @__PURE__ */ (0,
|
|
3232
|
-
/* @__PURE__ */ (0,
|
|
3279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
3280
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3233
3281
|
"path",
|
|
3234
3282
|
{
|
|
3235
3283
|
fillRule: "evenodd",
|
|
@@ -3238,7 +3286,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
3238
3286
|
fill: color
|
|
3239
3287
|
}
|
|
3240
3288
|
),
|
|
3241
|
-
/* @__PURE__ */ (0,
|
|
3289
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3242
3290
|
"path",
|
|
3243
3291
|
{
|
|
3244
3292
|
fillRule: "evenodd",
|
|
@@ -3252,7 +3300,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
3252
3300
|
|
|
3253
3301
|
// src/components/UserPopover/index.tsx
|
|
3254
3302
|
var import_react_intl6 = require("react-intl");
|
|
3255
|
-
var
|
|
3303
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3256
3304
|
function UserContent() {
|
|
3257
3305
|
const { logout, address, username } = useUserInfo();
|
|
3258
3306
|
const [logouting, setLogouting] = (0, import_react11.useState)(false);
|
|
@@ -3273,34 +3321,34 @@ function UserContent() {
|
|
|
3273
3321
|
rightIcon,
|
|
3274
3322
|
onClick
|
|
3275
3323
|
}) => {
|
|
3276
|
-
return /* @__PURE__ */ (0,
|
|
3277
|
-
/* @__PURE__ */ (0,
|
|
3324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "matchid-user-popover-item", onClick, children: [
|
|
3325
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: `matchid-user-popover-item-content`, children: [
|
|
3278
3326
|
icon,
|
|
3279
|
-
/* @__PURE__ */ (0,
|
|
3327
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "matchid-user-popover-item-text", children })
|
|
3280
3328
|
] }),
|
|
3281
3329
|
rightIcon
|
|
3282
3330
|
] });
|
|
3283
3331
|
};
|
|
3284
3332
|
const UserDivider = () => {
|
|
3285
|
-
return /* @__PURE__ */ (0,
|
|
3333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: `matchid-user-popover-divider` });
|
|
3286
3334
|
};
|
|
3287
3335
|
const [usernameOpen, setUsernameOpen] = (0, import_react11.useState)(false);
|
|
3288
3336
|
const [copied, setCopied] = useCopyClipboard();
|
|
3289
3337
|
const intl = (0, import_react_intl6.useIntl)();
|
|
3290
|
-
return /* @__PURE__ */ (0,
|
|
3291
|
-
/* @__PURE__ */ (0,
|
|
3292
|
-
/* @__PURE__ */ (0,
|
|
3338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "matchid-user-popover-content", children: [
|
|
3339
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "matchid-user-popover-list", children: [
|
|
3340
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(UserItem, { onClick: () => {
|
|
3293
3341
|
setCopied(address);
|
|
3294
|
-
}, icon: copied ? /* @__PURE__ */ (0,
|
|
3295
|
-
/* @__PURE__ */ (0,
|
|
3296
|
-
/* @__PURE__ */ (0,
|
|
3342
|
+
}, icon: copied ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(CheckIcon, { size: 20, color: "#0ecb81" }) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(CopyIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(CheckIcon, { size: 20, color: "var(--icon-color)" }), children: truncateAddress(address) }),
|
|
3343
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(UserDivider, {}),
|
|
3344
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(UserItem, { onClick: () => {
|
|
3297
3345
|
setUsernameOpen(true);
|
|
3298
|
-
}, icon: /* @__PURE__ */ (0,
|
|
3346
|
+
}, icon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ProfileIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ArrowRightIcon, { size: 20, color: "var(--icon-color)" }), children: username || intl.formatMessage({
|
|
3299
3347
|
id: "setUsername"
|
|
3300
3348
|
}) })
|
|
3301
3349
|
] }),
|
|
3302
|
-
/* @__PURE__ */ (0,
|
|
3303
|
-
/* @__PURE__ */ (0,
|
|
3350
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react_intl6.FormattedMessage, { id: "disconnect" }) }),
|
|
3351
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(UsernameModal, { isOpen: usernameOpen, onClose: () => {
|
|
3304
3352
|
setUsernameOpen(false);
|
|
3305
3353
|
}, onSuccess: () => {
|
|
3306
3354
|
setUsernameOpen(false);
|
|
@@ -3311,12 +3359,12 @@ function UserPopover({
|
|
|
3311
3359
|
children,
|
|
3312
3360
|
...props
|
|
3313
3361
|
}) {
|
|
3314
|
-
return /* @__PURE__ */ (0,
|
|
3362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Popover, { ...props, content: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(UserContent, {}), children });
|
|
3315
3363
|
}
|
|
3316
3364
|
|
|
3317
3365
|
// src/components/LoginButton/index.tsx
|
|
3318
3366
|
var import_react_intl7 = require("react-intl");
|
|
3319
|
-
var
|
|
3367
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3320
3368
|
function LoginButton({
|
|
3321
3369
|
loginRender,
|
|
3322
3370
|
methods,
|
|
@@ -3332,8 +3380,8 @@ function LoginButton({
|
|
|
3332
3380
|
const { isLogin, username } = useUserInfo();
|
|
3333
3381
|
const [loginOpen, setLoginOpen] = (0, import_react12.useState)(false);
|
|
3334
3382
|
if (!isLogin) {
|
|
3335
|
-
return /* @__PURE__ */ (0,
|
|
3336
|
-
/* @__PURE__ */ (0,
|
|
3383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
|
|
3384
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3337
3385
|
LoginModal,
|
|
3338
3386
|
{
|
|
3339
3387
|
methods,
|
|
@@ -3343,15 +3391,15 @@ function LoginButton({
|
|
|
3343
3391
|
onClose: () => setLoginOpen(false)
|
|
3344
3392
|
}
|
|
3345
3393
|
),
|
|
3346
|
-
/* @__PURE__ */ (0,
|
|
3347
|
-
/* @__PURE__ */ (0,
|
|
3348
|
-
/* @__PURE__ */ (0,
|
|
3394
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
|
|
3395
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(UnLoginIcon_default, {}),
|
|
3396
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react_intl7.FormattedMessage, { id: "login" }) })
|
|
3349
3397
|
] })
|
|
3350
3398
|
] });
|
|
3351
3399
|
}
|
|
3352
|
-
return loginRender ? /* @__PURE__ */ (0,
|
|
3353
|
-
/* @__PURE__ */ (0,
|
|
3354
|
-
/* @__PURE__ */ (0,
|
|
3400
|
+
return loginRender ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_jsx_runtime70.Fragment, { children: loginRender }) : /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(UserPopover, { position: popoverPosition, type: popoverType, gap: popoverGap, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(Button, { onClick: onLoginClick, className: "matchid-login-btn", ...props, children: [
|
|
3401
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(LoginIcon_default, {}),
|
|
3402
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { children: username ? truncateAddress(username) : "MatchID " + intl.formatMessage({
|
|
3355
3403
|
id: "user"
|
|
3356
3404
|
}) })
|
|
3357
3405
|
] }) });
|
|
@@ -3360,15 +3408,15 @@ function LoginButton({
|
|
|
3360
3408
|
// src/components/UsernameModal/index.tsx
|
|
3361
3409
|
var import_react13 = require("react");
|
|
3362
3410
|
var import_react_intl8 = require("react-intl");
|
|
3363
|
-
var
|
|
3411
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3364
3412
|
var ValidItem = ({
|
|
3365
3413
|
success = false,
|
|
3366
3414
|
text
|
|
3367
3415
|
}) => {
|
|
3368
3416
|
const isDownMd = useDownMd();
|
|
3369
|
-
return /* @__PURE__ */ (0,
|
|
3370
|
-
success ? /* @__PURE__ */ (0,
|
|
3371
|
-
/* @__PURE__ */ (0,
|
|
3417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
|
|
3418
|
+
success ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
|
|
3419
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { children: text })
|
|
3372
3420
|
] });
|
|
3373
3421
|
};
|
|
3374
3422
|
function UsernameModal({
|
|
@@ -3416,12 +3464,12 @@ function UsernameModal({
|
|
|
3416
3464
|
}
|
|
3417
3465
|
};
|
|
3418
3466
|
const intl = (0, import_react_intl8.useIntl)();
|
|
3419
|
-
return /* @__PURE__ */ (0,
|
|
3467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
|
|
3420
3468
|
id: username ? "editUsernameTitle" : "setUsernameTitle"
|
|
3421
|
-
}), children: /* @__PURE__ */ (0,
|
|
3422
|
-
/* @__PURE__ */ (0,
|
|
3469
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "matchid-username-box", children: [
|
|
3470
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Field, { label: intl.formatMessage({
|
|
3423
3471
|
id: "username"
|
|
3424
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
3472
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3425
3473
|
Input,
|
|
3426
3474
|
{
|
|
3427
3475
|
placeholder: intl.formatMessage({
|
|
@@ -3434,8 +3482,8 @@ function UsernameModal({
|
|
|
3434
3482
|
value: val
|
|
3435
3483
|
}
|
|
3436
3484
|
) }),
|
|
3437
|
-
/* @__PURE__ */ (0,
|
|
3438
|
-
/* @__PURE__ */ (0,
|
|
3485
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "matchid-valid", children: [
|
|
3486
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3439
3487
|
ValidItem,
|
|
3440
3488
|
{
|
|
3441
3489
|
success: isValid,
|
|
@@ -3444,16 +3492,16 @@ function UsernameModal({
|
|
|
3444
3492
|
})
|
|
3445
3493
|
}
|
|
3446
3494
|
),
|
|
3447
|
-
/* @__PURE__ */ (0,
|
|
3495
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ValidItem, { success: isLength, text: intl.formatMessage({
|
|
3448
3496
|
id: "usernameLengthError"
|
|
3449
3497
|
}) })
|
|
3450
3498
|
] }),
|
|
3451
|
-
/* @__PURE__ */ (0,
|
|
3499
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Button, { disabled: !isSafe, loading: isSubmitting, style: {
|
|
3452
3500
|
marginTop: isDownMd ? "36px" : "64px"
|
|
3453
|
-
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
3454
|
-
/* @__PURE__ */ (0,
|
|
3501
|
+
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react_intl8.FormattedMessage, { id: "confirm" }) }),
|
|
3502
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Button, { style: {
|
|
3455
3503
|
marginTop: isDownMd ? "12px" : "24px"
|
|
3456
|
-
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0,
|
|
3504
|
+
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react_intl8.FormattedMessage, { id: "cancel" }) })
|
|
3457
3505
|
] }) });
|
|
3458
3506
|
}
|
|
3459
3507
|
|
|
@@ -3509,7 +3557,7 @@ var walletConnectImage = wallet_default;
|
|
|
3509
3557
|
var walletSigningImage = signing_default;
|
|
3510
3558
|
|
|
3511
3559
|
// src/components/WalletModalContent/index.tsx
|
|
3512
|
-
var
|
|
3560
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3513
3561
|
function WalletModalContent({
|
|
3514
3562
|
status,
|
|
3515
3563
|
error,
|
|
@@ -3579,15 +3627,15 @@ function WalletModalContent({
|
|
|
3579
3627
|
statusImage: walletConnectImage
|
|
3580
3628
|
};
|
|
3581
3629
|
}, [visible, connected, status, error, address]);
|
|
3582
|
-
return /* @__PURE__ */ (0,
|
|
3583
|
-
/* @__PURE__ */ (0,
|
|
3584
|
-
/* @__PURE__ */ (0,
|
|
3630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
3631
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
3632
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
3585
3633
|
width: 128,
|
|
3586
3634
|
height: 128
|
|
3587
3635
|
} }),
|
|
3588
|
-
/* @__PURE__ */ (0,
|
|
3636
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: pageData.isError ? "matchid-error" : "", children: pageData.text })
|
|
3589
3637
|
] }),
|
|
3590
|
-
/* @__PURE__ */ (0,
|
|
3638
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3591
3639
|
Button,
|
|
3592
3640
|
{
|
|
3593
3641
|
block: true,
|
|
@@ -3663,15 +3711,15 @@ function WalletModalContentV2(props) {
|
|
|
3663
3711
|
statusImage: walletConnectImage
|
|
3664
3712
|
};
|
|
3665
3713
|
}, [props, submitting]);
|
|
3666
|
-
return /* @__PURE__ */ (0,
|
|
3667
|
-
/* @__PURE__ */ (0,
|
|
3668
|
-
/* @__PURE__ */ (0,
|
|
3714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
3715
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
3716
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
3669
3717
|
width: 128,
|
|
3670
3718
|
height: 128
|
|
3671
3719
|
} }),
|
|
3672
|
-
/* @__PURE__ */ (0,
|
|
3720
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: props.status == "error" ? "matchid-error" : "", children: pageData.text })
|
|
3673
3721
|
] }),
|
|
3674
|
-
/* @__PURE__ */ (0,
|
|
3722
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3675
3723
|
Button,
|
|
3676
3724
|
{
|
|
3677
3725
|
block: true,
|
|
@@ -3953,7 +4001,7 @@ async function getEthersSigner(config, { chainId } = {}) {
|
|
|
3953
4001
|
// src/components/EVMModal/index.tsx
|
|
3954
4002
|
var import_siwe = require("siwe");
|
|
3955
4003
|
var import_styles = require("@rainbow-me/rainbowkit/styles.css");
|
|
3956
|
-
var
|
|
4004
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3957
4005
|
function WalletContent({
|
|
3958
4006
|
onSuccess,
|
|
3959
4007
|
type
|
|
@@ -4111,7 +4159,7 @@ function WalletContent({
|
|
|
4111
4159
|
setNonce(void 0);
|
|
4112
4160
|
setStatus("start");
|
|
4113
4161
|
};
|
|
4114
|
-
return /* @__PURE__ */ (0,
|
|
4162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
4115
4163
|
WalletModalContentV2,
|
|
4116
4164
|
{
|
|
4117
4165
|
status,
|
|
@@ -4129,14 +4177,14 @@ function EVMConnectModal({
|
|
|
4129
4177
|
...props
|
|
4130
4178
|
}) {
|
|
4131
4179
|
const intl = (0, import_react_intl9.useIntl)();
|
|
4132
|
-
return /* @__PURE__ */ (0,
|
|
4180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4133
4181
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4134
4182
|
}, {
|
|
4135
4183
|
name: "EVM"
|
|
4136
|
-
}), children: /* @__PURE__ */ (0,
|
|
4184
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(WalletContent, { onSuccess, type }) });
|
|
4137
4185
|
}
|
|
4138
4186
|
function EVMModal(props) {
|
|
4139
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
4187
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_rainbowkit.RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(EVMConnectModal, { ...props }) });
|
|
4140
4188
|
}
|
|
4141
4189
|
|
|
4142
4190
|
// src/components/TRONModal/index.tsx
|
|
@@ -4251,7 +4299,7 @@ var useTRONWallet = () => {
|
|
|
4251
4299
|
};
|
|
4252
4300
|
|
|
4253
4301
|
// src/components/TRONModal/index.tsx
|
|
4254
|
-
var
|
|
4302
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
4255
4303
|
function TRONConnectModal({
|
|
4256
4304
|
type = "login",
|
|
4257
4305
|
onSuccess,
|
|
@@ -4261,9 +4309,9 @@ function TRONConnectModal({
|
|
|
4261
4309
|
const intl = (0, import_react_intl10.useIntl)();
|
|
4262
4310
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
|
|
4263
4311
|
const iconMaps = {
|
|
4264
|
-
tronlink: /* @__PURE__ */ (0,
|
|
4265
|
-
bitget: /* @__PURE__ */ (0,
|
|
4266
|
-
okx: /* @__PURE__ */ (0,
|
|
4312
|
+
tronlink: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
|
|
4313
|
+
bitget: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(BitgetIcon, { size: isDownMd ? 36 : 40 }),
|
|
4314
|
+
okx: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(OKXIcon, { size: isDownMd ? 36 : 40 })
|
|
4267
4315
|
};
|
|
4268
4316
|
const { events, login } = useMatch();
|
|
4269
4317
|
const [status, setStatus] = (0, import_react18.useState)("");
|
|
@@ -4355,11 +4403,11 @@ function TRONConnectModal({
|
|
|
4355
4403
|
disconnect();
|
|
4356
4404
|
}
|
|
4357
4405
|
}, [props.isOpen]);
|
|
4358
|
-
return /* @__PURE__ */ (0,
|
|
4406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4359
4407
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4360
4408
|
}, {
|
|
4361
4409
|
name: "TRON"
|
|
4362
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
4410
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4363
4411
|
WalletModalContent,
|
|
4364
4412
|
{
|
|
4365
4413
|
error,
|
|
@@ -4372,9 +4420,9 @@ function TRONConnectModal({
|
|
|
4372
4420
|
setVisible: () => {
|
|
4373
4421
|
}
|
|
4374
4422
|
}
|
|
4375
|
-
) : /* @__PURE__ */ (0,
|
|
4423
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
4376
4424
|
installedWallets.map((wallet2) => {
|
|
4377
|
-
return /* @__PURE__ */ (0,
|
|
4425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4378
4426
|
RecommendItem,
|
|
4379
4427
|
{
|
|
4380
4428
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -4387,14 +4435,14 @@ function TRONConnectModal({
|
|
|
4387
4435
|
);
|
|
4388
4436
|
}),
|
|
4389
4437
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
4390
|
-
return /* @__PURE__ */ (0,
|
|
4438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4391
4439
|
RecommendItem,
|
|
4392
4440
|
{
|
|
4393
4441
|
icon: iconMaps[wallet2.walletKey],
|
|
4394
4442
|
name: wallet2.name,
|
|
4395
4443
|
onClick: () => {
|
|
4396
4444
|
},
|
|
4397
|
-
footer: /* @__PURE__ */ (0,
|
|
4445
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Button, { size: "sm", onClick: () => {
|
|
4398
4446
|
window.open(wallet2.website);
|
|
4399
4447
|
}, children: "Install" })
|
|
4400
4448
|
},
|
|
@@ -4404,14 +4452,14 @@ function TRONConnectModal({
|
|
|
4404
4452
|
] }) }) });
|
|
4405
4453
|
}
|
|
4406
4454
|
function TRONModal(props) {
|
|
4407
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
4455
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TRONConnectModal, { ...props, type: props.type });
|
|
4408
4456
|
}
|
|
4409
4457
|
|
|
4410
4458
|
// src/components/TONModal/index.tsx
|
|
4411
4459
|
var import_react19 = __toESM(require("react"));
|
|
4412
4460
|
var import_react_intl11 = require("react-intl");
|
|
4413
4461
|
var import_ui_react = require("@tonconnect/ui-react");
|
|
4414
|
-
var
|
|
4462
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
4415
4463
|
function WalletContent2({
|
|
4416
4464
|
onSuccess,
|
|
4417
4465
|
type
|
|
@@ -4538,7 +4586,7 @@ function WalletContent2({
|
|
|
4538
4586
|
}
|
|
4539
4587
|
}
|
|
4540
4588
|
}, [state]);
|
|
4541
|
-
return /* @__PURE__ */ (0,
|
|
4589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4542
4590
|
WalletModalContent,
|
|
4543
4591
|
{
|
|
4544
4592
|
connected,
|
|
@@ -4572,20 +4620,20 @@ function TONConnectModal({
|
|
|
4572
4620
|
const intl = (0, import_react_intl11.useIntl)();
|
|
4573
4621
|
const { endpoints, appid } = useLocalStore_default();
|
|
4574
4622
|
const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
|
|
4575
|
-
return /* @__PURE__ */ (0,
|
|
4623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4576
4624
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4577
4625
|
}, {
|
|
4578
4626
|
name: "TON"
|
|
4579
|
-
}), children: /* @__PURE__ */ (0,
|
|
4627
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4580
4628
|
import_ui_react.TonConnectUIProvider,
|
|
4581
4629
|
{
|
|
4582
4630
|
manifestUrl,
|
|
4583
|
-
children: /* @__PURE__ */ (0,
|
|
4631
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(WalletContent2, { onSuccess, type })
|
|
4584
4632
|
}
|
|
4585
4633
|
) });
|
|
4586
4634
|
}
|
|
4587
4635
|
function TONModal(props) {
|
|
4588
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
4636
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(TONConnectModal, { ...props });
|
|
4589
4637
|
}
|
|
4590
4638
|
|
|
4591
4639
|
// src/components/BTCModal/index.tsx
|
|
@@ -4808,7 +4856,7 @@ var useBTCWallet = () => {
|
|
|
4808
4856
|
};
|
|
4809
4857
|
|
|
4810
4858
|
// src/components/BTCModal/index.tsx
|
|
4811
|
-
var
|
|
4859
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4812
4860
|
function BTCConnectModal({
|
|
4813
4861
|
type = "login",
|
|
4814
4862
|
onSuccess,
|
|
@@ -4818,10 +4866,10 @@ function BTCConnectModal({
|
|
|
4818
4866
|
const intl = (0, import_react_intl12.useIntl)();
|
|
4819
4867
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
|
|
4820
4868
|
const iconMaps = {
|
|
4821
|
-
leather: /* @__PURE__ */ (0,
|
|
4822
|
-
unisat: /* @__PURE__ */ (0,
|
|
4823
|
-
xverse: /* @__PURE__ */ (0,
|
|
4824
|
-
phantom: /* @__PURE__ */ (0,
|
|
4869
|
+
leather: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(LeatherIcon, { size: isDownMd ? 36 : 40 }),
|
|
4870
|
+
unisat: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(UnisatIcon, { size: isDownMd ? 36 : 40 }),
|
|
4871
|
+
xverse: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(XverseIcon, { size: isDownMd ? 36 : 40 }),
|
|
4872
|
+
phantom: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(PhantomIcon, { size: isDownMd ? 36 : 40 })
|
|
4825
4873
|
};
|
|
4826
4874
|
const { events, login } = useMatch();
|
|
4827
4875
|
const [status, setStatus] = (0, import_react21.useState)("");
|
|
@@ -4921,11 +4969,11 @@ function BTCConnectModal({
|
|
|
4921
4969
|
statusRef.current = "";
|
|
4922
4970
|
setError("");
|
|
4923
4971
|
};
|
|
4924
|
-
return /* @__PURE__ */ (0,
|
|
4972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4925
4973
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4926
4974
|
}, {
|
|
4927
4975
|
name: "BTC"
|
|
4928
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
4976
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4929
4977
|
WalletModalContent,
|
|
4930
4978
|
{
|
|
4931
4979
|
error,
|
|
@@ -4938,9 +4986,9 @@ function BTCConnectModal({
|
|
|
4938
4986
|
setVisible: () => {
|
|
4939
4987
|
}
|
|
4940
4988
|
}
|
|
4941
|
-
) : /* @__PURE__ */ (0,
|
|
4989
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
4942
4990
|
installedWallets.map((wallet2) => {
|
|
4943
|
-
return /* @__PURE__ */ (0,
|
|
4991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4944
4992
|
RecommendItem,
|
|
4945
4993
|
{
|
|
4946
4994
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -4953,14 +5001,14 @@ function BTCConnectModal({
|
|
|
4953
5001
|
);
|
|
4954
5002
|
}),
|
|
4955
5003
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
4956
|
-
return /* @__PURE__ */ (0,
|
|
5004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4957
5005
|
RecommendItem,
|
|
4958
5006
|
{
|
|
4959
5007
|
icon: iconMaps[wallet2.walletKey],
|
|
4960
5008
|
name: wallet2.name,
|
|
4961
5009
|
onClick: () => {
|
|
4962
5010
|
},
|
|
4963
|
-
footer: /* @__PURE__ */ (0,
|
|
5011
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Button, { size: "sm", onClick: () => {
|
|
4964
5012
|
window.open(wallet2.website);
|
|
4965
5013
|
}, children: "Install" })
|
|
4966
5014
|
},
|
|
@@ -4970,13 +5018,13 @@ function BTCConnectModal({
|
|
|
4970
5018
|
] }) }) });
|
|
4971
5019
|
}
|
|
4972
5020
|
function BTCModal(props) {
|
|
4973
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5021
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(BTCConnectModal, { ...props });
|
|
4974
5022
|
}
|
|
4975
5023
|
|
|
4976
5024
|
// src/components/WalletModal/index.tsx
|
|
4977
5025
|
var import_react22 = require("react");
|
|
4978
5026
|
var import_react_intl13 = require("react-intl");
|
|
4979
|
-
var
|
|
5027
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4980
5028
|
function WalletConnectModal({
|
|
4981
5029
|
type,
|
|
4982
5030
|
methods: _methods,
|
|
@@ -4994,13 +5042,13 @@ function WalletConnectModal({
|
|
|
4994
5042
|
const platform = config.platform.map((p) => p.toLowerCase());
|
|
4995
5043
|
return WALLET_METHODS.filter((m) => platform.includes(m));
|
|
4996
5044
|
}, [config.platform, _methods]);
|
|
4997
|
-
return /* @__PURE__ */ (0,
|
|
5045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4998
5046
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4999
5047
|
}, {
|
|
5000
5048
|
name: ""
|
|
5001
|
-
}), children: /* @__PURE__ */ (0,
|
|
5049
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "matchid-login-recommend-list", children: methods.map((method, index) => {
|
|
5002
5050
|
const m = walletMap[method];
|
|
5003
|
-
return /* @__PURE__ */ (0,
|
|
5051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
5004
5052
|
RecommendItem,
|
|
5005
5053
|
{
|
|
5006
5054
|
icon: m?.icon,
|
|
@@ -5014,12 +5062,12 @@ function WalletConnectModal({
|
|
|
5014
5062
|
}) }) }) });
|
|
5015
5063
|
}
|
|
5016
5064
|
function WalletModal(props) {
|
|
5017
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5065
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(WalletConnectModal, { ...props });
|
|
5018
5066
|
}
|
|
5019
5067
|
|
|
5020
5068
|
// src/components/AlphaAvatar/index.tsx
|
|
5021
5069
|
var import_react23 = require("react");
|
|
5022
|
-
var
|
|
5070
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
5023
5071
|
function AlphaAvatar({ name, size = 40, className = "" }) {
|
|
5024
5072
|
const [avatar, setAvatar] = (0, import_react23.useState)(void 0);
|
|
5025
5073
|
(0, import_react23.useEffect)(() => {
|
|
@@ -5028,7 +5076,7 @@ function AlphaAvatar({ name, size = 40, className = "" }) {
|
|
|
5028
5076
|
setAvatar(char);
|
|
5029
5077
|
}
|
|
5030
5078
|
}, [name]);
|
|
5031
|
-
return /* @__PURE__ */ (0,
|
|
5079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
5032
5080
|
width: size,
|
|
5033
5081
|
height: size,
|
|
5034
5082
|
fontSize: Math.ceil(size / 2)
|
|
@@ -5036,7 +5084,7 @@ function AlphaAvatar({ name, size = 40, className = "" }) {
|
|
|
5036
5084
|
}
|
|
5037
5085
|
|
|
5038
5086
|
// src/components/WalletAsset/index.tsx
|
|
5039
|
-
var
|
|
5087
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
5040
5088
|
function WalletAsset({
|
|
5041
5089
|
onAssetClick,
|
|
5042
5090
|
matchWalletAssetsOptions
|
|
@@ -5046,7 +5094,7 @@ function WalletAsset({
|
|
|
5046
5094
|
list: walletAssets.mergedAssets
|
|
5047
5095
|
});
|
|
5048
5096
|
const { list } = useMatchChain();
|
|
5049
|
-
return /* @__PURE__ */ (0,
|
|
5097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5050
5098
|
const clickFunc = onAssetClick && onAssetClick(n);
|
|
5051
5099
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5052
5100
|
const getFooterColor = () => {
|
|
@@ -5061,11 +5109,11 @@ function WalletAsset({
|
|
|
5061
5109
|
}
|
|
5062
5110
|
return "";
|
|
5063
5111
|
};
|
|
5064
|
-
return /* @__PURE__ */ (0,
|
|
5112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: `matchid-wallet-asset-item`, onClick: clickFunc, style: {
|
|
5065
5113
|
cursor: clickFunc ? "pointer" : "default"
|
|
5066
5114
|
}, children: [
|
|
5067
|
-
/* @__PURE__ */ (0,
|
|
5068
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
5115
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
|
|
5116
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-wallet-asset-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
5069
5117
|
AlphaAvatar,
|
|
5070
5118
|
{
|
|
5071
5119
|
className: `matchid-wallet-asset-icon`,
|
|
@@ -5073,12 +5121,12 @@ function WalletAsset({
|
|
|
5073
5121
|
name: n.symbol || n.name || ""
|
|
5074
5122
|
}
|
|
5075
5123
|
),
|
|
5076
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
5124
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
|
|
5077
5125
|
] }),
|
|
5078
|
-
/* @__PURE__ */ (0,
|
|
5079
|
-
/* @__PURE__ */ (0,
|
|
5080
|
-
"price" in n && /* @__PURE__ */ (0,
|
|
5081
|
-
/* @__PURE__ */ (0,
|
|
5126
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: `matchid-wallet-asset-info`, children: [
|
|
5127
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
|
|
5128
|
+
"price" in n && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: `matchid-wallet-asset-content`, children: [
|
|
5129
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
5082
5130
|
NumberFormatter,
|
|
5083
5131
|
{
|
|
5084
5132
|
value: n.price,
|
|
@@ -5086,7 +5134,7 @@ function WalletAsset({
|
|
|
5086
5134
|
tFixNum: 2
|
|
5087
5135
|
}
|
|
5088
5136
|
) }),
|
|
5089
|
-
/* @__PURE__ */ (0,
|
|
5137
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
5090
5138
|
NumberFormatter,
|
|
5091
5139
|
{
|
|
5092
5140
|
value: n.value,
|
|
@@ -5095,15 +5143,15 @@ function WalletAsset({
|
|
|
5095
5143
|
}
|
|
5096
5144
|
) })
|
|
5097
5145
|
] }),
|
|
5098
|
-
/* @__PURE__ */ (0,
|
|
5099
|
-
/* @__PURE__ */ (0,
|
|
5146
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: `matchid-wallet-asset-footer`, children: [
|
|
5147
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
5100
5148
|
NumberFormatter,
|
|
5101
5149
|
{
|
|
5102
5150
|
value: n.balance,
|
|
5103
5151
|
tFixNum: 3
|
|
5104
5152
|
}
|
|
5105
5153
|
) }),
|
|
5106
|
-
"price_change_24h" in n && /* @__PURE__ */ (0,
|
|
5154
|
+
"price_change_24h" in n && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: `matchid-wallet-asset-change ${getFooterColor()}`, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
5107
5155
|
NumberFormatter,
|
|
5108
5156
|
{
|
|
5109
5157
|
prefix: `${(n?.price_change_24h || 0) < 0 ? "-" : "+"} `,
|
|
@@ -5122,7 +5170,7 @@ function WalletAsset({
|
|
|
5122
5170
|
var import_react24 = require("react");
|
|
5123
5171
|
var import_viem3 = require("viem");
|
|
5124
5172
|
var import_react_intl14 = require("react-intl");
|
|
5125
|
-
var
|
|
5173
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
5126
5174
|
function Input2({
|
|
5127
5175
|
onChange,
|
|
5128
5176
|
placeholder,
|
|
@@ -5132,8 +5180,8 @@ function Input2({
|
|
|
5132
5180
|
error,
|
|
5133
5181
|
size = "df"
|
|
5134
5182
|
}) {
|
|
5135
|
-
return /* @__PURE__ */ (0,
|
|
5136
|
-
/* @__PURE__ */ (0,
|
|
5183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
|
|
5184
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
5137
5185
|
"input",
|
|
5138
5186
|
{
|
|
5139
5187
|
placeholder,
|
|
@@ -5144,7 +5192,7 @@ function Input2({
|
|
|
5144
5192
|
className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
|
|
5145
5193
|
}
|
|
5146
5194
|
),
|
|
5147
|
-
error && /* @__PURE__ */ (0,
|
|
5195
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-token-input-error-text", children: error })
|
|
5148
5196
|
] });
|
|
5149
5197
|
}
|
|
5150
5198
|
function TokenSend({
|
|
@@ -5272,24 +5320,24 @@ function TokenSend({
|
|
|
5272
5320
|
window.removeEventListener("message", receiveMessage);
|
|
5273
5321
|
};
|
|
5274
5322
|
}, []);
|
|
5275
|
-
return /* @__PURE__ */ (0,
|
|
5276
|
-
/* @__PURE__ */ (0,
|
|
5277
|
-
/* @__PURE__ */ (0,
|
|
5278
|
-
/* @__PURE__ */ (0,
|
|
5279
|
-
/* @__PURE__ */ (0,
|
|
5280
|
-
/* @__PURE__ */ (0,
|
|
5281
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
5323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl14.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-send-box`, children: [
|
|
5324
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
5325
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-amount-content`, children: [
|
|
5326
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-amount-header`, children: [
|
|
5327
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl14.FormattedMessage, { id: "amount" }) }),
|
|
5328
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
|
|
5329
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
5282
5330
|
"img",
|
|
5283
5331
|
{
|
|
5284
5332
|
src: token?.icon,
|
|
5285
5333
|
alt: token?.symbol,
|
|
5286
5334
|
className: `matchid-token-amount-chain-icon`
|
|
5287
5335
|
}
|
|
5288
|
-
) : /* @__PURE__ */ (0,
|
|
5289
|
-
/* @__PURE__ */ (0,
|
|
5336
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(AlphaAvatar2, { name: token.symbol || token.name || "", size: 16 }),
|
|
5337
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: token?.symbol })
|
|
5290
5338
|
] })
|
|
5291
5339
|
] }),
|
|
5292
|
-
/* @__PURE__ */ (0,
|
|
5340
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
5293
5341
|
Input2,
|
|
5294
5342
|
{
|
|
5295
5343
|
type: "text",
|
|
@@ -5302,18 +5350,18 @@ function TokenSend({
|
|
|
5302
5350
|
error: error.amount || txError
|
|
5303
5351
|
}
|
|
5304
5352
|
),
|
|
5305
|
-
/* @__PURE__ */ (0,
|
|
5306
|
-
/* @__PURE__ */ (0,
|
|
5307
|
-
/* @__PURE__ */ (0,
|
|
5353
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
|
|
5354
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-amount-title`, children: [
|
|
5355
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl14.FormattedMessage, { id: "balance" }),
|
|
5308
5356
|
":"
|
|
5309
5357
|
] }),
|
|
5310
|
-
/* @__PURE__ */ (0,
|
|
5358
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
|
|
5311
5359
|
] }),
|
|
5312
|
-
/* @__PURE__ */ (0,
|
|
5360
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
5313
5361
|
] }),
|
|
5314
|
-
/* @__PURE__ */ (0,
|
|
5315
|
-
/* @__PURE__ */ (0,
|
|
5316
|
-
/* @__PURE__ */ (0,
|
|
5362
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: `matchid-token-address-content`, children: [
|
|
5363
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl14.FormattedMessage, { id: "receiveTitle" }) }) }),
|
|
5364
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
5317
5365
|
Input2,
|
|
5318
5366
|
{
|
|
5319
5367
|
type: "text",
|
|
@@ -5329,7 +5377,7 @@ function TokenSend({
|
|
|
5329
5377
|
)
|
|
5330
5378
|
] })
|
|
5331
5379
|
] }),
|
|
5332
|
-
/* @__PURE__ */ (0,
|
|
5380
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
5333
5381
|
Button,
|
|
5334
5382
|
{
|
|
5335
5383
|
size: "lg",
|
|
@@ -5338,7 +5386,7 @@ function TokenSend({
|
|
|
5338
5386
|
disabled: !canSend || !!txError,
|
|
5339
5387
|
onClick: onNext,
|
|
5340
5388
|
loading: loading || sending,
|
|
5341
|
-
children: /* @__PURE__ */ (0,
|
|
5389
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl14.FormattedMessage, { id: "next" })
|
|
5342
5390
|
}
|
|
5343
5391
|
)
|
|
5344
5392
|
] }) });
|
|
@@ -5346,7 +5394,7 @@ function TokenSend({
|
|
|
5346
5394
|
|
|
5347
5395
|
// src/components/TokenDetail/index.tsx
|
|
5348
5396
|
var import_react_intl15 = require("react-intl");
|
|
5349
|
-
var
|
|
5397
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
5350
5398
|
function TokenDetail({
|
|
5351
5399
|
onClose,
|
|
5352
5400
|
token
|
|
@@ -5356,41 +5404,41 @@ function TokenDetail({
|
|
|
5356
5404
|
const chain = chainList?.find((m) => m.id.toString() === token.chain_id);
|
|
5357
5405
|
const onSend = () => {
|
|
5358
5406
|
modal.show((props) => {
|
|
5359
|
-
return /* @__PURE__ */ (0,
|
|
5407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(TokenSend, { onClose: () => {
|
|
5360
5408
|
props.close();
|
|
5361
5409
|
onClose();
|
|
5362
5410
|
}, onBack: props.close, zIndex: props.zIndex, token });
|
|
5363
5411
|
});
|
|
5364
5412
|
};
|
|
5365
5413
|
const intl = (0, import_react_intl15.useIntl)();
|
|
5366
|
-
return /* @__PURE__ */ (0,
|
|
5414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ModalDrawer, { isOpen: true, title: intl.formatMessage({
|
|
5367
5415
|
id: "tokenDetails"
|
|
5368
|
-
}), onClose, children: /* @__PURE__ */ (0,
|
|
5369
|
-
/* @__PURE__ */ (0,
|
|
5370
|
-
/* @__PURE__ */ (0,
|
|
5371
|
-
/* @__PURE__ */ (0,
|
|
5372
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
5373
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
5416
|
+
}), onClose, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-token-detail`, children: [
|
|
5417
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-token-main`, children: [
|
|
5418
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-token-info`, children: [
|
|
5419
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-token-logo`, children: [
|
|
5420
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("img", { src: token.icon, alt: token.symbol, className: `matchid-token-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(AlphaAvatar2, { className: `matchid-token-icon`, size: 48, name: token.symbol || token.name || "" }),
|
|
5421
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-token-chain` })
|
|
5374
5422
|
] }),
|
|
5375
|
-
/* @__PURE__ */ (0,
|
|
5376
|
-
/* @__PURE__ */ (0,
|
|
5423
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-token-name`, children: [
|
|
5424
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10 }),
|
|
5377
5425
|
" ",
|
|
5378
5426
|
token.symbol
|
|
5379
5427
|
] })
|
|
5380
5428
|
] }),
|
|
5381
|
-
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0,
|
|
5382
|
-
/* @__PURE__ */ (0,
|
|
5383
|
-
/* @__PURE__ */ (0,
|
|
5429
|
+
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-token-contract`, children: [
|
|
5430
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-token-contract-title", children: "Contract address" }),
|
|
5431
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-token-contract-address", children: token.address })
|
|
5384
5432
|
] })
|
|
5385
5433
|
] }),
|
|
5386
|
-
/* @__PURE__ */ (0,
|
|
5434
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl15.FormattedMessage, { id: "send" }) })
|
|
5387
5435
|
] }) });
|
|
5388
5436
|
}
|
|
5389
5437
|
|
|
5390
5438
|
// src/components/TokenSendList/index.tsx
|
|
5391
5439
|
var import_react25 = require("react");
|
|
5392
5440
|
var import_react_intl16 = require("react-intl");
|
|
5393
|
-
var
|
|
5441
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
5394
5442
|
function TokenSendList({ close }) {
|
|
5395
5443
|
const isDownMd = useDownMd();
|
|
5396
5444
|
const walletAssets = useMatchWalletAssets();
|
|
@@ -5402,16 +5450,16 @@ function TokenSendList({ close }) {
|
|
|
5402
5450
|
const modal = useModal();
|
|
5403
5451
|
const onNext = () => {
|
|
5404
5452
|
checked && modal.show((props) => {
|
|
5405
|
-
return /* @__PURE__ */ (0,
|
|
5453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TokenSend, { onClose: () => {
|
|
5406
5454
|
props.close();
|
|
5407
5455
|
close();
|
|
5408
5456
|
}, onBack: props.close, zIndex: props.zIndex, token: checked });
|
|
5409
5457
|
});
|
|
5410
5458
|
};
|
|
5411
|
-
return /* @__PURE__ */ (0,
|
|
5412
|
-
/* @__PURE__ */ (0,
|
|
5459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "matchid-token-send-list-box", children: [
|
|
5460
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5413
5461
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5414
|
-
return /* @__PURE__ */ (0,
|
|
5462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
5415
5463
|
"div",
|
|
5416
5464
|
{
|
|
5417
5465
|
className: `matchid-token-send-item ${checked?.address == n.address ? "matchid-token-send-chekced" : ""}`,
|
|
@@ -5419,10 +5467,10 @@ function TokenSendList({ close }) {
|
|
|
5419
5467
|
setChecked(n);
|
|
5420
5468
|
},
|
|
5421
5469
|
children: [
|
|
5422
|
-
/* @__PURE__ */ (0,
|
|
5423
|
-
/* @__PURE__ */ (0,
|
|
5424
|
-
/* @__PURE__ */ (0,
|
|
5425
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
5470
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
|
|
5471
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
5472
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "matchid-token-send-logo", children: [
|
|
5473
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
5426
5474
|
AlphaAvatar,
|
|
5427
5475
|
{
|
|
5428
5476
|
className: `matchid-token-send-icon`,
|
|
@@ -5430,7 +5478,7 @@ function TokenSendList({ close }) {
|
|
|
5430
5478
|
name: n.symbol || n.name || ""
|
|
5431
5479
|
}
|
|
5432
5480
|
),
|
|
5433
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
5481
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
5434
5482
|
"img",
|
|
5435
5483
|
{
|
|
5436
5484
|
src: chain.iconUrl,
|
|
@@ -5439,9 +5487,9 @@ function TokenSendList({ close }) {
|
|
|
5439
5487
|
}
|
|
5440
5488
|
)
|
|
5441
5489
|
] }),
|
|
5442
|
-
/* @__PURE__ */ (0,
|
|
5443
|
-
/* @__PURE__ */ (0,
|
|
5444
|
-
/* @__PURE__ */ (0,
|
|
5490
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: `matchid-token-send-info`, children: [
|
|
5491
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
|
|
5492
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
|
|
5445
5493
|
] })
|
|
5446
5494
|
] })
|
|
5447
5495
|
]
|
|
@@ -5449,7 +5497,7 @@ function TokenSendList({ close }) {
|
|
|
5449
5497
|
index
|
|
5450
5498
|
);
|
|
5451
5499
|
}) }),
|
|
5452
|
-
/* @__PURE__ */ (0,
|
|
5500
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react_intl16.FormattedMessage, { id: "next" }) })
|
|
5453
5501
|
] });
|
|
5454
5502
|
}
|
|
5455
5503
|
|
|
@@ -5557,7 +5605,7 @@ function useHash({
|
|
|
5557
5605
|
|
|
5558
5606
|
// src/components/TransactionList/index.tsx
|
|
5559
5607
|
var import_react_intl17 = require("react-intl");
|
|
5560
|
-
var
|
|
5608
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
5561
5609
|
var Item = ({ data }) => {
|
|
5562
5610
|
const { address } = useWallet();
|
|
5563
5611
|
const isOut = data.from.toLowerCase() == address.toLowerCase();
|
|
@@ -5644,18 +5692,18 @@ var Item = ({ data }) => {
|
|
|
5644
5692
|
}
|
|
5645
5693
|
return chain?.nativeCurrency.symbol || chain?.nativeCurrency.name;
|
|
5646
5694
|
}, [transferType, chain, contracts, chainId, data.to]);
|
|
5647
|
-
return /* @__PURE__ */ (0,
|
|
5695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
5648
5696
|
"a",
|
|
5649
5697
|
{
|
|
5650
5698
|
href: explorerLink(`tx/${data.hash}`),
|
|
5651
5699
|
target: "_blank",
|
|
5652
5700
|
className: `matchid-transaction-item`,
|
|
5653
5701
|
children: [
|
|
5654
|
-
/* @__PURE__ */ (0,
|
|
5655
|
-
/* @__PURE__ */ (0,
|
|
5656
|
-
/* @__PURE__ */ (0,
|
|
5657
|
-
/* @__PURE__ */ (0,
|
|
5658
|
-
/* @__PURE__ */ (0,
|
|
5702
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: `matchid-transacton-item-container`, children: [
|
|
5703
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
|
|
5704
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: `matchid-transaction-item-details`, children: [
|
|
5705
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
|
|
5706
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
5659
5707
|
"div",
|
|
5660
5708
|
{
|
|
5661
5709
|
className: `matchid-transaction-item-timestamp`,
|
|
@@ -5664,11 +5712,11 @@ var Item = ({ data }) => {
|
|
|
5664
5712
|
)
|
|
5665
5713
|
] })
|
|
5666
5714
|
] }),
|
|
5667
|
-
/* @__PURE__ */ (0,
|
|
5668
|
-
/* @__PURE__ */ (0,
|
|
5669
|
-
status == "loading" && /* @__PURE__ */ (0,
|
|
5670
|
-
status == "success" && /* @__PURE__ */ (0,
|
|
5671
|
-
status == "error" && /* @__PURE__ */ (0,
|
|
5715
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
|
|
5716
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(NumberFormatter, { value: amount, tFixNum: 6, prefix: isOut ? "-" : "+", suffix: " " + symbol }),
|
|
5717
|
+
status == "loading" && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(LoadingIcon_default, { color: "#000000", size: 16, rotate: true }),
|
|
5718
|
+
status == "success" && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CheckRoundIcon, { size: 16 }),
|
|
5719
|
+
status == "error" && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(InfoRoundIcon, { size: 16 })
|
|
5672
5720
|
] })
|
|
5673
5721
|
]
|
|
5674
5722
|
}
|
|
@@ -5678,26 +5726,26 @@ function TransactionList({
|
|
|
5678
5726
|
scrollableTarget
|
|
5679
5727
|
}) {
|
|
5680
5728
|
const { fetchMoreData, hasMore, items } = useMatchWalletRecords();
|
|
5681
|
-
return /* @__PURE__ */ (0,
|
|
5729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
5682
5730
|
import_react_infinite_scroll_component.default,
|
|
5683
5731
|
{
|
|
5684
5732
|
scrollableTarget,
|
|
5685
5733
|
dataLength: items.length,
|
|
5686
5734
|
next: fetchMoreData,
|
|
5687
5735
|
hasMore,
|
|
5688
|
-
loader: /* @__PURE__ */ (0,
|
|
5689
|
-
/* @__PURE__ */ (0,
|
|
5736
|
+
loader: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "matchid-list-nomore", children: [
|
|
5737
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
|
|
5690
5738
|
"Loading..."
|
|
5691
5739
|
] }),
|
|
5692
|
-
endMessage: items.length > 0 ? /* @__PURE__ */ (0,
|
|
5693
|
-
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0,
|
|
5740
|
+
endMessage: items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react_intl17.FormattedMessage, { id: "noMoreRecords" }) }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react_intl17.FormattedMessage, { id: "noRecords" }) }),
|
|
5741
|
+
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "mt-[150px]" }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Item, { data: item }, index)) })
|
|
5694
5742
|
}
|
|
5695
5743
|
);
|
|
5696
5744
|
}
|
|
5697
5745
|
|
|
5698
5746
|
// src/ui/Modal/index.tsx
|
|
5699
5747
|
var import_react_intl18 = require("react-intl");
|
|
5700
|
-
var
|
|
5748
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
5701
5749
|
function Modal({
|
|
5702
5750
|
children,
|
|
5703
5751
|
isOpen,
|
|
@@ -5705,10 +5753,10 @@ function Modal({
|
|
|
5705
5753
|
zIndex = 100,
|
|
5706
5754
|
className = ""
|
|
5707
5755
|
}) {
|
|
5708
|
-
return /* @__PURE__ */ (0,
|
|
5756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: `matchid-modal ${className}`, style: {
|
|
5709
5757
|
width
|
|
5710
5758
|
}, children: [
|
|
5711
|
-
/* @__PURE__ */ (0,
|
|
5759
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-modal-mobile-header" }),
|
|
5712
5760
|
children
|
|
5713
5761
|
] }) });
|
|
5714
5762
|
}
|
|
@@ -5722,13 +5770,13 @@ function ModalWithHeader({
|
|
|
5722
5770
|
...props
|
|
5723
5771
|
}) {
|
|
5724
5772
|
const isDownMd = useDownMd();
|
|
5725
|
-
return /* @__PURE__ */ (0,
|
|
5726
|
-
/* @__PURE__ */ (0,
|
|
5727
|
-
/* @__PURE__ */ (0,
|
|
5728
|
-
onBack && /* @__PURE__ */ (0,
|
|
5729
|
-
/* @__PURE__ */ (0,
|
|
5773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(Modal, { ...props, children: [
|
|
5774
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
|
|
5775
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-modal-header-content", children: [
|
|
5776
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
|
|
5777
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "matchid-modal-header-title", children: title })
|
|
5730
5778
|
] }),
|
|
5731
|
-
onClose && /* @__PURE__ */ (0,
|
|
5779
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
|
|
5732
5780
|
] }),
|
|
5733
5781
|
children
|
|
5734
5782
|
] });
|
|
@@ -5763,17 +5811,17 @@ function ConfirmModal({
|
|
|
5763
5811
|
setLoading(false);
|
|
5764
5812
|
}
|
|
5765
5813
|
};
|
|
5766
|
-
return /* @__PURE__ */ (0,
|
|
5767
|
-
/* @__PURE__ */ (0,
|
|
5768
|
-
error && /* @__PURE__ */ (0,
|
|
5769
|
-
/* @__PURE__ */ (0,
|
|
5814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ModalWithHeader, { isOpen, onClose, title, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-confirm-modal", children: [
|
|
5815
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-w-full", children }),
|
|
5816
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: `matchid-error`, children: error }),
|
|
5817
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Button, { size: "lg", onClick: onSubmit, loading, block: true, highlight: true, children: confirmText ?? intl.formatMessage({
|
|
5770
5818
|
id: "Confirm"
|
|
5771
5819
|
}) })
|
|
5772
5820
|
] }) });
|
|
5773
5821
|
}
|
|
5774
5822
|
|
|
5775
5823
|
// src/ui/ModalDrawer/index.tsx
|
|
5776
|
-
var
|
|
5824
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
5777
5825
|
function ModalDrawer({
|
|
5778
5826
|
title,
|
|
5779
5827
|
drawerTitleVisible = true,
|
|
@@ -5781,13 +5829,13 @@ function ModalDrawer({
|
|
|
5781
5829
|
}) {
|
|
5782
5830
|
const isDownMd = useDownMd();
|
|
5783
5831
|
if (isDownMd) {
|
|
5784
|
-
return /* @__PURE__ */ (0,
|
|
5832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ModalWithHeader, { ...props, title });
|
|
5785
5833
|
}
|
|
5786
|
-
return /* @__PURE__ */ (0,
|
|
5834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
|
|
5787
5835
|
}
|
|
5788
5836
|
|
|
5789
5837
|
// src/ui/HashPanel/index.tsx
|
|
5790
|
-
var
|
|
5838
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
5791
5839
|
function HashPanel({
|
|
5792
5840
|
hash,
|
|
5793
5841
|
chain,
|
|
@@ -5847,14 +5895,14 @@ function HashPanel({
|
|
|
5847
5895
|
}
|
|
5848
5896
|
}, [hashQuery.data]);
|
|
5849
5897
|
const link = chain ? `${chain?.blockExplorers?.default.url}/tx/${hash}` : "";
|
|
5850
|
-
return /* @__PURE__ */ (0,
|
|
5898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5851
5899
|
ModalDrawer,
|
|
5852
5900
|
{
|
|
5853
5901
|
isOpen,
|
|
5854
5902
|
showClose: true,
|
|
5855
5903
|
onClose,
|
|
5856
5904
|
zIndex,
|
|
5857
|
-
title: /* @__PURE__ */ (0,
|
|
5905
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5858
5906
|
"div",
|
|
5859
5907
|
{
|
|
5860
5908
|
className: "matchid-hashpanel-header",
|
|
@@ -5864,32 +5912,32 @@ function HashPanel({
|
|
|
5864
5912
|
children: statusValue.text
|
|
5865
5913
|
}
|
|
5866
5914
|
),
|
|
5867
|
-
children: /* @__PURE__ */ (0,
|
|
5868
|
-
/* @__PURE__ */ (0,
|
|
5869
|
-
/* @__PURE__ */ (0,
|
|
5915
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-hashpanel-box", children: [
|
|
5916
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-hashpanel-content", children: [
|
|
5917
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: `matchid-hashpanel-status`, style: {
|
|
5870
5918
|
color: statusValue.color
|
|
5871
5919
|
}, children: statusValue.text }),
|
|
5872
|
-
statusValue.lottie && /* @__PURE__ */ (0,
|
|
5920
|
+
statusValue.lottie && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Lottie_default, { animationData: statusValue.lottie, style: {
|
|
5873
5921
|
width: "96px",
|
|
5874
5922
|
height: "96px"
|
|
5875
5923
|
} }),
|
|
5876
|
-
hash && /* @__PURE__ */ (0,
|
|
5924
|
+
hash && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
|
|
5877
5925
|
"Hash:",
|
|
5878
|
-
/* @__PURE__ */ (0,
|
|
5926
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("a", { href: link, target: "_blank", children: hash })
|
|
5879
5927
|
] }),
|
|
5880
|
-
error && /* @__PURE__ */ (0,
|
|
5928
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-hashpanel-text", children: error })
|
|
5881
5929
|
] }),
|
|
5882
|
-
/* @__PURE__ */ (0,
|
|
5930
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
|
|
5883
5931
|
] })
|
|
5884
5932
|
}
|
|
5885
5933
|
);
|
|
5886
5934
|
}
|
|
5887
5935
|
function HashPanel_default(props) {
|
|
5888
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5936
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(HashPanel, { ...props });
|
|
5889
5937
|
}
|
|
5890
5938
|
|
|
5891
5939
|
// src/ui/Switch/index.tsx
|
|
5892
|
-
var
|
|
5940
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
5893
5941
|
function Switch({
|
|
5894
5942
|
size = "default",
|
|
5895
5943
|
checked = false,
|
|
@@ -5904,12 +5952,12 @@ function Switch({
|
|
|
5904
5952
|
onChange && onChange(!checked);
|
|
5905
5953
|
}
|
|
5906
5954
|
};
|
|
5907
|
-
return /* @__PURE__ */ (0,
|
|
5955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.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_runtime87.jsx)(LoadingIcon_default, { className: "matchid-switch-loading-icon", size: size == "default" ? 24 : 18, color: "var(--matchid-swicth-loading-color)" }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-switch-ball" }) });
|
|
5908
5956
|
}
|
|
5909
5957
|
|
|
5910
5958
|
// src/ui/AlphaAvatar/index.tsx
|
|
5911
5959
|
var import_react29 = require("react");
|
|
5912
|
-
var
|
|
5960
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
5913
5961
|
function AlphaAvatar2({
|
|
5914
5962
|
name,
|
|
5915
5963
|
size = "default",
|
|
@@ -5926,7 +5974,7 @@ function AlphaAvatar2({
|
|
|
5926
5974
|
return "";
|
|
5927
5975
|
}, [name]);
|
|
5928
5976
|
const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
|
|
5929
|
-
return /* @__PURE__ */ (0,
|
|
5977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
5930
5978
|
width: numberSize,
|
|
5931
5979
|
height: numberSize,
|
|
5932
5980
|
fontSize: Math.ceil(numberSize / 2),
|
|
@@ -5935,7 +5983,7 @@ function AlphaAvatar2({
|
|
|
5935
5983
|
}
|
|
5936
5984
|
|
|
5937
5985
|
// src/ui/Radio/index.tsx
|
|
5938
|
-
var
|
|
5986
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
5939
5987
|
function Radio({
|
|
5940
5988
|
checked = false,
|
|
5941
5989
|
onChange,
|
|
@@ -5944,20 +5992,20 @@ function Radio({
|
|
|
5944
5992
|
className = "",
|
|
5945
5993
|
style = {}
|
|
5946
5994
|
}) {
|
|
5947
|
-
return /* @__PURE__ */ (0,
|
|
5995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
|
|
5948
5996
|
width: size,
|
|
5949
5997
|
height: size,
|
|
5950
5998
|
...style,
|
|
5951
5999
|
// @ts-ignore
|
|
5952
6000
|
"--matchid-radio-checked": color
|
|
5953
|
-
}, children: checked && /* @__PURE__ */ (0,
|
|
6001
|
+
}, children: checked && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: `matchid-radio-content`, style: {
|
|
5954
6002
|
width: Math.floor(size * 0.7),
|
|
5955
6003
|
height: Math.floor(size * 0.7)
|
|
5956
6004
|
} }) });
|
|
5957
6005
|
}
|
|
5958
6006
|
|
|
5959
6007
|
// src/ui/Skeleton/index.tsx
|
|
5960
|
-
var
|
|
6008
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
5961
6009
|
var Skeleton = ({
|
|
5962
6010
|
style = {},
|
|
5963
6011
|
className = "",
|
|
@@ -5968,7 +6016,7 @@ var Skeleton = ({
|
|
|
5968
6016
|
children
|
|
5969
6017
|
}) => {
|
|
5970
6018
|
if (!loading) {
|
|
5971
|
-
return /* @__PURE__ */ (0,
|
|
6019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_jsx_runtime90.Fragment, { children });
|
|
5972
6020
|
}
|
|
5973
6021
|
const skeletonStyle = {
|
|
5974
6022
|
width,
|
|
@@ -5976,7 +6024,7 @@ var Skeleton = ({
|
|
|
5976
6024
|
borderRadius: radius,
|
|
5977
6025
|
...style
|
|
5978
6026
|
};
|
|
5979
|
-
return /* @__PURE__ */ (0,
|
|
6027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
5980
6028
|
"div",
|
|
5981
6029
|
{
|
|
5982
6030
|
className: "matchid-skeleton " + className,
|
|
@@ -5987,10 +6035,10 @@ var Skeleton = ({
|
|
|
5987
6035
|
var Skeleton_default = Skeleton;
|
|
5988
6036
|
|
|
5989
6037
|
// src/ui/Tabs/index.tsx
|
|
5990
|
-
var
|
|
6038
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
5991
6039
|
function Tabs(props) {
|
|
5992
|
-
return /* @__PURE__ */ (0,
|
|
5993
|
-
return /* @__PURE__ */ (0,
|
|
6040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-tabs`, children: props.tabs.map((tab, index) => {
|
|
6041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { onClick: () => props.setActiveTab(index), className: `matchid-tab ${props.activeTab === index ? "matchid-tab-active" : ""}`, children: tab }, index);
|
|
5994
6042
|
}) });
|
|
5995
6043
|
}
|
|
5996
6044
|
|
|
@@ -6008,16 +6056,16 @@ var LazyLottie = (props) => {
|
|
|
6008
6056
|
var Lottie_default = LazyLottie;
|
|
6009
6057
|
|
|
6010
6058
|
// src/ui/Checkbox/index.tsx
|
|
6011
|
-
var
|
|
6059
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
6012
6060
|
function Checkbox({
|
|
6013
6061
|
checked = false,
|
|
6014
6062
|
onChange
|
|
6015
6063
|
}) {
|
|
6016
|
-
return checked ? /* @__PURE__ */ (0,
|
|
6064
|
+
return checked ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(CheckboxCheckedIcon, { onClick: () => onChange?.(false) }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(CheckboxIcon, { onClick: () => onChange?.(true) });
|
|
6017
6065
|
}
|
|
6018
6066
|
|
|
6019
6067
|
// src/context/ModalContext.tsx
|
|
6020
|
-
var
|
|
6068
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
6021
6069
|
var ModalContext = (0, import_react30.createContext)(null);
|
|
6022
6070
|
function ModalProvider({ children }) {
|
|
6023
6071
|
const [modalState, setModalState] = (0, import_react30.useState)({
|
|
@@ -6061,7 +6109,7 @@ function ModalProvider({ children }) {
|
|
|
6061
6109
|
index: modalIndex,
|
|
6062
6110
|
zIndex: newZIndex,
|
|
6063
6111
|
close: () => closeModal(modalIndex),
|
|
6064
|
-
content: ({ close, zIndex }) => /* @__PURE__ */ (0,
|
|
6112
|
+
content: ({ close, zIndex }) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ModalDrawer, { showClose: true, isOpen: true, onClose: close, title: props.title, zIndex, onBack: props.onBack, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(props.content, { close, zIndex }) })
|
|
6065
6113
|
}],
|
|
6066
6114
|
highestZIndex: newZIndex
|
|
6067
6115
|
};
|
|
@@ -6069,11 +6117,11 @@ function ModalProvider({ children }) {
|
|
|
6069
6117
|
}, [getNextIndex, closeModal]);
|
|
6070
6118
|
const modalElements = modalState.modals.map(
|
|
6071
6119
|
(modal) => modal.visible ? (0, import_react_dom.createPortal)(
|
|
6072
|
-
/* @__PURE__ */ (0,
|
|
6120
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(modal.content, { zIndex: modal.zIndex, close: modal.close }, modal.index),
|
|
6073
6121
|
document.body
|
|
6074
6122
|
) : null
|
|
6075
6123
|
);
|
|
6076
|
-
return /* @__PURE__ */ (0,
|
|
6124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(ModalContext.Provider, { value: { show, open }, children: [
|
|
6077
6125
|
children,
|
|
6078
6126
|
modalElements
|
|
6079
6127
|
] });
|
|
@@ -6117,7 +6165,7 @@ var useTransactionStore = (0, import_zustand5.create)((0, import_middleware3.dev
|
|
|
6117
6165
|
var useTransactionStore_default = useTransactionStore;
|
|
6118
6166
|
|
|
6119
6167
|
// src/hooks/useWallet.tsx
|
|
6120
|
-
var
|
|
6168
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
6121
6169
|
var AppClientId = "react-sdk-" + getVersion();
|
|
6122
6170
|
function useWallet() {
|
|
6123
6171
|
const { address, wallet: walletConfig } = useLocalStore_default();
|
|
@@ -6291,12 +6339,12 @@ function useWallet() {
|
|
|
6291
6339
|
address: evmAccount.address
|
|
6292
6340
|
});
|
|
6293
6341
|
modal.show((props) => {
|
|
6294
|
-
return /* @__PURE__ */ (0,
|
|
6342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
|
|
6295
6343
|
});
|
|
6296
6344
|
return txHash;
|
|
6297
6345
|
} catch (error) {
|
|
6298
6346
|
modal.show((props) => {
|
|
6299
|
-
return /* @__PURE__ */ (0,
|
|
6347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, error: typeof error == "string" ? error : error.details || error.message, chain: _chain });
|
|
6300
6348
|
});
|
|
6301
6349
|
throw error;
|
|
6302
6350
|
}
|
|
@@ -6374,7 +6422,7 @@ function useCopyClipboard(timeout = 500) {
|
|
|
6374
6422
|
// src/context/ToastContext.tsx
|
|
6375
6423
|
var import_react33 = require("react");
|
|
6376
6424
|
var import_react_dom2 = require("react-dom");
|
|
6377
|
-
var
|
|
6425
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
6378
6426
|
var ToastContext = (0, import_react33.createContext)(null);
|
|
6379
6427
|
function ToastProvider({ children, zIndex = 299 }) {
|
|
6380
6428
|
const [toasts, setToasts] = (0, import_react33.useState)([]);
|
|
@@ -6387,28 +6435,28 @@ function ToastProvider({ children, zIndex = 299 }) {
|
|
|
6387
6435
|
setTimeout(() => removeToast(id), timeout);
|
|
6388
6436
|
}, [removeToast]);
|
|
6389
6437
|
const success = (0, import_react33.useCallback)((text, timeout) => {
|
|
6390
|
-
show({ icon: /* @__PURE__ */ (0,
|
|
6438
|
+
show({ icon: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(CheckRoundIcon, { color: "#2FCC00", size: 24 }), text, timeout });
|
|
6391
6439
|
}, [show]);
|
|
6392
6440
|
const error = (0, import_react33.useCallback)((text, timeout) => {
|
|
6393
|
-
show({ icon: /* @__PURE__ */ (0,
|
|
6441
|
+
show({ icon: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ErrorRoundIcon, { size: 24 }), text, timeout });
|
|
6394
6442
|
}, [show]);
|
|
6395
6443
|
const ToastComponent = (0, import_react_dom2.createPortal)(
|
|
6396
|
-
/* @__PURE__ */ (0,
|
|
6444
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "matchid-toast-box", style: {
|
|
6397
6445
|
zIndex
|
|
6398
|
-
}, children: toasts.reverse().map(({ id, icon, text }) => /* @__PURE__ */ (0,
|
|
6446
|
+
}, children: toasts.reverse().map(({ id, icon, text }) => /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
6399
6447
|
"div",
|
|
6400
6448
|
{
|
|
6401
6449
|
className: "matchid-toast",
|
|
6402
6450
|
children: [
|
|
6403
|
-
icon && /* @__PURE__ */ (0,
|
|
6404
|
-
/* @__PURE__ */ (0,
|
|
6451
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { children: icon }),
|
|
6452
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { children: text })
|
|
6405
6453
|
]
|
|
6406
6454
|
},
|
|
6407
6455
|
id
|
|
6408
6456
|
)) }),
|
|
6409
6457
|
document.body
|
|
6410
6458
|
);
|
|
6411
|
-
return /* @__PURE__ */ (0,
|
|
6459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(ToastContext.Provider, { value: { show, success, error }, children: [
|
|
6412
6460
|
children,
|
|
6413
6461
|
ToastComponent
|
|
6414
6462
|
] });
|
|
@@ -6553,7 +6601,7 @@ function useWalletAssetListQuery({
|
|
|
6553
6601
|
var import_react34 = require("react");
|
|
6554
6602
|
var import_viem10 = require("viem");
|
|
6555
6603
|
var import_react_intl19 = require("react-intl");
|
|
6556
|
-
var
|
|
6604
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
6557
6605
|
function useMatchChain() {
|
|
6558
6606
|
const chainListQuery = useChainListQuery();
|
|
6559
6607
|
const modal = useModal();
|
|
@@ -6584,28 +6632,28 @@ function useMatchChain() {
|
|
|
6584
6632
|
const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
|
|
6585
6633
|
const [selectedChainId, setSelectedChainId] = (0, import_react34.useState)(storeChainId2);
|
|
6586
6634
|
const isDownMd = useDownMd();
|
|
6587
|
-
return /* @__PURE__ */ (0,
|
|
6588
|
-
/* @__PURE__ */ (0,
|
|
6589
|
-
return /* @__PURE__ */ (0,
|
|
6635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-change-network-box`, children: [
|
|
6636
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
|
|
6637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
6590
6638
|
"div",
|
|
6591
6639
|
{
|
|
6592
6640
|
onClick: () => setSelectedChainId(item.id),
|
|
6593
6641
|
className: `matchid-change-network-item ${selectedChainId == item.id ? "matchid-change-network-selected" : ""}`,
|
|
6594
6642
|
children: [
|
|
6595
|
-
/* @__PURE__ */ (0,
|
|
6596
|
-
/* @__PURE__ */ (0,
|
|
6597
|
-
/* @__PURE__ */ (0,
|
|
6643
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
|
|
6644
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
|
|
6645
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
|
|
6598
6646
|
] }),
|
|
6599
|
-
/* @__PURE__ */ (0,
|
|
6647
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
|
|
6600
6648
|
]
|
|
6601
6649
|
},
|
|
6602
6650
|
index
|
|
6603
6651
|
);
|
|
6604
6652
|
}) }),
|
|
6605
|
-
/* @__PURE__ */ (0,
|
|
6653
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
|
|
6606
6654
|
setChainId2(selectedChainId || 0);
|
|
6607
6655
|
close();
|
|
6608
|
-
}, block: true, children: /* @__PURE__ */ (0,
|
|
6656
|
+
}, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl19.FormattedMessage, { id: "confirm" }) })
|
|
6609
6657
|
] });
|
|
6610
6658
|
}
|
|
6611
6659
|
const showChangeNetwork = () => {
|
|
@@ -6678,7 +6726,7 @@ function useIsContract({
|
|
|
6678
6726
|
}
|
|
6679
6727
|
|
|
6680
6728
|
// src/components/ImportToken/index.tsx
|
|
6681
|
-
var
|
|
6729
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
6682
6730
|
function ImportToken({ close }) {
|
|
6683
6731
|
const [status, setStatus] = (0, import_react35.useState)("");
|
|
6684
6732
|
const { token } = useUserInfo();
|
|
@@ -6789,22 +6837,22 @@ function ImportToken({ close }) {
|
|
|
6789
6837
|
enabled: canImport
|
|
6790
6838
|
});
|
|
6791
6839
|
if (status == "success" || status == "fail") {
|
|
6792
|
-
return /* @__PURE__ */ (0,
|
|
6793
|
-
/* @__PURE__ */ (0,
|
|
6794
|
-
/* @__PURE__ */ (0,
|
|
6840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: `matchid-import-token-result matchid-flex`, children: [
|
|
6841
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: `matchid-import-token-result-box matchid-flex`, children: [
|
|
6842
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: `matchid-import-token-result-img`, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Lottie_default, { animationData: status == "success" ? success_default : fail_default, style: {
|
|
6795
6843
|
width: "96px",
|
|
6796
6844
|
height: "96px"
|
|
6797
6845
|
} }) }),
|
|
6798
|
-
/* @__PURE__ */ (0,
|
|
6846
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: `matchid-import-token-result-text matchid-import-token-result-text-${status}`, children: status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_intl20.FormattedMessage, { id: "importSuccess" }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_intl20.FormattedMessage, { id: "importFail" }) })
|
|
6799
6847
|
] }),
|
|
6800
|
-
status == "success" ? /* @__PURE__ */ (0,
|
|
6848
|
+
status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Button, { size: "lg", onClick: close, block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_intl20.FormattedMessage, { id: "close" }) }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Button, { size: "lg", onClick: () => setStatus(""), block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_intl20.FormattedMessage, { id: "back" }) })
|
|
6801
6849
|
] });
|
|
6802
6850
|
}
|
|
6803
|
-
return /* @__PURE__ */ (0,
|
|
6804
|
-
/* @__PURE__ */ (0,
|
|
6805
|
-
/* @__PURE__ */ (0,
|
|
6851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: `matchid-import-token`, children: [
|
|
6852
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "matchid-import-token-form", children: [
|
|
6853
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Field, { label: intl.formatMessage({
|
|
6806
6854
|
id: "tokenSmartContract"
|
|
6807
|
-
}), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0,
|
|
6855
|
+
}), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
6808
6856
|
Input,
|
|
6809
6857
|
{
|
|
6810
6858
|
placeholder: intl.formatMessage({
|
|
@@ -6815,9 +6863,9 @@ function ImportToken({ close }) {
|
|
|
6815
6863
|
maxLength: 42
|
|
6816
6864
|
}
|
|
6817
6865
|
) }),
|
|
6818
|
-
/* @__PURE__ */ (0,
|
|
6866
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Field, { label: intl.formatMessage({
|
|
6819
6867
|
id: "tokenSymbol"
|
|
6820
|
-
}), error: error.symbol, children: /* @__PURE__ */ (0,
|
|
6868
|
+
}), error: error.symbol, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
6821
6869
|
Input,
|
|
6822
6870
|
{
|
|
6823
6871
|
placeholder: intl.formatMessage({
|
|
@@ -6828,9 +6876,9 @@ function ImportToken({ close }) {
|
|
|
6828
6876
|
maxLength: 16
|
|
6829
6877
|
}
|
|
6830
6878
|
) }),
|
|
6831
|
-
/* @__PURE__ */ (0,
|
|
6879
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Field, { label: intl.formatMessage({
|
|
6832
6880
|
id: "tokenDecimals"
|
|
6833
|
-
}), error: error.decimals, children: /* @__PURE__ */ (0,
|
|
6881
|
+
}), error: error.decimals, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
6834
6882
|
Input,
|
|
6835
6883
|
{
|
|
6836
6884
|
placeholder: intl.formatMessage({
|
|
@@ -6842,7 +6890,7 @@ function ImportToken({ close }) {
|
|
|
6842
6890
|
}
|
|
6843
6891
|
) })
|
|
6844
6892
|
] }),
|
|
6845
|
-
/* @__PURE__ */ (0,
|
|
6893
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
6846
6894
|
Button,
|
|
6847
6895
|
{
|
|
6848
6896
|
size: "lg",
|
|
@@ -6851,14 +6899,14 @@ function ImportToken({ close }) {
|
|
|
6851
6899
|
loading: loading || isContractQuery.isLoading,
|
|
6852
6900
|
disabled: !canImport || !isContractQuery.data,
|
|
6853
6901
|
highlight: true,
|
|
6854
|
-
children: /* @__PURE__ */ (0,
|
|
6902
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_intl20.FormattedMessage, { id: "import" })
|
|
6855
6903
|
}
|
|
6856
6904
|
)
|
|
6857
6905
|
] });
|
|
6858
6906
|
}
|
|
6859
6907
|
|
|
6860
6908
|
// src/hooks/useMatchWallet.tsx
|
|
6861
|
-
var
|
|
6909
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
6862
6910
|
var ReceiveModal = () => {
|
|
6863
6911
|
const chain = useMatchChain();
|
|
6864
6912
|
const { address } = useWallet();
|
|
@@ -6872,10 +6920,10 @@ var ReceiveModal = () => {
|
|
|
6872
6920
|
}));
|
|
6873
6921
|
};
|
|
6874
6922
|
const chainLink = chain.explorerLink("address/" + address);
|
|
6875
|
-
return /* @__PURE__ */ (0,
|
|
6876
|
-
/* @__PURE__ */ (0,
|
|
6877
|
-
/* @__PURE__ */ (0,
|
|
6878
|
-
/* @__PURE__ */ (0,
|
|
6923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-receive-modal`, children: [
|
|
6924
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "matchid-receive-container", children: [
|
|
6925
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl21.FormattedMessage, { id: "receiveQrcode" }) }),
|
|
6926
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-qr-container`, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
6879
6927
|
import_react_qrcode.QRCode,
|
|
6880
6928
|
{
|
|
6881
6929
|
margin: "0",
|
|
@@ -6883,7 +6931,7 @@ var ReceiveModal = () => {
|
|
|
6883
6931
|
value: address
|
|
6884
6932
|
}
|
|
6885
6933
|
) }),
|
|
6886
|
-
/* @__PURE__ */ (0,
|
|
6934
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
6887
6935
|
"a",
|
|
6888
6936
|
{
|
|
6889
6937
|
href: chainLink,
|
|
@@ -6893,7 +6941,7 @@ var ReceiveModal = () => {
|
|
|
6893
6941
|
}
|
|
6894
6942
|
)
|
|
6895
6943
|
] }),
|
|
6896
|
-
/* @__PURE__ */ (0,
|
|
6944
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Button, { size: "lg", onClick: onCopy, block: true, highlight: true, disabled: copied, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
6897
6945
|
import_react_intl21.FormattedMessage,
|
|
6898
6946
|
{
|
|
6899
6947
|
id: "copyAddress"
|
|
@@ -7517,7 +7565,7 @@ function useTransaction({
|
|
|
7517
7565
|
// src/components/CEXBindModal/index.tsx
|
|
7518
7566
|
var import_react39 = require("react");
|
|
7519
7567
|
var import_react_intl22 = require("react-intl");
|
|
7520
|
-
var
|
|
7568
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
7521
7569
|
function CEXBindModal({
|
|
7522
7570
|
onClose,
|
|
7523
7571
|
type,
|
|
@@ -7572,20 +7620,20 @@ function CEXBindModal({
|
|
|
7572
7620
|
setLoading(false);
|
|
7573
7621
|
}
|
|
7574
7622
|
};
|
|
7575
|
-
return /* @__PURE__ */ (0,
|
|
7623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ModalWithHeader, { showClose: true, isOpen, onClose, title: intl.formatMessage({
|
|
7576
7624
|
id: "CEXBindTitle"
|
|
7577
7625
|
}, {
|
|
7578
7626
|
type
|
|
7579
|
-
}), ...props, children: /* @__PURE__ */ (0,
|
|
7580
|
-
/* @__PURE__ */ (0,
|
|
7581
|
-
/* @__PURE__ */ (0,
|
|
7582
|
-
/* @__PURE__ */ (0,
|
|
7583
|
-
/* @__PURE__ */ (0,
|
|
7584
|
-
/* @__PURE__ */ (0,
|
|
7627
|
+
}), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "matchid-cex-modal", children: [
|
|
7628
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { children: [
|
|
7629
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindAttention" }) }),
|
|
7630
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips1" }) }),
|
|
7631
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips2" }) }),
|
|
7632
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips3" }) })
|
|
7585
7633
|
] }),
|
|
7586
|
-
/* @__PURE__ */ (0,
|
|
7634
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Field, { label: intl.formatMessage({
|
|
7587
7635
|
id: "CEXBindApiKey"
|
|
7588
|
-
}), children: /* @__PURE__ */ (0,
|
|
7636
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
7589
7637
|
Input,
|
|
7590
7638
|
{
|
|
7591
7639
|
value: key,
|
|
@@ -7593,9 +7641,9 @@ function CEXBindModal({
|
|
|
7593
7641
|
placeholder: "**** **** ****"
|
|
7594
7642
|
}
|
|
7595
7643
|
) }),
|
|
7596
|
-
/* @__PURE__ */ (0,
|
|
7644
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Field, { label: intl.formatMessage({
|
|
7597
7645
|
id: "CEXBindApiSecretKey"
|
|
7598
|
-
}), error: !needPassphrase && error, children: /* @__PURE__ */ (0,
|
|
7646
|
+
}), error: !needPassphrase && error, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
7599
7647
|
Input,
|
|
7600
7648
|
{
|
|
7601
7649
|
value: secret,
|
|
@@ -7603,9 +7651,9 @@ function CEXBindModal({
|
|
|
7603
7651
|
placeholder: "**** **** ****"
|
|
7604
7652
|
}
|
|
7605
7653
|
) }),
|
|
7606
|
-
needPassphrase && /* @__PURE__ */ (0,
|
|
7654
|
+
needPassphrase && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Field, { error, label: intl.formatMessage({
|
|
7607
7655
|
id: "CEXBindApiPassphrase"
|
|
7608
|
-
}), children: /* @__PURE__ */ (0,
|
|
7656
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
7609
7657
|
Input,
|
|
7610
7658
|
{
|
|
7611
7659
|
value: APIPassphrase,
|
|
@@ -7613,7 +7661,7 @@ function CEXBindModal({
|
|
|
7613
7661
|
placeholder: "**** **** ****"
|
|
7614
7662
|
}
|
|
7615
7663
|
) }),
|
|
7616
|
-
/* @__PURE__ */ (0,
|
|
7664
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
7617
7665
|
Button,
|
|
7618
7666
|
{
|
|
7619
7667
|
onClick: SubmitApi,
|
|
@@ -7621,7 +7669,7 @@ function CEXBindModal({
|
|
|
7621
7669
|
block: true,
|
|
7622
7670
|
loading,
|
|
7623
7671
|
disabled: !key || !secret,
|
|
7624
|
-
children: /* @__PURE__ */ (0,
|
|
7672
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl22.FormattedMessage, { id: "continue" })
|
|
7625
7673
|
}
|
|
7626
7674
|
)
|
|
7627
7675
|
] }) });
|
|
@@ -7629,7 +7677,7 @@ function CEXBindModal({
|
|
|
7629
7677
|
|
|
7630
7678
|
// src/context/BusinessProvider.tsx
|
|
7631
7679
|
var import_react_query9 = require("@tanstack/react-query");
|
|
7632
|
-
var
|
|
7680
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
7633
7681
|
function BusinessProvider({ children }) {
|
|
7634
7682
|
const { overview, token } = useUserInfo();
|
|
7635
7683
|
const { type: EVMType, isOpen: EVMIsOpen, close: EVMClose } = useEVMModalStore();
|
|
@@ -7663,8 +7711,8 @@ function BusinessProvider({ children }) {
|
|
|
7663
7711
|
enabled: !!tgAppAuthCode,
|
|
7664
7712
|
refetchInterval: 1e3 * 5
|
|
7665
7713
|
});
|
|
7666
|
-
return /* @__PURE__ */ (0,
|
|
7667
|
-
/* @__PURE__ */ (0,
|
|
7714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_jsx_runtime100.Fragment, { children: [
|
|
7715
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
7668
7716
|
EVMModal,
|
|
7669
7717
|
{
|
|
7670
7718
|
isOpen: EVMIsOpen && (EVMType == "login" && !overview && !token || EVMType == "bind" && !!token && !!overview),
|
|
@@ -7674,7 +7722,7 @@ function BusinessProvider({ children }) {
|
|
|
7674
7722
|
zIndex: 199
|
|
7675
7723
|
}
|
|
7676
7724
|
),
|
|
7677
|
-
/* @__PURE__ */ (0,
|
|
7725
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
7678
7726
|
TRONModal,
|
|
7679
7727
|
{
|
|
7680
7728
|
isOpen: TRONIsOpen && (TRONType == "login" && !overview && !token || TRONType == "bind" && !!token && !!overview),
|
|
@@ -7684,7 +7732,7 @@ function BusinessProvider({ children }) {
|
|
|
7684
7732
|
zIndex: 199
|
|
7685
7733
|
}
|
|
7686
7734
|
),
|
|
7687
|
-
/* @__PURE__ */ (0,
|
|
7735
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
7688
7736
|
TONModal,
|
|
7689
7737
|
{
|
|
7690
7738
|
isOpen: TONIsOpen && (TONType == "login" && !overview && !token || TONType == "bind" && !!token && !!overview),
|
|
@@ -7694,7 +7742,7 @@ function BusinessProvider({ children }) {
|
|
|
7694
7742
|
zIndex: 199
|
|
7695
7743
|
}
|
|
7696
7744
|
),
|
|
7697
|
-
/* @__PURE__ */ (0,
|
|
7745
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
7698
7746
|
BTCModal,
|
|
7699
7747
|
{
|
|
7700
7748
|
isOpen: BTCIsOpen && (BTCType == "login" && !overview && !token || BTCType == "bind" && !!token && !!overview),
|
|
@@ -7704,7 +7752,7 @@ function BusinessProvider({ children }) {
|
|
|
7704
7752
|
zIndex: 199
|
|
7705
7753
|
}
|
|
7706
7754
|
),
|
|
7707
|
-
/* @__PURE__ */ (0,
|
|
7755
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
7708
7756
|
CEXBindModal,
|
|
7709
7757
|
{
|
|
7710
7758
|
isOpen: CEXIsOpen && (!!token && !!overview),
|
|
@@ -7713,7 +7761,7 @@ function BusinessProvider({ children }) {
|
|
|
7713
7761
|
zIndex: 199
|
|
7714
7762
|
}
|
|
7715
7763
|
),
|
|
7716
|
-
/* @__PURE__ */ (0,
|
|
7764
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
7717
7765
|
WalletModal,
|
|
7718
7766
|
{
|
|
7719
7767
|
isOpen: WalletModalStore.isOpen && (WalletModalStore.type == "login" && !overview && !token || WalletModalStore.type == "bind" && !!token && !!overview),
|
|
@@ -7728,9 +7776,9 @@ function BusinessProvider({ children }) {
|
|
|
7728
7776
|
}
|
|
7729
7777
|
|
|
7730
7778
|
// src/context/index.tsx
|
|
7731
|
-
var
|
|
7779
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
7732
7780
|
var Providers = ({ children }) => {
|
|
7733
|
-
return /* @__PURE__ */ (0,
|
|
7781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(ModalProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(BusinessProvider, { children }) }) });
|
|
7734
7782
|
};
|
|
7735
7783
|
var context_default = Providers;
|
|
7736
7784
|
|
|
@@ -8992,7 +9040,7 @@ var matchTest = /* @__PURE__ */ (0, import_viem17.defineChain)({
|
|
|
8992
9040
|
|
|
8993
9041
|
// src/MatchContext.tsx
|
|
8994
9042
|
var import_wagmi3 = require("wagmi");
|
|
8995
|
-
var
|
|
9043
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
8996
9044
|
var queryClient = new import_react_query10.QueryClient();
|
|
8997
9045
|
var wagmiConfig = (0, import_rainbowkit2.getDefaultConfig)({
|
|
8998
9046
|
appName: "MatchID",
|
|
@@ -9031,7 +9079,7 @@ var MatchProvider = ({
|
|
|
9031
9079
|
useWalletInit({
|
|
9032
9080
|
config: wallet
|
|
9033
9081
|
});
|
|
9034
|
-
return /* @__PURE__ */ (0,
|
|
9082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_intl23.IntlProvider, { locale: realLocale, messages: messages[realLocale], children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_wagmi3.WagmiProvider, { config: wagmiConfig, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_query10.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
9035
9083
|
MatchContext.Provider,
|
|
9036
9084
|
{
|
|
9037
9085
|
value: {
|
|
@@ -9042,7 +9090,7 @@ var MatchProvider = ({
|
|
|
9042
9090
|
theme,
|
|
9043
9091
|
locale: realLocale
|
|
9044
9092
|
},
|
|
9045
|
-
children: /* @__PURE__ */ (0,
|
|
9093
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(context_default, { children })
|
|
9046
9094
|
}
|
|
9047
9095
|
) }) }) });
|
|
9048
9096
|
};
|