@matchain/matchid-sdk-react 0.1.55-alpha.9 → 0.1.55
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 +11 -12
- package/dist/api.js.map +1 -1
- package/dist/api.mjs +2 -2
- package/dist/assets/lottie.d.mts +1 -1
- package/dist/assets/lottie.d.ts +1 -1
- package/dist/chains.d.mts +1 -1
- package/dist/chains.d.ts +1 -1
- package/dist/{chunk-GCIXXSIH.mjs → chunk-6PWLEXC3.mjs} +2 -2
- package/dist/{chunk-2T4RY5BM.mjs → chunk-PAXASLBR.mjs} +282 -274
- package/dist/chunk-PAXASLBR.mjs.map +1 -0
- package/dist/components.d.mts +3 -3
- package/dist/components.d.ts +3 -3
- package/dist/components.js +295 -287
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +1 -1
- package/dist/hooks.d.mts +4 -2
- package/dist/hooks.d.ts +4 -2
- package/dist/hooks.js +103 -100
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/icon.d.mts +2 -2
- package/dist/icon.d.ts +2 -2
- package/dist/{index-Bx7ztInz.d.ts → index-4dZbgWG2.d.ts} +1 -1
- package/dist/{index-DXRGMAbv.d.mts → index-B50DU_xT.d.mts} +4 -4
- package/dist/{index-DXRGMAbv.d.ts → index-B50DU_xT.d.ts} +4 -4
- package/dist/{index-D6wTVWuu.d.mts → index-BKSGbw7b.d.mts} +3 -3
- package/dist/{index-DL0LMDQ0.d.mts → index-BXbfmVoU.d.mts} +2 -2
- package/dist/{index-BTO2pJRz.d.ts → index-BtjgRcNJ.d.ts} +3 -3
- package/dist/{index-DY5CjOq2.d.ts → index-C82WIWvx.d.ts} +5 -5
- package/dist/{index-DysgDUCb.d.mts → index-CDTTHSh0.d.mts} +14 -14
- package/dist/{index-DysgDUCb.d.ts → index-CDTTHSh0.d.ts} +14 -14
- package/dist/{index-BjdOd1te.d.mts → index-CHG4-0Z1.d.mts} +987 -981
- package/dist/{index-8h2kA48e.d.ts → index-CsUEaGtM.d.ts} +2 -2
- package/dist/{index-CopoHLm5.d.ts → index-CwHXzvvB.d.ts} +1 -1
- package/dist/{index-DueNjDv_.d.ts → index-D1Ep9UMx.d.ts} +987 -981
- package/dist/{index-HYPgwvkU.d.mts → index-D7E317WV.d.mts} +5 -5
- package/dist/{index-B-u8_Lcy.d.ts → index-DK7l3lsH.d.ts} +13 -11
- package/dist/{index-BW1GRpQ3.d.mts → index-FKxw4Vaa.d.mts} +1 -1
- package/dist/{index-D2hhRO2j.d.mts → index-TjbO7d74.d.mts} +1 -1
- package/dist/{index-Ba8t2zs6.d.mts → index-YPRyEYt6.d.mts} +13 -11
- package/dist/index.d.mts +20 -20
- package/dist/index.d.ts +20 -20
- package/dist/index.js +99 -91
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{types-Ch54HuTY.d.mts → types-DEsY_CPH.d.mts} +1 -1
- package/dist/{types-Ch54HuTY.d.ts → types-DEsY_CPH.d.ts} +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/ui.d.mts +3 -4
- package/dist/ui.d.ts +3 -4
- package/dist/ui.js +13 -10
- package/dist/ui.js.map +1 -1
- package/dist/ui.mjs +3 -3
- package/package.json +2 -3
- package/dist/chunk-2T4RY5BM.mjs.map +0 -1
- /package/dist/{chunk-GCIXXSIH.mjs.map → chunk-6PWLEXC3.mjs.map} +0 -0
package/dist/components.js
CHANGED
|
@@ -2146,7 +2146,7 @@ function HashPanel({
|
|
|
2146
2146
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: `matchid-hashpanel-status`, style: {
|
|
2147
2147
|
color: statusValue.color
|
|
2148
2148
|
}, children: statusValue.text }),
|
|
2149
|
-
statusValue.lottie ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2149
|
+
statusValue.lottie ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Lottie_default, { animationData: statusValue.lottie, style: {
|
|
2150
2150
|
width: "96px",
|
|
2151
2151
|
height: "96px"
|
|
2152
2152
|
} }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("img", { src: statusValue.icon, alt: statusValue.text, className: `matchid-hashpanel-img` }),
|
|
@@ -2255,17 +2255,20 @@ var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
|
2255
2255
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2256
2256
|
|
|
2257
2257
|
// src/ui/Lottie/index.tsx
|
|
2258
|
-
var import_lottie_react =
|
|
2259
|
-
var
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
}
|
|
2258
|
+
var import_lottie_react = require("lottie-react");
|
|
2259
|
+
var LazyLottie = (props) => {
|
|
2260
|
+
const options = {
|
|
2261
|
+
animationData: props.animationData,
|
|
2262
|
+
loop: true,
|
|
2263
|
+
autoplay: true
|
|
2264
|
+
};
|
|
2265
|
+
const { View } = (0, import_lottie_react.useLottie)(options, props.style);
|
|
2266
|
+
return View;
|
|
2267
|
+
};
|
|
2268
|
+
var Lottie_default = LazyLottie;
|
|
2266
2269
|
|
|
2267
2270
|
// src/context/ModalContext.tsx
|
|
2268
|
-
var
|
|
2271
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2269
2272
|
var ModalContext = (0, import_react10.createContext)(null);
|
|
2270
2273
|
function useModal() {
|
|
2271
2274
|
const context = (0, import_react10.useContext)(ModalContext);
|
|
@@ -2306,7 +2309,7 @@ var useTransactionStore = (0, import_zustand3.create)((0, import_middleware2.dev
|
|
|
2306
2309
|
var useTransactionStore_default = useTransactionStore;
|
|
2307
2310
|
|
|
2308
2311
|
// src/hooks/useWallet.tsx
|
|
2309
|
-
var
|
|
2312
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2310
2313
|
var AppClientId = "react-sdk-" + getVersion();
|
|
2311
2314
|
function useWallet() {
|
|
2312
2315
|
const { address, wallet: walletConfig } = useLocalStore_default();
|
|
@@ -2480,12 +2483,12 @@ function useWallet() {
|
|
|
2480
2483
|
address: evmAccount.address
|
|
2481
2484
|
});
|
|
2482
2485
|
modal.show((props) => {
|
|
2483
|
-
return /* @__PURE__ */ (0,
|
|
2486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
|
|
2484
2487
|
});
|
|
2485
2488
|
return txHash;
|
|
2486
2489
|
} catch (error) {
|
|
2487
2490
|
modal.show((props) => {
|
|
2488
|
-
return /* @__PURE__ */ (0,
|
|
2491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, error: typeof error == "string" ? error : error.details || error.message, chain: _chain });
|
|
2489
2492
|
});
|
|
2490
2493
|
throw error;
|
|
2491
2494
|
}
|
|
@@ -2563,7 +2566,7 @@ function useCopyClipboard(timeout = 500) {
|
|
|
2563
2566
|
// src/context/ToastContext.tsx
|
|
2564
2567
|
var import_react13 = require("react");
|
|
2565
2568
|
var import_react_dom2 = require("react-dom");
|
|
2566
|
-
var
|
|
2569
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2567
2570
|
var ToastContext = (0, import_react13.createContext)(null);
|
|
2568
2571
|
|
|
2569
2572
|
// src/hooks/api/wallet.ts
|
|
@@ -2625,7 +2628,7 @@ function useImportTokenListQuery({
|
|
|
2625
2628
|
var import_react14 = require("react");
|
|
2626
2629
|
var import_viem5 = require("viem");
|
|
2627
2630
|
var import_react_intl3 = require("react-intl");
|
|
2628
|
-
var
|
|
2631
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2629
2632
|
function useMatchChain() {
|
|
2630
2633
|
const chainListQuery = useChainListQuery();
|
|
2631
2634
|
const modal = useModal();
|
|
@@ -2656,28 +2659,28 @@ function useMatchChain() {
|
|
|
2656
2659
|
const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
|
|
2657
2660
|
const [selectedChainId, setSelectedChainId] = (0, import_react14.useState)(storeChainId2);
|
|
2658
2661
|
const isDownMd = useDownMd();
|
|
2659
|
-
return /* @__PURE__ */ (0,
|
|
2660
|
-
/* @__PURE__ */ (0,
|
|
2661
|
-
return /* @__PURE__ */ (0,
|
|
2662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: `matchid-change-network-box`, children: [
|
|
2663
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
|
|
2664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
2662
2665
|
"div",
|
|
2663
2666
|
{
|
|
2664
2667
|
onClick: () => setSelectedChainId(item.id),
|
|
2665
2668
|
className: `matchid-change-network-item ${selectedChainId == item.id ? "matchid-change-network-selected" : ""}`,
|
|
2666
2669
|
children: [
|
|
2667
|
-
/* @__PURE__ */ (0,
|
|
2668
|
-
/* @__PURE__ */ (0,
|
|
2669
|
-
/* @__PURE__ */ (0,
|
|
2670
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
|
|
2671
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
|
|
2672
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
|
|
2670
2673
|
] }),
|
|
2671
|
-
/* @__PURE__ */ (0,
|
|
2674
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
|
|
2672
2675
|
]
|
|
2673
2676
|
},
|
|
2674
2677
|
index
|
|
2675
2678
|
);
|
|
2676
2679
|
}) }),
|
|
2677
|
-
/* @__PURE__ */ (0,
|
|
2680
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
|
|
2678
2681
|
setChainId2(selectedChainId || 0);
|
|
2679
2682
|
close();
|
|
2680
|
-
}, block: true, children: /* @__PURE__ */ (0,
|
|
2683
|
+
}, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react_intl3.FormattedMessage, { id: "confirm" }) })
|
|
2681
2684
|
] });
|
|
2682
2685
|
}
|
|
2683
2686
|
const showChangeNetwork = () => {
|
|
@@ -2795,10 +2798,10 @@ var import_viem6 = require("viem");
|
|
|
2795
2798
|
var import_react_query3 = require("@tanstack/react-query");
|
|
2796
2799
|
|
|
2797
2800
|
// src/components/ImportToken/index.tsx
|
|
2798
|
-
var
|
|
2801
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
2799
2802
|
|
|
2800
2803
|
// src/hooks/useMatchWallet.tsx
|
|
2801
|
-
var
|
|
2804
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
2802
2805
|
function useMatchWalletRecords() {
|
|
2803
2806
|
const [hasMore, setHasMore] = (0, import_react16.useState)(true);
|
|
2804
2807
|
const [items, setItems] = (0, import_react16.useState)([]);
|
|
@@ -3107,39 +3110,39 @@ var CACHE_TTL2 = 86400 * 30 * 1e3;
|
|
|
3107
3110
|
var import_zustand5 = require("zustand");
|
|
3108
3111
|
|
|
3109
3112
|
// src/hooks/useConfig.tsx
|
|
3110
|
-
var
|
|
3113
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3111
3114
|
var DEFAULT_WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
3112
3115
|
var WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
3113
3116
|
function useWalletConfig() {
|
|
3114
3117
|
const isDownMd = useDownMd();
|
|
3115
3118
|
const walletMap = {
|
|
3116
3119
|
evm: {
|
|
3117
|
-
icon: /* @__PURE__ */ (0,
|
|
3118
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3120
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(EVMDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3121
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(EVMLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3119
3122
|
name: "EVM",
|
|
3120
3123
|
method: "evm"
|
|
3121
3124
|
},
|
|
3122
3125
|
sol: {
|
|
3123
|
-
icon: /* @__PURE__ */ (0,
|
|
3124
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3126
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(SOLDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3127
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(SOLLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3125
3128
|
name: "SOL",
|
|
3126
3129
|
method: "sol"
|
|
3127
3130
|
},
|
|
3128
3131
|
btc: {
|
|
3129
|
-
icon: /* @__PURE__ */ (0,
|
|
3130
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3132
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(BTCDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3133
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(BTCLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3131
3134
|
name: "BTC",
|
|
3132
3135
|
method: "btc"
|
|
3133
3136
|
},
|
|
3134
3137
|
tron: {
|
|
3135
|
-
icon: /* @__PURE__ */ (0,
|
|
3136
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3138
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TRXDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3139
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TRXLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3137
3140
|
name: "TRON",
|
|
3138
3141
|
method: "tron"
|
|
3139
3142
|
},
|
|
3140
3143
|
ton: {
|
|
3141
|
-
icon: /* @__PURE__ */ (0,
|
|
3142
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3144
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TonLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3145
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TonLightIcon2, { size: isDownMd ? 36 : 40 }),
|
|
3143
3146
|
name: "TON",
|
|
3144
3147
|
method: "ton"
|
|
3145
3148
|
}
|
|
@@ -3191,14 +3194,14 @@ var useWalletModalStore = (0, import_zustand5.create)((set) => ({
|
|
|
3191
3194
|
// src/components/CEXBindModal/index.tsx
|
|
3192
3195
|
var import_react19 = require("react");
|
|
3193
3196
|
var import_react_intl6 = require("react-intl");
|
|
3194
|
-
var
|
|
3197
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3195
3198
|
|
|
3196
3199
|
// src/context/BusinessProvider.tsx
|
|
3197
3200
|
var import_react_query8 = require("@tanstack/react-query");
|
|
3198
|
-
var
|
|
3201
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
3199
3202
|
|
|
3200
3203
|
// src/context/index.tsx
|
|
3201
|
-
var
|
|
3204
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
3202
3205
|
|
|
3203
3206
|
// src/hooks/useWalletInit.ts
|
|
3204
3207
|
var import_react20 = require("react");
|
|
@@ -3278,7 +3281,7 @@ var matchTest = /* @__PURE__ */ (0, import_viem12.defineChain)({
|
|
|
3278
3281
|
|
|
3279
3282
|
// src/MatchContext.tsx
|
|
3280
3283
|
var import_wagmi = require("wagmi");
|
|
3281
|
-
var
|
|
3284
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
3282
3285
|
var queryClient = new import_react_query9.QueryClient();
|
|
3283
3286
|
var wagmiConfig = (0, import_rainbowkit.getDefaultConfig)({
|
|
3284
3287
|
appName: "MatchID",
|
|
@@ -3606,7 +3609,7 @@ function useUserInfo() {
|
|
|
3606
3609
|
// src/components/EmailModal/StepVerify.tsx
|
|
3607
3610
|
var import_react24 = require("react");
|
|
3608
3611
|
var import_react_intl8 = require("react-intl");
|
|
3609
|
-
var
|
|
3612
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
3610
3613
|
function StepVerify(props) {
|
|
3611
3614
|
const intl = (0, import_react_intl8.useIntl)();
|
|
3612
3615
|
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
@@ -3683,17 +3686,17 @@ function StepVerify(props) {
|
|
|
3683
3686
|
setSubmitting(false);
|
|
3684
3687
|
}
|
|
3685
3688
|
};
|
|
3686
|
-
return /* @__PURE__ */ (0,
|
|
3687
|
-
/* @__PURE__ */ (0,
|
|
3688
|
-
/* @__PURE__ */ (0,
|
|
3689
|
-
/* @__PURE__ */ (0,
|
|
3690
|
-
/* @__PURE__ */ (0,
|
|
3691
|
-
/* @__PURE__ */ (0,
|
|
3689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-email-verify-box", children: [
|
|
3690
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-email-verify-header", children: [
|
|
3691
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
|
|
3692
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-email-verify-header-content", children: [
|
|
3693
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-email-verify-header-value", children: props.email }),
|
|
3694
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react_intl8.FormattedMessage, { id: "sendEmailTips" }) })
|
|
3692
3695
|
] })
|
|
3693
3696
|
] }),
|
|
3694
|
-
/* @__PURE__ */ (0,
|
|
3697
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Field, { label: intl.formatMessage({
|
|
3695
3698
|
id: "verificationCode"
|
|
3696
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
3699
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
3697
3700
|
Input,
|
|
3698
3701
|
{
|
|
3699
3702
|
placeholder: intl.formatMessage({
|
|
@@ -3703,7 +3706,7 @@ function StepVerify(props) {
|
|
|
3703
3706
|
maxLength: codeLength,
|
|
3704
3707
|
onChange: (e) => setCode(e.target.value),
|
|
3705
3708
|
value: code,
|
|
3706
|
-
after: /* @__PURE__ */ (0,
|
|
3709
|
+
after: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
3707
3710
|
Button,
|
|
3708
3711
|
{
|
|
3709
3712
|
highlight: true,
|
|
@@ -3722,13 +3725,13 @@ function StepVerify(props) {
|
|
|
3722
3725
|
)
|
|
3723
3726
|
}
|
|
3724
3727
|
) }),
|
|
3725
|
-
/* @__PURE__ */ (0,
|
|
3728
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Button, { disabled: !canContinue, loading: submitting, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react_intl8.FormattedMessage, { id: "continue" }) })
|
|
3726
3729
|
] });
|
|
3727
3730
|
}
|
|
3728
3731
|
|
|
3729
3732
|
// src/components/EmailModal/index.tsx
|
|
3730
3733
|
var import_react_intl9 = require("react-intl");
|
|
3731
|
-
var
|
|
3734
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
3732
3735
|
function EmailModal({
|
|
3733
3736
|
isOpen = false,
|
|
3734
3737
|
width = 480,
|
|
@@ -3745,7 +3748,7 @@ function EmailModal({
|
|
|
3745
3748
|
setEmailVal("");
|
|
3746
3749
|
}
|
|
3747
3750
|
}, [isOpen]);
|
|
3748
|
-
return /* @__PURE__ */ (0,
|
|
3751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
3749
3752
|
ModalWithHeader,
|
|
3750
3753
|
{
|
|
3751
3754
|
isOpen,
|
|
@@ -3755,10 +3758,10 @@ function EmailModal({
|
|
|
3755
3758
|
id: "email"
|
|
3756
3759
|
}),
|
|
3757
3760
|
onBack: step == "verify" ? () => setStep("input") : onBack,
|
|
3758
|
-
children: step === "input" ? /* @__PURE__ */ (0,
|
|
3761
|
+
children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
|
|
3759
3762
|
setEmailVal(email);
|
|
3760
3763
|
setStep("verify");
|
|
3761
|
-
} }) : /* @__PURE__ */ (0,
|
|
3764
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(StepVerify, { email: emailVal, onSuccess: onLogin })
|
|
3762
3765
|
}
|
|
3763
3766
|
);
|
|
3764
3767
|
}
|
|
@@ -3788,7 +3791,7 @@ function useAppConfig() {
|
|
|
3788
3791
|
}
|
|
3789
3792
|
|
|
3790
3793
|
// src/components/LoginBox/index.tsx
|
|
3791
|
-
var
|
|
3794
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3792
3795
|
var RecommendItem = ({
|
|
3793
3796
|
icon,
|
|
3794
3797
|
name,
|
|
@@ -3797,20 +3800,20 @@ var RecommendItem = ({
|
|
|
3797
3800
|
children,
|
|
3798
3801
|
footer
|
|
3799
3802
|
}) => {
|
|
3800
|
-
return /* @__PURE__ */ (0,
|
|
3801
|
-
/* @__PURE__ */ (0,
|
|
3802
|
-
/* @__PURE__ */ (0,
|
|
3803
|
-
/* @__PURE__ */ (0,
|
|
3804
|
-
/* @__PURE__ */ (0,
|
|
3803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-recommend-method", children: [
|
|
3804
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-recommend-method-item", onClick, children: [
|
|
3805
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-recommend-method-content", children: [
|
|
3806
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-recommend-method-icon", children: icon }),
|
|
3807
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "matchid-login-recommend-method-name", children: name })
|
|
3805
3808
|
] }),
|
|
3806
|
-
footer ? footer : children ? /* @__PURE__ */ (0,
|
|
3809
|
+
footer ? footer : children ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3807
3810
|
ArrowDownIcon,
|
|
3808
3811
|
{
|
|
3809
3812
|
className: `matchid-login-recommend-method-arrow ${showChildren ? "matchid-login-recommend-method-arrow-active" : ""}`,
|
|
3810
3813
|
size: 20,
|
|
3811
3814
|
color: "var(--matchid-arrow-color)"
|
|
3812
3815
|
}
|
|
3813
|
-
) : /* @__PURE__ */ (0,
|
|
3816
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3814
3817
|
ArrowRightIcon,
|
|
3815
3818
|
{
|
|
3816
3819
|
className: "matchid-login-recommend-method-arrow",
|
|
@@ -3819,7 +3822,7 @@ var RecommendItem = ({
|
|
|
3819
3822
|
}
|
|
3820
3823
|
)
|
|
3821
3824
|
] }),
|
|
3822
|
-
children && /* @__PURE__ */ (0,
|
|
3825
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3823
3826
|
"div",
|
|
3824
3827
|
{
|
|
3825
3828
|
className: `matchid-login-recommend-method-popover ${showChildren ? "matchid-login-recommend-method-popover-active" : ""}`,
|
|
@@ -3884,75 +3887,75 @@ function LoginBox({
|
|
|
3884
3887
|
const isDownMd = useDownMd();
|
|
3885
3888
|
const methodMap = {
|
|
3886
3889
|
wallet: {
|
|
3887
|
-
icon: /* @__PURE__ */ (0,
|
|
3890
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(WalletIcon, { size: isDownMd ? 36 : 40 }),
|
|
3888
3891
|
name: intl.formatMessage({ id: "wallet" }),
|
|
3889
3892
|
onClick: () => setShowWallet(!showWallet),
|
|
3890
3893
|
type: "wallet"
|
|
3891
3894
|
},
|
|
3892
3895
|
email: {
|
|
3893
|
-
icon: /* @__PURE__ */ (0,
|
|
3896
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
|
|
3894
3897
|
name: intl.formatMessage({ id: "email" }),
|
|
3895
3898
|
onClick: () => {
|
|
3896
3899
|
setEmailOpen(true);
|
|
3897
3900
|
}
|
|
3898
3901
|
},
|
|
3899
3902
|
google: {
|
|
3900
|
-
icon: /* @__PURE__ */ (0,
|
|
3903
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(GoogleIcon, { size: isDownMd ? 36 : 40 }),
|
|
3901
3904
|
name: "Google",
|
|
3902
3905
|
onClick: () => login("google")
|
|
3903
3906
|
},
|
|
3904
3907
|
twitter: {
|
|
3905
|
-
icon: /* @__PURE__ */ (0,
|
|
3908
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(XIcon, { size: isDownMd ? 36 : 40 }),
|
|
3906
3909
|
name: "X",
|
|
3907
3910
|
onClick: () => login("twitter")
|
|
3908
3911
|
},
|
|
3909
3912
|
telegram: {
|
|
3910
|
-
icon: /* @__PURE__ */ (0,
|
|
3913
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TelegramIcon, { size: isDownMd ? 36 : 40 }),
|
|
3911
3914
|
name: "Telegram",
|
|
3912
3915
|
onClick: () => login("telegram")
|
|
3913
3916
|
},
|
|
3914
3917
|
github: {
|
|
3915
|
-
icon: /* @__PURE__ */ (0,
|
|
3918
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(GithubIcon, { size: isDownMd ? 36 : 40 }),
|
|
3916
3919
|
name: "Github",
|
|
3917
3920
|
onClick: () => login("github")
|
|
3918
3921
|
},
|
|
3919
3922
|
discord: {
|
|
3920
|
-
icon: /* @__PURE__ */ (0,
|
|
3923
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(DiscordIcon, { size: isDownMd ? 36 : 40 }),
|
|
3921
3924
|
name: "Discord",
|
|
3922
3925
|
onClick: () => login("discord")
|
|
3923
3926
|
},
|
|
3924
3927
|
linkedin: {
|
|
3925
|
-
icon: /* @__PURE__ */ (0,
|
|
3928
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
|
|
3926
3929
|
name: "LinkedIn",
|
|
3927
3930
|
onClick: () => login("linkedin")
|
|
3928
3931
|
},
|
|
3929
3932
|
facebook: {
|
|
3930
|
-
icon: /* @__PURE__ */ (0,
|
|
3933
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(FacebookIcon, { size: isDownMd ? 36 : 40 }),
|
|
3931
3934
|
name: "Facebook",
|
|
3932
3935
|
onClick: () => login("facebook")
|
|
3933
3936
|
},
|
|
3934
3937
|
youtube: {
|
|
3935
|
-
icon: /* @__PURE__ */ (0,
|
|
3938
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
|
|
3936
3939
|
name: "Youtube",
|
|
3937
3940
|
onClick: () => login("youtube")
|
|
3938
3941
|
}
|
|
3939
3942
|
};
|
|
3940
3943
|
const { walletMap } = useWalletConfig();
|
|
3941
|
-
return /* @__PURE__ */ (0,
|
|
3942
|
-
(!inModal || !emailOpen) && /* @__PURE__ */ (0,
|
|
3943
|
-
/* @__PURE__ */ (0,
|
|
3944
|
-
return /* @__PURE__ */ (0,
|
|
3944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
|
|
3945
|
+
(!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-box", children: [
|
|
3946
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
|
|
3947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3945
3948
|
RecommendItem,
|
|
3946
3949
|
{
|
|
3947
3950
|
icon: methodMap[m]?.icon,
|
|
3948
3951
|
name: methodMap[m]?.name,
|
|
3949
3952
|
onClick: methodMap[m]?.onClick,
|
|
3950
3953
|
showChildren: m == "wallet" && showWallet,
|
|
3951
|
-
children: m == "wallet" && /* @__PURE__ */ (0,
|
|
3952
|
-
/* @__PURE__ */ (0,
|
|
3953
|
-
/* @__PURE__ */ (0,
|
|
3954
|
+
children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
|
|
3955
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
|
|
3956
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
|
|
3954
3957
|
const m2 = walletMap[n];
|
|
3955
|
-
return /* @__PURE__ */ (0,
|
|
3958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
3956
3959
|
"div",
|
|
3957
3960
|
{
|
|
3958
3961
|
className: "matchid-login-recommend-wallet-item",
|
|
@@ -3960,16 +3963,16 @@ function LoginBox({
|
|
|
3960
3963
|
login(m2.method);
|
|
3961
3964
|
},
|
|
3962
3965
|
children: [
|
|
3963
|
-
/* @__PURE__ */ (0,
|
|
3964
|
-
/* @__PURE__ */ (0,
|
|
3965
|
-
/* @__PURE__ */ (0,
|
|
3966
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
|
|
3967
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
|
|
3968
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3966
3969
|
"div",
|
|
3967
3970
|
{
|
|
3968
3971
|
className: "matchid-login-recommend-wallet-item-hover-icon",
|
|
3969
3972
|
children: m2.activeIcon
|
|
3970
3973
|
}
|
|
3971
3974
|
),
|
|
3972
|
-
/* @__PURE__ */ (0,
|
|
3975
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3973
3976
|
"span",
|
|
3974
3977
|
{
|
|
3975
3978
|
className: "matchid-login-recommend-wallet-item-name",
|
|
@@ -3977,7 +3980,7 @@ function LoginBox({
|
|
|
3977
3980
|
}
|
|
3978
3981
|
)
|
|
3979
3982
|
] }),
|
|
3980
|
-
/* @__PURE__ */ (0,
|
|
3983
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3981
3984
|
ArrowRightIcon,
|
|
3982
3985
|
{
|
|
3983
3986
|
className: "matchid-login-recommend-wallet-item-arrow",
|
|
@@ -3995,10 +3998,10 @@ function LoginBox({
|
|
|
3995
3998
|
m
|
|
3996
3999
|
);
|
|
3997
4000
|
}) }),
|
|
3998
|
-
methodConfig.methods.length > 0 && /* @__PURE__ */ (0,
|
|
3999
|
-
/* @__PURE__ */ (0,
|
|
4000
|
-
/* @__PURE__ */ (0,
|
|
4001
|
-
return /* @__PURE__ */ (0,
|
|
4001
|
+
methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-other", children: [
|
|
4002
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl10.FormattedMessage, { id: "otherLoginMethods" }) }),
|
|
4003
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
4004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4002
4005
|
"div",
|
|
4003
4006
|
{
|
|
4004
4007
|
className: "matchid-login-method-item",
|
|
@@ -4011,7 +4014,7 @@ function LoginBox({
|
|
|
4011
4014
|
}) })
|
|
4012
4015
|
] })
|
|
4013
4016
|
] }),
|
|
4014
|
-
/* @__PURE__ */ (0,
|
|
4017
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4015
4018
|
EmailModal,
|
|
4016
4019
|
{
|
|
4017
4020
|
isOpen: emailOpen,
|
|
@@ -4031,40 +4034,40 @@ var import_react28 = require("react");
|
|
|
4031
4034
|
|
|
4032
4035
|
// src/components/LoginPanel/index.tsx
|
|
4033
4036
|
var import_react_intl11 = require("react-intl");
|
|
4034
|
-
var
|
|
4037
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
4035
4038
|
function LoginPanel({
|
|
4036
4039
|
header,
|
|
4037
4040
|
onClose,
|
|
4038
4041
|
...props
|
|
4039
4042
|
}) {
|
|
4040
4043
|
const isDownMd = useDownMd();
|
|
4041
|
-
return /* @__PURE__ */ (0,
|
|
4042
|
-
header ? header : /* @__PURE__ */ (0,
|
|
4043
|
-
/* @__PURE__ */ (0,
|
|
4044
|
-
/* @__PURE__ */ (0,
|
|
4045
|
-
/* @__PURE__ */ (0,
|
|
4044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-login-panel", children: [
|
|
4045
|
+
header ? header : /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-login-panel-header", children: [
|
|
4046
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-login-panel-header-content", children: [
|
|
4047
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl11.FormattedMessage, { id: "loginTitle" }) }),
|
|
4048
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl11.FormattedMessage, { id: "loginTips" }) })
|
|
4046
4049
|
] }),
|
|
4047
|
-
onClose && /* @__PURE__ */ (0,
|
|
4050
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
|
|
4048
4051
|
] }),
|
|
4049
|
-
/* @__PURE__ */ (0,
|
|
4050
|
-
/* @__PURE__ */ (0,
|
|
4052
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-login-panel-divide" }),
|
|
4053
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(LoginBox, { ...props }) })
|
|
4051
4054
|
] });
|
|
4052
4055
|
}
|
|
4053
4056
|
|
|
4054
4057
|
// src/components/LoginModal/index.tsx
|
|
4055
|
-
var
|
|
4058
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
4056
4059
|
function LoginModal({
|
|
4057
4060
|
isOpen = false,
|
|
4058
4061
|
width = 480,
|
|
4059
4062
|
...props
|
|
4060
4063
|
}) {
|
|
4061
4064
|
const { isLogin } = useUserInfo();
|
|
4062
|
-
return /* @__PURE__ */ (0,
|
|
4065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4063
4066
|
Modal,
|
|
4064
4067
|
{
|
|
4065
4068
|
isOpen: isOpen && !isLogin,
|
|
4066
4069
|
width,
|
|
4067
|
-
children: /* @__PURE__ */ (0,
|
|
4070
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(LoginPanel, { ...props, inModal: true })
|
|
4068
4071
|
}
|
|
4069
4072
|
);
|
|
4070
4073
|
}
|
|
@@ -4073,10 +4076,10 @@ function LoginModal({
|
|
|
4073
4076
|
var import_react27 = require("react");
|
|
4074
4077
|
|
|
4075
4078
|
// src/assets/icon/ProfileIcon.tsx
|
|
4076
|
-
var
|
|
4079
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
4077
4080
|
function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
4078
|
-
return /* @__PURE__ */ (0,
|
|
4079
|
-
/* @__PURE__ */ (0,
|
|
4081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
4082
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
4080
4083
|
"path",
|
|
4081
4084
|
{
|
|
4082
4085
|
fillRule: "evenodd",
|
|
@@ -4085,7 +4088,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
4085
4088
|
fill: color
|
|
4086
4089
|
}
|
|
4087
4090
|
),
|
|
4088
|
-
/* @__PURE__ */ (0,
|
|
4091
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
4089
4092
|
"path",
|
|
4090
4093
|
{
|
|
4091
4094
|
fillRule: "evenodd",
|
|
@@ -4099,7 +4102,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
4099
4102
|
|
|
4100
4103
|
// src/components/UserPopover/index.tsx
|
|
4101
4104
|
var import_react_intl12 = require("react-intl");
|
|
4102
|
-
var
|
|
4105
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
4103
4106
|
function UserContent() {
|
|
4104
4107
|
const { logout, address, username } = useUserInfo();
|
|
4105
4108
|
const [logouting, setLogouting] = (0, import_react27.useState)(false);
|
|
@@ -4120,34 +4123,34 @@ function UserContent() {
|
|
|
4120
4123
|
rightIcon,
|
|
4121
4124
|
onClick
|
|
4122
4125
|
}) => {
|
|
4123
|
-
return /* @__PURE__ */ (0,
|
|
4124
|
-
/* @__PURE__ */ (0,
|
|
4126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-user-popover-item", onClick, children: [
|
|
4127
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: `matchid-user-popover-item-content`, children: [
|
|
4125
4128
|
icon,
|
|
4126
|
-
/* @__PURE__ */ (0,
|
|
4129
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-user-popover-item-text", children })
|
|
4127
4130
|
] }),
|
|
4128
4131
|
rightIcon
|
|
4129
4132
|
] });
|
|
4130
4133
|
};
|
|
4131
4134
|
const UserDivider = () => {
|
|
4132
|
-
return /* @__PURE__ */ (0,
|
|
4135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: `matchid-user-popover-divider` });
|
|
4133
4136
|
};
|
|
4134
4137
|
const [usernameOpen, setUsernameOpen] = (0, import_react27.useState)(false);
|
|
4135
4138
|
const [copied, setCopied] = useCopyClipboard();
|
|
4136
4139
|
const intl = (0, import_react_intl12.useIntl)();
|
|
4137
|
-
return /* @__PURE__ */ (0,
|
|
4138
|
-
/* @__PURE__ */ (0,
|
|
4139
|
-
/* @__PURE__ */ (0,
|
|
4140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-user-popover-content", children: [
|
|
4141
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-user-popover-list", children: [
|
|
4142
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(UserItem, { onClick: () => {
|
|
4140
4143
|
setCopied(address);
|
|
4141
|
-
}, icon: copied ? /* @__PURE__ */ (0,
|
|
4142
|
-
/* @__PURE__ */ (0,
|
|
4143
|
-
/* @__PURE__ */ (0,
|
|
4144
|
+
}, icon: copied ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CheckIcon, { size: 20, color: "#0ecb81" }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CopyIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CheckIcon, { size: 20, color: "var(--icon-color)" }), children: truncateAddress(address) }),
|
|
4145
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(UserDivider, {}),
|
|
4146
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(UserItem, { onClick: () => {
|
|
4144
4147
|
setUsernameOpen(true);
|
|
4145
|
-
}, icon: /* @__PURE__ */ (0,
|
|
4148
|
+
}, icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ProfileIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ArrowRightIcon, { size: 20, color: "var(--icon-color)" }), children: username || intl.formatMessage({
|
|
4146
4149
|
id: "setUsername"
|
|
4147
4150
|
}) })
|
|
4148
4151
|
] }),
|
|
4149
|
-
/* @__PURE__ */ (0,
|
|
4150
|
-
/* @__PURE__ */ (0,
|
|
4152
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_intl12.FormattedMessage, { id: "disconnect" }) }),
|
|
4153
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(UsernameModal, { isOpen: usernameOpen, onClose: () => {
|
|
4151
4154
|
setUsernameOpen(false);
|
|
4152
4155
|
}, onSuccess: () => {
|
|
4153
4156
|
setUsernameOpen(false);
|
|
@@ -4158,12 +4161,12 @@ function UserPopover({
|
|
|
4158
4161
|
children,
|
|
4159
4162
|
...props
|
|
4160
4163
|
}) {
|
|
4161
|
-
return /* @__PURE__ */ (0,
|
|
4164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Popover, { ...props, content: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(UserContent, {}), children });
|
|
4162
4165
|
}
|
|
4163
4166
|
|
|
4164
4167
|
// src/components/LoginButton/index.tsx
|
|
4165
4168
|
var import_react_intl13 = require("react-intl");
|
|
4166
|
-
var
|
|
4169
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
4167
4170
|
function LoginButton({
|
|
4168
4171
|
loginRender,
|
|
4169
4172
|
methods,
|
|
@@ -4179,8 +4182,8 @@ function LoginButton({
|
|
|
4179
4182
|
const { isLogin, username } = useUserInfo();
|
|
4180
4183
|
const [loginOpen, setLoginOpen] = (0, import_react28.useState)(false);
|
|
4181
4184
|
if (!isLogin) {
|
|
4182
|
-
return /* @__PURE__ */ (0,
|
|
4183
|
-
/* @__PURE__ */ (0,
|
|
4185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
|
|
4186
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4184
4187
|
LoginModal,
|
|
4185
4188
|
{
|
|
4186
4189
|
methods,
|
|
@@ -4190,15 +4193,15 @@ function LoginButton({
|
|
|
4190
4193
|
onClose: () => setLoginOpen(false)
|
|
4191
4194
|
}
|
|
4192
4195
|
),
|
|
4193
|
-
/* @__PURE__ */ (0,
|
|
4194
|
-
/* @__PURE__ */ (0,
|
|
4195
|
-
/* @__PURE__ */ (0,
|
|
4196
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
|
|
4197
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(UnLoginIcon_default, {}),
|
|
4198
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl13.FormattedMessage, { id: "login" }) })
|
|
4196
4199
|
] })
|
|
4197
4200
|
] });
|
|
4198
4201
|
}
|
|
4199
|
-
return loginRender ? /* @__PURE__ */ (0,
|
|
4200
|
-
/* @__PURE__ */ (0,
|
|
4201
|
-
/* @__PURE__ */ (0,
|
|
4202
|
+
return loginRender ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_jsx_runtime85.Fragment, { children: loginRender }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(UserPopover, { position: popoverPosition, type: popoverType, gap: popoverGap, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(Button, { onClick: onLoginClick, className: "matchid-login-btn", ...props, children: [
|
|
4203
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(LoginIcon_default, {}),
|
|
4204
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: username ? truncateAddress(username) : "MatchID " + intl.formatMessage({
|
|
4202
4205
|
id: "user"
|
|
4203
4206
|
}) })
|
|
4204
4207
|
] }) });
|
|
@@ -4207,15 +4210,15 @@ function LoginButton({
|
|
|
4207
4210
|
// src/components/UsernameModal/index.tsx
|
|
4208
4211
|
var import_react29 = require("react");
|
|
4209
4212
|
var import_react_intl14 = require("react-intl");
|
|
4210
|
-
var
|
|
4213
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
4211
4214
|
var ValidItem = ({
|
|
4212
4215
|
success = false,
|
|
4213
4216
|
text
|
|
4214
4217
|
}) => {
|
|
4215
4218
|
const isDownMd = useDownMd();
|
|
4216
|
-
return /* @__PURE__ */ (0,
|
|
4217
|
-
success ? /* @__PURE__ */ (0,
|
|
4218
|
-
/* @__PURE__ */ (0,
|
|
4219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
|
|
4220
|
+
success ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
|
|
4221
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: text })
|
|
4219
4222
|
] });
|
|
4220
4223
|
};
|
|
4221
4224
|
function UsernameModal({
|
|
@@ -4263,12 +4266,12 @@ function UsernameModal({
|
|
|
4263
4266
|
}
|
|
4264
4267
|
};
|
|
4265
4268
|
const intl = (0, import_react_intl14.useIntl)();
|
|
4266
|
-
return /* @__PURE__ */ (0,
|
|
4269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
|
|
4267
4270
|
id: username ? "editUsernameTitle" : "setUsernameTitle"
|
|
4268
|
-
}), children: /* @__PURE__ */ (0,
|
|
4269
|
-
/* @__PURE__ */ (0,
|
|
4271
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-username-box", children: [
|
|
4272
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Field, { label: intl.formatMessage({
|
|
4270
4273
|
id: "username"
|
|
4271
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
4274
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
4272
4275
|
Input,
|
|
4273
4276
|
{
|
|
4274
4277
|
placeholder: intl.formatMessage({
|
|
@@ -4281,8 +4284,8 @@ function UsernameModal({
|
|
|
4281
4284
|
value: val
|
|
4282
4285
|
}
|
|
4283
4286
|
) }),
|
|
4284
|
-
/* @__PURE__ */ (0,
|
|
4285
|
-
/* @__PURE__ */ (0,
|
|
4287
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-valid", children: [
|
|
4288
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
4286
4289
|
ValidItem,
|
|
4287
4290
|
{
|
|
4288
4291
|
success: isValid,
|
|
@@ -4291,16 +4294,16 @@ function UsernameModal({
|
|
|
4291
4294
|
})
|
|
4292
4295
|
}
|
|
4293
4296
|
),
|
|
4294
|
-
/* @__PURE__ */ (0,
|
|
4297
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ValidItem, { success: isLength, text: intl.formatMessage({
|
|
4295
4298
|
id: "usernameLengthError"
|
|
4296
4299
|
}) })
|
|
4297
4300
|
] }),
|
|
4298
|
-
/* @__PURE__ */ (0,
|
|
4301
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Button, { disabled: !isSafe, loading: isSubmitting, style: {
|
|
4299
4302
|
marginTop: isDownMd ? "36px" : "64px"
|
|
4300
|
-
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
4301
|
-
/* @__PURE__ */ (0,
|
|
4303
|
+
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl14.FormattedMessage, { id: "confirm" }) }),
|
|
4304
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Button, { style: {
|
|
4302
4305
|
marginTop: isDownMd ? "12px" : "24px"
|
|
4303
|
-
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0,
|
|
4306
|
+
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl14.FormattedMessage, { id: "cancel" }) })
|
|
4304
4307
|
] }) });
|
|
4305
4308
|
}
|
|
4306
4309
|
|
|
@@ -4319,7 +4322,7 @@ var walletConnectImage = wallet_default;
|
|
|
4319
4322
|
var walletSigningImage = signing_default;
|
|
4320
4323
|
|
|
4321
4324
|
// src/components/WalletModalContent/index.tsx
|
|
4322
|
-
var
|
|
4325
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
4323
4326
|
function WalletModalContent({
|
|
4324
4327
|
status,
|
|
4325
4328
|
error,
|
|
@@ -4389,15 +4392,15 @@ function WalletModalContent({
|
|
|
4389
4392
|
statusImage: walletConnectImage
|
|
4390
4393
|
};
|
|
4391
4394
|
}, [visible, connected, status, error, address]);
|
|
4392
|
-
return /* @__PURE__ */ (0,
|
|
4393
|
-
/* @__PURE__ */ (0,
|
|
4394
|
-
/* @__PURE__ */ (0,
|
|
4395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
4396
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
4397
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
4395
4398
|
width: 128,
|
|
4396
4399
|
height: 128
|
|
4397
4400
|
} }),
|
|
4398
|
-
/* @__PURE__ */ (0,
|
|
4401
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: pageData.isError ? "matchid-error" : "", children: pageData.text })
|
|
4399
4402
|
] }),
|
|
4400
|
-
/* @__PURE__ */ (0,
|
|
4403
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4401
4404
|
Button,
|
|
4402
4405
|
{
|
|
4403
4406
|
block: true,
|
|
@@ -4473,15 +4476,15 @@ function WalletModalContentV2(props) {
|
|
|
4473
4476
|
statusImage: walletConnectImage
|
|
4474
4477
|
};
|
|
4475
4478
|
}, [props, submitting]);
|
|
4476
|
-
return /* @__PURE__ */ (0,
|
|
4477
|
-
/* @__PURE__ */ (0,
|
|
4478
|
-
/* @__PURE__ */ (0,
|
|
4479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
4480
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
4481
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
4479
4482
|
width: 128,
|
|
4480
4483
|
height: 128
|
|
4481
4484
|
} }),
|
|
4482
|
-
/* @__PURE__ */ (0,
|
|
4485
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: props.status == "error" ? "matchid-error" : "", children: pageData.text })
|
|
4483
4486
|
] }),
|
|
4484
|
-
/* @__PURE__ */ (0,
|
|
4487
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4485
4488
|
Button,
|
|
4486
4489
|
{
|
|
4487
4490
|
block: true,
|
|
@@ -4545,7 +4548,7 @@ var import_wagmi2 = require("wagmi");
|
|
|
4545
4548
|
var import_ethers = require("ethers");
|
|
4546
4549
|
|
|
4547
4550
|
// node_modules/@wagmi/core/dist/esm/version.js
|
|
4548
|
-
var version = "2.16.
|
|
4551
|
+
var version = "2.16.5";
|
|
4549
4552
|
|
|
4550
4553
|
// node_modules/@wagmi/core/dist/esm/utils/getVersion.js
|
|
4551
4554
|
var getVersion2 = () => `@wagmi/core@${version}`;
|
|
@@ -4696,7 +4699,11 @@ async function getConnectorClient(config, parameters = {}) {
|
|
|
4696
4699
|
if (config.state.status === "reconnecting" && !connector2.getAccounts && !connector2.getChainId)
|
|
4697
4700
|
throw new ConnectorUnavailableReconnectingError({ connector: connector2 });
|
|
4698
4701
|
const [accounts, chainId2] = await Promise.all([
|
|
4699
|
-
connector2.getAccounts()
|
|
4702
|
+
connector2.getAccounts().catch((e) => {
|
|
4703
|
+
if (parameters.account === null)
|
|
4704
|
+
return [];
|
|
4705
|
+
throw e;
|
|
4706
|
+
}),
|
|
4700
4707
|
connector2.getChainId()
|
|
4701
4708
|
]);
|
|
4702
4709
|
connection = {
|
|
@@ -4719,7 +4726,8 @@ async function getConnectorClient(config, parameters = {}) {
|
|
|
4719
4726
|
if (connector.getClient)
|
|
4720
4727
|
return connector.getClient({ chainId });
|
|
4721
4728
|
const account = (0, import_utils9.parseAccount)(parameters.account ?? connection.accounts[0]);
|
|
4722
|
-
|
|
4729
|
+
if (account)
|
|
4730
|
+
account.address = (0, import_utils9.getAddress)(account.address);
|
|
4723
4731
|
if (parameters.account && !connection.accounts.some((x) => x.toLowerCase() === account.address.toLowerCase()))
|
|
4724
4732
|
throw new ConnectorAccountNotFoundError({
|
|
4725
4733
|
address: account.address,
|
|
@@ -4758,7 +4766,7 @@ async function getEthersSigner(config, { chainId } = {}) {
|
|
|
4758
4766
|
// src/components/EVMModal/index.tsx
|
|
4759
4767
|
var import_siwe = require("siwe");
|
|
4760
4768
|
var import_styles = require("@rainbow-me/rainbowkit/styles.css");
|
|
4761
|
-
var
|
|
4769
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
4762
4770
|
function WalletContent({
|
|
4763
4771
|
onSuccess,
|
|
4764
4772
|
type
|
|
@@ -4916,7 +4924,7 @@ function WalletContent({
|
|
|
4916
4924
|
setNonce(void 0);
|
|
4917
4925
|
setStatus("start");
|
|
4918
4926
|
};
|
|
4919
|
-
return /* @__PURE__ */ (0,
|
|
4927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4920
4928
|
WalletModalContentV2,
|
|
4921
4929
|
{
|
|
4922
4930
|
status,
|
|
@@ -4934,14 +4942,14 @@ function EVMConnectModal({
|
|
|
4934
4942
|
...props
|
|
4935
4943
|
}) {
|
|
4936
4944
|
const intl = (0, import_react_intl15.useIntl)();
|
|
4937
|
-
return /* @__PURE__ */ (0,
|
|
4945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4938
4946
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4939
4947
|
}, {
|
|
4940
4948
|
name: "EVM"
|
|
4941
|
-
}), children: /* @__PURE__ */ (0,
|
|
4949
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(WalletContent, { onSuccess, type }) });
|
|
4942
4950
|
}
|
|
4943
4951
|
function EVMModal(props) {
|
|
4944
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
4952
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(EVMConnectModal, { ...props });
|
|
4945
4953
|
}
|
|
4946
4954
|
|
|
4947
4955
|
// src/components/TRONModal/index.tsx
|
|
@@ -5056,7 +5064,7 @@ var useTRONWallet = () => {
|
|
|
5056
5064
|
};
|
|
5057
5065
|
|
|
5058
5066
|
// src/components/TRONModal/index.tsx
|
|
5059
|
-
var
|
|
5067
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
5060
5068
|
function TRONConnectModal({
|
|
5061
5069
|
type = "login",
|
|
5062
5070
|
onSuccess,
|
|
@@ -5066,9 +5074,9 @@ function TRONConnectModal({
|
|
|
5066
5074
|
const intl = (0, import_react_intl16.useIntl)();
|
|
5067
5075
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
|
|
5068
5076
|
const iconMaps = {
|
|
5069
|
-
tronlink: /* @__PURE__ */ (0,
|
|
5070
|
-
bitget: /* @__PURE__ */ (0,
|
|
5071
|
-
okx: /* @__PURE__ */ (0,
|
|
5077
|
+
tronlink: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
|
|
5078
|
+
bitget: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(BitgetIcon, { size: isDownMd ? 36 : 40 }),
|
|
5079
|
+
okx: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(OKXIcon, { size: isDownMd ? 36 : 40 })
|
|
5072
5080
|
};
|
|
5073
5081
|
const { events, login } = useMatch();
|
|
5074
5082
|
const [status, setStatus] = (0, import_react34.useState)("");
|
|
@@ -5160,11 +5168,11 @@ function TRONConnectModal({
|
|
|
5160
5168
|
disconnect();
|
|
5161
5169
|
}
|
|
5162
5170
|
}, [props.isOpen]);
|
|
5163
|
-
return /* @__PURE__ */ (0,
|
|
5171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5164
5172
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5165
5173
|
}, {
|
|
5166
5174
|
name: "TRON"
|
|
5167
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5175
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
5168
5176
|
WalletModalContent,
|
|
5169
5177
|
{
|
|
5170
5178
|
error,
|
|
@@ -5177,9 +5185,9 @@ function TRONConnectModal({
|
|
|
5177
5185
|
setVisible: () => {
|
|
5178
5186
|
}
|
|
5179
5187
|
}
|
|
5180
|
-
) : /* @__PURE__ */ (0,
|
|
5188
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
5181
5189
|
installedWallets.map((wallet2) => {
|
|
5182
|
-
return /* @__PURE__ */ (0,
|
|
5190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
5183
5191
|
RecommendItem,
|
|
5184
5192
|
{
|
|
5185
5193
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -5192,14 +5200,14 @@ function TRONConnectModal({
|
|
|
5192
5200
|
);
|
|
5193
5201
|
}),
|
|
5194
5202
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
5195
|
-
return /* @__PURE__ */ (0,
|
|
5203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
5196
5204
|
RecommendItem,
|
|
5197
5205
|
{
|
|
5198
5206
|
icon: iconMaps[wallet2.walletKey],
|
|
5199
5207
|
name: wallet2.name,
|
|
5200
5208
|
onClick: () => {
|
|
5201
5209
|
},
|
|
5202
|
-
footer: /* @__PURE__ */ (0,
|
|
5210
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Button, { size: "sm", onClick: () => {
|
|
5203
5211
|
window.open(wallet2.website);
|
|
5204
5212
|
}, children: "Install" })
|
|
5205
5213
|
},
|
|
@@ -5209,14 +5217,14 @@ function TRONConnectModal({
|
|
|
5209
5217
|
] }) }) });
|
|
5210
5218
|
}
|
|
5211
5219
|
function TRONModal(props) {
|
|
5212
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5220
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(TRONConnectModal, { ...props, type: props.type });
|
|
5213
5221
|
}
|
|
5214
5222
|
|
|
5215
5223
|
// src/components/TONModal/index.tsx
|
|
5216
5224
|
var import_react35 = __toESM(require("react"));
|
|
5217
5225
|
var import_react_intl17 = require("react-intl");
|
|
5218
5226
|
var import_ui_react = require("@tonconnect/ui-react");
|
|
5219
|
-
var
|
|
5227
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
5220
5228
|
function WalletContent2({
|
|
5221
5229
|
onSuccess,
|
|
5222
5230
|
type
|
|
@@ -5343,7 +5351,7 @@ function WalletContent2({
|
|
|
5343
5351
|
}
|
|
5344
5352
|
}
|
|
5345
5353
|
}, [state]);
|
|
5346
|
-
return /* @__PURE__ */ (0,
|
|
5354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
5347
5355
|
WalletModalContent,
|
|
5348
5356
|
{
|
|
5349
5357
|
connected,
|
|
@@ -5377,20 +5385,20 @@ function TONConnectModal({
|
|
|
5377
5385
|
const intl = (0, import_react_intl17.useIntl)();
|
|
5378
5386
|
const { endpoints, appid } = useLocalStore_default();
|
|
5379
5387
|
const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
|
|
5380
|
-
return /* @__PURE__ */ (0,
|
|
5388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5381
5389
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5382
5390
|
}, {
|
|
5383
5391
|
name: "TON"
|
|
5384
|
-
}), children: /* @__PURE__ */ (0,
|
|
5392
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
5385
5393
|
import_ui_react.TonConnectUIProvider,
|
|
5386
5394
|
{
|
|
5387
5395
|
manifestUrl,
|
|
5388
|
-
children: /* @__PURE__ */ (0,
|
|
5396
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(WalletContent2, { onSuccess, type })
|
|
5389
5397
|
}
|
|
5390
5398
|
) });
|
|
5391
5399
|
}
|
|
5392
5400
|
function TONModal(props) {
|
|
5393
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5401
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(TONConnectModal, { ...props });
|
|
5394
5402
|
}
|
|
5395
5403
|
|
|
5396
5404
|
// src/components/BTCModal/index.tsx
|
|
@@ -5613,7 +5621,7 @@ var useBTCWallet = () => {
|
|
|
5613
5621
|
};
|
|
5614
5622
|
|
|
5615
5623
|
// src/components/BTCModal/index.tsx
|
|
5616
|
-
var
|
|
5624
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
5617
5625
|
function BTCConnectModal({
|
|
5618
5626
|
type = "login",
|
|
5619
5627
|
onSuccess,
|
|
@@ -5623,10 +5631,10 @@ function BTCConnectModal({
|
|
|
5623
5631
|
const intl = (0, import_react_intl18.useIntl)();
|
|
5624
5632
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
|
|
5625
5633
|
const iconMaps = {
|
|
5626
|
-
leather: /* @__PURE__ */ (0,
|
|
5627
|
-
unisat: /* @__PURE__ */ (0,
|
|
5628
|
-
xverse: /* @__PURE__ */ (0,
|
|
5629
|
-
phantom: /* @__PURE__ */ (0,
|
|
5634
|
+
leather: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(LeatherIcon, { size: isDownMd ? 36 : 40 }),
|
|
5635
|
+
unisat: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UnisatIcon, { size: isDownMd ? 36 : 40 }),
|
|
5636
|
+
xverse: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(XverseIcon, { size: isDownMd ? 36 : 40 }),
|
|
5637
|
+
phantom: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(PhantomIcon, { size: isDownMd ? 36 : 40 })
|
|
5630
5638
|
};
|
|
5631
5639
|
const { events, login } = useMatch();
|
|
5632
5640
|
const [status, setStatus] = (0, import_react37.useState)("");
|
|
@@ -5726,11 +5734,11 @@ function BTCConnectModal({
|
|
|
5726
5734
|
statusRef.current = "";
|
|
5727
5735
|
setError("");
|
|
5728
5736
|
};
|
|
5729
|
-
return /* @__PURE__ */ (0,
|
|
5737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5730
5738
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5731
5739
|
}, {
|
|
5732
5740
|
name: "BTC"
|
|
5733
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5741
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
5734
5742
|
WalletModalContent,
|
|
5735
5743
|
{
|
|
5736
5744
|
error,
|
|
@@ -5743,9 +5751,9 @@ function BTCConnectModal({
|
|
|
5743
5751
|
setVisible: () => {
|
|
5744
5752
|
}
|
|
5745
5753
|
}
|
|
5746
|
-
) : /* @__PURE__ */ (0,
|
|
5754
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
5747
5755
|
installedWallets.map((wallet2) => {
|
|
5748
|
-
return /* @__PURE__ */ (0,
|
|
5756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
5749
5757
|
RecommendItem,
|
|
5750
5758
|
{
|
|
5751
5759
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -5758,14 +5766,14 @@ function BTCConnectModal({
|
|
|
5758
5766
|
);
|
|
5759
5767
|
}),
|
|
5760
5768
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
5761
|
-
return /* @__PURE__ */ (0,
|
|
5769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
5762
5770
|
RecommendItem,
|
|
5763
5771
|
{
|
|
5764
5772
|
icon: iconMaps[wallet2.walletKey],
|
|
5765
5773
|
name: wallet2.name,
|
|
5766
5774
|
onClick: () => {
|
|
5767
5775
|
},
|
|
5768
|
-
footer: /* @__PURE__ */ (0,
|
|
5776
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Button, { size: "sm", onClick: () => {
|
|
5769
5777
|
window.open(wallet2.website);
|
|
5770
5778
|
}, children: "Install" })
|
|
5771
5779
|
},
|
|
@@ -5775,13 +5783,13 @@ function BTCConnectModal({
|
|
|
5775
5783
|
] }) }) });
|
|
5776
5784
|
}
|
|
5777
5785
|
function BTCModal(props) {
|
|
5778
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5786
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(BTCConnectModal, { ...props });
|
|
5779
5787
|
}
|
|
5780
5788
|
|
|
5781
5789
|
// src/components/WalletModal/index.tsx
|
|
5782
5790
|
var import_react38 = require("react");
|
|
5783
5791
|
var import_react_intl19 = require("react-intl");
|
|
5784
|
-
var
|
|
5792
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
5785
5793
|
function WalletConnectModal({
|
|
5786
5794
|
type,
|
|
5787
5795
|
methods: _methods,
|
|
@@ -5799,13 +5807,13 @@ function WalletConnectModal({
|
|
|
5799
5807
|
const platform = config.platform.map((p) => p.toLowerCase());
|
|
5800
5808
|
return WALLET_METHODS.filter((m) => platform.includes(m));
|
|
5801
5809
|
}, [config.platform, _methods]);
|
|
5802
|
-
return /* @__PURE__ */ (0,
|
|
5810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5803
5811
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5804
5812
|
}, {
|
|
5805
5813
|
name: ""
|
|
5806
|
-
}), children: /* @__PURE__ */ (0,
|
|
5814
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "matchid-login-recommend-list", children: methods.map((method, index) => {
|
|
5807
5815
|
const m = walletMap[method];
|
|
5808
|
-
return /* @__PURE__ */ (0,
|
|
5816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5809
5817
|
RecommendItem,
|
|
5810
5818
|
{
|
|
5811
5819
|
icon: m?.icon,
|
|
@@ -5819,12 +5827,12 @@ function WalletConnectModal({
|
|
|
5819
5827
|
}) }) }) });
|
|
5820
5828
|
}
|
|
5821
5829
|
function WalletModal(props) {
|
|
5822
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5830
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(WalletConnectModal, { ...props });
|
|
5823
5831
|
}
|
|
5824
5832
|
|
|
5825
5833
|
// src/components/AlphaAvatar/index.tsx
|
|
5826
5834
|
var import_react39 = require("react");
|
|
5827
|
-
var
|
|
5835
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
5828
5836
|
function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
5829
5837
|
const [avatar, setAvatar] = (0, import_react39.useState)(void 0);
|
|
5830
5838
|
(0, import_react39.useEffect)(() => {
|
|
@@ -5833,7 +5841,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
5833
5841
|
setAvatar(char);
|
|
5834
5842
|
}
|
|
5835
5843
|
}, [name]);
|
|
5836
|
-
return /* @__PURE__ */ (0,
|
|
5844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
5837
5845
|
width: size,
|
|
5838
5846
|
height: size,
|
|
5839
5847
|
fontSize: Math.ceil(size / 2)
|
|
@@ -5841,7 +5849,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
5841
5849
|
}
|
|
5842
5850
|
|
|
5843
5851
|
// src/components/WalletAsset/index.tsx
|
|
5844
|
-
var
|
|
5852
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
5845
5853
|
function WalletAsset({
|
|
5846
5854
|
onAssetClick,
|
|
5847
5855
|
matchWalletAssetsOptions
|
|
@@ -5851,7 +5859,7 @@ function WalletAsset({
|
|
|
5851
5859
|
list: walletAssets.mergedAssets
|
|
5852
5860
|
});
|
|
5853
5861
|
const { list } = useMatchChain();
|
|
5854
|
-
return /* @__PURE__ */ (0,
|
|
5862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5855
5863
|
const clickFunc = onAssetClick && onAssetClick(n);
|
|
5856
5864
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5857
5865
|
const getFooterColor = () => {
|
|
@@ -5866,11 +5874,11 @@ function WalletAsset({
|
|
|
5866
5874
|
}
|
|
5867
5875
|
return "";
|
|
5868
5876
|
};
|
|
5869
|
-
return /* @__PURE__ */ (0,
|
|
5877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-asset-item`, onClick: clickFunc, style: {
|
|
5870
5878
|
cursor: clickFunc ? "pointer" : "default"
|
|
5871
5879
|
}, children: [
|
|
5872
|
-
/* @__PURE__ */ (0,
|
|
5873
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
5880
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
|
|
5881
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-wallet-asset-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5874
5882
|
AlphaAvatar2,
|
|
5875
5883
|
{
|
|
5876
5884
|
className: `matchid-wallet-asset-icon`,
|
|
@@ -5878,12 +5886,12 @@ function WalletAsset({
|
|
|
5878
5886
|
name: n.symbol || n.name || ""
|
|
5879
5887
|
}
|
|
5880
5888
|
),
|
|
5881
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
5889
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
|
|
5882
5890
|
] }),
|
|
5883
|
-
/* @__PURE__ */ (0,
|
|
5884
|
-
/* @__PURE__ */ (0,
|
|
5885
|
-
"price" in n && /* @__PURE__ */ (0,
|
|
5886
|
-
/* @__PURE__ */ (0,
|
|
5891
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-asset-info`, children: [
|
|
5892
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
|
|
5893
|
+
"price" in n && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-asset-content`, children: [
|
|
5894
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5887
5895
|
NumberFormatter,
|
|
5888
5896
|
{
|
|
5889
5897
|
value: n.price,
|
|
@@ -5891,7 +5899,7 @@ function WalletAsset({
|
|
|
5891
5899
|
tFixNum: 2
|
|
5892
5900
|
}
|
|
5893
5901
|
) }),
|
|
5894
|
-
/* @__PURE__ */ (0,
|
|
5902
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5895
5903
|
NumberFormatter,
|
|
5896
5904
|
{
|
|
5897
5905
|
value: n.value,
|
|
@@ -5900,15 +5908,15 @@ function WalletAsset({
|
|
|
5900
5908
|
}
|
|
5901
5909
|
) })
|
|
5902
5910
|
] }),
|
|
5903
|
-
/* @__PURE__ */ (0,
|
|
5904
|
-
/* @__PURE__ */ (0,
|
|
5911
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-asset-footer`, children: [
|
|
5912
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5905
5913
|
NumberFormatter,
|
|
5906
5914
|
{
|
|
5907
5915
|
value: n.balance,
|
|
5908
5916
|
tFixNum: 3
|
|
5909
5917
|
}
|
|
5910
5918
|
) }),
|
|
5911
|
-
"price_change_24h" in n && /* @__PURE__ */ (0,
|
|
5919
|
+
"price_change_24h" in n && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-wallet-asset-change ${getFooterColor()}`, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5912
5920
|
NumberFormatter,
|
|
5913
5921
|
{
|
|
5914
5922
|
prefix: `${(n?.price_change_24h || 0) < 0 ? "-" : "+"} `,
|
|
@@ -5927,7 +5935,7 @@ function WalletAsset({
|
|
|
5927
5935
|
var import_react40 = require("react");
|
|
5928
5936
|
var import_viem15 = require("viem");
|
|
5929
5937
|
var import_react_intl20 = require("react-intl");
|
|
5930
|
-
var
|
|
5938
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
5931
5939
|
function Input2({
|
|
5932
5940
|
onChange,
|
|
5933
5941
|
placeholder,
|
|
@@ -5937,8 +5945,8 @@ function Input2({
|
|
|
5937
5945
|
error,
|
|
5938
5946
|
size = "df"
|
|
5939
5947
|
}) {
|
|
5940
|
-
return /* @__PURE__ */ (0,
|
|
5941
|
-
/* @__PURE__ */ (0,
|
|
5948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
|
|
5949
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5942
5950
|
"input",
|
|
5943
5951
|
{
|
|
5944
5952
|
placeholder,
|
|
@@ -5949,7 +5957,7 @@ function Input2({
|
|
|
5949
5957
|
className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
|
|
5950
5958
|
}
|
|
5951
5959
|
),
|
|
5952
|
-
error && /* @__PURE__ */ (0,
|
|
5960
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "matchid-token-input-error-text", children: error })
|
|
5953
5961
|
] });
|
|
5954
5962
|
}
|
|
5955
5963
|
function TokenSend({
|
|
@@ -6077,24 +6085,24 @@ function TokenSend({
|
|
|
6077
6085
|
window.removeEventListener("message", receiveMessage);
|
|
6078
6086
|
};
|
|
6079
6087
|
}, []);
|
|
6080
|
-
return /* @__PURE__ */ (0,
|
|
6081
|
-
/* @__PURE__ */ (0,
|
|
6082
|
-
/* @__PURE__ */ (0,
|
|
6083
|
-
/* @__PURE__ */ (0,
|
|
6084
|
-
/* @__PURE__ */ (0,
|
|
6085
|
-
/* @__PURE__ */ (0,
|
|
6086
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
6088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl20.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-send-box`, children: [
|
|
6089
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
6090
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-amount-content`, children: [
|
|
6091
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-amount-header`, children: [
|
|
6092
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl20.FormattedMessage, { id: "amount" }) }),
|
|
6093
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
|
|
6094
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
6087
6095
|
"img",
|
|
6088
6096
|
{
|
|
6089
6097
|
src: token?.icon,
|
|
6090
6098
|
alt: token?.symbol,
|
|
6091
6099
|
className: `matchid-token-amount-chain-icon`
|
|
6092
6100
|
}
|
|
6093
|
-
) : /* @__PURE__ */ (0,
|
|
6094
|
-
/* @__PURE__ */ (0,
|
|
6101
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
|
|
6102
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { children: token?.symbol })
|
|
6095
6103
|
] })
|
|
6096
6104
|
] }),
|
|
6097
|
-
/* @__PURE__ */ (0,
|
|
6105
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
6098
6106
|
Input2,
|
|
6099
6107
|
{
|
|
6100
6108
|
type: "text",
|
|
@@ -6107,18 +6115,18 @@ function TokenSend({
|
|
|
6107
6115
|
error: error.amount || txError
|
|
6108
6116
|
}
|
|
6109
6117
|
),
|
|
6110
|
-
/* @__PURE__ */ (0,
|
|
6111
|
-
/* @__PURE__ */ (0,
|
|
6112
|
-
/* @__PURE__ */ (0,
|
|
6118
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
|
|
6119
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-amount-title`, children: [
|
|
6120
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl20.FormattedMessage, { id: "balance" }),
|
|
6113
6121
|
":"
|
|
6114
6122
|
] }),
|
|
6115
|
-
/* @__PURE__ */ (0,
|
|
6123
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
|
|
6116
6124
|
] }),
|
|
6117
|
-
/* @__PURE__ */ (0,
|
|
6125
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
6118
6126
|
] }),
|
|
6119
|
-
/* @__PURE__ */ (0,
|
|
6120
|
-
/* @__PURE__ */ (0,
|
|
6121
|
-
/* @__PURE__ */ (0,
|
|
6127
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-address-content`, children: [
|
|
6128
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl20.FormattedMessage, { id: "receiveTitle" }) }) }),
|
|
6129
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
6122
6130
|
Input2,
|
|
6123
6131
|
{
|
|
6124
6132
|
type: "text",
|
|
@@ -6134,7 +6142,7 @@ function TokenSend({
|
|
|
6134
6142
|
)
|
|
6135
6143
|
] })
|
|
6136
6144
|
] }),
|
|
6137
|
-
/* @__PURE__ */ (0,
|
|
6145
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
6138
6146
|
Button,
|
|
6139
6147
|
{
|
|
6140
6148
|
size: "lg",
|
|
@@ -6143,7 +6151,7 @@ function TokenSend({
|
|
|
6143
6151
|
disabled: !canSend || !!txError,
|
|
6144
6152
|
onClick: onNext,
|
|
6145
6153
|
loading: loading || sending,
|
|
6146
|
-
children: /* @__PURE__ */ (0,
|
|
6154
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl20.FormattedMessage, { id: "next" })
|
|
6147
6155
|
}
|
|
6148
6156
|
)
|
|
6149
6157
|
] }) });
|
|
@@ -6151,7 +6159,7 @@ function TokenSend({
|
|
|
6151
6159
|
|
|
6152
6160
|
// src/components/TokenDetail/index.tsx
|
|
6153
6161
|
var import_react_intl21 = require("react-intl");
|
|
6154
|
-
var
|
|
6162
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
6155
6163
|
function TokenDetail({
|
|
6156
6164
|
onClose,
|
|
6157
6165
|
token
|
|
@@ -6161,41 +6169,41 @@ function TokenDetail({
|
|
|
6161
6169
|
const chain = chainList?.find((m) => m.id.toString() === token.chain_id);
|
|
6162
6170
|
const onSend = () => {
|
|
6163
6171
|
modal.show((props) => {
|
|
6164
|
-
return /* @__PURE__ */ (0,
|
|
6172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TokenSend, { onClose: () => {
|
|
6165
6173
|
props.close();
|
|
6166
6174
|
onClose();
|
|
6167
6175
|
}, onBack: props.close, zIndex: props.zIndex, token });
|
|
6168
6176
|
});
|
|
6169
6177
|
};
|
|
6170
6178
|
const intl = (0, import_react_intl21.useIntl)();
|
|
6171
|
-
return /* @__PURE__ */ (0,
|
|
6179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ModalDrawer, { isOpen: true, title: intl.formatMessage({
|
|
6172
6180
|
id: "tokenDetails"
|
|
6173
|
-
}), onClose, children: /* @__PURE__ */ (0,
|
|
6174
|
-
/* @__PURE__ */ (0,
|
|
6175
|
-
/* @__PURE__ */ (0,
|
|
6176
|
-
/* @__PURE__ */ (0,
|
|
6177
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
6178
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6181
|
+
}), onClose, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-detail`, children: [
|
|
6182
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-main`, children: [
|
|
6183
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-info`, children: [
|
|
6184
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-logo`, children: [
|
|
6185
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("img", { src: token.icon, alt: token.symbol, className: `matchid-token-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(AlphaAvatar, { className: `matchid-token-icon`, size: 48, name: token.symbol || token.name || "" }),
|
|
6186
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-token-chain` })
|
|
6179
6187
|
] }),
|
|
6180
|
-
/* @__PURE__ */ (0,
|
|
6181
|
-
/* @__PURE__ */ (0,
|
|
6188
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-name`, children: [
|
|
6189
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10 }),
|
|
6182
6190
|
" ",
|
|
6183
6191
|
token.symbol
|
|
6184
6192
|
] })
|
|
6185
6193
|
] }),
|
|
6186
|
-
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0,
|
|
6187
|
-
/* @__PURE__ */ (0,
|
|
6188
|
-
/* @__PURE__ */ (0,
|
|
6194
|
+
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-contract`, children: [
|
|
6195
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "matchid-token-contract-title", children: "Contract address" }),
|
|
6196
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "matchid-token-contract-address", children: token.address })
|
|
6189
6197
|
] })
|
|
6190
6198
|
] }),
|
|
6191
|
-
/* @__PURE__ */ (0,
|
|
6199
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl21.FormattedMessage, { id: "send" }) })
|
|
6192
6200
|
] }) });
|
|
6193
6201
|
}
|
|
6194
6202
|
|
|
6195
6203
|
// src/components/TokenSendList/index.tsx
|
|
6196
6204
|
var import_react41 = require("react");
|
|
6197
6205
|
var import_react_intl22 = require("react-intl");
|
|
6198
|
-
var
|
|
6206
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
6199
6207
|
function TokenSendList({ close }) {
|
|
6200
6208
|
const isDownMd = useDownMd();
|
|
6201
6209
|
const walletAssets = useMatchWalletAssets();
|
|
@@ -6207,16 +6215,16 @@ function TokenSendList({ close }) {
|
|
|
6207
6215
|
const modal = useModal();
|
|
6208
6216
|
const onNext = () => {
|
|
6209
6217
|
checked && modal.show((props) => {
|
|
6210
|
-
return /* @__PURE__ */ (0,
|
|
6218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(TokenSend, { onClose: () => {
|
|
6211
6219
|
props.close();
|
|
6212
6220
|
close();
|
|
6213
6221
|
}, onBack: props.close, zIndex: props.zIndex, token: checked });
|
|
6214
6222
|
});
|
|
6215
6223
|
};
|
|
6216
|
-
return /* @__PURE__ */ (0,
|
|
6217
|
-
/* @__PURE__ */ (0,
|
|
6224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "matchid-token-send-list-box", children: [
|
|
6225
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
6218
6226
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
6219
|
-
return /* @__PURE__ */ (0,
|
|
6227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
6220
6228
|
"div",
|
|
6221
6229
|
{
|
|
6222
6230
|
className: `matchid-token-send-item ${checked?.address == n.address ? "matchid-token-send-chekced" : ""}`,
|
|
@@ -6224,10 +6232,10 @@ function TokenSendList({ close }) {
|
|
|
6224
6232
|
setChecked(n);
|
|
6225
6233
|
},
|
|
6226
6234
|
children: [
|
|
6227
|
-
/* @__PURE__ */ (0,
|
|
6228
|
-
/* @__PURE__ */ (0,
|
|
6229
|
-
/* @__PURE__ */ (0,
|
|
6230
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
6235
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
|
|
6236
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
6237
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "matchid-token-send-logo", children: [
|
|
6238
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
6231
6239
|
AlphaAvatar2,
|
|
6232
6240
|
{
|
|
6233
6241
|
className: `matchid-token-send-icon`,
|
|
@@ -6235,7 +6243,7 @@ function TokenSendList({ close }) {
|
|
|
6235
6243
|
name: n.symbol || n.name || ""
|
|
6236
6244
|
}
|
|
6237
6245
|
),
|
|
6238
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6246
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
6239
6247
|
"img",
|
|
6240
6248
|
{
|
|
6241
6249
|
src: chain.iconUrl,
|
|
@@ -6244,9 +6252,9 @@ function TokenSendList({ close }) {
|
|
|
6244
6252
|
}
|
|
6245
6253
|
)
|
|
6246
6254
|
] }),
|
|
6247
|
-
/* @__PURE__ */ (0,
|
|
6248
|
-
/* @__PURE__ */ (0,
|
|
6249
|
-
/* @__PURE__ */ (0,
|
|
6255
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: `matchid-token-send-info`, children: [
|
|
6256
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
|
|
6257
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
|
|
6250
6258
|
] })
|
|
6251
6259
|
] })
|
|
6252
6260
|
]
|
|
@@ -6254,7 +6262,7 @@ function TokenSendList({ close }) {
|
|
|
6254
6262
|
index
|
|
6255
6263
|
);
|
|
6256
6264
|
}) }),
|
|
6257
|
-
/* @__PURE__ */ (0,
|
|
6265
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_intl22.FormattedMessage, { id: "next" }) })
|
|
6258
6266
|
] });
|
|
6259
6267
|
}
|
|
6260
6268
|
|
|
@@ -6264,7 +6272,7 @@ var import_react42 = require("react");
|
|
|
6264
6272
|
var import_viem16 = require("viem");
|
|
6265
6273
|
var import_viem17 = require("viem");
|
|
6266
6274
|
var import_react_intl23 = require("react-intl");
|
|
6267
|
-
var
|
|
6275
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
6268
6276
|
var Item = ({ data }) => {
|
|
6269
6277
|
const { address } = useWallet();
|
|
6270
6278
|
const isOut = data.from.toLowerCase() == address.toLowerCase();
|
|
@@ -6351,18 +6359,18 @@ var Item = ({ data }) => {
|
|
|
6351
6359
|
}
|
|
6352
6360
|
return chain?.nativeCurrency.symbol || chain?.nativeCurrency.name;
|
|
6353
6361
|
}, [transferType, chain, contracts, chainId, data.to]);
|
|
6354
|
-
return /* @__PURE__ */ (0,
|
|
6362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
6355
6363
|
"a",
|
|
6356
6364
|
{
|
|
6357
6365
|
href: explorerLink(`tx/${data.hash}`),
|
|
6358
6366
|
target: "_blank",
|
|
6359
6367
|
className: `matchid-transaction-item`,
|
|
6360
6368
|
children: [
|
|
6361
|
-
/* @__PURE__ */ (0,
|
|
6362
|
-
/* @__PURE__ */ (0,
|
|
6363
|
-
/* @__PURE__ */ (0,
|
|
6364
|
-
/* @__PURE__ */ (0,
|
|
6365
|
-
/* @__PURE__ */ (0,
|
|
6369
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-transacton-item-container`, children: [
|
|
6370
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
|
|
6371
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-transaction-item-details`, children: [
|
|
6372
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
|
|
6373
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
6366
6374
|
"div",
|
|
6367
6375
|
{
|
|
6368
6376
|
className: `matchid-transaction-item-timestamp`,
|
|
@@ -6371,11 +6379,11 @@ var Item = ({ data }) => {
|
|
|
6371
6379
|
)
|
|
6372
6380
|
] })
|
|
6373
6381
|
] }),
|
|
6374
|
-
/* @__PURE__ */ (0,
|
|
6375
|
-
/* @__PURE__ */ (0,
|
|
6376
|
-
status == "loading" && /* @__PURE__ */ (0,
|
|
6377
|
-
status == "success" && /* @__PURE__ */ (0,
|
|
6378
|
-
status == "error" && /* @__PURE__ */ (0,
|
|
6382
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
|
|
6383
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(NumberFormatter, { value: amount, tFixNum: 6, prefix: isOut ? "-" : "+", suffix: " " + symbol }),
|
|
6384
|
+
status == "loading" && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(LoadingIcon_default, { color: "#000000", size: 16, rotate: true }),
|
|
6385
|
+
status == "success" && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(CheckRoundIcon, { size: 16 }),
|
|
6386
|
+
status == "error" && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(InfoRoundIcon, { size: 16 })
|
|
6379
6387
|
] })
|
|
6380
6388
|
]
|
|
6381
6389
|
}
|
|
@@ -6385,19 +6393,19 @@ function TransactionList({
|
|
|
6385
6393
|
scrollableTarget
|
|
6386
6394
|
}) {
|
|
6387
6395
|
const { fetchMoreData, hasMore, items } = useMatchWalletRecords();
|
|
6388
|
-
return /* @__PURE__ */ (0,
|
|
6396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
6389
6397
|
import_react_infinite_scroll_component.default,
|
|
6390
6398
|
{
|
|
6391
6399
|
scrollableTarget,
|
|
6392
6400
|
dataLength: items.length,
|
|
6393
6401
|
next: fetchMoreData,
|
|
6394
6402
|
hasMore,
|
|
6395
|
-
loader: /* @__PURE__ */ (0,
|
|
6396
|
-
/* @__PURE__ */ (0,
|
|
6403
|
+
loader: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "matchid-list-nomore", children: [
|
|
6404
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
|
|
6397
6405
|
"Loading..."
|
|
6398
6406
|
] }),
|
|
6399
|
-
endMessage: items.length > 0 ? /* @__PURE__ */ (0,
|
|
6400
|
-
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0,
|
|
6407
|
+
endMessage: items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl23.FormattedMessage, { id: "noMoreRecords" }) }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl23.FormattedMessage, { id: "noRecords" }) }),
|
|
6408
|
+
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "mt-[150px]" }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Item, { data: item }, index)) })
|
|
6401
6409
|
}
|
|
6402
6410
|
);
|
|
6403
6411
|
}
|