@matchain/matchid-sdk-react 0.1.56 → 0.1.57
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 +96 -48
- package/dist/api.js.map +1 -1
- package/dist/api.mjs +3 -3
- package/dist/chains.d.mts +1 -1
- package/dist/chains.d.ts +1 -1
- package/dist/{chunk-GD7URBBZ.mjs → chunk-7SUDHG7S.mjs} +41 -1
- package/dist/chunk-7SUDHG7S.mjs.map +1 -0
- package/dist/{chunk-NYE6DBEZ.mjs → chunk-EUG3QRAG.mjs} +2 -2
- package/dist/{chunk-KFB23MLQ.mjs → chunk-QMV4FDUH.mjs} +348 -215
- package/dist/chunk-QMV4FDUH.mjs.map +1 -0
- package/dist/components.d.mts +3 -3
- package/dist/components.d.ts +3 -3
- package/dist/components.js +495 -368
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +2 -2
- package/dist/hooks.d.mts +2 -3
- package/dist/hooks.d.ts +2 -3
- package/dist/hooks.js +228 -182
- 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 +40 -0
- package/dist/icon.js.map +1 -1
- package/dist/icon.mjs +5 -1
- package/dist/{index-CBcBTQyU.d.mts → index-84CqVi2I.d.mts} +1 -1
- package/dist/index-B70k4Jpk.d.ts +7138 -0
- package/dist/index-BJJ0Gb6v.d.mts +7138 -0
- package/dist/{index-DlaCsN95.d.ts → index-BNqdFiOo.d.ts} +1 -1
- package/dist/{index-xThRnNN3.d.mts → index-BctnHnJp.d.ts} +11 -3
- package/dist/{index-CjekOYJl.d.mts → index-BqI0PEIi.d.mts} +1 -1
- package/dist/{index-BcuSCgol.d.ts → index-C2hr7zlN.d.ts} +5 -3
- package/dist/{index-CD0dACxf.d.mts → index-CTHpnEoB.d.mts} +5 -3
- package/dist/{index-CER00guz.d.mts → index-Car1jFyN.d.mts} +1 -1
- package/dist/{index-B50DU_xT.d.mts → index-CboftuIp.d.mts} +2 -0
- package/dist/{index-B50DU_xT.d.ts → index-CboftuIp.d.ts} +2 -0
- package/dist/{index-o0WW1c5O.d.ts → index-CcVHENNv.d.ts} +1 -1
- package/dist/{index-DkIIQLbh.d.ts → index-Cqdz_5bE.d.ts} +2 -2
- package/dist/{index-DdN22cwf.d.ts → index-CvzpMw3N.d.ts} +1 -1
- package/dist/{index-DN-jrh8-.d.ts → index-DkijpM5Q.d.mts} +11 -3
- package/dist/{index-lh6qBAf_.d.mts → index-DxHhOW24.d.mts} +2 -2
- package/dist/index.css +209 -46
- package/dist/index.d.mts +166 -88
- package/dist/index.d.ts +166 -88
- package/dist/index.js +596 -427
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{types-CheN9vHJ.d.mts → types-BrVeC0c8.d.mts} +1 -1
- package/dist/{types-CheN9vHJ.d.ts → types-BrVeC0c8.d.ts} +1 -1
- 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 +127 -110
- package/dist/ui.js.map +1 -1
- package/dist/ui.mjs +2 -2
- package/example/src/App.tsx +65 -60
- package/example/src/config/index.ts +8 -6
- package/example/src/pages/Wallet/index.tsx +88 -88
- package/package.json +2 -2
- package/dist/chunk-GD7URBBZ.mjs.map +0 -1
- package/dist/chunk-KFB23MLQ.mjs.map +0 -1
- package/dist/index-BlMLqmS2.d.mts +0 -3341
- package/dist/index-C1Nyy5zx.d.ts +0 -3341
- /package/dist/{chunk-NYE6DBEZ.mjs.map → chunk-EUG3QRAG.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -726,10 +726,12 @@ __export(icon_exports, {
|
|
|
726
726
|
InfoLineIcon: () => InfoLineIcon,
|
|
727
727
|
InfoRoundIcon: () => InfoRoundIcon,
|
|
728
728
|
InputLengthIcon: () => InputLengthIcon,
|
|
729
|
+
KakaoIcon: () => KakaoIcon,
|
|
729
730
|
LeatherIcon: () => LeatherIcon,
|
|
730
731
|
LinkedinIcon: () => LinkedinIcon,
|
|
731
732
|
LoadingIcon: () => LoadingIcon_default,
|
|
732
733
|
LoginIcon: () => LoginIcon_default,
|
|
734
|
+
MatchIdIcon: () => MatchIdIcon_default,
|
|
733
735
|
MoreIcon: () => MoreIcon,
|
|
734
736
|
OKXIcon: () => OKXIcon,
|
|
735
737
|
OpenEyeIcon: () => OpenEyeIcon,
|
|
@@ -2032,6 +2034,42 @@ function InputLengthIcon({
|
|
|
2032
2034
|
) });
|
|
2033
2035
|
}
|
|
2034
2036
|
|
|
2037
|
+
// src/assets/icon/KakaoIcon.tsx
|
|
2038
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2039
|
+
function KakaoIcon({ size = 40 }) {
|
|
2040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("svg", { width: size, height: size, viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
2041
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("g", { clipPath: "url(#clip0_8121_9671)", children: [
|
|
2042
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("rect", { width: "48", height: "48", fill: "#FFE711" }),
|
|
2043
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { d: "M20.7005 6.97049C24.083 6.52424 27.5622 6.75599 30.8375 7.72274C34.0872 8.68199 37.16 10.377 39.5262 12.8235C41.474 14.829 42.9035 17.3902 43.3415 20.169C43.7727 22.791 43.3047 25.536 42.0807 27.8902C40.901 30.1905 39.08 32.1225 36.974 33.6022C34.3302 35.4592 31.238 36.6337 28.0602 37.1655C25.5777 37.5757 23.0322 37.608 20.5407 37.2562C18.2067 38.8845 15.8795 40.5262 13.4787 42.0555C13.1202 42.2745 12.7677 42.5085 12.3815 42.6757C12.1707 42.762 11.876 42.7822 11.7297 42.5752C11.5947 42.3667 11.6757 42.114 11.7327 41.8942C12.3357 39.6367 13.0002 37.3965 13.64 35.1495C11.7297 34.2037 9.95823 32.961 8.47548 31.4257C6.68373 29.5785 5.32698 27.2692 4.78323 24.741C4.22448 22.1992 4.50948 19.4872 5.56323 17.1097C6.78273 14.319 8.94498 12.015 11.4687 10.3477C14.228 8.52224 17.4297 7.41149 20.7005 6.97049ZM9.23523 18.6757C9.24498 19.2262 9.72423 19.7107 10.2732 19.7325C10.88 19.743 11.4875 19.7302 12.095 19.7385C12.0935 21.987 12.0882 24.2355 12.0972 26.484C12.1242 27.216 12.9867 27.702 13.643 27.414C14.0517 27.2595 14.3585 26.8455 14.345 26.4022C14.3457 24.1807 14.3427 21.9592 14.3465 19.7377C14.9652 19.7287 15.5847 19.7467 16.2035 19.7295C16.7675 19.689 17.2347 19.1617 17.2047 18.5962C17.1972 18.03 16.6925 17.5305 16.1255 17.5327C14.177 17.5305 12.2285 17.529 10.2792 17.5335C9.69723 17.5485 9.19773 18.093 9.23523 18.6757ZM18.3882 18.6075C17.5205 20.889 16.6557 23.172 15.7872 25.4535C15.6387 25.827 15.518 26.2237 15.536 26.6295C15.5472 26.8755 15.6417 27.1387 15.8615 27.2722C16.163 27.4537 16.5297 27.501 16.8755 27.4657C17.171 27.426 17.498 27.2812 17.6037 26.9797C17.7912 26.496 17.972 26.0092 18.1602 25.5255C19.3032 25.5195 20.4455 25.524 21.5885 25.5232C21.7872 26.025 21.9672 26.5342 22.172 27.0337C22.3602 27.4215 22.8545 27.5055 23.2437 27.471C23.5962 27.4327 24.029 27.312 24.155 26.9355C24.2915 26.5147 24.1782 26.0617 24.0402 25.6567C23.183 23.3955 22.3227 21.1357 21.464 18.8752C21.2742 18.1612 20.6382 17.541 19.874 17.5312C19.2215 17.544 18.6237 18.0082 18.3882 18.6075ZM24.7962 18.678C24.797 21.2257 24.7947 23.7735 24.7977 26.3212C24.7962 26.8837 25.3302 27.342 25.8785 27.3285C27.1002 27.3277 28.3235 27.333 29.5452 27.3262C30.101 27.315 30.6072 26.8072 30.56 26.2425C30.5442 25.7197 30.068 25.2855 29.5542 25.2682C28.7345 25.2577 27.9147 25.2682 27.095 25.263C27.0935 23.0422 27.098 20.8207 27.0927 18.5992C27.077 17.925 26.3682 17.4007 25.718 17.5522C25.1945 17.6482 24.776 18.141 24.7962 18.678ZM31.0002 18.672C31.0002 21.246 30.9965 23.8192 31.0017 26.3932C31.0077 26.9707 31.5252 27.483 32.1042 27.4762C32.696 27.5055 33.2442 26.9887 33.2487 26.3962C33.2562 25.5622 33.2465 24.7282 33.2532 23.895C33.3852 23.7675 33.5135 23.637 33.6417 23.5057C34.52 24.6765 35.4035 25.8435 36.2855 27.0112C36.6492 27.5175 37.4472 27.5985 37.9085 27.1815C38.3487 26.8215 38.435 26.115 38.087 25.6635C37.1645 24.4335 36.2315 23.2117 35.3127 21.9787C36.1722 21.108 37.0467 20.2515 37.9047 19.3785C38.282 18.9615 38.1282 18.2707 37.7067 17.943C37.3452 17.6295 36.7362 17.5755 36.389 17.937C35.3397 18.978 34.2987 20.0272 33.2517 21.0705C33.248 20.2477 33.2555 19.425 33.2487 18.6022C33.236 18.0105 32.6862 17.5005 32.0952 17.5305C31.499 17.5312 30.9777 18.0765 31.0002 18.672Z", fill: "black" }),
|
|
2044
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { d: "M19.8744 20.3452C20.2547 21.4042 20.6184 22.47 21.0009 23.529C20.2517 23.5305 19.5024 23.5297 18.7539 23.5282C19.1252 22.467 19.5002 21.4065 19.8744 20.3452Z", fill: "black" }),
|
|
2045
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { d: "M9.23538 18.6757C9.19788 18.0929 9.69738 17.5484 10.2794 17.5334C12.2286 17.5289 14.1771 17.5304 16.1256 17.5327C16.6926 17.5304 17.1974 18.0299 17.2049 18.5962C17.2349 19.1617 16.7676 19.6889 16.2036 19.7294C15.5849 19.7467 14.9654 19.7287 14.3466 19.7377C14.3429 21.9592 14.3459 24.1807 14.3451 26.4022C14.3586 26.8454 14.0519 27.2594 13.6431 27.4139C12.9869 27.7019 12.1244 27.2159 12.0974 26.4839C12.0884 24.2354 12.0936 21.9869 12.0951 19.7384C11.4876 19.7302 10.8801 19.7429 10.2734 19.7324C9.72438 19.7107 9.24513 19.2262 9.23538 18.6757Z", fill: "#FFE711" }),
|
|
2046
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { d: "M18.3882 18.6075C18.6237 18.0083 19.2215 17.544 19.874 17.5312C20.6382 17.541 21.2742 18.1612 21.464 18.8752C22.3227 21.1358 23.183 23.3955 24.0402 25.6567C24.1782 26.0618 24.2915 26.5148 24.155 26.9355C24.029 27.312 23.5962 27.4328 23.2437 27.471C22.8545 27.5055 22.3602 27.4215 22.172 27.0338C21.9672 26.5343 21.7872 26.025 21.5885 25.5233C20.4455 25.524 19.3032 25.5195 18.1602 25.5255C17.972 26.0092 17.7912 26.496 17.6037 26.9798C17.498 27.2813 17.171 27.426 16.8755 27.4657C16.5297 27.501 16.163 27.4538 15.8615 27.2723C15.6417 27.1388 15.5472 26.8755 15.536 26.6295C15.518 26.2238 15.6387 25.827 15.7872 25.4535C16.6557 23.172 17.5205 20.889 18.3882 18.6075ZM19.8747 20.3452C19.5005 21.4065 19.1255 22.467 18.7542 23.5282C19.5027 23.5297 20.252 23.5305 21.0012 23.529C20.6187 22.47 20.255 21.4042 19.8747 20.3452Z", fill: "#FFE711" }),
|
|
2047
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { d: "M24.7956 18.6779C24.7754 18.1409 25.1939 17.6481 25.7174 17.5521C26.3676 17.4006 27.0764 17.9249 27.0921 18.5991C27.0974 20.8206 27.0929 23.0421 27.0944 25.2629C27.9141 25.2681 28.7339 25.2576 29.5536 25.2681C30.0674 25.2854 30.5436 25.7196 30.5594 26.2424C30.6066 26.8071 30.1004 27.3149 29.5446 27.3261C28.3229 27.3329 27.0996 27.3276 25.8779 27.3284C25.3296 27.3419 24.7956 26.8836 24.7971 26.3211C24.7941 23.7734 24.7964 21.2256 24.7956 18.6779Z", fill: "#FFE711" }),
|
|
2048
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { d: "M31.0013 18.6718C30.9788 18.0763 31.5 17.5311 32.0963 17.5303C32.6873 17.5003 33.237 18.0103 33.2498 18.6021C33.2565 19.4248 33.249 20.2476 33.2528 21.0703C34.2998 20.0271 35.3408 18.9778 36.39 17.9368C36.7373 17.5753 37.3463 17.6293 37.7078 17.9428C38.1293 18.2706 38.283 18.9613 37.9058 19.3783C37.0478 20.2513 36.1733 21.1078 35.3138 21.9786C36.2325 23.2116 37.1655 24.4333 38.088 25.6633C38.436 26.1148 38.3498 26.8213 37.9095 27.1813C37.4483 27.5983 36.6503 27.5173 36.2865 27.0111C35.4045 25.8433 34.521 24.6763 33.6428 23.5056C33.5145 23.6368 33.3863 23.7673 33.2543 23.8948C33.2475 24.7281 33.2573 25.5621 33.2498 26.3961C33.2453 26.9886 32.697 27.5053 32.1053 27.4761C31.5263 27.4828 31.0088 26.9706 31.0028 26.3931C30.9975 23.8191 31.0013 21.2458 31.0013 18.6718Z", fill: "#FFE711" })
|
|
2049
|
+
] }),
|
|
2050
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("clipPath", { id: "clip0_8121_9671", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("rect", { width: "48", height: "48", rx: "8", fill: "white" }) }) })
|
|
2051
|
+
] });
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
// src/assets/icon/MatchIdIcon.tsx
|
|
2055
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2056
|
+
var MatchIdIcon = () => {
|
|
2057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("svg", { width: "94", height: "20", viewBox: "0 0 94 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
2058
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("g", { clipPath: "url(#clip0_8154_9735)", children: [
|
|
2059
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M3.63333 7.535V17.5H0.75V2.5H4.55167L8.89667 13.615L13.2633 2.5H17.065V17.5H14.1817V7.45167L10.2117 17.5H7.55833L3.63333 7.535Z", fill: "black" }),
|
|
2060
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M28.3433 14.2833H22.5149L21.3666 17.5H18.1699L23.8099 2.5H27.2783L32.8766 17.5H29.4716L28.3433 14.2833ZM23.4133 11.755H27.4666L25.4616 5.96833L23.4149 11.755H23.4133Z", fill: "black" }),
|
|
2061
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M36.4072 17.5V5.36167H31.6855V2.5H44.3255V5.36167H39.5839V17.5H36.4089H36.4072Z", fill: "black" }),
|
|
2062
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M44.4199 9.98C44.4199 5.76833 47.5883 2.5 51.6399 2.5C55.4299 2.5 58.3983 5.02667 58.8999 8.71667H55.6716C55.3299 6.65167 53.7266 5.22667 51.6816 5.22667C49.2149 5.22667 47.5499 7.17167 47.5499 9.98C47.5499 12.7883 49.2149 14.7733 51.6816 14.7733C53.7266 14.7733 55.3116 13.33 55.6716 11.2633H58.8999C58.3983 14.9933 55.4316 17.5 51.6399 17.5C47.5899 17.5 44.4199 14.2117 44.4199 9.98Z", fill: "black" }),
|
|
2063
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M59.9355 17.5V2.5H63.1105V8.41167H69.6072V2.5H72.7822V17.5H69.6072V11.1483H63.1105V17.5H59.9355Z", fill: "black" }),
|
|
2064
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M92.2318 10C92.2318 11.21 91.9502 12.3533 91.4485 13.3667C90.2335 15.8183 87.7318 17.5 84.8435 17.5H78.8002C78.7518 17.5 78.7735 17.4467 78.8002 17.4067C78.9418 17.1967 79.5068 16.8133 79.5068 15.8283C79.5068 14.8433 79.1985 14.35 79.0502 14.15C79.0202 14.11 79.0002 14.0533 79.0502 14.0533H84.8435C86.6752 14.0533 88.5035 11.86 88.5035 10C88.5035 8.14 86.6752 5.94667 84.8435 5.94667H79.0368C78.9902 5.94667 79.0135 5.89667 79.0368 5.85667C79.1718 5.62667 79.5052 4.98 79.5052 4.20333C79.5052 3.25 79.1868 2.78667 79.0368 2.59833C79.0068 2.55833 78.9868 2.5 79.0385 2.5H84.8452C87.7335 2.5 90.2352 4.18167 91.4502 6.63333C91.9518 7.645 92.2335 8.78833 92.2335 10H92.2318Z", fill: "black" }),
|
|
2065
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M74.2598 9.12662C74.2598 7.97329 75.1948 7.03662 76.3498 7.03662C77.5048 7.03662 78.4398 7.97162 78.4398 9.12662C78.4398 9.72829 78.1848 10.2716 77.7764 10.6533C77.3264 11.075 76.9164 11.605 76.9164 12.2216V12.3166C76.9164 12.9333 77.3264 13.4633 77.7764 13.885C78.1848 14.2666 78.4398 14.8083 78.4398 15.4116C78.4398 16.565 77.5048 17.5016 76.3498 17.5016C75.1948 17.5016 74.2598 16.5666 74.2598 15.4116C74.2598 14.81 74.5148 14.2666 74.9231 13.885C75.3731 13.4633 75.7831 12.9333 75.7831 12.3166V12.2216C75.7831 11.605 75.3731 11.075 74.9231 10.6533C74.5148 10.2716 74.2598 9.72995 74.2598 9.12662Z", fill: "#FC802D" }),
|
|
2066
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M76.3477 6.09C77.3391 6.09 78.1427 5.28635 78.1427 4.295C78.1427 3.30365 77.3391 2.5 76.3477 2.5C75.3564 2.5 74.5527 3.30365 74.5527 4.295C74.5527 5.28635 75.3564 6.09 76.3477 6.09Z", fill: "#FC802D" })
|
|
2067
|
+
] }),
|
|
2068
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("clipPath", { id: "clip0_8154_9735", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("rect", { width: "92.5", height: "20", fill: "white", transform: "translate(0.75)" }) }) })
|
|
2069
|
+
] });
|
|
2070
|
+
};
|
|
2071
|
+
var MatchIdIcon_default = MatchIdIcon;
|
|
2072
|
+
|
|
2035
2073
|
// src/hooks/useLayout.tsx
|
|
2036
2074
|
var useLayout_exports = {};
|
|
2037
2075
|
__export(useLayout_exports, {
|
|
@@ -2053,39 +2091,39 @@ function useDownMd() {
|
|
|
2053
2091
|
}
|
|
2054
2092
|
|
|
2055
2093
|
// src/hooks/useConfig.tsx
|
|
2056
|
-
var
|
|
2094
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2057
2095
|
var DEFAULT_WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
2058
2096
|
var WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
2059
2097
|
function useWalletConfig() {
|
|
2060
2098
|
const isDownMd = useDownMd();
|
|
2061
2099
|
const walletMap = {
|
|
2062
2100
|
evm: {
|
|
2063
|
-
icon: /* @__PURE__ */ (0,
|
|
2064
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2101
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(EVMDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
2102
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(EVMLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
2065
2103
|
name: "EVM",
|
|
2066
2104
|
method: "evm"
|
|
2067
2105
|
},
|
|
2068
2106
|
sol: {
|
|
2069
|
-
icon: /* @__PURE__ */ (0,
|
|
2070
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2107
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SOLDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
2108
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SOLLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
2071
2109
|
name: "SOL",
|
|
2072
2110
|
method: "sol"
|
|
2073
2111
|
},
|
|
2074
2112
|
btc: {
|
|
2075
|
-
icon: /* @__PURE__ */ (0,
|
|
2076
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2113
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BTCDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
2114
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BTCLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
2077
2115
|
name: "BTC",
|
|
2078
2116
|
method: "btc"
|
|
2079
2117
|
},
|
|
2080
2118
|
tron: {
|
|
2081
|
-
icon: /* @__PURE__ */ (0,
|
|
2082
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2119
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TRXDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
2120
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TRXLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
2083
2121
|
name: "TRON",
|
|
2084
2122
|
method: "tron"
|
|
2085
2123
|
},
|
|
2086
2124
|
ton: {
|
|
2087
|
-
icon: /* @__PURE__ */ (0,
|
|
2088
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
2125
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TonLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
2126
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TonLightIcon2, { size: isDownMd ? 36 : 40 }),
|
|
2089
2127
|
name: "TON",
|
|
2090
2128
|
method: "ton"
|
|
2091
2129
|
}
|
|
@@ -2133,6 +2171,12 @@ var useWalletModalStore = (0, import_zustand2.create)((set) => ({
|
|
|
2133
2171
|
open: (type, methods = DEFAULT_WALLET_METHODS) => set({ isOpen: true, type, methods }),
|
|
2134
2172
|
close: () => set({ isOpen: false })
|
|
2135
2173
|
}));
|
|
2174
|
+
var useEmailModalStore = (0, import_zustand2.create)((set) => ({
|
|
2175
|
+
isOpen: false,
|
|
2176
|
+
type: "",
|
|
2177
|
+
open: (type) => set({ isOpen: true, type }),
|
|
2178
|
+
close: () => set({ isOpen: false })
|
|
2179
|
+
}));
|
|
2136
2180
|
|
|
2137
2181
|
// src/store/useStore.ts
|
|
2138
2182
|
var import_zustand3 = require("zustand");
|
|
@@ -2170,6 +2214,7 @@ function useUserInfo() {
|
|
|
2170
2214
|
const { open: BTCOpen } = useBTCModalStore();
|
|
2171
2215
|
const { open: CEXBindOpen } = useCEXBindModalStore();
|
|
2172
2216
|
const walletModalStore = useWalletModalStore();
|
|
2217
|
+
const emailModalStore = useEmailModalStore();
|
|
2173
2218
|
const getRedirectUri = () => {
|
|
2174
2219
|
return encodeURIComponent(window.location.href);
|
|
2175
2220
|
};
|
|
@@ -2263,6 +2308,7 @@ function useUserInfo() {
|
|
|
2263
2308
|
case "github":
|
|
2264
2309
|
case "linkedin":
|
|
2265
2310
|
case "facebook":
|
|
2311
|
+
case "kakao":
|
|
2266
2312
|
return await loginByMethod(method);
|
|
2267
2313
|
default:
|
|
2268
2314
|
throw new Error("unsupported method");
|
|
@@ -2347,6 +2393,8 @@ function useUserInfo() {
|
|
|
2347
2393
|
return TONOpen("bind");
|
|
2348
2394
|
case "btc":
|
|
2349
2395
|
return BTCOpen("bind");
|
|
2396
|
+
case "email":
|
|
2397
|
+
return emailModalStore.open("bind");
|
|
2350
2398
|
case "telegram":
|
|
2351
2399
|
return await bindTelegram();
|
|
2352
2400
|
case "twitter":
|
|
@@ -2356,6 +2404,7 @@ function useUserInfo() {
|
|
|
2356
2404
|
case "linkedin":
|
|
2357
2405
|
case "facebook":
|
|
2358
2406
|
case "youtube":
|
|
2407
|
+
case "kakao":
|
|
2359
2408
|
const link = `${endpoints.back}api/v1/auth/${method == "youtube" ? "google" : method}?appid=${appid}&provider=${method == "youtube" ? "google" : method}&redirect=${encodeURIComponent(endpoints.auth + "bind/" + method)}&authorization=${token.includes("Bearer ") ? token.split(" ")[1] : token}${method == "youtube" ? "&auth_type=youtube" : ""}`;
|
|
2360
2409
|
matchlog_default.log("link", link);
|
|
2361
2410
|
return window.open(
|
|
@@ -2370,6 +2419,31 @@ function useUserInfo() {
|
|
|
2370
2419
|
const bindCex = (type) => {
|
|
2371
2420
|
return CEXBindOpen(type);
|
|
2372
2421
|
};
|
|
2422
|
+
const bindByEmail = async ({ email, code }) => {
|
|
2423
|
+
try {
|
|
2424
|
+
const obj = {
|
|
2425
|
+
email,
|
|
2426
|
+
verification_key: emailLoginKey,
|
|
2427
|
+
verification_code: code
|
|
2428
|
+
};
|
|
2429
|
+
const res = await verifyEmailCodeApi(obj);
|
|
2430
|
+
if (res && res.data && isSuccess(res)) {
|
|
2431
|
+
events.onBind && events.onBind({
|
|
2432
|
+
type: "email"
|
|
2433
|
+
});
|
|
2434
|
+
eventManager_default.emit("onBind", {
|
|
2435
|
+
type: "email"
|
|
2436
|
+
});
|
|
2437
|
+
return true;
|
|
2438
|
+
} else {
|
|
2439
|
+
throw new Error(res.message);
|
|
2440
|
+
}
|
|
2441
|
+
} catch (error) {
|
|
2442
|
+
console.error("bindByEmail", error);
|
|
2443
|
+
throw error;
|
|
2444
|
+
}
|
|
2445
|
+
return false;
|
|
2446
|
+
};
|
|
2373
2447
|
const getAuthInfo = async (method) => {
|
|
2374
2448
|
const element_id = "auth_iframe";
|
|
2375
2449
|
if (document.getElementById(element_id)) {
|
|
@@ -2438,6 +2512,7 @@ function useUserInfo() {
|
|
|
2438
2512
|
auth,
|
|
2439
2513
|
login: loginMethod,
|
|
2440
2514
|
bind,
|
|
2515
|
+
bindByEmail,
|
|
2441
2516
|
getAuthInfo,
|
|
2442
2517
|
invite
|
|
2443
2518
|
};
|
|
@@ -2511,7 +2586,7 @@ __export(ui_exports, {
|
|
|
2511
2586
|
});
|
|
2512
2587
|
|
|
2513
2588
|
// src/ui/Button/index.tsx
|
|
2514
|
-
var
|
|
2589
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2515
2590
|
function Button({
|
|
2516
2591
|
size = "df",
|
|
2517
2592
|
disabled = false,
|
|
@@ -2531,7 +2606,7 @@ function Button({
|
|
|
2531
2606
|
onClick && onClick();
|
|
2532
2607
|
}
|
|
2533
2608
|
};
|
|
2534
|
-
return /* @__PURE__ */ (0,
|
|
2609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2535
2610
|
"button",
|
|
2536
2611
|
{
|
|
2537
2612
|
type,
|
|
@@ -2542,14 +2617,14 @@ function Button({
|
|
|
2542
2617
|
},
|
|
2543
2618
|
onClick: onAction,
|
|
2544
2619
|
...dataset,
|
|
2545
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
2620
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
|
|
2546
2621
|
}
|
|
2547
2622
|
);
|
|
2548
2623
|
}
|
|
2549
2624
|
|
|
2550
2625
|
// src/ui/Overlay/index.tsx
|
|
2551
2626
|
var import_react4 = require("react");
|
|
2552
|
-
var
|
|
2627
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2553
2628
|
function Overlay({
|
|
2554
2629
|
isOpen = false,
|
|
2555
2630
|
children,
|
|
@@ -2565,7 +2640,7 @@ function Overlay({
|
|
|
2565
2640
|
document.body.style.overflow = "";
|
|
2566
2641
|
};
|
|
2567
2642
|
}, [isOpen]);
|
|
2568
|
-
return isOpen ? /* @__PURE__ */ (0,
|
|
2643
|
+
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
2569
2644
|
"div",
|
|
2570
2645
|
{
|
|
2571
2646
|
className: "matchid-overlay",
|
|
@@ -2574,11 +2649,11 @@ function Overlay({
|
|
|
2574
2649
|
},
|
|
2575
2650
|
children
|
|
2576
2651
|
}
|
|
2577
|
-
) : /* @__PURE__ */ (0,
|
|
2652
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_jsx_runtime59.Fragment, {});
|
|
2578
2653
|
}
|
|
2579
2654
|
|
|
2580
2655
|
// src/ui/Drawer/index.tsx
|
|
2581
|
-
var
|
|
2656
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2582
2657
|
function Drawer({
|
|
2583
2658
|
children,
|
|
2584
2659
|
showClose = true,
|
|
@@ -2589,22 +2664,22 @@ function Drawer({
|
|
|
2589
2664
|
onBack
|
|
2590
2665
|
}) {
|
|
2591
2666
|
if (!isOpen) {
|
|
2592
|
-
return /* @__PURE__ */ (0,
|
|
2667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_jsx_runtime60.Fragment, {});
|
|
2593
2668
|
}
|
|
2594
|
-
return /* @__PURE__ */ (0,
|
|
2595
|
-
/* @__PURE__ */ (0,
|
|
2596
|
-
/* @__PURE__ */ (0,
|
|
2597
|
-
onBack && /* @__PURE__ */ (0,
|
|
2669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "matchid-drawer", children: [
|
|
2670
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: `matchid-drawer-header matchid-flex`, children: [
|
|
2671
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: `matchid-drawer-header-content matchid-flex`, children: [
|
|
2672
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ArrowLeftIcon, { height: 25, width: 24, className: "matchid-drawer-header-back", onClick: onBack }),
|
|
2598
2673
|
title
|
|
2599
2674
|
] }),
|
|
2600
|
-
showClose && /* @__PURE__ */ (0,
|
|
2675
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
|
|
2601
2676
|
] }),
|
|
2602
2677
|
children
|
|
2603
2678
|
] }) });
|
|
2604
2679
|
}
|
|
2605
2680
|
|
|
2606
2681
|
// src/ui/Field/index.tsx
|
|
2607
|
-
var
|
|
2682
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2608
2683
|
function Field({
|
|
2609
2684
|
label,
|
|
2610
2685
|
children,
|
|
@@ -2612,13 +2687,13 @@ function Field({
|
|
|
2612
2687
|
required,
|
|
2613
2688
|
className = ""
|
|
2614
2689
|
}) {
|
|
2615
|
-
return /* @__PURE__ */ (0,
|
|
2616
|
-
/* @__PURE__ */ (0,
|
|
2617
|
-
required && /* @__PURE__ */ (0,
|
|
2690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
|
|
2691
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "matchid-field-label", children: [
|
|
2692
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "matchid-field-required", children: "*" }),
|
|
2618
2693
|
label
|
|
2619
2694
|
] }),
|
|
2620
2695
|
children,
|
|
2621
|
-
error && /* @__PURE__ */ (0,
|
|
2696
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "matchid-field-error", children: error })
|
|
2622
2697
|
] });
|
|
2623
2698
|
}
|
|
2624
2699
|
|
|
@@ -2664,7 +2739,7 @@ var import_react6 = require("react");
|
|
|
2664
2739
|
|
|
2665
2740
|
// src/ui/Input/index.tsx
|
|
2666
2741
|
var import_react5 = require("react");
|
|
2667
|
-
var
|
|
2742
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2668
2743
|
function Input({
|
|
2669
2744
|
onChange,
|
|
2670
2745
|
type,
|
|
@@ -2689,7 +2764,7 @@ function Input({
|
|
|
2689
2764
|
textarea.style.height = Math.min(textarea.scrollHeight, maxHeight) + "px";
|
|
2690
2765
|
}
|
|
2691
2766
|
}, [props.value]);
|
|
2692
|
-
return /* @__PURE__ */ (0,
|
|
2767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
2693
2768
|
"div",
|
|
2694
2769
|
{
|
|
2695
2770
|
className: `matchid-input-box matchid-input-${type} ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
@@ -2698,14 +2773,14 @@ function Input({
|
|
|
2698
2773
|
"--max-rows": maxRows
|
|
2699
2774
|
},
|
|
2700
2775
|
children: [
|
|
2701
|
-
children ?? (type == "textarea" ? /* @__PURE__ */ (0,
|
|
2776
|
+
children ?? (type == "textarea" ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("textarea", { rows: 1, onChange, ...props, className: "matchid-input-field", ref: textareaRef, style: {
|
|
2702
2777
|
maxHeight: maxRows * 24 + "px"
|
|
2703
|
-
} }) : /* @__PURE__ */ (0,
|
|
2704
|
-
type != "textarea" && showClear && props.value && props.value.length > 0 && /* @__PURE__ */ (0,
|
|
2778
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" })),
|
|
2779
|
+
type != "textarea" && showClear && props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
|
|
2705
2780
|
if (onChange) {
|
|
2706
2781
|
onChange({ target: { value: "" } });
|
|
2707
2782
|
}
|
|
2708
|
-
}, children: /* @__PURE__ */ (0,
|
|
2783
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2709
2784
|
DeleteRoundIcon,
|
|
2710
2785
|
{
|
|
2711
2786
|
height: isDownMd ? 16 : 21,
|
|
@@ -2713,16 +2788,16 @@ function Input({
|
|
|
2713
2788
|
color: "var(--matchid-input-delete-icon-color)"
|
|
2714
2789
|
}
|
|
2715
2790
|
) }),
|
|
2716
|
-
type === "password" && /* @__PURE__ */ (0,
|
|
2791
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
|
|
2717
2792
|
setInputType(inputType === "password" ? "text" : "password");
|
|
2718
|
-
}, children: inputType === "password" ? /* @__PURE__ */ (0,
|
|
2719
|
-
showLength && props.maxLength && /* @__PURE__ */ (0,
|
|
2720
|
-
/* @__PURE__ */ (0,
|
|
2793
|
+
}, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
|
|
2794
|
+
showLength && props.maxLength && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: `matchid-input-length`, children: [
|
|
2795
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("span", { children: [
|
|
2721
2796
|
props.value?.length || 0,
|
|
2722
2797
|
"/",
|
|
2723
2798
|
props.maxLength
|
|
2724
2799
|
] }),
|
|
2725
|
-
/* @__PURE__ */ (0,
|
|
2800
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(InputLengthIcon, { color: "var(--icon-color)" })
|
|
2726
2801
|
] }),
|
|
2727
2802
|
after
|
|
2728
2803
|
]
|
|
@@ -2732,7 +2807,7 @@ function Input({
|
|
|
2732
2807
|
|
|
2733
2808
|
// src/components/EmailModal/StepEmail.tsx
|
|
2734
2809
|
var import_react_intl = require("react-intl");
|
|
2735
|
-
var
|
|
2810
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2736
2811
|
function StepEmail(props) {
|
|
2737
2812
|
const intl = (0, import_react_intl.useIntl)();
|
|
2738
2813
|
const [emailVal, setEmailVal] = (0, import_react6.useState)("");
|
|
@@ -2747,10 +2822,10 @@ function StepEmail(props) {
|
|
|
2747
2822
|
const onContinue = async () => {
|
|
2748
2823
|
props.onContinue(emailVal);
|
|
2749
2824
|
};
|
|
2750
|
-
return /* @__PURE__ */ (0,
|
|
2751
|
-
/* @__PURE__ */ (0,
|
|
2825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "matchid-email-email-box", children: [
|
|
2826
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Field, { label: intl.formatMessage({
|
|
2752
2827
|
id: "emailAddress"
|
|
2753
|
-
}), children: /* @__PURE__ */ (0,
|
|
2828
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2754
2829
|
Input,
|
|
2755
2830
|
{
|
|
2756
2831
|
placeholder: intl.formatMessage({
|
|
@@ -2760,9 +2835,9 @@ function StepEmail(props) {
|
|
|
2760
2835
|
value: emailVal
|
|
2761
2836
|
}
|
|
2762
2837
|
) }),
|
|
2763
|
-
/* @__PURE__ */ (0,
|
|
2838
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Button, { disabled: !canContinue, style: {
|
|
2764
2839
|
marginTop: "64px"
|
|
2765
|
-
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
2840
|
+
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react_intl.FormattedMessage, { id: "continue" }) })
|
|
2766
2841
|
] });
|
|
2767
2842
|
}
|
|
2768
2843
|
|
|
@@ -2773,13 +2848,15 @@ var import_react7 = require("react");
|
|
|
2773
2848
|
var EMAIL_INTERVAL = 60;
|
|
2774
2849
|
var EMAIL_CODE_LENGTH = 6;
|
|
2775
2850
|
var NATIVE_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
2851
|
+
var TERMS_OF_SERVICE_URL = "https://docs.google.com/document/d/1QbagOOBhi50niC2mn4pJAd9pyNlvm1MSwcKWuP9YB80/edit?usp=sharing";
|
|
2852
|
+
var PRIVACY_POLICY_URL = "https://docs.google.com/document/d/1YOUUOmNXbA7qy79YckxhPMLWBj_WDiUp6mkJPNq_XCk/edit?usp=sharing";
|
|
2776
2853
|
|
|
2777
2854
|
// src/components/EmailModal/StepVerify.tsx
|
|
2778
2855
|
var import_react_intl2 = require("react-intl");
|
|
2779
|
-
var
|
|
2856
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2780
2857
|
function StepVerify(props) {
|
|
2781
2858
|
const intl = (0, import_react_intl2.useIntl)();
|
|
2782
|
-
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
2859
|
+
const { getLoginEmailCode, loginByEmail, bindByEmail } = useUserInfo();
|
|
2783
2860
|
const [error, setError] = (0, import_react7.useState)("");
|
|
2784
2861
|
const [code, setCode] = (0, import_react7.useState)("");
|
|
2785
2862
|
const [sending, setSending] = (0, import_react7.useState)(false);
|
|
@@ -2839,7 +2916,10 @@ function StepVerify(props) {
|
|
|
2839
2916
|
try {
|
|
2840
2917
|
setError("");
|
|
2841
2918
|
setSubmitting(true);
|
|
2842
|
-
const res = await
|
|
2919
|
+
const res = props.type === "bind" ? await bindByEmail({
|
|
2920
|
+
email: props.email,
|
|
2921
|
+
code
|
|
2922
|
+
}) : await loginByEmail({
|
|
2843
2923
|
email: props.email,
|
|
2844
2924
|
code
|
|
2845
2925
|
});
|
|
@@ -2853,17 +2933,17 @@ function StepVerify(props) {
|
|
|
2853
2933
|
setSubmitting(false);
|
|
2854
2934
|
}
|
|
2855
2935
|
};
|
|
2856
|
-
return /* @__PURE__ */ (0,
|
|
2857
|
-
/* @__PURE__ */ (0,
|
|
2858
|
-
/* @__PURE__ */ (0,
|
|
2859
|
-
/* @__PURE__ */ (0,
|
|
2860
|
-
/* @__PURE__ */ (0,
|
|
2861
|
-
/* @__PURE__ */ (0,
|
|
2936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "matchid-email-verify-box", children: [
|
|
2937
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "matchid-email-verify-header", children: [
|
|
2938
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
|
|
2939
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "matchid-email-verify-header-content", children: [
|
|
2940
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "matchid-email-verify-header-value", children: props.email }),
|
|
2941
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react_intl2.FormattedMessage, { id: "sendEmailTips" }) })
|
|
2862
2942
|
] })
|
|
2863
2943
|
] }),
|
|
2864
|
-
/* @__PURE__ */ (0,
|
|
2944
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Field, { label: intl.formatMessage({
|
|
2865
2945
|
id: "verificationCode"
|
|
2866
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
2946
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
2867
2947
|
Input,
|
|
2868
2948
|
{
|
|
2869
2949
|
placeholder: intl.formatMessage({
|
|
@@ -2873,7 +2953,7 @@ function StepVerify(props) {
|
|
|
2873
2953
|
maxLength: codeLength,
|
|
2874
2954
|
onChange: (e) => setCode(e.target.value),
|
|
2875
2955
|
value: code,
|
|
2876
|
-
after: /* @__PURE__ */ (0,
|
|
2956
|
+
after: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
2877
2957
|
Button,
|
|
2878
2958
|
{
|
|
2879
2959
|
highlight: true,
|
|
@@ -2892,19 +2972,20 @@ function StepVerify(props) {
|
|
|
2892
2972
|
)
|
|
2893
2973
|
}
|
|
2894
2974
|
) }),
|
|
2895
|
-
/* @__PURE__ */ (0,
|
|
2975
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Button, { disabled: !canContinue, loading: submitting, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react_intl2.FormattedMessage, { id: "continue" }) })
|
|
2896
2976
|
] });
|
|
2897
2977
|
}
|
|
2898
2978
|
|
|
2899
2979
|
// src/components/EmailModal/index.tsx
|
|
2900
2980
|
var import_react_intl3 = require("react-intl");
|
|
2901
|
-
var
|
|
2981
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2902
2982
|
function EmailModal({
|
|
2903
2983
|
isOpen = false,
|
|
2904
2984
|
width = 480,
|
|
2905
2985
|
onClose,
|
|
2906
2986
|
onBack,
|
|
2907
|
-
onLogin
|
|
2987
|
+
onLogin,
|
|
2988
|
+
type = "login"
|
|
2908
2989
|
}) {
|
|
2909
2990
|
const [step, setStep] = (0, import_react8.useState)("input");
|
|
2910
2991
|
const [emailVal, setEmailVal] = (0, import_react8.useState)("");
|
|
@@ -2915,7 +2996,7 @@ function EmailModal({
|
|
|
2915
2996
|
setEmailVal("");
|
|
2916
2997
|
}
|
|
2917
2998
|
}, [isOpen]);
|
|
2918
|
-
return /* @__PURE__ */ (0,
|
|
2999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2919
3000
|
ModalWithHeader,
|
|
2920
3001
|
{
|
|
2921
3002
|
isOpen,
|
|
@@ -2925,17 +3006,17 @@ function EmailModal({
|
|
|
2925
3006
|
id: "email"
|
|
2926
3007
|
}),
|
|
2927
3008
|
onBack: step == "verify" ? () => setStep("input") : onBack,
|
|
2928
|
-
children: step === "input" ? /* @__PURE__ */ (0,
|
|
3009
|
+
children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
|
|
2929
3010
|
setEmailVal(email);
|
|
2930
3011
|
setStep("verify");
|
|
2931
|
-
} }) : /* @__PURE__ */ (0,
|
|
3012
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(StepVerify, { type, email: emailVal, onSuccess: onLogin })
|
|
2932
3013
|
}
|
|
2933
3014
|
);
|
|
2934
3015
|
}
|
|
2935
3016
|
|
|
2936
3017
|
// src/ui/Popover/index.tsx
|
|
2937
3018
|
var import_react9 = require("react");
|
|
2938
|
-
var
|
|
3019
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2939
3020
|
function Popover({
|
|
2940
3021
|
children,
|
|
2941
3022
|
content,
|
|
@@ -2945,7 +3026,7 @@ function Popover({
|
|
|
2945
3026
|
gap = "20px"
|
|
2946
3027
|
}) {
|
|
2947
3028
|
const [active, setActive] = (0, import_react9.useState)(false);
|
|
2948
|
-
return children && /* @__PURE__ */ (0,
|
|
3029
|
+
return children && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
2949
3030
|
"div",
|
|
2950
3031
|
{
|
|
2951
3032
|
onClick: () => {
|
|
@@ -2956,9 +3037,9 @@ function Popover({
|
|
|
2956
3037
|
className: `matchid-popover-box matchid-popover-${position} matchid-popover-${type} ${className} ${type == "click" && active ? "matchid-popover-click-active" : ""}`,
|
|
2957
3038
|
children: [
|
|
2958
3039
|
children,
|
|
2959
|
-
/* @__PURE__ */ (0,
|
|
3040
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { style: {
|
|
2960
3041
|
paddingTop: gap
|
|
2961
|
-
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0,
|
|
3042
|
+
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: `matchid-popover-content`, children: content }) })
|
|
2962
3043
|
]
|
|
2963
3044
|
}
|
|
2964
3045
|
);
|
|
@@ -2989,7 +3070,7 @@ function useAppConfig() {
|
|
|
2989
3070
|
}
|
|
2990
3071
|
|
|
2991
3072
|
// src/components/LoginBox/index.tsx
|
|
2992
|
-
var
|
|
3073
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2993
3074
|
var RecommendItem = ({
|
|
2994
3075
|
icon,
|
|
2995
3076
|
name,
|
|
@@ -2998,20 +3079,20 @@ var RecommendItem = ({
|
|
|
2998
3079
|
children,
|
|
2999
3080
|
footer
|
|
3000
3081
|
}) => {
|
|
3001
|
-
return /* @__PURE__ */ (0,
|
|
3002
|
-
/* @__PURE__ */ (0,
|
|
3003
|
-
/* @__PURE__ */ (0,
|
|
3004
|
-
/* @__PURE__ */ (0,
|
|
3005
|
-
/* @__PURE__ */ (0,
|
|
3082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-recommend-method", children: [
|
|
3083
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-recommend-method-item", onClick, children: [
|
|
3084
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-recommend-method-content", children: [
|
|
3085
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-recommend-method-icon", children: icon }),
|
|
3086
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "matchid-login-recommend-method-name", children: name })
|
|
3006
3087
|
] }),
|
|
3007
|
-
footer ? footer : children ? /* @__PURE__ */ (0,
|
|
3088
|
+
footer ? footer : children ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3008
3089
|
ArrowDownIcon,
|
|
3009
3090
|
{
|
|
3010
3091
|
className: `matchid-login-recommend-method-arrow ${showChildren ? "matchid-login-recommend-method-arrow-active" : ""}`,
|
|
3011
3092
|
size: 20,
|
|
3012
3093
|
color: "var(--matchid-arrow-color)"
|
|
3013
3094
|
}
|
|
3014
|
-
) : /* @__PURE__ */ (0,
|
|
3095
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3015
3096
|
ArrowRightIcon,
|
|
3016
3097
|
{
|
|
3017
3098
|
className: "matchid-login-recommend-method-arrow",
|
|
@@ -3020,7 +3101,7 @@ var RecommendItem = ({
|
|
|
3020
3101
|
}
|
|
3021
3102
|
)
|
|
3022
3103
|
] }),
|
|
3023
|
-
children && /* @__PURE__ */ (0,
|
|
3104
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3024
3105
|
"div",
|
|
3025
3106
|
{
|
|
3026
3107
|
className: `matchid-login-recommend-method-popover ${showChildren ? "matchid-login-recommend-method-popover-active" : ""}`,
|
|
@@ -3085,75 +3166,80 @@ function LoginBox({
|
|
|
3085
3166
|
const isDownMd = useDownMd();
|
|
3086
3167
|
const methodMap = {
|
|
3087
3168
|
wallet: {
|
|
3088
|
-
icon: /* @__PURE__ */ (0,
|
|
3169
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(WalletIcon, { size: isDownMd ? 36 : 40 }),
|
|
3089
3170
|
name: intl.formatMessage({ id: "wallet" }),
|
|
3090
3171
|
onClick: () => setShowWallet(!showWallet),
|
|
3091
3172
|
type: "wallet"
|
|
3092
3173
|
},
|
|
3093
3174
|
email: {
|
|
3094
|
-
icon: /* @__PURE__ */ (0,
|
|
3175
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
|
|
3095
3176
|
name: intl.formatMessage({ id: "email" }),
|
|
3096
3177
|
onClick: () => {
|
|
3097
3178
|
setEmailOpen(true);
|
|
3098
3179
|
}
|
|
3099
3180
|
},
|
|
3100
3181
|
google: {
|
|
3101
|
-
icon: /* @__PURE__ */ (0,
|
|
3182
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(GoogleIcon, { size: isDownMd ? 36 : 40 }),
|
|
3102
3183
|
name: "Google",
|
|
3103
3184
|
onClick: () => login("google")
|
|
3104
3185
|
},
|
|
3105
3186
|
twitter: {
|
|
3106
|
-
icon: /* @__PURE__ */ (0,
|
|
3187
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(XIcon, { size: isDownMd ? 36 : 40 }),
|
|
3107
3188
|
name: "X",
|
|
3108
3189
|
onClick: () => login("twitter")
|
|
3109
3190
|
},
|
|
3110
3191
|
telegram: {
|
|
3111
|
-
icon: /* @__PURE__ */ (0,
|
|
3192
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(TelegramIcon, { size: isDownMd ? 36 : 40 }),
|
|
3112
3193
|
name: "Telegram",
|
|
3113
3194
|
onClick: () => login("telegram")
|
|
3114
3195
|
},
|
|
3115
3196
|
github: {
|
|
3116
|
-
icon: /* @__PURE__ */ (0,
|
|
3197
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(GithubIcon, { size: isDownMd ? 36 : 40 }),
|
|
3117
3198
|
name: "Github",
|
|
3118
3199
|
onClick: () => login("github")
|
|
3119
3200
|
},
|
|
3120
3201
|
discord: {
|
|
3121
|
-
icon: /* @__PURE__ */ (0,
|
|
3202
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(DiscordIcon, { size: isDownMd ? 36 : 40 }),
|
|
3122
3203
|
name: "Discord",
|
|
3123
3204
|
onClick: () => login("discord")
|
|
3124
3205
|
},
|
|
3125
3206
|
linkedin: {
|
|
3126
|
-
icon: /* @__PURE__ */ (0,
|
|
3207
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
|
|
3127
3208
|
name: "LinkedIn",
|
|
3128
3209
|
onClick: () => login("linkedin")
|
|
3129
3210
|
},
|
|
3130
3211
|
facebook: {
|
|
3131
|
-
icon: /* @__PURE__ */ (0,
|
|
3212
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(FacebookIcon, { size: isDownMd ? 36 : 40 }),
|
|
3132
3213
|
name: "Facebook",
|
|
3133
3214
|
onClick: () => login("facebook")
|
|
3134
3215
|
},
|
|
3135
3216
|
youtube: {
|
|
3136
|
-
icon: /* @__PURE__ */ (0,
|
|
3217
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
|
|
3137
3218
|
name: "Youtube",
|
|
3138
3219
|
onClick: () => login("youtube")
|
|
3220
|
+
},
|
|
3221
|
+
kakao: {
|
|
3222
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(KakaoIcon, { size: isDownMd ? 36 : 40 }),
|
|
3223
|
+
name: "Kakao",
|
|
3224
|
+
onClick: () => login("kakao")
|
|
3139
3225
|
}
|
|
3140
3226
|
};
|
|
3141
3227
|
const { walletMap } = useWalletConfig();
|
|
3142
|
-
return /* @__PURE__ */ (0,
|
|
3143
|
-
(!inModal || !emailOpen) && /* @__PURE__ */ (0,
|
|
3144
|
-
/* @__PURE__ */ (0,
|
|
3145
|
-
return /* @__PURE__ */ (0,
|
|
3228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
3229
|
+
(!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-box", children: [
|
|
3230
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
|
|
3231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3146
3232
|
RecommendItem,
|
|
3147
3233
|
{
|
|
3148
3234
|
icon: methodMap[m]?.icon,
|
|
3149
3235
|
name: methodMap[m]?.name,
|
|
3150
3236
|
onClick: methodMap[m]?.onClick,
|
|
3151
3237
|
showChildren: m == "wallet" && showWallet,
|
|
3152
|
-
children: m == "wallet" && /* @__PURE__ */ (0,
|
|
3153
|
-
/* @__PURE__ */ (0,
|
|
3154
|
-
/* @__PURE__ */ (0,
|
|
3238
|
+
children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
3239
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
|
|
3240
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
|
|
3155
3241
|
const m2 = walletMap[n];
|
|
3156
|
-
return /* @__PURE__ */ (0,
|
|
3242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
3157
3243
|
"div",
|
|
3158
3244
|
{
|
|
3159
3245
|
className: "matchid-login-recommend-wallet-item",
|
|
@@ -3161,16 +3247,16 @@ function LoginBox({
|
|
|
3161
3247
|
login(m2.method);
|
|
3162
3248
|
},
|
|
3163
3249
|
children: [
|
|
3164
|
-
/* @__PURE__ */ (0,
|
|
3165
|
-
/* @__PURE__ */ (0,
|
|
3166
|
-
/* @__PURE__ */ (0,
|
|
3250
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
|
|
3251
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
|
|
3252
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3167
3253
|
"div",
|
|
3168
3254
|
{
|
|
3169
3255
|
className: "matchid-login-recommend-wallet-item-hover-icon",
|
|
3170
3256
|
children: m2.activeIcon
|
|
3171
3257
|
}
|
|
3172
3258
|
),
|
|
3173
|
-
/* @__PURE__ */ (0,
|
|
3259
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3174
3260
|
"span",
|
|
3175
3261
|
{
|
|
3176
3262
|
className: "matchid-login-recommend-wallet-item-name",
|
|
@@ -3178,7 +3264,7 @@ function LoginBox({
|
|
|
3178
3264
|
}
|
|
3179
3265
|
)
|
|
3180
3266
|
] }),
|
|
3181
|
-
/* @__PURE__ */ (0,
|
|
3267
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3182
3268
|
ArrowRightIcon,
|
|
3183
3269
|
{
|
|
3184
3270
|
className: "matchid-login-recommend-wallet-item-arrow",
|
|
@@ -3196,10 +3282,48 @@ function LoginBox({
|
|
|
3196
3282
|
m
|
|
3197
3283
|
);
|
|
3198
3284
|
}) }),
|
|
3199
|
-
|
|
3200
|
-
/* @__PURE__ */ (0,
|
|
3201
|
-
|
|
3202
|
-
|
|
3285
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-privacy-policy", children: [
|
|
3286
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-privacy-policy-content", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3287
|
+
import_react_intl4.FormattedMessage,
|
|
3288
|
+
{
|
|
3289
|
+
id: "loginAgreement",
|
|
3290
|
+
values: {
|
|
3291
|
+
termsLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3292
|
+
"a",
|
|
3293
|
+
{
|
|
3294
|
+
href: TERMS_OF_SERVICE_URL,
|
|
3295
|
+
target: "_blank",
|
|
3296
|
+
rel: "noopener noreferrer",
|
|
3297
|
+
className: "matchid-privacy-policy-content-link",
|
|
3298
|
+
children: chunks
|
|
3299
|
+
}
|
|
3300
|
+
),
|
|
3301
|
+
privacyLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3302
|
+
"a",
|
|
3303
|
+
{
|
|
3304
|
+
href: PRIVACY_POLICY_URL,
|
|
3305
|
+
target: "_blank",
|
|
3306
|
+
rel: "noopener noreferrer",
|
|
3307
|
+
className: "matchid-privacy-policy-content-link",
|
|
3308
|
+
children: chunks
|
|
3309
|
+
}
|
|
3310
|
+
)
|
|
3311
|
+
}
|
|
3312
|
+
}
|
|
3313
|
+
) }),
|
|
3314
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-privacy-policy-powered-by", children: [
|
|
3315
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_intl4.FormattedMessage, { id: "poweredBy" }),
|
|
3316
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(MatchIdIcon_default, {})
|
|
3317
|
+
] })
|
|
3318
|
+
] }),
|
|
3319
|
+
methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-other", children: [
|
|
3320
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-other-line-box", children: [
|
|
3321
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-other-line" }),
|
|
3322
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_intl4.FormattedMessage, { id: "otherLoginMethods" }) }),
|
|
3323
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-other-line" })
|
|
3324
|
+
] }),
|
|
3325
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
3326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3203
3327
|
"div",
|
|
3204
3328
|
{
|
|
3205
3329
|
className: "matchid-login-method-item",
|
|
@@ -3212,7 +3336,7 @@ function LoginBox({
|
|
|
3212
3336
|
}) })
|
|
3213
3337
|
] })
|
|
3214
3338
|
] }),
|
|
3215
|
-
/* @__PURE__ */ (0,
|
|
3339
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3216
3340
|
EmailModal,
|
|
3217
3341
|
{
|
|
3218
3342
|
isOpen: emailOpen,
|
|
@@ -3232,40 +3356,40 @@ var import_react12 = require("react");
|
|
|
3232
3356
|
|
|
3233
3357
|
// src/components/LoginPanel/index.tsx
|
|
3234
3358
|
var import_react_intl5 = require("react-intl");
|
|
3235
|
-
var
|
|
3359
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3236
3360
|
function LoginPanel({
|
|
3237
3361
|
header,
|
|
3238
3362
|
onClose,
|
|
3239
3363
|
...props
|
|
3240
3364
|
}) {
|
|
3241
3365
|
const isDownMd = useDownMd();
|
|
3242
|
-
return /* @__PURE__ */ (0,
|
|
3243
|
-
header ? header : /* @__PURE__ */ (0,
|
|
3244
|
-
/* @__PURE__ */ (0,
|
|
3245
|
-
/* @__PURE__ */ (0,
|
|
3246
|
-
/* @__PURE__ */ (0,
|
|
3366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "matchid-login-panel", children: [
|
|
3367
|
+
header ? header : /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "matchid-login-panel-header", children: [
|
|
3368
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "matchid-login-panel-header-content", children: [
|
|
3369
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react_intl5.FormattedMessage, { id: "loginTitle" }) }),
|
|
3370
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react_intl5.FormattedMessage, { id: "loginTips" }) })
|
|
3247
3371
|
] }),
|
|
3248
|
-
onClose && /* @__PURE__ */ (0,
|
|
3372
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
|
|
3249
3373
|
] }),
|
|
3250
|
-
/* @__PURE__ */ (0,
|
|
3251
|
-
/* @__PURE__ */ (0,
|
|
3374
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "matchid-login-panel-divide" }),
|
|
3375
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(LoginBox, { ...props }) })
|
|
3252
3376
|
] });
|
|
3253
3377
|
}
|
|
3254
3378
|
|
|
3255
3379
|
// src/components/LoginModal/index.tsx
|
|
3256
|
-
var
|
|
3380
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3257
3381
|
function LoginModal({
|
|
3258
3382
|
isOpen = false,
|
|
3259
3383
|
width = 480,
|
|
3260
3384
|
...props
|
|
3261
3385
|
}) {
|
|
3262
3386
|
const { isLogin } = useUserInfo();
|
|
3263
|
-
return /* @__PURE__ */ (0,
|
|
3387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3264
3388
|
Modal,
|
|
3265
3389
|
{
|
|
3266
3390
|
isOpen: isOpen && !isLogin,
|
|
3267
3391
|
width,
|
|
3268
|
-
children: /* @__PURE__ */ (0,
|
|
3392
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(LoginPanel, { ...props, inModal: true })
|
|
3269
3393
|
}
|
|
3270
3394
|
);
|
|
3271
3395
|
}
|
|
@@ -3274,10 +3398,10 @@ function LoginModal({
|
|
|
3274
3398
|
var import_react11 = require("react");
|
|
3275
3399
|
|
|
3276
3400
|
// src/assets/icon/ProfileIcon.tsx
|
|
3277
|
-
var
|
|
3401
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3278
3402
|
function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
3279
|
-
return /* @__PURE__ */ (0,
|
|
3280
|
-
/* @__PURE__ */ (0,
|
|
3403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
3404
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3281
3405
|
"path",
|
|
3282
3406
|
{
|
|
3283
3407
|
fillRule: "evenodd",
|
|
@@ -3286,7 +3410,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
3286
3410
|
fill: color
|
|
3287
3411
|
}
|
|
3288
3412
|
),
|
|
3289
|
-
/* @__PURE__ */ (0,
|
|
3413
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3290
3414
|
"path",
|
|
3291
3415
|
{
|
|
3292
3416
|
fillRule: "evenodd",
|
|
@@ -3300,7 +3424,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
3300
3424
|
|
|
3301
3425
|
// src/components/UserPopover/index.tsx
|
|
3302
3426
|
var import_react_intl6 = require("react-intl");
|
|
3303
|
-
var
|
|
3427
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3304
3428
|
function UserContent() {
|
|
3305
3429
|
const { logout, address, username } = useUserInfo();
|
|
3306
3430
|
const [logouting, setLogouting] = (0, import_react11.useState)(false);
|
|
@@ -3321,34 +3445,34 @@ function UserContent() {
|
|
|
3321
3445
|
rightIcon,
|
|
3322
3446
|
onClick
|
|
3323
3447
|
}) => {
|
|
3324
|
-
return /* @__PURE__ */ (0,
|
|
3325
|
-
/* @__PURE__ */ (0,
|
|
3448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "matchid-user-popover-item", onClick, children: [
|
|
3449
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: `matchid-user-popover-item-content`, children: [
|
|
3326
3450
|
icon,
|
|
3327
|
-
/* @__PURE__ */ (0,
|
|
3451
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "matchid-user-popover-item-text", children })
|
|
3328
3452
|
] }),
|
|
3329
3453
|
rightIcon
|
|
3330
3454
|
] });
|
|
3331
3455
|
};
|
|
3332
3456
|
const UserDivider = () => {
|
|
3333
|
-
return /* @__PURE__ */ (0,
|
|
3457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: `matchid-user-popover-divider` });
|
|
3334
3458
|
};
|
|
3335
3459
|
const [usernameOpen, setUsernameOpen] = (0, import_react11.useState)(false);
|
|
3336
3460
|
const [copied, setCopied] = useCopyClipboard();
|
|
3337
3461
|
const intl = (0, import_react_intl6.useIntl)();
|
|
3338
|
-
return /* @__PURE__ */ (0,
|
|
3339
|
-
/* @__PURE__ */ (0,
|
|
3340
|
-
/* @__PURE__ */ (0,
|
|
3462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "matchid-user-popover-content", children: [
|
|
3463
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "matchid-user-popover-list", children: [
|
|
3464
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(UserItem, { onClick: () => {
|
|
3341
3465
|
setCopied(address);
|
|
3342
|
-
}, icon: copied ? /* @__PURE__ */ (0,
|
|
3343
|
-
/* @__PURE__ */ (0,
|
|
3344
|
-
/* @__PURE__ */ (0,
|
|
3466
|
+
}, icon: copied ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(CheckIcon, { size: 20, color: "#0ecb81" }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(CopyIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(CheckIcon, { size: 20, color: "var(--icon-color)" }), children: truncateAddress(address) }),
|
|
3467
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(UserDivider, {}),
|
|
3468
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(UserItem, { onClick: () => {
|
|
3345
3469
|
setUsernameOpen(true);
|
|
3346
|
-
}, icon: /* @__PURE__ */ (0,
|
|
3470
|
+
}, icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ProfileIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ArrowRightIcon, { size: 20, color: "var(--icon-color)" }), children: username || intl.formatMessage({
|
|
3347
3471
|
id: "setUsername"
|
|
3348
3472
|
}) })
|
|
3349
3473
|
] }),
|
|
3350
|
-
/* @__PURE__ */ (0,
|
|
3351
|
-
/* @__PURE__ */ (0,
|
|
3474
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react_intl6.FormattedMessage, { id: "disconnect" }) }),
|
|
3475
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(UsernameModal, { isOpen: usernameOpen, onClose: () => {
|
|
3352
3476
|
setUsernameOpen(false);
|
|
3353
3477
|
}, onSuccess: () => {
|
|
3354
3478
|
setUsernameOpen(false);
|
|
@@ -3359,12 +3483,12 @@ function UserPopover({
|
|
|
3359
3483
|
children,
|
|
3360
3484
|
...props
|
|
3361
3485
|
}) {
|
|
3362
|
-
return /* @__PURE__ */ (0,
|
|
3486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Popover, { ...props, content: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(UserContent, {}), children });
|
|
3363
3487
|
}
|
|
3364
3488
|
|
|
3365
3489
|
// src/components/LoginButton/index.tsx
|
|
3366
3490
|
var import_react_intl7 = require("react-intl");
|
|
3367
|
-
var
|
|
3491
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3368
3492
|
function LoginButton({
|
|
3369
3493
|
loginRender,
|
|
3370
3494
|
methods,
|
|
@@ -3380,8 +3504,8 @@ function LoginButton({
|
|
|
3380
3504
|
const { isLogin, username } = useUserInfo();
|
|
3381
3505
|
const [loginOpen, setLoginOpen] = (0, import_react12.useState)(false);
|
|
3382
3506
|
if (!isLogin) {
|
|
3383
|
-
return /* @__PURE__ */ (0,
|
|
3384
|
-
/* @__PURE__ */ (0,
|
|
3507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
|
|
3508
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3385
3509
|
LoginModal,
|
|
3386
3510
|
{
|
|
3387
3511
|
methods,
|
|
@@ -3391,15 +3515,15 @@ function LoginButton({
|
|
|
3391
3515
|
onClose: () => setLoginOpen(false)
|
|
3392
3516
|
}
|
|
3393
3517
|
),
|
|
3394
|
-
/* @__PURE__ */ (0,
|
|
3395
|
-
/* @__PURE__ */ (0,
|
|
3396
|
-
/* @__PURE__ */ (0,
|
|
3518
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
|
|
3519
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(UnLoginIcon_default, {}),
|
|
3520
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react_intl7.FormattedMessage, { id: "login" }) })
|
|
3397
3521
|
] })
|
|
3398
3522
|
] });
|
|
3399
3523
|
}
|
|
3400
|
-
return loginRender ? /* @__PURE__ */ (0,
|
|
3401
|
-
/* @__PURE__ */ (0,
|
|
3402
|
-
/* @__PURE__ */ (0,
|
|
3524
|
+
return loginRender ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_jsx_runtime72.Fragment, { children: loginRender }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(UserPopover, { position: popoverPosition, type: popoverType, gap: popoverGap, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(Button, { onClick: onLoginClick, className: "matchid-login-btn", ...props, children: [
|
|
3525
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(LoginIcon_default, {}),
|
|
3526
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { children: username ? truncateAddress(username) : "MatchID " + intl.formatMessage({
|
|
3403
3527
|
id: "user"
|
|
3404
3528
|
}) })
|
|
3405
3529
|
] }) });
|
|
@@ -3408,15 +3532,15 @@ function LoginButton({
|
|
|
3408
3532
|
// src/components/UsernameModal/index.tsx
|
|
3409
3533
|
var import_react13 = require("react");
|
|
3410
3534
|
var import_react_intl8 = require("react-intl");
|
|
3411
|
-
var
|
|
3535
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3412
3536
|
var ValidItem = ({
|
|
3413
3537
|
success = false,
|
|
3414
3538
|
text
|
|
3415
3539
|
}) => {
|
|
3416
3540
|
const isDownMd = useDownMd();
|
|
3417
|
-
return /* @__PURE__ */ (0,
|
|
3418
|
-
success ? /* @__PURE__ */ (0,
|
|
3419
|
-
/* @__PURE__ */ (0,
|
|
3541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
|
|
3542
|
+
success ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
|
|
3543
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { children: text })
|
|
3420
3544
|
] });
|
|
3421
3545
|
};
|
|
3422
3546
|
function UsernameModal({
|
|
@@ -3464,12 +3588,12 @@ function UsernameModal({
|
|
|
3464
3588
|
}
|
|
3465
3589
|
};
|
|
3466
3590
|
const intl = (0, import_react_intl8.useIntl)();
|
|
3467
|
-
return /* @__PURE__ */ (0,
|
|
3591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
|
|
3468
3592
|
id: username ? "editUsernameTitle" : "setUsernameTitle"
|
|
3469
|
-
}), children: /* @__PURE__ */ (0,
|
|
3470
|
-
/* @__PURE__ */ (0,
|
|
3593
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "matchid-username-box", children: [
|
|
3594
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Field, { label: intl.formatMessage({
|
|
3471
3595
|
id: "username"
|
|
3472
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
3596
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3473
3597
|
Input,
|
|
3474
3598
|
{
|
|
3475
3599
|
placeholder: intl.formatMessage({
|
|
@@ -3482,8 +3606,8 @@ function UsernameModal({
|
|
|
3482
3606
|
value: val
|
|
3483
3607
|
}
|
|
3484
3608
|
) }),
|
|
3485
|
-
/* @__PURE__ */ (0,
|
|
3486
|
-
/* @__PURE__ */ (0,
|
|
3609
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "matchid-valid", children: [
|
|
3610
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3487
3611
|
ValidItem,
|
|
3488
3612
|
{
|
|
3489
3613
|
success: isValid,
|
|
@@ -3492,16 +3616,16 @@ function UsernameModal({
|
|
|
3492
3616
|
})
|
|
3493
3617
|
}
|
|
3494
3618
|
),
|
|
3495
|
-
/* @__PURE__ */ (0,
|
|
3619
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(ValidItem, { success: isLength, text: intl.formatMessage({
|
|
3496
3620
|
id: "usernameLengthError"
|
|
3497
3621
|
}) })
|
|
3498
3622
|
] }),
|
|
3499
|
-
/* @__PURE__ */ (0,
|
|
3623
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Button, { disabled: !isSafe, loading: isSubmitting, style: {
|
|
3500
3624
|
marginTop: isDownMd ? "36px" : "64px"
|
|
3501
|
-
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
3502
|
-
/* @__PURE__ */ (0,
|
|
3625
|
+
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react_intl8.FormattedMessage, { id: "confirm" }) }),
|
|
3626
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Button, { style: {
|
|
3503
3627
|
marginTop: isDownMd ? "12px" : "24px"
|
|
3504
|
-
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0,
|
|
3628
|
+
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react_intl8.FormattedMessage, { id: "cancel" }) })
|
|
3505
3629
|
] }) });
|
|
3506
3630
|
}
|
|
3507
3631
|
|
|
@@ -3557,7 +3681,7 @@ var walletConnectImage = wallet_default;
|
|
|
3557
3681
|
var walletSigningImage = signing_default;
|
|
3558
3682
|
|
|
3559
3683
|
// src/components/WalletModalContent/index.tsx
|
|
3560
|
-
var
|
|
3684
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3561
3685
|
function WalletModalContent({
|
|
3562
3686
|
status,
|
|
3563
3687
|
error,
|
|
@@ -3627,15 +3751,15 @@ function WalletModalContent({
|
|
|
3627
3751
|
statusImage: walletConnectImage
|
|
3628
3752
|
};
|
|
3629
3753
|
}, [visible, connected, status, error, address]);
|
|
3630
|
-
return /* @__PURE__ */ (0,
|
|
3631
|
-
/* @__PURE__ */ (0,
|
|
3632
|
-
/* @__PURE__ */ (0,
|
|
3754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
3755
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
3756
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
3633
3757
|
width: 128,
|
|
3634
3758
|
height: 128
|
|
3635
3759
|
} }),
|
|
3636
|
-
/* @__PURE__ */ (0,
|
|
3760
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: pageData.isError ? "matchid-error" : "", children: pageData.text })
|
|
3637
3761
|
] }),
|
|
3638
|
-
/* @__PURE__ */ (0,
|
|
3762
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3639
3763
|
Button,
|
|
3640
3764
|
{
|
|
3641
3765
|
block: true,
|
|
@@ -3711,15 +3835,15 @@ function WalletModalContentV2(props) {
|
|
|
3711
3835
|
statusImage: walletConnectImage
|
|
3712
3836
|
};
|
|
3713
3837
|
}, [props, submitting]);
|
|
3714
|
-
return /* @__PURE__ */ (0,
|
|
3715
|
-
/* @__PURE__ */ (0,
|
|
3716
|
-
/* @__PURE__ */ (0,
|
|
3838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
3839
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
3840
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
3717
3841
|
width: 128,
|
|
3718
3842
|
height: 128
|
|
3719
3843
|
} }),
|
|
3720
|
-
/* @__PURE__ */ (0,
|
|
3844
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: props.status == "error" ? "matchid-error" : "", children: pageData.text })
|
|
3721
3845
|
] }),
|
|
3722
|
-
/* @__PURE__ */ (0,
|
|
3846
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3723
3847
|
Button,
|
|
3724
3848
|
{
|
|
3725
3849
|
block: true,
|
|
@@ -3783,7 +3907,7 @@ var import_wagmi = require("wagmi");
|
|
|
3783
3907
|
var import_ethers = require("ethers");
|
|
3784
3908
|
|
|
3785
3909
|
// node_modules/@wagmi/core/dist/esm/version.js
|
|
3786
|
-
var version = "2.
|
|
3910
|
+
var version = "2.17.1";
|
|
3787
3911
|
|
|
3788
3912
|
// node_modules/@wagmi/core/dist/esm/utils/getVersion.js
|
|
3789
3913
|
var getVersion2 = () => `@wagmi/core@${version}`;
|
|
@@ -4001,7 +4125,7 @@ async function getEthersSigner(config, { chainId } = {}) {
|
|
|
4001
4125
|
// src/components/EVMModal/index.tsx
|
|
4002
4126
|
var import_siwe = require("siwe");
|
|
4003
4127
|
var import_styles = require("@rainbow-me/rainbowkit/styles.css");
|
|
4004
|
-
var
|
|
4128
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
4005
4129
|
function WalletContent({
|
|
4006
4130
|
onSuccess,
|
|
4007
4131
|
type
|
|
@@ -4159,7 +4283,7 @@ function WalletContent({
|
|
|
4159
4283
|
setNonce(void 0);
|
|
4160
4284
|
setStatus("start");
|
|
4161
4285
|
};
|
|
4162
|
-
return /* @__PURE__ */ (0,
|
|
4286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4163
4287
|
WalletModalContentV2,
|
|
4164
4288
|
{
|
|
4165
4289
|
status,
|
|
@@ -4177,14 +4301,14 @@ function EVMConnectModal({
|
|
|
4177
4301
|
...props
|
|
4178
4302
|
}) {
|
|
4179
4303
|
const intl = (0, import_react_intl9.useIntl)();
|
|
4180
|
-
return /* @__PURE__ */ (0,
|
|
4304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4181
4305
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4182
4306
|
}, {
|
|
4183
4307
|
name: "EVM"
|
|
4184
|
-
}), children: /* @__PURE__ */ (0,
|
|
4308
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(WalletContent, { onSuccess, type }) });
|
|
4185
4309
|
}
|
|
4186
4310
|
function EVMModal(props) {
|
|
4187
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
4311
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_rainbowkit.RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(EVMConnectModal, { ...props }) });
|
|
4188
4312
|
}
|
|
4189
4313
|
|
|
4190
4314
|
// src/components/TRONModal/index.tsx
|
|
@@ -4299,7 +4423,7 @@ var useTRONWallet = () => {
|
|
|
4299
4423
|
};
|
|
4300
4424
|
|
|
4301
4425
|
// src/components/TRONModal/index.tsx
|
|
4302
|
-
var
|
|
4426
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4303
4427
|
function TRONConnectModal({
|
|
4304
4428
|
type = "login",
|
|
4305
4429
|
onSuccess,
|
|
@@ -4309,9 +4433,9 @@ function TRONConnectModal({
|
|
|
4309
4433
|
const intl = (0, import_react_intl10.useIntl)();
|
|
4310
4434
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
|
|
4311
4435
|
const iconMaps = {
|
|
4312
|
-
tronlink: /* @__PURE__ */ (0,
|
|
4313
|
-
bitget: /* @__PURE__ */ (0,
|
|
4314
|
-
okx: /* @__PURE__ */ (0,
|
|
4436
|
+
tronlink: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
|
|
4437
|
+
bitget: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(BitgetIcon, { size: isDownMd ? 36 : 40 }),
|
|
4438
|
+
okx: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(OKXIcon, { size: isDownMd ? 36 : 40 })
|
|
4315
4439
|
};
|
|
4316
4440
|
const { events, login } = useMatch();
|
|
4317
4441
|
const [status, setStatus] = (0, import_react18.useState)("");
|
|
@@ -4403,11 +4527,11 @@ function TRONConnectModal({
|
|
|
4403
4527
|
disconnect();
|
|
4404
4528
|
}
|
|
4405
4529
|
}, [props.isOpen]);
|
|
4406
|
-
return /* @__PURE__ */ (0,
|
|
4530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4407
4531
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4408
4532
|
}, {
|
|
4409
4533
|
name: "TRON"
|
|
4410
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
4534
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4411
4535
|
WalletModalContent,
|
|
4412
4536
|
{
|
|
4413
4537
|
error,
|
|
@@ -4420,9 +4544,9 @@ function TRONConnectModal({
|
|
|
4420
4544
|
setVisible: () => {
|
|
4421
4545
|
}
|
|
4422
4546
|
}
|
|
4423
|
-
) : /* @__PURE__ */ (0,
|
|
4547
|
+
) : /* @__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: [
|
|
4424
4548
|
installedWallets.map((wallet2) => {
|
|
4425
|
-
return /* @__PURE__ */ (0,
|
|
4549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4426
4550
|
RecommendItem,
|
|
4427
4551
|
{
|
|
4428
4552
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -4435,14 +4559,14 @@ function TRONConnectModal({
|
|
|
4435
4559
|
);
|
|
4436
4560
|
}),
|
|
4437
4561
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
4438
|
-
return /* @__PURE__ */ (0,
|
|
4562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4439
4563
|
RecommendItem,
|
|
4440
4564
|
{
|
|
4441
4565
|
icon: iconMaps[wallet2.walletKey],
|
|
4442
4566
|
name: wallet2.name,
|
|
4443
4567
|
onClick: () => {
|
|
4444
4568
|
},
|
|
4445
|
-
footer: /* @__PURE__ */ (0,
|
|
4569
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Button, { size: "sm", onClick: () => {
|
|
4446
4570
|
window.open(wallet2.website);
|
|
4447
4571
|
}, children: "Install" })
|
|
4448
4572
|
},
|
|
@@ -4452,14 +4576,14 @@ function TRONConnectModal({
|
|
|
4452
4576
|
] }) }) });
|
|
4453
4577
|
}
|
|
4454
4578
|
function TRONModal(props) {
|
|
4455
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
4579
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TRONConnectModal, { ...props, type: props.type });
|
|
4456
4580
|
}
|
|
4457
4581
|
|
|
4458
4582
|
// src/components/TONModal/index.tsx
|
|
4459
4583
|
var import_react19 = __toESM(require("react"));
|
|
4460
4584
|
var import_react_intl11 = require("react-intl");
|
|
4461
4585
|
var import_ui_react = require("@tonconnect/ui-react");
|
|
4462
|
-
var
|
|
4586
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4463
4587
|
function WalletContent2({
|
|
4464
4588
|
onSuccess,
|
|
4465
4589
|
type
|
|
@@ -4586,7 +4710,7 @@ function WalletContent2({
|
|
|
4586
4710
|
}
|
|
4587
4711
|
}
|
|
4588
4712
|
}, [state]);
|
|
4589
|
-
return /* @__PURE__ */ (0,
|
|
4713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4590
4714
|
WalletModalContent,
|
|
4591
4715
|
{
|
|
4592
4716
|
connected,
|
|
@@ -4620,20 +4744,20 @@ function TONConnectModal({
|
|
|
4620
4744
|
const intl = (0, import_react_intl11.useIntl)();
|
|
4621
4745
|
const { endpoints, appid } = useLocalStore_default();
|
|
4622
4746
|
const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
|
|
4623
|
-
return /* @__PURE__ */ (0,
|
|
4747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4624
4748
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4625
4749
|
}, {
|
|
4626
4750
|
name: "TON"
|
|
4627
|
-
}), children: /* @__PURE__ */ (0,
|
|
4751
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4628
4752
|
import_ui_react.TonConnectUIProvider,
|
|
4629
4753
|
{
|
|
4630
4754
|
manifestUrl,
|
|
4631
|
-
children: /* @__PURE__ */ (0,
|
|
4755
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(WalletContent2, { onSuccess, type })
|
|
4632
4756
|
}
|
|
4633
4757
|
) });
|
|
4634
4758
|
}
|
|
4635
4759
|
function TONModal(props) {
|
|
4636
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
4760
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(TONConnectModal, { ...props });
|
|
4637
4761
|
}
|
|
4638
4762
|
|
|
4639
4763
|
// src/components/BTCModal/index.tsx
|
|
@@ -4856,7 +4980,7 @@ var useBTCWallet = () => {
|
|
|
4856
4980
|
};
|
|
4857
4981
|
|
|
4858
4982
|
// src/components/BTCModal/index.tsx
|
|
4859
|
-
var
|
|
4983
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
4860
4984
|
function BTCConnectModal({
|
|
4861
4985
|
type = "login",
|
|
4862
4986
|
onSuccess,
|
|
@@ -4866,10 +4990,10 @@ function BTCConnectModal({
|
|
|
4866
4990
|
const intl = (0, import_react_intl12.useIntl)();
|
|
4867
4991
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
|
|
4868
4992
|
const iconMaps = {
|
|
4869
|
-
leather: /* @__PURE__ */ (0,
|
|
4870
|
-
unisat: /* @__PURE__ */ (0,
|
|
4871
|
-
xverse: /* @__PURE__ */ (0,
|
|
4872
|
-
phantom: /* @__PURE__ */ (0,
|
|
4993
|
+
leather: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(LeatherIcon, { size: isDownMd ? 36 : 40 }),
|
|
4994
|
+
unisat: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(UnisatIcon, { size: isDownMd ? 36 : 40 }),
|
|
4995
|
+
xverse: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(XverseIcon, { size: isDownMd ? 36 : 40 }),
|
|
4996
|
+
phantom: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(PhantomIcon, { size: isDownMd ? 36 : 40 })
|
|
4873
4997
|
};
|
|
4874
4998
|
const { events, login } = useMatch();
|
|
4875
4999
|
const [status, setStatus] = (0, import_react21.useState)("");
|
|
@@ -4969,11 +5093,11 @@ function BTCConnectModal({
|
|
|
4969
5093
|
statusRef.current = "";
|
|
4970
5094
|
setError("");
|
|
4971
5095
|
};
|
|
4972
|
-
return /* @__PURE__ */ (0,
|
|
5096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4973
5097
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4974
5098
|
}, {
|
|
4975
5099
|
name: "BTC"
|
|
4976
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5100
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4977
5101
|
WalletModalContent,
|
|
4978
5102
|
{
|
|
4979
5103
|
error,
|
|
@@ -4986,9 +5110,9 @@ function BTCConnectModal({
|
|
|
4986
5110
|
setVisible: () => {
|
|
4987
5111
|
}
|
|
4988
5112
|
}
|
|
4989
|
-
) : /* @__PURE__ */ (0,
|
|
5113
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
4990
5114
|
installedWallets.map((wallet2) => {
|
|
4991
|
-
return /* @__PURE__ */ (0,
|
|
5115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4992
5116
|
RecommendItem,
|
|
4993
5117
|
{
|
|
4994
5118
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -5001,14 +5125,14 @@ function BTCConnectModal({
|
|
|
5001
5125
|
);
|
|
5002
5126
|
}),
|
|
5003
5127
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
5004
|
-
return /* @__PURE__ */ (0,
|
|
5128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5005
5129
|
RecommendItem,
|
|
5006
5130
|
{
|
|
5007
5131
|
icon: iconMaps[wallet2.walletKey],
|
|
5008
5132
|
name: wallet2.name,
|
|
5009
5133
|
onClick: () => {
|
|
5010
5134
|
},
|
|
5011
|
-
footer: /* @__PURE__ */ (0,
|
|
5135
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Button, { size: "sm", onClick: () => {
|
|
5012
5136
|
window.open(wallet2.website);
|
|
5013
5137
|
}, children: "Install" })
|
|
5014
5138
|
},
|
|
@@ -5018,13 +5142,13 @@ function BTCConnectModal({
|
|
|
5018
5142
|
] }) }) });
|
|
5019
5143
|
}
|
|
5020
5144
|
function BTCModal(props) {
|
|
5021
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5145
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(BTCConnectModal, { ...props });
|
|
5022
5146
|
}
|
|
5023
5147
|
|
|
5024
5148
|
// src/components/WalletModal/index.tsx
|
|
5025
5149
|
var import_react22 = require("react");
|
|
5026
5150
|
var import_react_intl13 = require("react-intl");
|
|
5027
|
-
var
|
|
5151
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
5028
5152
|
function WalletConnectModal({
|
|
5029
5153
|
type,
|
|
5030
5154
|
methods: _methods,
|
|
@@ -5042,13 +5166,13 @@ function WalletConnectModal({
|
|
|
5042
5166
|
const platform = config.platform.map((p) => p.toLowerCase());
|
|
5043
5167
|
return WALLET_METHODS.filter((m) => platform.includes(m));
|
|
5044
5168
|
}, [config.platform, _methods]);
|
|
5045
|
-
return /* @__PURE__ */ (0,
|
|
5169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5046
5170
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5047
5171
|
}, {
|
|
5048
5172
|
name: ""
|
|
5049
|
-
}), children: /* @__PURE__ */ (0,
|
|
5173
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "matchid-login-recommend-list", children: methods.map((method, index) => {
|
|
5050
5174
|
const m = walletMap[method];
|
|
5051
|
-
return /* @__PURE__ */ (0,
|
|
5175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
5052
5176
|
RecommendItem,
|
|
5053
5177
|
{
|
|
5054
5178
|
icon: m?.icon,
|
|
@@ -5062,12 +5186,12 @@ function WalletConnectModal({
|
|
|
5062
5186
|
}) }) }) });
|
|
5063
5187
|
}
|
|
5064
5188
|
function WalletModal(props) {
|
|
5065
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5189
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(WalletConnectModal, { ...props });
|
|
5066
5190
|
}
|
|
5067
5191
|
|
|
5068
5192
|
// src/components/AlphaAvatar/index.tsx
|
|
5069
5193
|
var import_react23 = require("react");
|
|
5070
|
-
var
|
|
5194
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
5071
5195
|
function AlphaAvatar({ name, size = 40, className = "" }) {
|
|
5072
5196
|
const [avatar, setAvatar] = (0, import_react23.useState)(void 0);
|
|
5073
5197
|
(0, import_react23.useEffect)(() => {
|
|
@@ -5076,7 +5200,7 @@ function AlphaAvatar({ name, size = 40, className = "" }) {
|
|
|
5076
5200
|
setAvatar(char);
|
|
5077
5201
|
}
|
|
5078
5202
|
}, [name]);
|
|
5079
|
-
return /* @__PURE__ */ (0,
|
|
5203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
5080
5204
|
width: size,
|
|
5081
5205
|
height: size,
|
|
5082
5206
|
fontSize: Math.ceil(size / 2)
|
|
@@ -5084,7 +5208,7 @@ function AlphaAvatar({ name, size = 40, className = "" }) {
|
|
|
5084
5208
|
}
|
|
5085
5209
|
|
|
5086
5210
|
// src/components/WalletAsset/index.tsx
|
|
5087
|
-
var
|
|
5211
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
5088
5212
|
function WalletAsset({
|
|
5089
5213
|
onAssetClick,
|
|
5090
5214
|
matchWalletAssetsOptions
|
|
@@ -5094,7 +5218,7 @@ function WalletAsset({
|
|
|
5094
5218
|
list: walletAssets.mergedAssets
|
|
5095
5219
|
});
|
|
5096
5220
|
const { list } = useMatchChain();
|
|
5097
|
-
return /* @__PURE__ */ (0,
|
|
5221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5098
5222
|
const clickFunc = onAssetClick && onAssetClick(n);
|
|
5099
5223
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5100
5224
|
const getFooterColor = () => {
|
|
@@ -5109,11 +5233,11 @@ function WalletAsset({
|
|
|
5109
5233
|
}
|
|
5110
5234
|
return "";
|
|
5111
5235
|
};
|
|
5112
|
-
return /* @__PURE__ */ (0,
|
|
5236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-wallet-asset-item`, onClick: clickFunc, style: {
|
|
5113
5237
|
cursor: clickFunc ? "pointer" : "default"
|
|
5114
5238
|
}, children: [
|
|
5115
|
-
/* @__PURE__ */ (0,
|
|
5116
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
5239
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
|
|
5240
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-wallet-asset-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
5117
5241
|
AlphaAvatar,
|
|
5118
5242
|
{
|
|
5119
5243
|
className: `matchid-wallet-asset-icon`,
|
|
@@ -5121,12 +5245,12 @@ function WalletAsset({
|
|
|
5121
5245
|
name: n.symbol || n.name || ""
|
|
5122
5246
|
}
|
|
5123
5247
|
),
|
|
5124
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
5248
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
|
|
5125
5249
|
] }),
|
|
5126
|
-
/* @__PURE__ */ (0,
|
|
5127
|
-
/* @__PURE__ */ (0,
|
|
5128
|
-
"price" in n && /* @__PURE__ */ (0,
|
|
5129
|
-
/* @__PURE__ */ (0,
|
|
5250
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-wallet-asset-info`, children: [
|
|
5251
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
|
|
5252
|
+
"price" in n && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-wallet-asset-content`, children: [
|
|
5253
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
5130
5254
|
NumberFormatter,
|
|
5131
5255
|
{
|
|
5132
5256
|
value: n.price,
|
|
@@ -5134,7 +5258,7 @@ function WalletAsset({
|
|
|
5134
5258
|
tFixNum: 2
|
|
5135
5259
|
}
|
|
5136
5260
|
) }),
|
|
5137
|
-
/* @__PURE__ */ (0,
|
|
5261
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
5138
5262
|
NumberFormatter,
|
|
5139
5263
|
{
|
|
5140
5264
|
value: n.value,
|
|
@@ -5143,15 +5267,15 @@ function WalletAsset({
|
|
|
5143
5267
|
}
|
|
5144
5268
|
) })
|
|
5145
5269
|
] }),
|
|
5146
|
-
/* @__PURE__ */ (0,
|
|
5147
|
-
/* @__PURE__ */ (0,
|
|
5270
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-wallet-asset-footer`, children: [
|
|
5271
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
5148
5272
|
NumberFormatter,
|
|
5149
5273
|
{
|
|
5150
5274
|
value: n.balance,
|
|
5151
5275
|
tFixNum: 3
|
|
5152
5276
|
}
|
|
5153
5277
|
) }),
|
|
5154
|
-
"price_change_24h" in n && /* @__PURE__ */ (0,
|
|
5278
|
+
"price_change_24h" in n && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: `matchid-wallet-asset-change ${getFooterColor()}`, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
5155
5279
|
NumberFormatter,
|
|
5156
5280
|
{
|
|
5157
5281
|
prefix: `${(n?.price_change_24h || 0) < 0 ? "-" : "+"} `,
|
|
@@ -5170,7 +5294,7 @@ function WalletAsset({
|
|
|
5170
5294
|
var import_react24 = require("react");
|
|
5171
5295
|
var import_viem3 = require("viem");
|
|
5172
5296
|
var import_react_intl14 = require("react-intl");
|
|
5173
|
-
var
|
|
5297
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
5174
5298
|
function Input2({
|
|
5175
5299
|
onChange,
|
|
5176
5300
|
placeholder,
|
|
@@ -5180,8 +5304,8 @@ function Input2({
|
|
|
5180
5304
|
error,
|
|
5181
5305
|
size = "df"
|
|
5182
5306
|
}) {
|
|
5183
|
-
return /* @__PURE__ */ (0,
|
|
5184
|
-
/* @__PURE__ */ (0,
|
|
5307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
|
|
5308
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
5185
5309
|
"input",
|
|
5186
5310
|
{
|
|
5187
5311
|
placeholder,
|
|
@@ -5192,7 +5316,7 @@ function Input2({
|
|
|
5192
5316
|
className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
|
|
5193
5317
|
}
|
|
5194
5318
|
),
|
|
5195
|
-
error && /* @__PURE__ */ (0,
|
|
5319
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "matchid-token-input-error-text", children: error })
|
|
5196
5320
|
] });
|
|
5197
5321
|
}
|
|
5198
5322
|
function TokenSend({
|
|
@@ -5320,24 +5444,24 @@ function TokenSend({
|
|
|
5320
5444
|
window.removeEventListener("message", receiveMessage);
|
|
5321
5445
|
};
|
|
5322
5446
|
}, []);
|
|
5323
|
-
return /* @__PURE__ */ (0,
|
|
5324
|
-
/* @__PURE__ */ (0,
|
|
5325
|
-
/* @__PURE__ */ (0,
|
|
5326
|
-
/* @__PURE__ */ (0,
|
|
5327
|
-
/* @__PURE__ */ (0,
|
|
5328
|
-
/* @__PURE__ */ (0,
|
|
5329
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
5447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react_intl14.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: `matchid-token-send-box`, children: [
|
|
5448
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
5449
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: `matchid-token-amount-content`, children: [
|
|
5450
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: `matchid-token-amount-header`, children: [
|
|
5451
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react_intl14.FormattedMessage, { id: "amount" }) }),
|
|
5452
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
|
|
5453
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
5330
5454
|
"img",
|
|
5331
5455
|
{
|
|
5332
5456
|
src: token?.icon,
|
|
5333
5457
|
alt: token?.symbol,
|
|
5334
5458
|
className: `matchid-token-amount-chain-icon`
|
|
5335
5459
|
}
|
|
5336
|
-
) : /* @__PURE__ */ (0,
|
|
5337
|
-
/* @__PURE__ */ (0,
|
|
5460
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(AlphaAvatar2, { name: token.symbol || token.name || "", size: 16 }),
|
|
5461
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { children: token?.symbol })
|
|
5338
5462
|
] })
|
|
5339
5463
|
] }),
|
|
5340
|
-
/* @__PURE__ */ (0,
|
|
5464
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
5341
5465
|
Input2,
|
|
5342
5466
|
{
|
|
5343
5467
|
type: "text",
|
|
@@ -5350,18 +5474,18 @@ function TokenSend({
|
|
|
5350
5474
|
error: error.amount || txError
|
|
5351
5475
|
}
|
|
5352
5476
|
),
|
|
5353
|
-
/* @__PURE__ */ (0,
|
|
5354
|
-
/* @__PURE__ */ (0,
|
|
5355
|
-
/* @__PURE__ */ (0,
|
|
5477
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
|
|
5478
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: `matchid-token-amount-title`, children: [
|
|
5479
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react_intl14.FormattedMessage, { id: "balance" }),
|
|
5356
5480
|
":"
|
|
5357
5481
|
] }),
|
|
5358
|
-
/* @__PURE__ */ (0,
|
|
5482
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
|
|
5359
5483
|
] }),
|
|
5360
|
-
/* @__PURE__ */ (0,
|
|
5484
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
5361
5485
|
] }),
|
|
5362
|
-
/* @__PURE__ */ (0,
|
|
5363
|
-
/* @__PURE__ */ (0,
|
|
5364
|
-
/* @__PURE__ */ (0,
|
|
5486
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: `matchid-token-address-content`, children: [
|
|
5487
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react_intl14.FormattedMessage, { id: "receiveTitle" }) }) }),
|
|
5488
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
5365
5489
|
Input2,
|
|
5366
5490
|
{
|
|
5367
5491
|
type: "text",
|
|
@@ -5377,7 +5501,7 @@ function TokenSend({
|
|
|
5377
5501
|
)
|
|
5378
5502
|
] })
|
|
5379
5503
|
] }),
|
|
5380
|
-
/* @__PURE__ */ (0,
|
|
5504
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
5381
5505
|
Button,
|
|
5382
5506
|
{
|
|
5383
5507
|
size: "lg",
|
|
@@ -5386,7 +5510,7 @@ function TokenSend({
|
|
|
5386
5510
|
disabled: !canSend || !!txError,
|
|
5387
5511
|
onClick: onNext,
|
|
5388
5512
|
loading: loading || sending,
|
|
5389
|
-
children: /* @__PURE__ */ (0,
|
|
5513
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react_intl14.FormattedMessage, { id: "next" })
|
|
5390
5514
|
}
|
|
5391
5515
|
)
|
|
5392
5516
|
] }) });
|
|
@@ -5394,7 +5518,7 @@ function TokenSend({
|
|
|
5394
5518
|
|
|
5395
5519
|
// src/components/TokenDetail/index.tsx
|
|
5396
5520
|
var import_react_intl15 = require("react-intl");
|
|
5397
|
-
var
|
|
5521
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
5398
5522
|
function TokenDetail({
|
|
5399
5523
|
onClose,
|
|
5400
5524
|
token
|
|
@@ -5404,41 +5528,41 @@ function TokenDetail({
|
|
|
5404
5528
|
const chain = chainList?.find((m) => m.id.toString() === token.chain_id);
|
|
5405
5529
|
const onSend = () => {
|
|
5406
5530
|
modal.show((props) => {
|
|
5407
|
-
return /* @__PURE__ */ (0,
|
|
5531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TokenSend, { onClose: () => {
|
|
5408
5532
|
props.close();
|
|
5409
5533
|
onClose();
|
|
5410
5534
|
}, onBack: props.close, zIndex: props.zIndex, token });
|
|
5411
5535
|
});
|
|
5412
5536
|
};
|
|
5413
5537
|
const intl = (0, import_react_intl15.useIntl)();
|
|
5414
|
-
return /* @__PURE__ */ (0,
|
|
5538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ModalDrawer, { isOpen: true, title: intl.formatMessage({
|
|
5415
5539
|
id: "tokenDetails"
|
|
5416
|
-
}), onClose, children: /* @__PURE__ */ (0,
|
|
5417
|
-
/* @__PURE__ */ (0,
|
|
5418
|
-
/* @__PURE__ */ (0,
|
|
5419
|
-
/* @__PURE__ */ (0,
|
|
5420
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
5421
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
5540
|
+
}), onClose, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: `matchid-token-detail`, children: [
|
|
5541
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: `matchid-token-main`, children: [
|
|
5542
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: `matchid-token-info`, children: [
|
|
5543
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: `matchid-token-logo`, children: [
|
|
5544
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("img", { src: token.icon, alt: token.symbol, className: `matchid-token-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(AlphaAvatar2, { className: `matchid-token-icon`, size: 48, name: token.symbol || token.name || "" }),
|
|
5545
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-token-chain` })
|
|
5422
5546
|
] }),
|
|
5423
|
-
/* @__PURE__ */ (0,
|
|
5424
|
-
/* @__PURE__ */ (0,
|
|
5547
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: `matchid-token-name`, children: [
|
|
5548
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10 }),
|
|
5425
5549
|
" ",
|
|
5426
5550
|
token.symbol
|
|
5427
5551
|
] })
|
|
5428
5552
|
] }),
|
|
5429
|
-
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0,
|
|
5430
|
-
/* @__PURE__ */ (0,
|
|
5431
|
-
/* @__PURE__ */ (0,
|
|
5553
|
+
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: `matchid-token-contract`, children: [
|
|
5554
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "matchid-token-contract-title", children: "Contract address" }),
|
|
5555
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "matchid-token-contract-address", children: token.address })
|
|
5432
5556
|
] })
|
|
5433
5557
|
] }),
|
|
5434
|
-
/* @__PURE__ */ (0,
|
|
5558
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react_intl15.FormattedMessage, { id: "send" }) })
|
|
5435
5559
|
] }) });
|
|
5436
5560
|
}
|
|
5437
5561
|
|
|
5438
5562
|
// src/components/TokenSendList/index.tsx
|
|
5439
5563
|
var import_react25 = require("react");
|
|
5440
5564
|
var import_react_intl16 = require("react-intl");
|
|
5441
|
-
var
|
|
5565
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
5442
5566
|
function TokenSendList({ close }) {
|
|
5443
5567
|
const isDownMd = useDownMd();
|
|
5444
5568
|
const walletAssets = useMatchWalletAssets();
|
|
@@ -5450,16 +5574,16 @@ function TokenSendList({ close }) {
|
|
|
5450
5574
|
const modal = useModal();
|
|
5451
5575
|
const onNext = () => {
|
|
5452
5576
|
checked && modal.show((props) => {
|
|
5453
|
-
return /* @__PURE__ */ (0,
|
|
5577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TokenSend, { onClose: () => {
|
|
5454
5578
|
props.close();
|
|
5455
5579
|
close();
|
|
5456
5580
|
}, onBack: props.close, zIndex: props.zIndex, token: checked });
|
|
5457
5581
|
});
|
|
5458
5582
|
};
|
|
5459
|
-
return /* @__PURE__ */ (0,
|
|
5460
|
-
/* @__PURE__ */ (0,
|
|
5583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-token-send-list-box", children: [
|
|
5584
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5461
5585
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5462
|
-
return /* @__PURE__ */ (0,
|
|
5586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
5463
5587
|
"div",
|
|
5464
5588
|
{
|
|
5465
5589
|
className: `matchid-token-send-item ${checked?.address == n.address ? "matchid-token-send-chekced" : ""}`,
|
|
@@ -5467,10 +5591,10 @@ function TokenSendList({ close }) {
|
|
|
5467
5591
|
setChecked(n);
|
|
5468
5592
|
},
|
|
5469
5593
|
children: [
|
|
5470
|
-
/* @__PURE__ */ (0,
|
|
5471
|
-
/* @__PURE__ */ (0,
|
|
5472
|
-
/* @__PURE__ */ (0,
|
|
5473
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
5594
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
|
|
5595
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
5596
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-token-send-logo", children: [
|
|
5597
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
5474
5598
|
AlphaAvatar,
|
|
5475
5599
|
{
|
|
5476
5600
|
className: `matchid-token-send-icon`,
|
|
@@ -5478,7 +5602,7 @@ function TokenSendList({ close }) {
|
|
|
5478
5602
|
name: n.symbol || n.name || ""
|
|
5479
5603
|
}
|
|
5480
5604
|
),
|
|
5481
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
5605
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
5482
5606
|
"img",
|
|
5483
5607
|
{
|
|
5484
5608
|
src: chain.iconUrl,
|
|
@@ -5487,9 +5611,9 @@ function TokenSendList({ close }) {
|
|
|
5487
5611
|
}
|
|
5488
5612
|
)
|
|
5489
5613
|
] }),
|
|
5490
|
-
/* @__PURE__ */ (0,
|
|
5491
|
-
/* @__PURE__ */ (0,
|
|
5492
|
-
/* @__PURE__ */ (0,
|
|
5614
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: `matchid-token-send-info`, children: [
|
|
5615
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
|
|
5616
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
|
|
5493
5617
|
] })
|
|
5494
5618
|
] })
|
|
5495
5619
|
]
|
|
@@ -5497,7 +5621,7 @@ function TokenSendList({ close }) {
|
|
|
5497
5621
|
index
|
|
5498
5622
|
);
|
|
5499
5623
|
}) }),
|
|
5500
|
-
/* @__PURE__ */ (0,
|
|
5624
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_intl16.FormattedMessage, { id: "next" }) })
|
|
5501
5625
|
] });
|
|
5502
5626
|
}
|
|
5503
5627
|
|
|
@@ -5605,7 +5729,7 @@ function useHash({
|
|
|
5605
5729
|
|
|
5606
5730
|
// src/components/TransactionList/index.tsx
|
|
5607
5731
|
var import_react_intl17 = require("react-intl");
|
|
5608
|
-
var
|
|
5732
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
5609
5733
|
var Item = ({ data }) => {
|
|
5610
5734
|
const { address } = useWallet();
|
|
5611
5735
|
const isOut = data.from.toLowerCase() == address.toLowerCase();
|
|
@@ -5692,18 +5816,18 @@ var Item = ({ data }) => {
|
|
|
5692
5816
|
}
|
|
5693
5817
|
return chain?.nativeCurrency.symbol || chain?.nativeCurrency.name;
|
|
5694
5818
|
}, [transferType, chain, contracts, chainId, data.to]);
|
|
5695
|
-
return /* @__PURE__ */ (0,
|
|
5819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
5696
5820
|
"a",
|
|
5697
5821
|
{
|
|
5698
5822
|
href: explorerLink(`tx/${data.hash}`),
|
|
5699
5823
|
target: "_blank",
|
|
5700
5824
|
className: `matchid-transaction-item`,
|
|
5701
5825
|
children: [
|
|
5702
|
-
/* @__PURE__ */ (0,
|
|
5703
|
-
/* @__PURE__ */ (0,
|
|
5704
|
-
/* @__PURE__ */ (0,
|
|
5705
|
-
/* @__PURE__ */ (0,
|
|
5706
|
-
/* @__PURE__ */ (0,
|
|
5826
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-transacton-item-container`, children: [
|
|
5827
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
|
|
5828
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-transaction-item-details`, children: [
|
|
5829
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
|
|
5830
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5707
5831
|
"div",
|
|
5708
5832
|
{
|
|
5709
5833
|
className: `matchid-transaction-item-timestamp`,
|
|
@@ -5712,11 +5836,11 @@ var Item = ({ data }) => {
|
|
|
5712
5836
|
)
|
|
5713
5837
|
] })
|
|
5714
5838
|
] }),
|
|
5715
|
-
/* @__PURE__ */ (0,
|
|
5716
|
-
/* @__PURE__ */ (0,
|
|
5717
|
-
status == "loading" && /* @__PURE__ */ (0,
|
|
5718
|
-
status == "success" && /* @__PURE__ */ (0,
|
|
5719
|
-
status == "error" && /* @__PURE__ */ (0,
|
|
5839
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
|
|
5840
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(NumberFormatter, { value: amount, tFixNum: 6, prefix: isOut ? "-" : "+", suffix: " " + symbol }),
|
|
5841
|
+
status == "loading" && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(LoadingIcon_default, { color: "#000000", size: 16, rotate: true }),
|
|
5842
|
+
status == "success" && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(CheckRoundIcon, { size: 16 }),
|
|
5843
|
+
status == "error" && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(InfoRoundIcon, { size: 16 })
|
|
5720
5844
|
] })
|
|
5721
5845
|
]
|
|
5722
5846
|
}
|
|
@@ -5726,26 +5850,26 @@ function TransactionList({
|
|
|
5726
5850
|
scrollableTarget
|
|
5727
5851
|
}) {
|
|
5728
5852
|
const { fetchMoreData, hasMore, items } = useMatchWalletRecords();
|
|
5729
|
-
return /* @__PURE__ */ (0,
|
|
5853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5730
5854
|
import_react_infinite_scroll_component.default,
|
|
5731
5855
|
{
|
|
5732
5856
|
scrollableTarget,
|
|
5733
5857
|
dataLength: items.length,
|
|
5734
5858
|
next: fetchMoreData,
|
|
5735
5859
|
hasMore,
|
|
5736
|
-
loader: /* @__PURE__ */ (0,
|
|
5737
|
-
/* @__PURE__ */ (0,
|
|
5860
|
+
loader: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-list-nomore", children: [
|
|
5861
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
|
|
5738
5862
|
"Loading..."
|
|
5739
5863
|
] }),
|
|
5740
|
-
endMessage: items.length > 0 ? /* @__PURE__ */ (0,
|
|
5741
|
-
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0,
|
|
5864
|
+
endMessage: items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl17.FormattedMessage, { id: "noMoreRecords" }) }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl17.FormattedMessage, { id: "noRecords" }) }),
|
|
5865
|
+
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "mt-[150px]" }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Item, { data: item }, index)) })
|
|
5742
5866
|
}
|
|
5743
5867
|
);
|
|
5744
5868
|
}
|
|
5745
5869
|
|
|
5746
5870
|
// src/ui/Modal/index.tsx
|
|
5747
5871
|
var import_react_intl18 = require("react-intl");
|
|
5748
|
-
var
|
|
5872
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
5749
5873
|
function Modal({
|
|
5750
5874
|
children,
|
|
5751
5875
|
isOpen,
|
|
@@ -5753,10 +5877,10 @@ function Modal({
|
|
|
5753
5877
|
zIndex = 100,
|
|
5754
5878
|
className = ""
|
|
5755
5879
|
}) {
|
|
5756
|
-
return /* @__PURE__ */ (0,
|
|
5880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: `matchid-modal ${className}`, style: {
|
|
5757
5881
|
width
|
|
5758
5882
|
}, children: [
|
|
5759
|
-
/* @__PURE__ */ (0,
|
|
5883
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-modal-mobile-header" }),
|
|
5760
5884
|
children
|
|
5761
5885
|
] }) });
|
|
5762
5886
|
}
|
|
@@ -5770,13 +5894,13 @@ function ModalWithHeader({
|
|
|
5770
5894
|
...props
|
|
5771
5895
|
}) {
|
|
5772
5896
|
const isDownMd = useDownMd();
|
|
5773
|
-
return /* @__PURE__ */ (0,
|
|
5774
|
-
/* @__PURE__ */ (0,
|
|
5775
|
-
/* @__PURE__ */ (0,
|
|
5776
|
-
onBack && /* @__PURE__ */ (0,
|
|
5777
|
-
/* @__PURE__ */ (0,
|
|
5897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(Modal, { ...props, children: [
|
|
5898
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
|
|
5899
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-modal-header-content", children: [
|
|
5900
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
|
|
5901
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "matchid-modal-header-title", children: title })
|
|
5778
5902
|
] }),
|
|
5779
|
-
onClose && /* @__PURE__ */ (0,
|
|
5903
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
|
|
5780
5904
|
] }),
|
|
5781
5905
|
children
|
|
5782
5906
|
] });
|
|
@@ -5811,17 +5935,17 @@ function ConfirmModal({
|
|
|
5811
5935
|
setLoading(false);
|
|
5812
5936
|
}
|
|
5813
5937
|
};
|
|
5814
|
-
return /* @__PURE__ */ (0,
|
|
5815
|
-
/* @__PURE__ */ (0,
|
|
5816
|
-
error && /* @__PURE__ */ (0,
|
|
5817
|
-
/* @__PURE__ */ (0,
|
|
5938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ModalWithHeader, { isOpen, onClose, title, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-confirm-modal", children: [
|
|
5939
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-w-full", children }),
|
|
5940
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: `matchid-error`, children: error }),
|
|
5941
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Button, { size: "lg", onClick: onSubmit, loading, block: true, highlight: true, children: confirmText ?? intl.formatMessage({
|
|
5818
5942
|
id: "Confirm"
|
|
5819
5943
|
}) })
|
|
5820
5944
|
] }) });
|
|
5821
5945
|
}
|
|
5822
5946
|
|
|
5823
5947
|
// src/ui/ModalDrawer/index.tsx
|
|
5824
|
-
var
|
|
5948
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
5825
5949
|
function ModalDrawer({
|
|
5826
5950
|
title,
|
|
5827
5951
|
drawerTitleVisible = true,
|
|
@@ -5829,13 +5953,13 @@ function ModalDrawer({
|
|
|
5829
5953
|
}) {
|
|
5830
5954
|
const isDownMd = useDownMd();
|
|
5831
5955
|
if (isDownMd) {
|
|
5832
|
-
return /* @__PURE__ */ (0,
|
|
5956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ModalWithHeader, { ...props, title });
|
|
5833
5957
|
}
|
|
5834
|
-
return /* @__PURE__ */ (0,
|
|
5958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
|
|
5835
5959
|
}
|
|
5836
5960
|
|
|
5837
5961
|
// src/ui/HashPanel/index.tsx
|
|
5838
|
-
var
|
|
5962
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
5839
5963
|
function HashPanel({
|
|
5840
5964
|
hash,
|
|
5841
5965
|
chain,
|
|
@@ -5895,14 +6019,14 @@ function HashPanel({
|
|
|
5895
6019
|
}
|
|
5896
6020
|
}, [hashQuery.data]);
|
|
5897
6021
|
const link = chain ? `${chain?.blockExplorers?.default.url}/tx/${hash}` : "";
|
|
5898
|
-
return /* @__PURE__ */ (0,
|
|
6022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
5899
6023
|
ModalDrawer,
|
|
5900
6024
|
{
|
|
5901
6025
|
isOpen,
|
|
5902
6026
|
showClose: true,
|
|
5903
6027
|
onClose,
|
|
5904
6028
|
zIndex,
|
|
5905
|
-
title: /* @__PURE__ */ (0,
|
|
6029
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
5906
6030
|
"div",
|
|
5907
6031
|
{
|
|
5908
6032
|
className: "matchid-hashpanel-header",
|
|
@@ -5912,32 +6036,32 @@ function HashPanel({
|
|
|
5912
6036
|
children: statusValue.text
|
|
5913
6037
|
}
|
|
5914
6038
|
),
|
|
5915
|
-
children: /* @__PURE__ */ (0,
|
|
5916
|
-
/* @__PURE__ */ (0,
|
|
5917
|
-
/* @__PURE__ */ (0,
|
|
6039
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-hashpanel-box", children: [
|
|
6040
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-hashpanel-content", children: [
|
|
6041
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: `matchid-hashpanel-status`, style: {
|
|
5918
6042
|
color: statusValue.color
|
|
5919
6043
|
}, children: statusValue.text }),
|
|
5920
|
-
statusValue.lottie && /* @__PURE__ */ (0,
|
|
6044
|
+
statusValue.lottie && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Lottie_default, { animationData: statusValue.lottie, style: {
|
|
5921
6045
|
width: "96px",
|
|
5922
6046
|
height: "96px"
|
|
5923
6047
|
} }),
|
|
5924
|
-
hash && /* @__PURE__ */ (0,
|
|
6048
|
+
hash && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
|
|
5925
6049
|
"Hash:",
|
|
5926
|
-
/* @__PURE__ */ (0,
|
|
6050
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("a", { href: link, target: "_blank", children: hash })
|
|
5927
6051
|
] }),
|
|
5928
|
-
error && /* @__PURE__ */ (0,
|
|
6052
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-hashpanel-text", children: error })
|
|
5929
6053
|
] }),
|
|
5930
|
-
/* @__PURE__ */ (0,
|
|
6054
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
|
|
5931
6055
|
] })
|
|
5932
6056
|
}
|
|
5933
6057
|
);
|
|
5934
6058
|
}
|
|
5935
6059
|
function HashPanel_default(props) {
|
|
5936
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
6060
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(HashPanel, { ...props });
|
|
5937
6061
|
}
|
|
5938
6062
|
|
|
5939
6063
|
// src/ui/Switch/index.tsx
|
|
5940
|
-
var
|
|
6064
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
5941
6065
|
function Switch({
|
|
5942
6066
|
size = "default",
|
|
5943
6067
|
checked = false,
|
|
@@ -5952,12 +6076,12 @@ function Switch({
|
|
|
5952
6076
|
onChange && onChange(!checked);
|
|
5953
6077
|
}
|
|
5954
6078
|
};
|
|
5955
|
-
return /* @__PURE__ */ (0,
|
|
6079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.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_runtime89.jsx)(LoadingIcon_default, { className: "matchid-switch-loading-icon", size: size == "default" ? 24 : 18, color: "var(--matchid-swicth-loading-color)" }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "matchid-switch-ball" }) });
|
|
5956
6080
|
}
|
|
5957
6081
|
|
|
5958
6082
|
// src/ui/AlphaAvatar/index.tsx
|
|
5959
6083
|
var import_react29 = require("react");
|
|
5960
|
-
var
|
|
6084
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
5961
6085
|
function AlphaAvatar2({
|
|
5962
6086
|
name,
|
|
5963
6087
|
size = "default",
|
|
@@ -5974,7 +6098,7 @@ function AlphaAvatar2({
|
|
|
5974
6098
|
return "";
|
|
5975
6099
|
}, [name]);
|
|
5976
6100
|
const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
|
|
5977
|
-
return /* @__PURE__ */ (0,
|
|
6101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
5978
6102
|
width: numberSize,
|
|
5979
6103
|
height: numberSize,
|
|
5980
6104
|
fontSize: Math.ceil(numberSize / 2),
|
|
@@ -5983,7 +6107,7 @@ function AlphaAvatar2({
|
|
|
5983
6107
|
}
|
|
5984
6108
|
|
|
5985
6109
|
// src/ui/Radio/index.tsx
|
|
5986
|
-
var
|
|
6110
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
5987
6111
|
function Radio({
|
|
5988
6112
|
checked = false,
|
|
5989
6113
|
onChange,
|
|
@@ -5992,20 +6116,20 @@ function Radio({
|
|
|
5992
6116
|
className = "",
|
|
5993
6117
|
style = {}
|
|
5994
6118
|
}) {
|
|
5995
|
-
return /* @__PURE__ */ (0,
|
|
6119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
|
|
5996
6120
|
width: size,
|
|
5997
6121
|
height: size,
|
|
5998
6122
|
...style,
|
|
5999
6123
|
// @ts-ignore
|
|
6000
6124
|
"--matchid-radio-checked": color
|
|
6001
|
-
}, children: checked && /* @__PURE__ */ (0,
|
|
6125
|
+
}, children: checked && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-radio-content`, style: {
|
|
6002
6126
|
width: Math.floor(size * 0.7),
|
|
6003
6127
|
height: Math.floor(size * 0.7)
|
|
6004
6128
|
} }) });
|
|
6005
6129
|
}
|
|
6006
6130
|
|
|
6007
6131
|
// src/ui/Skeleton/index.tsx
|
|
6008
|
-
var
|
|
6132
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
6009
6133
|
var Skeleton = ({
|
|
6010
6134
|
style = {},
|
|
6011
6135
|
className = "",
|
|
@@ -6016,7 +6140,7 @@ var Skeleton = ({
|
|
|
6016
6140
|
children
|
|
6017
6141
|
}) => {
|
|
6018
6142
|
if (!loading) {
|
|
6019
|
-
return /* @__PURE__ */ (0,
|
|
6143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_jsx_runtime92.Fragment, { children });
|
|
6020
6144
|
}
|
|
6021
6145
|
const skeletonStyle = {
|
|
6022
6146
|
width,
|
|
@@ -6024,7 +6148,7 @@ var Skeleton = ({
|
|
|
6024
6148
|
borderRadius: radius,
|
|
6025
6149
|
...style
|
|
6026
6150
|
};
|
|
6027
|
-
return /* @__PURE__ */ (0,
|
|
6151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
6028
6152
|
"div",
|
|
6029
6153
|
{
|
|
6030
6154
|
className: "matchid-skeleton " + className,
|
|
@@ -6035,10 +6159,10 @@ var Skeleton = ({
|
|
|
6035
6159
|
var Skeleton_default = Skeleton;
|
|
6036
6160
|
|
|
6037
6161
|
// src/ui/Tabs/index.tsx
|
|
6038
|
-
var
|
|
6162
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
6039
6163
|
function Tabs(props) {
|
|
6040
|
-
return /* @__PURE__ */ (0,
|
|
6041
|
-
return /* @__PURE__ */ (0,
|
|
6164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: `matchid-tabs`, children: props.tabs.map((tab, index) => {
|
|
6165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { onClick: () => props.setActiveTab(index), className: `matchid-tab ${props.activeTab === index ? "matchid-tab-active" : ""}`, children: tab }, index);
|
|
6042
6166
|
}) });
|
|
6043
6167
|
}
|
|
6044
6168
|
|
|
@@ -6056,16 +6180,16 @@ var LazyLottie = (props) => {
|
|
|
6056
6180
|
var Lottie_default = LazyLottie;
|
|
6057
6181
|
|
|
6058
6182
|
// src/ui/Checkbox/index.tsx
|
|
6059
|
-
var
|
|
6183
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
6060
6184
|
function Checkbox({
|
|
6061
6185
|
checked = false,
|
|
6062
6186
|
onChange
|
|
6063
6187
|
}) {
|
|
6064
|
-
return checked ? /* @__PURE__ */ (0,
|
|
6188
|
+
return checked ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(CheckboxCheckedIcon, { onClick: () => onChange?.(false) }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(CheckboxIcon, { onClick: () => onChange?.(true) });
|
|
6065
6189
|
}
|
|
6066
6190
|
|
|
6067
6191
|
// src/context/ModalContext.tsx
|
|
6068
|
-
var
|
|
6192
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
6069
6193
|
var ModalContext = (0, import_react30.createContext)(null);
|
|
6070
6194
|
function ModalProvider({ children }) {
|
|
6071
6195
|
const [modalState, setModalState] = (0, import_react30.useState)({
|
|
@@ -6109,7 +6233,7 @@ function ModalProvider({ children }) {
|
|
|
6109
6233
|
index: modalIndex,
|
|
6110
6234
|
zIndex: newZIndex,
|
|
6111
6235
|
close: () => closeModal(modalIndex),
|
|
6112
|
-
content: ({ close, zIndex }) => /* @__PURE__ */ (0,
|
|
6236
|
+
content: ({ close, zIndex }) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ModalDrawer, { showClose: true, isOpen: true, onClose: close, title: props.title, zIndex, onBack: props.onBack, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(props.content, { close, zIndex }) })
|
|
6113
6237
|
}],
|
|
6114
6238
|
highestZIndex: newZIndex
|
|
6115
6239
|
};
|
|
@@ -6117,11 +6241,11 @@ function ModalProvider({ children }) {
|
|
|
6117
6241
|
}, [getNextIndex, closeModal]);
|
|
6118
6242
|
const modalElements = modalState.modals.map(
|
|
6119
6243
|
(modal) => modal.visible ? (0, import_react_dom.createPortal)(
|
|
6120
|
-
/* @__PURE__ */ (0,
|
|
6244
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(modal.content, { zIndex: modal.zIndex, close: modal.close }, modal.index),
|
|
6121
6245
|
document.body
|
|
6122
6246
|
) : null
|
|
6123
6247
|
);
|
|
6124
|
-
return /* @__PURE__ */ (0,
|
|
6248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(ModalContext.Provider, { value: { show, open }, children: [
|
|
6125
6249
|
children,
|
|
6126
6250
|
modalElements
|
|
6127
6251
|
] });
|
|
@@ -6165,7 +6289,7 @@ var useTransactionStore = (0, import_zustand5.create)((0, import_middleware3.dev
|
|
|
6165
6289
|
var useTransactionStore_default = useTransactionStore;
|
|
6166
6290
|
|
|
6167
6291
|
// src/hooks/useWallet.tsx
|
|
6168
|
-
var
|
|
6292
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
6169
6293
|
var AppClientId = "react-sdk-" + getVersion();
|
|
6170
6294
|
function useWallet() {
|
|
6171
6295
|
const { address, wallet: walletConfig } = useLocalStore_default();
|
|
@@ -6339,12 +6463,12 @@ function useWallet() {
|
|
|
6339
6463
|
address: evmAccount.address
|
|
6340
6464
|
});
|
|
6341
6465
|
modal.show((props) => {
|
|
6342
|
-
return /* @__PURE__ */ (0,
|
|
6466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
|
|
6343
6467
|
});
|
|
6344
6468
|
return txHash;
|
|
6345
6469
|
} catch (error) {
|
|
6346
6470
|
modal.show((props) => {
|
|
6347
|
-
return /* @__PURE__ */ (0,
|
|
6471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, error: typeof error == "string" ? error : error.details || error.message, chain: _chain });
|
|
6348
6472
|
});
|
|
6349
6473
|
throw error;
|
|
6350
6474
|
}
|
|
@@ -6422,7 +6546,7 @@ function useCopyClipboard(timeout = 500) {
|
|
|
6422
6546
|
// src/context/ToastContext.tsx
|
|
6423
6547
|
var import_react33 = require("react");
|
|
6424
6548
|
var import_react_dom2 = require("react-dom");
|
|
6425
|
-
var
|
|
6549
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
6426
6550
|
var ToastContext = (0, import_react33.createContext)(null);
|
|
6427
6551
|
function ToastProvider({ children, zIndex = 299 }) {
|
|
6428
6552
|
const [toasts, setToasts] = (0, import_react33.useState)([]);
|
|
@@ -6435,28 +6559,28 @@ function ToastProvider({ children, zIndex = 299 }) {
|
|
|
6435
6559
|
setTimeout(() => removeToast(id), timeout);
|
|
6436
6560
|
}, [removeToast]);
|
|
6437
6561
|
const success = (0, import_react33.useCallback)((text, timeout) => {
|
|
6438
|
-
show({ icon: /* @__PURE__ */ (0,
|
|
6562
|
+
show({ icon: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(CheckRoundIcon, { color: "#2FCC00", size: 24 }), text, timeout });
|
|
6439
6563
|
}, [show]);
|
|
6440
6564
|
const error = (0, import_react33.useCallback)((text, timeout) => {
|
|
6441
|
-
show({ icon: /* @__PURE__ */ (0,
|
|
6565
|
+
show({ icon: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ErrorRoundIcon, { size: 24 }), text, timeout });
|
|
6442
6566
|
}, [show]);
|
|
6443
6567
|
const ToastComponent = (0, import_react_dom2.createPortal)(
|
|
6444
|
-
/* @__PURE__ */ (0,
|
|
6568
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "matchid-toast-box", style: {
|
|
6445
6569
|
zIndex
|
|
6446
|
-
}, children: toasts.reverse().map(({ id, icon, text }) => /* @__PURE__ */ (0,
|
|
6570
|
+
}, children: toasts.reverse().map(({ id, icon, text }) => /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
6447
6571
|
"div",
|
|
6448
6572
|
{
|
|
6449
6573
|
className: "matchid-toast",
|
|
6450
6574
|
children: [
|
|
6451
|
-
icon && /* @__PURE__ */ (0,
|
|
6452
|
-
/* @__PURE__ */ (0,
|
|
6575
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: icon }),
|
|
6576
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: text })
|
|
6453
6577
|
]
|
|
6454
6578
|
},
|
|
6455
6579
|
id
|
|
6456
6580
|
)) }),
|
|
6457
6581
|
document.body
|
|
6458
6582
|
);
|
|
6459
|
-
return /* @__PURE__ */ (0,
|
|
6583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(ToastContext.Provider, { value: { show, success, error }, children: [
|
|
6460
6584
|
children,
|
|
6461
6585
|
ToastComponent
|
|
6462
6586
|
] });
|
|
@@ -6601,7 +6725,7 @@ function useWalletAssetListQuery({
|
|
|
6601
6725
|
var import_react34 = require("react");
|
|
6602
6726
|
var import_viem10 = require("viem");
|
|
6603
6727
|
var import_react_intl19 = require("react-intl");
|
|
6604
|
-
var
|
|
6728
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
6605
6729
|
function useMatchChain() {
|
|
6606
6730
|
const chainListQuery = useChainListQuery();
|
|
6607
6731
|
const modal = useModal();
|
|
@@ -6632,28 +6756,28 @@ function useMatchChain() {
|
|
|
6632
6756
|
const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
|
|
6633
6757
|
const [selectedChainId, setSelectedChainId] = (0, import_react34.useState)(storeChainId2);
|
|
6634
6758
|
const isDownMd = useDownMd();
|
|
6635
|
-
return /* @__PURE__ */ (0,
|
|
6636
|
-
/* @__PURE__ */ (0,
|
|
6637
|
-
return /* @__PURE__ */ (0,
|
|
6759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-change-network-box`, children: [
|
|
6760
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
|
|
6761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
6638
6762
|
"div",
|
|
6639
6763
|
{
|
|
6640
6764
|
onClick: () => setSelectedChainId(item.id),
|
|
6641
6765
|
className: `matchid-change-network-item ${selectedChainId == item.id ? "matchid-change-network-selected" : ""}`,
|
|
6642
6766
|
children: [
|
|
6643
|
-
/* @__PURE__ */ (0,
|
|
6644
|
-
/* @__PURE__ */ (0,
|
|
6645
|
-
/* @__PURE__ */ (0,
|
|
6767
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
|
|
6768
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
|
|
6769
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
|
|
6646
6770
|
] }),
|
|
6647
|
-
/* @__PURE__ */ (0,
|
|
6771
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
|
|
6648
6772
|
]
|
|
6649
6773
|
},
|
|
6650
6774
|
index
|
|
6651
6775
|
);
|
|
6652
6776
|
}) }),
|
|
6653
|
-
/* @__PURE__ */ (0,
|
|
6777
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
|
|
6654
6778
|
setChainId2(selectedChainId || 0);
|
|
6655
6779
|
close();
|
|
6656
|
-
}, block: true, children: /* @__PURE__ */ (0,
|
|
6780
|
+
}, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl19.FormattedMessage, { id: "confirm" }) })
|
|
6657
6781
|
] });
|
|
6658
6782
|
}
|
|
6659
6783
|
const showChangeNetwork = () => {
|
|
@@ -6726,7 +6850,7 @@ function useIsContract({
|
|
|
6726
6850
|
}
|
|
6727
6851
|
|
|
6728
6852
|
// src/components/ImportToken/index.tsx
|
|
6729
|
-
var
|
|
6853
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
6730
6854
|
function ImportToken({ close }) {
|
|
6731
6855
|
const [status, setStatus] = (0, import_react35.useState)("");
|
|
6732
6856
|
const { token } = useUserInfo();
|
|
@@ -6837,22 +6961,22 @@ function ImportToken({ close }) {
|
|
|
6837
6961
|
enabled: canImport
|
|
6838
6962
|
});
|
|
6839
6963
|
if (status == "success" || status == "fail") {
|
|
6840
|
-
return /* @__PURE__ */ (0,
|
|
6841
|
-
/* @__PURE__ */ (0,
|
|
6842
|
-
/* @__PURE__ */ (0,
|
|
6964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: `matchid-import-token-result matchid-flex`, children: [
|
|
6965
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: `matchid-import-token-result-box matchid-flex`, children: [
|
|
6966
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: `matchid-import-token-result-img`, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Lottie_default, { animationData: status == "success" ? success_default : fail_default, style: {
|
|
6843
6967
|
width: "96px",
|
|
6844
6968
|
height: "96px"
|
|
6845
6969
|
} }) }),
|
|
6846
|
-
/* @__PURE__ */ (0,
|
|
6970
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: `matchid-import-token-result-text matchid-import-token-result-text-${status}`, children: status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl20.FormattedMessage, { id: "importSuccess" }) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl20.FormattedMessage, { id: "importFail" }) })
|
|
6847
6971
|
] }),
|
|
6848
|
-
status == "success" ? /* @__PURE__ */ (0,
|
|
6972
|
+
status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Button, { size: "lg", onClick: close, block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl20.FormattedMessage, { id: "close" }) }) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Button, { size: "lg", onClick: () => setStatus(""), block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl20.FormattedMessage, { id: "back" }) })
|
|
6849
6973
|
] });
|
|
6850
6974
|
}
|
|
6851
|
-
return /* @__PURE__ */ (0,
|
|
6852
|
-
/* @__PURE__ */ (0,
|
|
6853
|
-
/* @__PURE__ */ (0,
|
|
6975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: `matchid-import-token`, children: [
|
|
6976
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "matchid-import-token-form", children: [
|
|
6977
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Field, { label: intl.formatMessage({
|
|
6854
6978
|
id: "tokenSmartContract"
|
|
6855
|
-
}), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0,
|
|
6979
|
+
}), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
6856
6980
|
Input,
|
|
6857
6981
|
{
|
|
6858
6982
|
placeholder: intl.formatMessage({
|
|
@@ -6863,9 +6987,9 @@ function ImportToken({ close }) {
|
|
|
6863
6987
|
maxLength: 42
|
|
6864
6988
|
}
|
|
6865
6989
|
) }),
|
|
6866
|
-
/* @__PURE__ */ (0,
|
|
6990
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Field, { label: intl.formatMessage({
|
|
6867
6991
|
id: "tokenSymbol"
|
|
6868
|
-
}), error: error.symbol, children: /* @__PURE__ */ (0,
|
|
6992
|
+
}), error: error.symbol, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
6869
6993
|
Input,
|
|
6870
6994
|
{
|
|
6871
6995
|
placeholder: intl.formatMessage({
|
|
@@ -6876,9 +7000,9 @@ function ImportToken({ close }) {
|
|
|
6876
7000
|
maxLength: 16
|
|
6877
7001
|
}
|
|
6878
7002
|
) }),
|
|
6879
|
-
/* @__PURE__ */ (0,
|
|
7003
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Field, { label: intl.formatMessage({
|
|
6880
7004
|
id: "tokenDecimals"
|
|
6881
|
-
}), error: error.decimals, children: /* @__PURE__ */ (0,
|
|
7005
|
+
}), error: error.decimals, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
6882
7006
|
Input,
|
|
6883
7007
|
{
|
|
6884
7008
|
placeholder: intl.formatMessage({
|
|
@@ -6890,7 +7014,7 @@ function ImportToken({ close }) {
|
|
|
6890
7014
|
}
|
|
6891
7015
|
) })
|
|
6892
7016
|
] }),
|
|
6893
|
-
/* @__PURE__ */ (0,
|
|
7017
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
6894
7018
|
Button,
|
|
6895
7019
|
{
|
|
6896
7020
|
size: "lg",
|
|
@@ -6899,14 +7023,14 @@ function ImportToken({ close }) {
|
|
|
6899
7023
|
loading: loading || isContractQuery.isLoading,
|
|
6900
7024
|
disabled: !canImport || !isContractQuery.data,
|
|
6901
7025
|
highlight: true,
|
|
6902
|
-
children: /* @__PURE__ */ (0,
|
|
7026
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl20.FormattedMessage, { id: "import" })
|
|
6903
7027
|
}
|
|
6904
7028
|
)
|
|
6905
7029
|
] });
|
|
6906
7030
|
}
|
|
6907
7031
|
|
|
6908
7032
|
// src/hooks/useMatchWallet.tsx
|
|
6909
|
-
var
|
|
7033
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
6910
7034
|
var ReceiveModal = () => {
|
|
6911
7035
|
const chain = useMatchChain();
|
|
6912
7036
|
const { address } = useWallet();
|
|
@@ -6920,10 +7044,10 @@ var ReceiveModal = () => {
|
|
|
6920
7044
|
}));
|
|
6921
7045
|
};
|
|
6922
7046
|
const chainLink = chain.explorerLink("address/" + address);
|
|
6923
|
-
return /* @__PURE__ */ (0,
|
|
6924
|
-
/* @__PURE__ */ (0,
|
|
6925
|
-
/* @__PURE__ */ (0,
|
|
6926
|
-
/* @__PURE__ */ (0,
|
|
7047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: `matchid-receive-modal`, children: [
|
|
7048
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "matchid-receive-container", children: [
|
|
7049
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react_intl21.FormattedMessage, { id: "receiveQrcode" }) }),
|
|
7050
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: `matchid-qr-container`, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
6927
7051
|
import_react_qrcode.QRCode,
|
|
6928
7052
|
{
|
|
6929
7053
|
margin: "0",
|
|
@@ -6931,7 +7055,7 @@ var ReceiveModal = () => {
|
|
|
6931
7055
|
value: address
|
|
6932
7056
|
}
|
|
6933
7057
|
) }),
|
|
6934
|
-
/* @__PURE__ */ (0,
|
|
7058
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
6935
7059
|
"a",
|
|
6936
7060
|
{
|
|
6937
7061
|
href: chainLink,
|
|
@@ -6941,7 +7065,7 @@ var ReceiveModal = () => {
|
|
|
6941
7065
|
}
|
|
6942
7066
|
)
|
|
6943
7067
|
] }),
|
|
6944
|
-
/* @__PURE__ */ (0,
|
|
7068
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Button, { size: "lg", onClick: onCopy, block: true, highlight: true, disabled: copied, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
6945
7069
|
import_react_intl21.FormattedMessage,
|
|
6946
7070
|
{
|
|
6947
7071
|
id: "copyAddress"
|
|
@@ -7565,7 +7689,7 @@ function useTransaction({
|
|
|
7565
7689
|
// src/components/CEXBindModal/index.tsx
|
|
7566
7690
|
var import_react39 = require("react");
|
|
7567
7691
|
var import_react_intl22 = require("react-intl");
|
|
7568
|
-
var
|
|
7692
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
7569
7693
|
function CEXBindModal({
|
|
7570
7694
|
onClose,
|
|
7571
7695
|
type,
|
|
@@ -7581,7 +7705,7 @@ function CEXBindModal({
|
|
|
7581
7705
|
const [secret, setSecret] = (0, import_react39.useState)("");
|
|
7582
7706
|
const [error, setError] = (0, import_react39.useState)("");
|
|
7583
7707
|
const needPassphrase = (0, import_react39.useMemo)(() => {
|
|
7584
|
-
return ["bitget", "okx"].includes(type.toLowerCase());
|
|
7708
|
+
return ["bitget", "okx", "kucoin"].includes(type.toLowerCase());
|
|
7585
7709
|
}, [type]);
|
|
7586
7710
|
(0, import_react39.useEffect)(() => {
|
|
7587
7711
|
if (isOpen) {
|
|
@@ -7620,20 +7744,20 @@ function CEXBindModal({
|
|
|
7620
7744
|
setLoading(false);
|
|
7621
7745
|
}
|
|
7622
7746
|
};
|
|
7623
|
-
return /* @__PURE__ */ (0,
|
|
7747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(ModalWithHeader, { showClose: true, isOpen, onClose, title: intl.formatMessage({
|
|
7624
7748
|
id: "CEXBindTitle"
|
|
7625
7749
|
}, {
|
|
7626
7750
|
type
|
|
7627
|
-
}), ...props, children: /* @__PURE__ */ (0,
|
|
7628
|
-
/* @__PURE__ */ (0,
|
|
7629
|
-
/* @__PURE__ */ (0,
|
|
7630
|
-
/* @__PURE__ */ (0,
|
|
7631
|
-
/* @__PURE__ */ (0,
|
|
7632
|
-
/* @__PURE__ */ (0,
|
|
7751
|
+
}), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "matchid-cex-modal", children: [
|
|
7752
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { children: [
|
|
7753
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindAttention" }) }),
|
|
7754
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips1" }) }),
|
|
7755
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips2" }) }),
|
|
7756
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips3" }) })
|
|
7633
7757
|
] }),
|
|
7634
|
-
/* @__PURE__ */ (0,
|
|
7758
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Field, { label: intl.formatMessage({
|
|
7635
7759
|
id: "CEXBindApiKey"
|
|
7636
|
-
}), children: /* @__PURE__ */ (0,
|
|
7760
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
7637
7761
|
Input,
|
|
7638
7762
|
{
|
|
7639
7763
|
value: key,
|
|
@@ -7641,9 +7765,9 @@ function CEXBindModal({
|
|
|
7641
7765
|
placeholder: "**** **** ****"
|
|
7642
7766
|
}
|
|
7643
7767
|
) }),
|
|
7644
|
-
/* @__PURE__ */ (0,
|
|
7768
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Field, { label: intl.formatMessage({
|
|
7645
7769
|
id: "CEXBindApiSecretKey"
|
|
7646
|
-
}), error: !needPassphrase && error, children: /* @__PURE__ */ (0,
|
|
7770
|
+
}), error: !needPassphrase && error, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
7647
7771
|
Input,
|
|
7648
7772
|
{
|
|
7649
7773
|
value: secret,
|
|
@@ -7651,9 +7775,9 @@ function CEXBindModal({
|
|
|
7651
7775
|
placeholder: "**** **** ****"
|
|
7652
7776
|
}
|
|
7653
7777
|
) }),
|
|
7654
|
-
needPassphrase && /* @__PURE__ */ (0,
|
|
7778
|
+
needPassphrase && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Field, { error, label: intl.formatMessage({
|
|
7655
7779
|
id: "CEXBindApiPassphrase"
|
|
7656
|
-
}), children: /* @__PURE__ */ (0,
|
|
7780
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
7657
7781
|
Input,
|
|
7658
7782
|
{
|
|
7659
7783
|
value: APIPassphrase,
|
|
@@ -7661,7 +7785,7 @@ function CEXBindModal({
|
|
|
7661
7785
|
placeholder: "**** **** ****"
|
|
7662
7786
|
}
|
|
7663
7787
|
) }),
|
|
7664
|
-
/* @__PURE__ */ (0,
|
|
7788
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
7665
7789
|
Button,
|
|
7666
7790
|
{
|
|
7667
7791
|
onClick: SubmitApi,
|
|
@@ -7669,7 +7793,7 @@ function CEXBindModal({
|
|
|
7669
7793
|
block: true,
|
|
7670
7794
|
loading,
|
|
7671
7795
|
disabled: !key || !secret,
|
|
7672
|
-
children: /* @__PURE__ */ (0,
|
|
7796
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react_intl22.FormattedMessage, { id: "continue" })
|
|
7673
7797
|
}
|
|
7674
7798
|
)
|
|
7675
7799
|
] }) });
|
|
@@ -7677,7 +7801,25 @@ function CEXBindModal({
|
|
|
7677
7801
|
|
|
7678
7802
|
// src/context/BusinessProvider.tsx
|
|
7679
7803
|
var import_react_query9 = require("@tanstack/react-query");
|
|
7680
|
-
|
|
7804
|
+
|
|
7805
|
+
// src/components/BindEmailModal/index.tsx
|
|
7806
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
7807
|
+
var BindEmailModal = ({ isOpen, onClose, onBack, onLogin }) => {
|
|
7808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
7809
|
+
EmailModal,
|
|
7810
|
+
{
|
|
7811
|
+
type: "bind",
|
|
7812
|
+
isOpen,
|
|
7813
|
+
onClose,
|
|
7814
|
+
onBack,
|
|
7815
|
+
onLogin
|
|
7816
|
+
}
|
|
7817
|
+
);
|
|
7818
|
+
};
|
|
7819
|
+
var BindEmailModal_default = BindEmailModal;
|
|
7820
|
+
|
|
7821
|
+
// src/context/BusinessProvider.tsx
|
|
7822
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
7681
7823
|
function BusinessProvider({ children }) {
|
|
7682
7824
|
const { overview, token } = useUserInfo();
|
|
7683
7825
|
const { type: EVMType, isOpen: EVMIsOpen, close: EVMClose } = useEVMModalStore();
|
|
@@ -7685,6 +7827,7 @@ function BusinessProvider({ children }) {
|
|
|
7685
7827
|
const { type: TRONType, isOpen: TRONIsOpen, close: TRONClose } = useTRONModalStore();
|
|
7686
7828
|
const { type: BTCType, isOpen: BTCIsOpen, close: BTCClose } = useBTCModalStore();
|
|
7687
7829
|
const { type: CEXType, isOpen: CEXIsOpen, close: CEXClose } = useCEXBindModalStore();
|
|
7830
|
+
const { type: EmailType, isOpen: EmailIsOpen, close: EmailClose } = useEmailModalStore();
|
|
7688
7831
|
const WalletModalStore = useWalletModalStore();
|
|
7689
7832
|
const { tgAppAuthCode, setTgAppAuthCode } = useStore_default();
|
|
7690
7833
|
const { login } = useMatch();
|
|
@@ -7711,8 +7854,8 @@ function BusinessProvider({ children }) {
|
|
|
7711
7854
|
enabled: !!tgAppAuthCode,
|
|
7712
7855
|
refetchInterval: 1e3 * 5
|
|
7713
7856
|
});
|
|
7714
|
-
return /* @__PURE__ */ (0,
|
|
7715
|
-
/* @__PURE__ */ (0,
|
|
7857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(import_jsx_runtime103.Fragment, { children: [
|
|
7858
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
7716
7859
|
EVMModal,
|
|
7717
7860
|
{
|
|
7718
7861
|
isOpen: EVMIsOpen && (EVMType == "login" && !overview && !token || EVMType == "bind" && !!token && !!overview),
|
|
@@ -7722,7 +7865,7 @@ function BusinessProvider({ children }) {
|
|
|
7722
7865
|
zIndex: 199
|
|
7723
7866
|
}
|
|
7724
7867
|
),
|
|
7725
|
-
/* @__PURE__ */ (0,
|
|
7868
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
7726
7869
|
TRONModal,
|
|
7727
7870
|
{
|
|
7728
7871
|
isOpen: TRONIsOpen && (TRONType == "login" && !overview && !token || TRONType == "bind" && !!token && !!overview),
|
|
@@ -7732,7 +7875,7 @@ function BusinessProvider({ children }) {
|
|
|
7732
7875
|
zIndex: 199
|
|
7733
7876
|
}
|
|
7734
7877
|
),
|
|
7735
|
-
/* @__PURE__ */ (0,
|
|
7878
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
7736
7879
|
TONModal,
|
|
7737
7880
|
{
|
|
7738
7881
|
isOpen: TONIsOpen && (TONType == "login" && !overview && !token || TONType == "bind" && !!token && !!overview),
|
|
@@ -7742,7 +7885,7 @@ function BusinessProvider({ children }) {
|
|
|
7742
7885
|
zIndex: 199
|
|
7743
7886
|
}
|
|
7744
7887
|
),
|
|
7745
|
-
/* @__PURE__ */ (0,
|
|
7888
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
7746
7889
|
BTCModal,
|
|
7747
7890
|
{
|
|
7748
7891
|
isOpen: BTCIsOpen && (BTCType == "login" && !overview && !token || BTCType == "bind" && !!token && !!overview),
|
|
@@ -7752,7 +7895,7 @@ function BusinessProvider({ children }) {
|
|
|
7752
7895
|
zIndex: 199
|
|
7753
7896
|
}
|
|
7754
7897
|
),
|
|
7755
|
-
/* @__PURE__ */ (0,
|
|
7898
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
7756
7899
|
CEXBindModal,
|
|
7757
7900
|
{
|
|
7758
7901
|
isOpen: CEXIsOpen && (!!token && !!overview),
|
|
@@ -7761,7 +7904,7 @@ function BusinessProvider({ children }) {
|
|
|
7761
7904
|
zIndex: 199
|
|
7762
7905
|
}
|
|
7763
7906
|
),
|
|
7764
|
-
/* @__PURE__ */ (0,
|
|
7907
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
7765
7908
|
WalletModal,
|
|
7766
7909
|
{
|
|
7767
7910
|
isOpen: WalletModalStore.isOpen && (WalletModalStore.type == "login" && !overview && !token || WalletModalStore.type == "bind" && !!token && !!overview),
|
|
@@ -7771,14 +7914,22 @@ function BusinessProvider({ children }) {
|
|
|
7771
7914
|
zIndex: 150
|
|
7772
7915
|
}
|
|
7773
7916
|
),
|
|
7917
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
7918
|
+
BindEmailModal_default,
|
|
7919
|
+
{
|
|
7920
|
+
isOpen: EmailIsOpen && (EmailType == "bind" && !!token && !!overview),
|
|
7921
|
+
onClose: EmailClose,
|
|
7922
|
+
onLogin: EmailClose
|
|
7923
|
+
}
|
|
7924
|
+
),
|
|
7774
7925
|
children
|
|
7775
7926
|
] });
|
|
7776
7927
|
}
|
|
7777
7928
|
|
|
7778
7929
|
// src/context/index.tsx
|
|
7779
|
-
var
|
|
7930
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
7780
7931
|
var Providers = ({ children }) => {
|
|
7781
|
-
return /* @__PURE__ */ (0,
|
|
7932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(ModalProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(BusinessProvider, { children }) }) });
|
|
7782
7933
|
};
|
|
7783
7934
|
var context_default = Providers;
|
|
7784
7935
|
|
|
@@ -8251,7 +8402,9 @@ var en_default = {
|
|
|
8251
8402
|
noRequests: "No Requests yet",
|
|
8252
8403
|
noMore: "No more",
|
|
8253
8404
|
Remove: "Remove",
|
|
8254
|
-
removeSuccess: "Remove Successfully"
|
|
8405
|
+
removeSuccess: "Remove Successfully",
|
|
8406
|
+
loginAgreement: "By login, you agree to our <termsLink>Terms of Service</termsLink> and <privacyLink>Privacy Policy</privacyLink>",
|
|
8407
|
+
poweredBy: "Powered by"
|
|
8255
8408
|
};
|
|
8256
8409
|
|
|
8257
8410
|
// src/i18n/zh.json
|
|
@@ -8339,7 +8492,9 @@ var zh_default = {
|
|
|
8339
8492
|
noRequests: "\u6682\u65E0\u8BF7\u6C42",
|
|
8340
8493
|
noMore: "\u6CA1\u6709\u66F4\u591A",
|
|
8341
8494
|
Remove: "\u79FB\u9664",
|
|
8342
|
-
removeSuccess: "\u79FB\u9664\u6210\u529F"
|
|
8495
|
+
removeSuccess: "\u79FB\u9664\u6210\u529F",
|
|
8496
|
+
loginAgreement: "\u767B\u5F55\u5373\u8868\u793A\u60A8\u540C\u610F\u6211\u4EEC\u7684<termsLink>\u670D\u52A1\u6761\u6B3E</termsLink>\u548C<privacyLink>\u9690\u79C1\u653F\u7B56</privacyLink>",
|
|
8497
|
+
poweredBy: "\u7531"
|
|
8343
8498
|
};
|
|
8344
8499
|
|
|
8345
8500
|
// src/i18n/tw.json
|
|
@@ -8427,7 +8582,9 @@ var tw_default = {
|
|
|
8427
8582
|
noRequests: "\u66AB\u7121\u8ACB\u6C42",
|
|
8428
8583
|
noMore: "\u6C92\u6709\u66F4\u591A",
|
|
8429
8584
|
Remove: "\u79FB\u9664",
|
|
8430
|
-
removeSuccess: "\u79FB\u9664\u6210\u529F"
|
|
8585
|
+
removeSuccess: "\u79FB\u9664\u6210\u529F",
|
|
8586
|
+
loginAgreement: "\u767B\u5165\u5373\u8868\u793A\u60A8\u540C\u610F\u6211\u5011\u7684<termsLink>\u670D\u52D9\u689D\u6B3E</termsLink>\u548C<privacyLink>\u96B1\u79C1\u6B0A\u653F\u7B56</privacyLink>",
|
|
8587
|
+
poweredBy: "\u7531"
|
|
8431
8588
|
};
|
|
8432
8589
|
|
|
8433
8590
|
// src/i18n/fr.json
|
|
@@ -8515,7 +8672,9 @@ var fr_default = {
|
|
|
8515
8672
|
noRequests: "Pas encore de demandes",
|
|
8516
8673
|
noMore: "Plus rien",
|
|
8517
8674
|
Remove: "Supprimer",
|
|
8518
|
-
removeSuccess: "Suppression r\xE9ussie"
|
|
8675
|
+
removeSuccess: "Suppression r\xE9ussie",
|
|
8676
|
+
loginAgreement: "En vous connectant, vous acceptez nos <termsLink>Conditions G\xE9n\xE9rales d'Utilisation</termsLink> et notre <privacyLink>Politique de Confidentialit\xE9</privacyLink>",
|
|
8677
|
+
poweredBy: "Par"
|
|
8519
8678
|
};
|
|
8520
8679
|
|
|
8521
8680
|
// src/i18n/ja.json
|
|
@@ -8603,7 +8762,9 @@ var ja_default = {
|
|
|
8603
8762
|
noRequests: "\u307E\u3060\u30EA\u30AF\u30A8\u30B9\u30C8\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
8604
8763
|
noMore: "\u3053\u308C\u4EE5\u4E0A\u3042\u308A\u307E\u305B\u3093",
|
|
8605
8764
|
Remove: "\u524A\u9664",
|
|
8606
|
-
removeSuccess: "\u524A\u9664\u306B\u6210\u529F\u3057\u307E\u3057\u305F"
|
|
8765
|
+
removeSuccess: "\u524A\u9664\u306B\u6210\u529F\u3057\u307E\u3057\u305F",
|
|
8766
|
+
loginAgreement: "\u30ED\u30B0\u30A4\u30F3\u3059\u308B\u3053\u3068\u306B\u3088\u308A\u3001\u5F53\u793E\u306E<termsLink>\u5229\u7528\u898F\u7D04</termsLink>\u304A\u3088\u3073<privacyLink>\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC</termsLink>\u306B\u540C\u610F\u3057\u305F\u3082\u306E\u3068\u307F\u306A\u3055\u308C\u307E\u3059",
|
|
8767
|
+
poweredBy: "\u88FD\u9020\u5143"
|
|
8607
8768
|
};
|
|
8608
8769
|
|
|
8609
8770
|
// src/i18n/ko.json
|
|
@@ -8691,7 +8852,9 @@ var ko_default = {
|
|
|
8691
8852
|
noRequests: "\uC544\uC9C1 \uC694\uCCAD\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
8692
8853
|
noMore: "\uB354 \uC774\uC0C1 \uC5C6\uC74C",
|
|
8693
8854
|
Remove: "\uC0AD\uC81C",
|
|
8694
|
-
removeSuccess: "\uC0AD\uC81C \uC131\uACF5"
|
|
8855
|
+
removeSuccess: "\uC0AD\uC81C \uC131\uACF5",
|
|
8856
|
+
loginAgreement: "\uB85C\uADF8\uC778\uD568\uC73C\uB85C\uC368 \uB2F9\uC0AC\uC758 <termsLink>\uC11C\uBE44\uC2A4 \uC57D\uAD00</termsLink> \uBC0F <privacyLink>\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68</privacyLink>\uC5D0 \uB3D9\uC758\uD558\uB294 \uAC83\uC73C\uB85C \uAC04\uC8FC\uB429\uB2C8\uB2E4",
|
|
8857
|
+
poweredBy: "\uC81C\uC791"
|
|
8695
8858
|
};
|
|
8696
8859
|
|
|
8697
8860
|
// src/i18n/vi.json
|
|
@@ -8779,7 +8942,9 @@ var vi_default = {
|
|
|
8779
8942
|
noRequests: "Ch\u01B0a c\xF3 y\xEAu c\u1EA7u n\xE0o",
|
|
8780
8943
|
noMore: "Kh\xF4ng c\xF2n n\u1EEFa",
|
|
8781
8944
|
Remove: "X\xF3a",
|
|
8782
|
-
removeSuccess: "X\xF3a th\xE0nh c\xF4ng"
|
|
8945
|
+
removeSuccess: "X\xF3a th\xE0nh c\xF4ng",
|
|
8946
|
+
loginAgreement: "B\u1EB1ng c\xE1ch \u0111\u0103ng nh\u1EADp, b\u1EA1n \u0111\u1ED3ng \xFD v\u1EDBi <termsLink>\u0110i\u1EC1u kho\u1EA3n d\u1ECBch v\u1EE5</termsLink> v\xE0 <privacyLink>Ch\xEDnh s\xE1ch quy\u1EC1n ri\xEAng t\u01B0</privacyLink> c\u1EE7a ch\xFAng t\xF4i",
|
|
8947
|
+
poweredBy: "B\u1EDFi"
|
|
8783
8948
|
};
|
|
8784
8949
|
|
|
8785
8950
|
// src/i18n/es.json
|
|
@@ -8867,7 +9032,9 @@ var es_default = {
|
|
|
8867
9032
|
noRequests: "A\xFAn no hay solicitudes",
|
|
8868
9033
|
noMore: "No hay m\xE1s",
|
|
8869
9034
|
Remove: "Eliminar",
|
|
8870
|
-
removeSuccess: "Eliminado con \xE9xito"
|
|
9035
|
+
removeSuccess: "Eliminado con \xE9xito",
|
|
9036
|
+
loginAgreement: "Al iniciar sesi\xF3n, aceptas nuestros <termsLink>T\xE9rminos de servicio</termsLink> y nuestra <privacyLink>Pol\xEDtica de privacidad</privacyLink>",
|
|
9037
|
+
poweredBy: "Por"
|
|
8871
9038
|
};
|
|
8872
9039
|
|
|
8873
9040
|
// src/i18n/pt.json
|
|
@@ -8955,7 +9122,9 @@ var pt_default = {
|
|
|
8955
9122
|
noRequests: "Ainda sem solicita\xE7\xF5es",
|
|
8956
9123
|
noMore: "N\xE3o h\xE1 mais",
|
|
8957
9124
|
Remove: "Remover",
|
|
8958
|
-
removeSuccess: "Removido com sucesso"
|
|
9125
|
+
removeSuccess: "Removido com sucesso",
|
|
9126
|
+
loginAgreement: "Ao fazer login, voc\xEA concorda com nossos <termsLink>Termos de Servi\xE7o</termsLink> e nossa <privacyLink>Pol\xEDtica de Privacidade</privacyLink>",
|
|
9127
|
+
poweredBy: "Por"
|
|
8959
9128
|
};
|
|
8960
9129
|
|
|
8961
9130
|
// src/i18n/index.ts
|
|
@@ -9040,7 +9209,7 @@ var matchTest = /* @__PURE__ */ (0, import_viem17.defineChain)({
|
|
|
9040
9209
|
|
|
9041
9210
|
// src/MatchContext.tsx
|
|
9042
9211
|
var import_wagmi3 = require("wagmi");
|
|
9043
|
-
var
|
|
9212
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
9044
9213
|
var queryClient = new import_react_query10.QueryClient();
|
|
9045
9214
|
var wagmiConfig = (0, import_rainbowkit2.getDefaultConfig)({
|
|
9046
9215
|
appName: "MatchID",
|
|
@@ -9079,7 +9248,7 @@ var MatchProvider = ({
|
|
|
9079
9248
|
useWalletInit({
|
|
9080
9249
|
config: wallet
|
|
9081
9250
|
});
|
|
9082
|
-
return /* @__PURE__ */ (0,
|
|
9251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react_intl23.IntlProvider, { locale: realLocale, messages: messages[realLocale], children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_wagmi3.WagmiProvider, { config: wagmiConfig, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react_query10.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
9083
9252
|
MatchContext.Provider,
|
|
9084
9253
|
{
|
|
9085
9254
|
value: {
|
|
@@ -9090,7 +9259,7 @@ var MatchProvider = ({
|
|
|
9090
9259
|
theme,
|
|
9091
9260
|
locale: realLocale
|
|
9092
9261
|
},
|
|
9093
|
-
children: /* @__PURE__ */ (0,
|
|
9262
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(context_default, { children })
|
|
9094
9263
|
}
|
|
9095
9264
|
) }) }) });
|
|
9096
9265
|
};
|