@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/components.js
CHANGED
|
@@ -1231,6 +1231,42 @@ function InputLengthIcon({
|
|
|
1231
1231
|
) });
|
|
1232
1232
|
}
|
|
1233
1233
|
|
|
1234
|
+
// src/assets/icon/KakaoIcon.tsx
|
|
1235
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
1236
|
+
function KakaoIcon({ size = 40 }) {
|
|
1237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("svg", { width: size, height: size, viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1238
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("g", { clipPath: "url(#clip0_8121_9671)", children: [
|
|
1239
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("rect", { width: "48", height: "48", fill: "#FFE711" }),
|
|
1240
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.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" }),
|
|
1241
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.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" }),
|
|
1242
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.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" }),
|
|
1243
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.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" }),
|
|
1244
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.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" }),
|
|
1245
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.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" })
|
|
1246
|
+
] }),
|
|
1247
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("clipPath", { id: "clip0_8121_9671", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("rect", { width: "48", height: "48", rx: "8", fill: "white" }) }) })
|
|
1248
|
+
] });
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
// src/assets/icon/MatchIdIcon.tsx
|
|
1252
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1253
|
+
var MatchIdIcon = () => {
|
|
1254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("svg", { width: "94", height: "20", viewBox: "0 0 94 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1255
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("g", { clipPath: "url(#clip0_8154_9735)", children: [
|
|
1256
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.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" }),
|
|
1257
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.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" }),
|
|
1258
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { d: "M36.4072 17.5V5.36167H31.6855V2.5H44.3255V5.36167H39.5839V17.5H36.4089H36.4072Z", fill: "black" }),
|
|
1259
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.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" }),
|
|
1260
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { d: "M59.9355 17.5V2.5H63.1105V8.41167H69.6072V2.5H72.7822V17.5H69.6072V11.1483H63.1105V17.5H59.9355Z", fill: "black" }),
|
|
1261
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.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" }),
|
|
1262
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.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" }),
|
|
1263
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.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" })
|
|
1264
|
+
] }),
|
|
1265
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("clipPath", { id: "clip0_8154_9735", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("rect", { width: "92.5", height: "20", fill: "white", transform: "translate(0.75)" }) }) })
|
|
1266
|
+
] });
|
|
1267
|
+
};
|
|
1268
|
+
var MatchIdIcon_default = MatchIdIcon;
|
|
1269
|
+
|
|
1234
1270
|
// src/hooks/useLayout.tsx
|
|
1235
1271
|
var import_react = require("react");
|
|
1236
1272
|
function useDownMd() {
|
|
@@ -1249,7 +1285,7 @@ function useDownMd() {
|
|
|
1249
1285
|
|
|
1250
1286
|
// src/ui/Overlay/index.tsx
|
|
1251
1287
|
var import_react2 = require("react");
|
|
1252
|
-
var
|
|
1288
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
1253
1289
|
function Overlay({
|
|
1254
1290
|
isOpen = false,
|
|
1255
1291
|
children,
|
|
@@ -1265,7 +1301,7 @@ function Overlay({
|
|
|
1265
1301
|
document.body.style.overflow = "";
|
|
1266
1302
|
};
|
|
1267
1303
|
}, [isOpen]);
|
|
1268
|
-
return isOpen ? /* @__PURE__ */ (0,
|
|
1304
|
+
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
1269
1305
|
"div",
|
|
1270
1306
|
{
|
|
1271
1307
|
className: "matchid-overlay",
|
|
@@ -1274,12 +1310,12 @@ function Overlay({
|
|
|
1274
1310
|
},
|
|
1275
1311
|
children
|
|
1276
1312
|
}
|
|
1277
|
-
) : /* @__PURE__ */ (0,
|
|
1313
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_jsx_runtime56.Fragment, {});
|
|
1278
1314
|
}
|
|
1279
1315
|
|
|
1280
1316
|
// src/ui/Modal/index.tsx
|
|
1281
1317
|
var import_react_intl = require("react-intl");
|
|
1282
|
-
var
|
|
1318
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
1283
1319
|
function Modal({
|
|
1284
1320
|
children,
|
|
1285
1321
|
isOpen,
|
|
@@ -1287,10 +1323,10 @@ function Modal({
|
|
|
1287
1323
|
zIndex = 100,
|
|
1288
1324
|
className = ""
|
|
1289
1325
|
}) {
|
|
1290
|
-
return /* @__PURE__ */ (0,
|
|
1326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: `matchid-modal ${className}`, style: {
|
|
1291
1327
|
width
|
|
1292
1328
|
}, children: [
|
|
1293
|
-
/* @__PURE__ */ (0,
|
|
1329
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "matchid-modal-mobile-header" }),
|
|
1294
1330
|
children
|
|
1295
1331
|
] }) });
|
|
1296
1332
|
}
|
|
@@ -1304,13 +1340,13 @@ function ModalWithHeader({
|
|
|
1304
1340
|
...props
|
|
1305
1341
|
}) {
|
|
1306
1342
|
const isDownMd = useDownMd();
|
|
1307
|
-
return /* @__PURE__ */ (0,
|
|
1308
|
-
/* @__PURE__ */ (0,
|
|
1309
|
-
/* @__PURE__ */ (0,
|
|
1310
|
-
onBack && /* @__PURE__ */ (0,
|
|
1311
|
-
/* @__PURE__ */ (0,
|
|
1343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Modal, { ...props, children: [
|
|
1344
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
|
|
1345
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "matchid-modal-header-content", children: [
|
|
1346
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
|
|
1347
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "matchid-modal-header-title", children: title })
|
|
1312
1348
|
] }),
|
|
1313
|
-
onClose && /* @__PURE__ */ (0,
|
|
1349
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
|
|
1314
1350
|
] }),
|
|
1315
1351
|
children
|
|
1316
1352
|
] });
|
|
@@ -1321,7 +1357,7 @@ var import_react5 = require("react");
|
|
|
1321
1357
|
|
|
1322
1358
|
// src/utils/index.tsx
|
|
1323
1359
|
var import_moment = __toESM(require("moment"));
|
|
1324
|
-
var
|
|
1360
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
1325
1361
|
var getVersion = () => {
|
|
1326
1362
|
return "0.0.2";
|
|
1327
1363
|
};
|
|
@@ -1367,10 +1403,10 @@ var NumberFormatter = ({
|
|
|
1367
1403
|
const [intPart, decimalPart] = numberValue.toString().split(".");
|
|
1368
1404
|
const intFormat = separator ? intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : intPart;
|
|
1369
1405
|
if (Math.abs(parseFloat(numberValue)) >= 1) {
|
|
1370
|
-
return /* @__PURE__ */ (0,
|
|
1371
|
-
prefix && /* @__PURE__ */ (0,
|
|
1372
|
-
/* @__PURE__ */ (0,
|
|
1373
|
-
decimalPart ? /* @__PURE__ */ (0,
|
|
1406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className, children: [
|
|
1407
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
1408
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: intClassName, children: intFormat }),
|
|
1409
|
+
decimalPart ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: decimalClassName, children: [
|
|
1374
1410
|
".",
|
|
1375
1411
|
decimalPart.substring(0, fixNum)
|
|
1376
1412
|
] }) : "",
|
|
@@ -1387,30 +1423,30 @@ var NumberFormatter = ({
|
|
|
1387
1423
|
}
|
|
1388
1424
|
}
|
|
1389
1425
|
if (zeroCount < tFixNum) {
|
|
1390
|
-
return /* @__PURE__ */ (0,
|
|
1391
|
-
prefix && /* @__PURE__ */ (0,
|
|
1392
|
-
/* @__PURE__ */ (0,
|
|
1393
|
-
/* @__PURE__ */ (0,
|
|
1426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className, children: [
|
|
1427
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
1428
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: intClassName, children: intFormat }),
|
|
1429
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: decimalClassName, children: [
|
|
1394
1430
|
".",
|
|
1395
1431
|
decimalPart.substring(0, tFixNum)
|
|
1396
1432
|
] }),
|
|
1397
1433
|
suffix
|
|
1398
1434
|
] });
|
|
1399
1435
|
}
|
|
1400
|
-
return /* @__PURE__ */ (0,
|
|
1401
|
-
prefix && /* @__PURE__ */ (0,
|
|
1402
|
-
/* @__PURE__ */ (0,
|
|
1403
|
-
/* @__PURE__ */ (0,
|
|
1436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className, children: [
|
|
1437
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
1438
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: intClassName, children: intFormat }),
|
|
1439
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: decimalClassName, children: [
|
|
1404
1440
|
".0",
|
|
1405
|
-
/* @__PURE__ */ (0,
|
|
1441
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("sub", { children: zeroCount }),
|
|
1406
1442
|
decimalPart?.substring(zeroCount, zeroCount + tFixNum - 2)
|
|
1407
1443
|
] }),
|
|
1408
1444
|
suffix
|
|
1409
1445
|
] });
|
|
1410
1446
|
}
|
|
1411
|
-
return /* @__PURE__ */ (0,
|
|
1412
|
-
prefix && /* @__PURE__ */ (0,
|
|
1413
|
-
/* @__PURE__ */ (0,
|
|
1447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className, children: [
|
|
1448
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
1449
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: intClassName, children: intPart }),
|
|
1414
1450
|
suffix
|
|
1415
1451
|
] });
|
|
1416
1452
|
};
|
|
@@ -1432,7 +1468,7 @@ function bytesToBase64(bytes) {
|
|
|
1432
1468
|
}
|
|
1433
1469
|
|
|
1434
1470
|
// src/ui/Button/index.tsx
|
|
1435
|
-
var
|
|
1471
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
1436
1472
|
function Button({
|
|
1437
1473
|
size = "df",
|
|
1438
1474
|
disabled = false,
|
|
@@ -1452,7 +1488,7 @@ function Button({
|
|
|
1452
1488
|
onClick && onClick();
|
|
1453
1489
|
}
|
|
1454
1490
|
};
|
|
1455
|
-
return /* @__PURE__ */ (0,
|
|
1491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
1456
1492
|
"button",
|
|
1457
1493
|
{
|
|
1458
1494
|
type,
|
|
@@ -1463,14 +1499,14 @@ function Button({
|
|
|
1463
1499
|
},
|
|
1464
1500
|
onClick: onAction,
|
|
1465
1501
|
...dataset,
|
|
1466
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
1502
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
|
|
1467
1503
|
}
|
|
1468
1504
|
);
|
|
1469
1505
|
}
|
|
1470
1506
|
|
|
1471
1507
|
// src/ui/Input/index.tsx
|
|
1472
1508
|
var import_react4 = require("react");
|
|
1473
|
-
var
|
|
1509
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
1474
1510
|
function Input({
|
|
1475
1511
|
onChange,
|
|
1476
1512
|
type,
|
|
@@ -1495,7 +1531,7 @@ function Input({
|
|
|
1495
1531
|
textarea.style.height = Math.min(textarea.scrollHeight, maxHeight) + "px";
|
|
1496
1532
|
}
|
|
1497
1533
|
}, [props.value]);
|
|
1498
|
-
return /* @__PURE__ */ (0,
|
|
1534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
1499
1535
|
"div",
|
|
1500
1536
|
{
|
|
1501
1537
|
className: `matchid-input-box matchid-input-${type} ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
@@ -1504,14 +1540,14 @@ function Input({
|
|
|
1504
1540
|
"--max-rows": maxRows
|
|
1505
1541
|
},
|
|
1506
1542
|
children: [
|
|
1507
|
-
children ?? (type == "textarea" ? /* @__PURE__ */ (0,
|
|
1543
|
+
children ?? (type == "textarea" ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("textarea", { rows: 1, onChange, ...props, className: "matchid-input-field", ref: textareaRef, style: {
|
|
1508
1544
|
maxHeight: maxRows * 24 + "px"
|
|
1509
|
-
} }) : /* @__PURE__ */ (0,
|
|
1510
|
-
type != "textarea" && showClear && props.value && props.value.length > 0 && /* @__PURE__ */ (0,
|
|
1545
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" })),
|
|
1546
|
+
type != "textarea" && showClear && props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
|
|
1511
1547
|
if (onChange) {
|
|
1512
1548
|
onChange({ target: { value: "" } });
|
|
1513
1549
|
}
|
|
1514
|
-
}, children: /* @__PURE__ */ (0,
|
|
1550
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
1515
1551
|
DeleteRoundIcon,
|
|
1516
1552
|
{
|
|
1517
1553
|
height: isDownMd ? 16 : 21,
|
|
@@ -1519,16 +1555,16 @@ function Input({
|
|
|
1519
1555
|
color: "var(--matchid-input-delete-icon-color)"
|
|
1520
1556
|
}
|
|
1521
1557
|
) }),
|
|
1522
|
-
type === "password" && /* @__PURE__ */ (0,
|
|
1558
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
|
|
1523
1559
|
setInputType(inputType === "password" ? "text" : "password");
|
|
1524
|
-
}, children: inputType === "password" ? /* @__PURE__ */ (0,
|
|
1525
|
-
showLength && props.maxLength && /* @__PURE__ */ (0,
|
|
1526
|
-
/* @__PURE__ */ (0,
|
|
1560
|
+
}, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
|
|
1561
|
+
showLength && props.maxLength && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: `matchid-input-length`, children: [
|
|
1562
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { children: [
|
|
1527
1563
|
props.value?.length || 0,
|
|
1528
1564
|
"/",
|
|
1529
1565
|
props.maxLength
|
|
1530
1566
|
] }),
|
|
1531
|
-
/* @__PURE__ */ (0,
|
|
1567
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(InputLengthIcon, { color: "var(--icon-color)" })
|
|
1532
1568
|
] }),
|
|
1533
1569
|
after
|
|
1534
1570
|
]
|
|
@@ -1537,7 +1573,7 @@ function Input({
|
|
|
1537
1573
|
}
|
|
1538
1574
|
|
|
1539
1575
|
// src/ui/Field/index.tsx
|
|
1540
|
-
var
|
|
1576
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
1541
1577
|
function Field({
|
|
1542
1578
|
label,
|
|
1543
1579
|
children,
|
|
@@ -1545,19 +1581,19 @@ function Field({
|
|
|
1545
1581
|
required,
|
|
1546
1582
|
className = ""
|
|
1547
1583
|
}) {
|
|
1548
|
-
return /* @__PURE__ */ (0,
|
|
1549
|
-
/* @__PURE__ */ (0,
|
|
1550
|
-
required && /* @__PURE__ */ (0,
|
|
1584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
|
|
1585
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "matchid-field-label", children: [
|
|
1586
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "matchid-field-required", children: "*" }),
|
|
1551
1587
|
label
|
|
1552
1588
|
] }),
|
|
1553
1589
|
children,
|
|
1554
|
-
error && /* @__PURE__ */ (0,
|
|
1590
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "matchid-field-error", children: error })
|
|
1555
1591
|
] });
|
|
1556
1592
|
}
|
|
1557
1593
|
|
|
1558
1594
|
// src/components/EmailModal/StepEmail.tsx
|
|
1559
1595
|
var import_react_intl2 = require("react-intl");
|
|
1560
|
-
var
|
|
1596
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
1561
1597
|
function StepEmail(props) {
|
|
1562
1598
|
const intl = (0, import_react_intl2.useIntl)();
|
|
1563
1599
|
const [emailVal, setEmailVal] = (0, import_react5.useState)("");
|
|
@@ -1572,10 +1608,10 @@ function StepEmail(props) {
|
|
|
1572
1608
|
const onContinue = async () => {
|
|
1573
1609
|
props.onContinue(emailVal);
|
|
1574
1610
|
};
|
|
1575
|
-
return /* @__PURE__ */ (0,
|
|
1576
|
-
/* @__PURE__ */ (0,
|
|
1611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "matchid-email-email-box", children: [
|
|
1612
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Field, { label: intl.formatMessage({
|
|
1577
1613
|
id: "emailAddress"
|
|
1578
|
-
}), children: /* @__PURE__ */ (0,
|
|
1614
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
1579
1615
|
Input,
|
|
1580
1616
|
{
|
|
1581
1617
|
placeholder: intl.formatMessage({
|
|
@@ -1585,9 +1621,9 @@ function StepEmail(props) {
|
|
|
1585
1621
|
value: emailVal
|
|
1586
1622
|
}
|
|
1587
1623
|
) }),
|
|
1588
|
-
/* @__PURE__ */ (0,
|
|
1624
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Button, { disabled: !canContinue, style: {
|
|
1589
1625
|
marginTop: "64px"
|
|
1590
|
-
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
1626
|
+
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react_intl2.FormattedMessage, { id: "continue" }) })
|
|
1591
1627
|
] });
|
|
1592
1628
|
}
|
|
1593
1629
|
|
|
@@ -2010,7 +2046,7 @@ var import_react10 = require("react");
|
|
|
2010
2046
|
var import_react_dom = require("react-dom");
|
|
2011
2047
|
|
|
2012
2048
|
// src/ui/Drawer/index.tsx
|
|
2013
|
-
var
|
|
2049
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2014
2050
|
function Drawer({
|
|
2015
2051
|
children,
|
|
2016
2052
|
showClose = true,
|
|
@@ -2021,15 +2057,15 @@ function Drawer({
|
|
|
2021
2057
|
onBack
|
|
2022
2058
|
}) {
|
|
2023
2059
|
if (!isOpen) {
|
|
2024
|
-
return /* @__PURE__ */ (0,
|
|
2060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, {});
|
|
2025
2061
|
}
|
|
2026
|
-
return /* @__PURE__ */ (0,
|
|
2027
|
-
/* @__PURE__ */ (0,
|
|
2028
|
-
/* @__PURE__ */ (0,
|
|
2029
|
-
onBack && /* @__PURE__ */ (0,
|
|
2062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "matchid-drawer", children: [
|
|
2063
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: `matchid-drawer-header matchid-flex`, children: [
|
|
2064
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: `matchid-drawer-header-content matchid-flex`, children: [
|
|
2065
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ArrowLeftIcon, { height: 25, width: 24, className: "matchid-drawer-header-back", onClick: onBack }),
|
|
2030
2066
|
title
|
|
2031
2067
|
] }),
|
|
2032
|
-
showClose && /* @__PURE__ */ (0,
|
|
2068
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
|
|
2033
2069
|
] }),
|
|
2034
2070
|
children
|
|
2035
2071
|
] }) });
|
|
@@ -2039,7 +2075,7 @@ function Drawer({
|
|
|
2039
2075
|
var import_react7 = require("react");
|
|
2040
2076
|
|
|
2041
2077
|
// src/ui/ModalDrawer/index.tsx
|
|
2042
|
-
var
|
|
2078
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2043
2079
|
function ModalDrawer({
|
|
2044
2080
|
title,
|
|
2045
2081
|
drawerTitleVisible = true,
|
|
@@ -2047,9 +2083,9 @@ function ModalDrawer({
|
|
|
2047
2083
|
}) {
|
|
2048
2084
|
const isDownMd = useDownMd();
|
|
2049
2085
|
if (isDownMd) {
|
|
2050
|
-
return /* @__PURE__ */ (0,
|
|
2086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ModalWithHeader, { ...props, title });
|
|
2051
2087
|
}
|
|
2052
|
-
return /* @__PURE__ */ (0,
|
|
2088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
|
|
2053
2089
|
}
|
|
2054
2090
|
|
|
2055
2091
|
// src/assets/lottie/confirm.json
|
|
@@ -2117,7 +2153,7 @@ function useHash({
|
|
|
2117
2153
|
}
|
|
2118
2154
|
|
|
2119
2155
|
// src/ui/HashPanel/index.tsx
|
|
2120
|
-
var
|
|
2156
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2121
2157
|
function HashPanel({
|
|
2122
2158
|
hash,
|
|
2123
2159
|
chain,
|
|
@@ -2177,14 +2213,14 @@ function HashPanel({
|
|
|
2177
2213
|
}
|
|
2178
2214
|
}, [hashQuery.data]);
|
|
2179
2215
|
const link = chain ? `${chain?.blockExplorers?.default.url}/tx/${hash}` : "";
|
|
2180
|
-
return /* @__PURE__ */ (0,
|
|
2216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2181
2217
|
ModalDrawer,
|
|
2182
2218
|
{
|
|
2183
2219
|
isOpen,
|
|
2184
2220
|
showClose: true,
|
|
2185
2221
|
onClose,
|
|
2186
2222
|
zIndex,
|
|
2187
|
-
title: /* @__PURE__ */ (0,
|
|
2223
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2188
2224
|
"div",
|
|
2189
2225
|
{
|
|
2190
2226
|
className: "matchid-hashpanel-header",
|
|
@@ -2194,33 +2230,33 @@ function HashPanel({
|
|
|
2194
2230
|
children: statusValue.text
|
|
2195
2231
|
}
|
|
2196
2232
|
),
|
|
2197
|
-
children: /* @__PURE__ */ (0,
|
|
2198
|
-
/* @__PURE__ */ (0,
|
|
2199
|
-
/* @__PURE__ */ (0,
|
|
2233
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "matchid-hashpanel-box", children: [
|
|
2234
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "matchid-hashpanel-content", children: [
|
|
2235
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: `matchid-hashpanel-status`, style: {
|
|
2200
2236
|
color: statusValue.color
|
|
2201
2237
|
}, children: statusValue.text }),
|
|
2202
|
-
statusValue.lottie && /* @__PURE__ */ (0,
|
|
2238
|
+
statusValue.lottie && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Lottie_default, { animationData: statusValue.lottie, style: {
|
|
2203
2239
|
width: "96px",
|
|
2204
2240
|
height: "96px"
|
|
2205
2241
|
} }),
|
|
2206
|
-
hash && /* @__PURE__ */ (0,
|
|
2242
|
+
hash && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
|
|
2207
2243
|
"Hash:",
|
|
2208
|
-
/* @__PURE__ */ (0,
|
|
2244
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("a", { href: link, target: "_blank", children: hash })
|
|
2209
2245
|
] }),
|
|
2210
|
-
error && /* @__PURE__ */ (0,
|
|
2246
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "matchid-hashpanel-text", children: error })
|
|
2211
2247
|
] }),
|
|
2212
|
-
/* @__PURE__ */ (0,
|
|
2248
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
|
|
2213
2249
|
] })
|
|
2214
2250
|
}
|
|
2215
2251
|
);
|
|
2216
2252
|
}
|
|
2217
2253
|
function HashPanel_default(props) {
|
|
2218
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
2254
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(HashPanel, { ...props });
|
|
2219
2255
|
}
|
|
2220
2256
|
|
|
2221
2257
|
// src/ui/Popover/index.tsx
|
|
2222
2258
|
var import_react8 = require("react");
|
|
2223
|
-
var
|
|
2259
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2224
2260
|
function Popover({
|
|
2225
2261
|
children,
|
|
2226
2262
|
content,
|
|
@@ -2230,7 +2266,7 @@ function Popover({
|
|
|
2230
2266
|
gap = "20px"
|
|
2231
2267
|
}) {
|
|
2232
2268
|
const [active, setActive] = (0, import_react8.useState)(false);
|
|
2233
|
-
return children && /* @__PURE__ */ (0,
|
|
2269
|
+
return children && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
2234
2270
|
"div",
|
|
2235
2271
|
{
|
|
2236
2272
|
onClick: () => {
|
|
@@ -2241,20 +2277,20 @@ function Popover({
|
|
|
2241
2277
|
className: `matchid-popover-box matchid-popover-${position} matchid-popover-${type} ${className} ${type == "click" && active ? "matchid-popover-click-active" : ""}`,
|
|
2242
2278
|
children: [
|
|
2243
2279
|
children,
|
|
2244
|
-
/* @__PURE__ */ (0,
|
|
2280
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { style: {
|
|
2245
2281
|
paddingTop: gap
|
|
2246
|
-
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0,
|
|
2282
|
+
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: `matchid-popover-content`, children: content }) })
|
|
2247
2283
|
]
|
|
2248
2284
|
}
|
|
2249
2285
|
);
|
|
2250
2286
|
}
|
|
2251
2287
|
|
|
2252
2288
|
// src/ui/Switch/index.tsx
|
|
2253
|
-
var
|
|
2289
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2254
2290
|
|
|
2255
2291
|
// src/ui/AlphaAvatar/index.tsx
|
|
2256
2292
|
var import_react9 = require("react");
|
|
2257
|
-
var
|
|
2293
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2258
2294
|
function AlphaAvatar({
|
|
2259
2295
|
name,
|
|
2260
2296
|
size = "default",
|
|
@@ -2271,7 +2307,7 @@ function AlphaAvatar({
|
|
|
2271
2307
|
return "";
|
|
2272
2308
|
}, [name]);
|
|
2273
2309
|
const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
|
|
2274
|
-
return /* @__PURE__ */ (0,
|
|
2310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
2275
2311
|
width: numberSize,
|
|
2276
2312
|
height: numberSize,
|
|
2277
2313
|
fontSize: Math.ceil(numberSize / 2),
|
|
@@ -2280,7 +2316,7 @@ function AlphaAvatar({
|
|
|
2280
2316
|
}
|
|
2281
2317
|
|
|
2282
2318
|
// src/ui/Radio/index.tsx
|
|
2283
|
-
var
|
|
2319
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2284
2320
|
function Radio({
|
|
2285
2321
|
checked = false,
|
|
2286
2322
|
onChange,
|
|
@@ -2289,23 +2325,23 @@ function Radio({
|
|
|
2289
2325
|
className = "",
|
|
2290
2326
|
style = {}
|
|
2291
2327
|
}) {
|
|
2292
|
-
return /* @__PURE__ */ (0,
|
|
2328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
|
|
2293
2329
|
width: size,
|
|
2294
2330
|
height: size,
|
|
2295
2331
|
...style,
|
|
2296
2332
|
// @ts-ignore
|
|
2297
2333
|
"--matchid-radio-checked": color
|
|
2298
|
-
}, children: checked && /* @__PURE__ */ (0,
|
|
2334
|
+
}, children: checked && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: `matchid-radio-content`, style: {
|
|
2299
2335
|
width: Math.floor(size * 0.7),
|
|
2300
2336
|
height: Math.floor(size * 0.7)
|
|
2301
2337
|
} }) });
|
|
2302
2338
|
}
|
|
2303
2339
|
|
|
2304
2340
|
// src/ui/Skeleton/index.tsx
|
|
2305
|
-
var
|
|
2341
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2306
2342
|
|
|
2307
2343
|
// src/ui/Tabs/index.tsx
|
|
2308
|
-
var
|
|
2344
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
2309
2345
|
|
|
2310
2346
|
// src/ui/Lottie/index.tsx
|
|
2311
2347
|
var import_lottie_react = require("lottie-react");
|
|
@@ -2321,10 +2357,10 @@ var LazyLottie = (props) => {
|
|
|
2321
2357
|
var Lottie_default = LazyLottie;
|
|
2322
2358
|
|
|
2323
2359
|
// src/ui/Checkbox/index.tsx
|
|
2324
|
-
var
|
|
2360
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
2325
2361
|
|
|
2326
2362
|
// src/context/ModalContext.tsx
|
|
2327
|
-
var
|
|
2363
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
2328
2364
|
var ModalContext = (0, import_react10.createContext)(null);
|
|
2329
2365
|
function useModal() {
|
|
2330
2366
|
const context = (0, import_react10.useContext)(ModalContext);
|
|
@@ -2365,7 +2401,7 @@ var useTransactionStore = (0, import_zustand3.create)((0, import_middleware2.dev
|
|
|
2365
2401
|
var useTransactionStore_default = useTransactionStore;
|
|
2366
2402
|
|
|
2367
2403
|
// src/hooks/useWallet.tsx
|
|
2368
|
-
var
|
|
2404
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
2369
2405
|
var AppClientId = "react-sdk-" + getVersion();
|
|
2370
2406
|
function useWallet() {
|
|
2371
2407
|
const { address, wallet: walletConfig } = useLocalStore_default();
|
|
@@ -2539,12 +2575,12 @@ function useWallet() {
|
|
|
2539
2575
|
address: evmAccount.address
|
|
2540
2576
|
});
|
|
2541
2577
|
modal.show((props) => {
|
|
2542
|
-
return /* @__PURE__ */ (0,
|
|
2578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
|
|
2543
2579
|
});
|
|
2544
2580
|
return txHash;
|
|
2545
2581
|
} catch (error) {
|
|
2546
2582
|
modal.show((props) => {
|
|
2547
|
-
return /* @__PURE__ */ (0,
|
|
2583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, error: typeof error == "string" ? error : error.details || error.message, chain: _chain });
|
|
2548
2584
|
});
|
|
2549
2585
|
throw error;
|
|
2550
2586
|
}
|
|
@@ -2622,7 +2658,7 @@ function useCopyClipboard(timeout = 500) {
|
|
|
2622
2658
|
// src/context/ToastContext.tsx
|
|
2623
2659
|
var import_react13 = require("react");
|
|
2624
2660
|
var import_react_dom2 = require("react-dom");
|
|
2625
|
-
var
|
|
2661
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
2626
2662
|
var ToastContext = (0, import_react13.createContext)(null);
|
|
2627
2663
|
|
|
2628
2664
|
// src/hooks/api/wallet.ts
|
|
@@ -2684,7 +2720,7 @@ function useImportTokenListQuery({
|
|
|
2684
2720
|
var import_react14 = require("react");
|
|
2685
2721
|
var import_viem5 = require("viem");
|
|
2686
2722
|
var import_react_intl3 = require("react-intl");
|
|
2687
|
-
var
|
|
2723
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
2688
2724
|
function useMatchChain() {
|
|
2689
2725
|
const chainListQuery = useChainListQuery();
|
|
2690
2726
|
const modal = useModal();
|
|
@@ -2715,28 +2751,28 @@ function useMatchChain() {
|
|
|
2715
2751
|
const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
|
|
2716
2752
|
const [selectedChainId, setSelectedChainId] = (0, import_react14.useState)(storeChainId2);
|
|
2717
2753
|
const isDownMd = useDownMd();
|
|
2718
|
-
return /* @__PURE__ */ (0,
|
|
2719
|
-
/* @__PURE__ */ (0,
|
|
2720
|
-
return /* @__PURE__ */ (0,
|
|
2754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: `matchid-change-network-box`, children: [
|
|
2755
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
|
|
2756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
2721
2757
|
"div",
|
|
2722
2758
|
{
|
|
2723
2759
|
onClick: () => setSelectedChainId(item.id),
|
|
2724
2760
|
className: `matchid-change-network-item ${selectedChainId == item.id ? "matchid-change-network-selected" : ""}`,
|
|
2725
2761
|
children: [
|
|
2726
|
-
/* @__PURE__ */ (0,
|
|
2727
|
-
/* @__PURE__ */ (0,
|
|
2728
|
-
/* @__PURE__ */ (0,
|
|
2762
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
|
|
2763
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
|
|
2764
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
|
|
2729
2765
|
] }),
|
|
2730
|
-
/* @__PURE__ */ (0,
|
|
2766
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
|
|
2731
2767
|
]
|
|
2732
2768
|
},
|
|
2733
2769
|
index
|
|
2734
2770
|
);
|
|
2735
2771
|
}) }),
|
|
2736
|
-
/* @__PURE__ */ (0,
|
|
2772
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
|
|
2737
2773
|
setChainId2(selectedChainId || 0);
|
|
2738
2774
|
close();
|
|
2739
|
-
}, block: true, children: /* @__PURE__ */ (0,
|
|
2775
|
+
}, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react_intl3.FormattedMessage, { id: "confirm" }) })
|
|
2740
2776
|
] });
|
|
2741
2777
|
}
|
|
2742
2778
|
const showChangeNetwork = () => {
|
|
@@ -2780,6 +2816,8 @@ var import_react_query5 = require("@tanstack/react-query");
|
|
|
2780
2816
|
var EMAIL_INTERVAL = 60;
|
|
2781
2817
|
var EMAIL_CODE_LENGTH = 6;
|
|
2782
2818
|
var NATIVE_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
2819
|
+
var TERMS_OF_SERVICE_URL = "https://docs.google.com/document/d/1QbagOOBhi50niC2mn4pJAd9pyNlvm1MSwcKWuP9YB80/edit?usp=sharing";
|
|
2820
|
+
var PRIVACY_POLICY_URL = "https://docs.google.com/document/d/1YOUUOmNXbA7qy79YckxhPMLWBj_WDiUp6mkJPNq_XCk/edit?usp=sharing";
|
|
2783
2821
|
|
|
2784
2822
|
// src/hooks/useMatchWallet.tsx
|
|
2785
2823
|
var import_viem8 = require("viem");
|
|
@@ -2854,10 +2892,10 @@ var import_viem6 = require("viem");
|
|
|
2854
2892
|
var import_react_query3 = require("@tanstack/react-query");
|
|
2855
2893
|
|
|
2856
2894
|
// src/components/ImportToken/index.tsx
|
|
2857
|
-
var
|
|
2895
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
2858
2896
|
|
|
2859
2897
|
// src/hooks/useMatchWallet.tsx
|
|
2860
|
-
var
|
|
2898
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
2861
2899
|
function useMatchWalletRecords() {
|
|
2862
2900
|
const [hasMore, setHasMore] = (0, import_react16.useState)(true);
|
|
2863
2901
|
const [items, setItems] = (0, import_react16.useState)([]);
|
|
@@ -3166,39 +3204,39 @@ var CACHE_TTL2 = 86400 * 30 * 1e3;
|
|
|
3166
3204
|
var import_zustand5 = require("zustand");
|
|
3167
3205
|
|
|
3168
3206
|
// src/hooks/useConfig.tsx
|
|
3169
|
-
var
|
|
3207
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
3170
3208
|
var DEFAULT_WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
3171
3209
|
var WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
3172
3210
|
function useWalletConfig() {
|
|
3173
3211
|
const isDownMd = useDownMd();
|
|
3174
3212
|
const walletMap = {
|
|
3175
3213
|
evm: {
|
|
3176
|
-
icon: /* @__PURE__ */ (0,
|
|
3177
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3214
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(EVMDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3215
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(EVMLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3178
3216
|
name: "EVM",
|
|
3179
3217
|
method: "evm"
|
|
3180
3218
|
},
|
|
3181
3219
|
sol: {
|
|
3182
|
-
icon: /* @__PURE__ */ (0,
|
|
3183
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3220
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(SOLDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3221
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(SOLLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3184
3222
|
name: "SOL",
|
|
3185
3223
|
method: "sol"
|
|
3186
3224
|
},
|
|
3187
3225
|
btc: {
|
|
3188
|
-
icon: /* @__PURE__ */ (0,
|
|
3189
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3226
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(BTCDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3227
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(BTCLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3190
3228
|
name: "BTC",
|
|
3191
3229
|
method: "btc"
|
|
3192
3230
|
},
|
|
3193
3231
|
tron: {
|
|
3194
|
-
icon: /* @__PURE__ */ (0,
|
|
3195
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3232
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TRXDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3233
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TRXLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3196
3234
|
name: "TRON",
|
|
3197
3235
|
method: "tron"
|
|
3198
3236
|
},
|
|
3199
3237
|
ton: {
|
|
3200
|
-
icon: /* @__PURE__ */ (0,
|
|
3201
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3238
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TonLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3239
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TonLightIcon2, { size: isDownMd ? 36 : 40 }),
|
|
3202
3240
|
name: "TON",
|
|
3203
3241
|
method: "ton"
|
|
3204
3242
|
}
|
|
@@ -3246,18 +3284,29 @@ var useWalletModalStore = (0, import_zustand5.create)((set) => ({
|
|
|
3246
3284
|
open: (type, methods = DEFAULT_WALLET_METHODS) => set({ isOpen: true, type, methods }),
|
|
3247
3285
|
close: () => set({ isOpen: false })
|
|
3248
3286
|
}));
|
|
3287
|
+
var useEmailModalStore = (0, import_zustand5.create)((set) => ({
|
|
3288
|
+
isOpen: false,
|
|
3289
|
+
type: "",
|
|
3290
|
+
open: (type) => set({ isOpen: true, type }),
|
|
3291
|
+
close: () => set({ isOpen: false })
|
|
3292
|
+
}));
|
|
3249
3293
|
|
|
3250
3294
|
// src/components/CEXBindModal/index.tsx
|
|
3251
3295
|
var import_react19 = require("react");
|
|
3252
3296
|
var import_react_intl6 = require("react-intl");
|
|
3253
|
-
var
|
|
3297
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3254
3298
|
|
|
3255
3299
|
// src/context/BusinessProvider.tsx
|
|
3256
3300
|
var import_react_query8 = require("@tanstack/react-query");
|
|
3257
|
-
|
|
3301
|
+
|
|
3302
|
+
// src/components/BindEmailModal/index.tsx
|
|
3303
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3304
|
+
|
|
3305
|
+
// src/context/BusinessProvider.tsx
|
|
3306
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
3258
3307
|
|
|
3259
3308
|
// src/context/index.tsx
|
|
3260
|
-
var
|
|
3309
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
3261
3310
|
|
|
3262
3311
|
// src/hooks/useWalletInit.ts
|
|
3263
3312
|
var import_react20 = require("react");
|
|
@@ -3337,7 +3386,7 @@ var matchTest = /* @__PURE__ */ (0, import_viem12.defineChain)({
|
|
|
3337
3386
|
|
|
3338
3387
|
// src/MatchContext.tsx
|
|
3339
3388
|
var import_wagmi = require("wagmi");
|
|
3340
|
-
var
|
|
3389
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
3341
3390
|
var queryClient = new import_react_query9.QueryClient();
|
|
3342
3391
|
var wagmiConfig = (0, import_rainbowkit.getDefaultConfig)({
|
|
3343
3392
|
appName: "MatchID",
|
|
@@ -3389,6 +3438,7 @@ function useUserInfo() {
|
|
|
3389
3438
|
const { open: BTCOpen } = useBTCModalStore();
|
|
3390
3439
|
const { open: CEXBindOpen } = useCEXBindModalStore();
|
|
3391
3440
|
const walletModalStore = useWalletModalStore();
|
|
3441
|
+
const emailModalStore = useEmailModalStore();
|
|
3392
3442
|
const getRedirectUri = () => {
|
|
3393
3443
|
return encodeURIComponent(window.location.href);
|
|
3394
3444
|
};
|
|
@@ -3482,6 +3532,7 @@ function useUserInfo() {
|
|
|
3482
3532
|
case "github":
|
|
3483
3533
|
case "linkedin":
|
|
3484
3534
|
case "facebook":
|
|
3535
|
+
case "kakao":
|
|
3485
3536
|
return await loginByMethod(method);
|
|
3486
3537
|
default:
|
|
3487
3538
|
throw new Error("unsupported method");
|
|
@@ -3566,6 +3617,8 @@ function useUserInfo() {
|
|
|
3566
3617
|
return TONOpen("bind");
|
|
3567
3618
|
case "btc":
|
|
3568
3619
|
return BTCOpen("bind");
|
|
3620
|
+
case "email":
|
|
3621
|
+
return emailModalStore.open("bind");
|
|
3569
3622
|
case "telegram":
|
|
3570
3623
|
return await bindTelegram();
|
|
3571
3624
|
case "twitter":
|
|
@@ -3575,6 +3628,7 @@ function useUserInfo() {
|
|
|
3575
3628
|
case "linkedin":
|
|
3576
3629
|
case "facebook":
|
|
3577
3630
|
case "youtube":
|
|
3631
|
+
case "kakao":
|
|
3578
3632
|
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" : ""}`;
|
|
3579
3633
|
matchlog_default.log("link", link);
|
|
3580
3634
|
return window.open(
|
|
@@ -3589,6 +3643,31 @@ function useUserInfo() {
|
|
|
3589
3643
|
const bindCex = (type) => {
|
|
3590
3644
|
return CEXBindOpen(type);
|
|
3591
3645
|
};
|
|
3646
|
+
const bindByEmail = async ({ email, code }) => {
|
|
3647
|
+
try {
|
|
3648
|
+
const obj = {
|
|
3649
|
+
email,
|
|
3650
|
+
verification_key: emailLoginKey,
|
|
3651
|
+
verification_code: code
|
|
3652
|
+
};
|
|
3653
|
+
const res = await verifyEmailCodeApi(obj);
|
|
3654
|
+
if (res && res.data && isSuccess(res)) {
|
|
3655
|
+
events.onBind && events.onBind({
|
|
3656
|
+
type: "email"
|
|
3657
|
+
});
|
|
3658
|
+
eventManager_default.emit("onBind", {
|
|
3659
|
+
type: "email"
|
|
3660
|
+
});
|
|
3661
|
+
return true;
|
|
3662
|
+
} else {
|
|
3663
|
+
throw new Error(res.message);
|
|
3664
|
+
}
|
|
3665
|
+
} catch (error) {
|
|
3666
|
+
console.error("bindByEmail", error);
|
|
3667
|
+
throw error;
|
|
3668
|
+
}
|
|
3669
|
+
return false;
|
|
3670
|
+
};
|
|
3592
3671
|
const getAuthInfo = async (method) => {
|
|
3593
3672
|
const element_id = "auth_iframe";
|
|
3594
3673
|
if (document.getElementById(element_id)) {
|
|
@@ -3657,6 +3736,7 @@ function useUserInfo() {
|
|
|
3657
3736
|
auth,
|
|
3658
3737
|
login: loginMethod,
|
|
3659
3738
|
bind,
|
|
3739
|
+
bindByEmail,
|
|
3660
3740
|
getAuthInfo,
|
|
3661
3741
|
invite
|
|
3662
3742
|
};
|
|
@@ -3665,10 +3745,10 @@ function useUserInfo() {
|
|
|
3665
3745
|
// src/components/EmailModal/StepVerify.tsx
|
|
3666
3746
|
var import_react24 = require("react");
|
|
3667
3747
|
var import_react_intl8 = require("react-intl");
|
|
3668
|
-
var
|
|
3748
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
3669
3749
|
function StepVerify(props) {
|
|
3670
3750
|
const intl = (0, import_react_intl8.useIntl)();
|
|
3671
|
-
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
3751
|
+
const { getLoginEmailCode, loginByEmail, bindByEmail } = useUserInfo();
|
|
3672
3752
|
const [error, setError] = (0, import_react24.useState)("");
|
|
3673
3753
|
const [code, setCode] = (0, import_react24.useState)("");
|
|
3674
3754
|
const [sending, setSending] = (0, import_react24.useState)(false);
|
|
@@ -3728,7 +3808,10 @@ function StepVerify(props) {
|
|
|
3728
3808
|
try {
|
|
3729
3809
|
setError("");
|
|
3730
3810
|
setSubmitting(true);
|
|
3731
|
-
const res = await
|
|
3811
|
+
const res = props.type === "bind" ? await bindByEmail({
|
|
3812
|
+
email: props.email,
|
|
3813
|
+
code
|
|
3814
|
+
}) : await loginByEmail({
|
|
3732
3815
|
email: props.email,
|
|
3733
3816
|
code
|
|
3734
3817
|
});
|
|
@@ -3742,17 +3825,17 @@ function StepVerify(props) {
|
|
|
3742
3825
|
setSubmitting(false);
|
|
3743
3826
|
}
|
|
3744
3827
|
};
|
|
3745
|
-
return /* @__PURE__ */ (0,
|
|
3746
|
-
/* @__PURE__ */ (0,
|
|
3747
|
-
/* @__PURE__ */ (0,
|
|
3748
|
-
/* @__PURE__ */ (0,
|
|
3749
|
-
/* @__PURE__ */ (0,
|
|
3750
|
-
/* @__PURE__ */ (0,
|
|
3828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-email-verify-box", children: [
|
|
3829
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-email-verify-header", children: [
|
|
3830
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
|
|
3831
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-email-verify-header-content", children: [
|
|
3832
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-email-verify-header-value", children: props.email }),
|
|
3833
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl8.FormattedMessage, { id: "sendEmailTips" }) })
|
|
3751
3834
|
] })
|
|
3752
3835
|
] }),
|
|
3753
|
-
/* @__PURE__ */ (0,
|
|
3836
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Field, { label: intl.formatMessage({
|
|
3754
3837
|
id: "verificationCode"
|
|
3755
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
3838
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
3756
3839
|
Input,
|
|
3757
3840
|
{
|
|
3758
3841
|
placeholder: intl.formatMessage({
|
|
@@ -3762,7 +3845,7 @@ function StepVerify(props) {
|
|
|
3762
3845
|
maxLength: codeLength,
|
|
3763
3846
|
onChange: (e) => setCode(e.target.value),
|
|
3764
3847
|
value: code,
|
|
3765
|
-
after: /* @__PURE__ */ (0,
|
|
3848
|
+
after: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
3766
3849
|
Button,
|
|
3767
3850
|
{
|
|
3768
3851
|
highlight: true,
|
|
@@ -3781,19 +3864,20 @@ function StepVerify(props) {
|
|
|
3781
3864
|
)
|
|
3782
3865
|
}
|
|
3783
3866
|
) }),
|
|
3784
|
-
/* @__PURE__ */ (0,
|
|
3867
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Button, { disabled: !canContinue, loading: submitting, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl8.FormattedMessage, { id: "continue" }) })
|
|
3785
3868
|
] });
|
|
3786
3869
|
}
|
|
3787
3870
|
|
|
3788
3871
|
// src/components/EmailModal/index.tsx
|
|
3789
3872
|
var import_react_intl9 = require("react-intl");
|
|
3790
|
-
var
|
|
3873
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
3791
3874
|
function EmailModal({
|
|
3792
3875
|
isOpen = false,
|
|
3793
3876
|
width = 480,
|
|
3794
3877
|
onClose,
|
|
3795
3878
|
onBack,
|
|
3796
|
-
onLogin
|
|
3879
|
+
onLogin,
|
|
3880
|
+
type = "login"
|
|
3797
3881
|
}) {
|
|
3798
3882
|
const [step, setStep] = (0, import_react25.useState)("input");
|
|
3799
3883
|
const [emailVal, setEmailVal] = (0, import_react25.useState)("");
|
|
@@ -3804,7 +3888,7 @@ function EmailModal({
|
|
|
3804
3888
|
setEmailVal("");
|
|
3805
3889
|
}
|
|
3806
3890
|
}, [isOpen]);
|
|
3807
|
-
return /* @__PURE__ */ (0,
|
|
3891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
3808
3892
|
ModalWithHeader,
|
|
3809
3893
|
{
|
|
3810
3894
|
isOpen,
|
|
@@ -3814,10 +3898,10 @@ function EmailModal({
|
|
|
3814
3898
|
id: "email"
|
|
3815
3899
|
}),
|
|
3816
3900
|
onBack: step == "verify" ? () => setStep("input") : onBack,
|
|
3817
|
-
children: step === "input" ? /* @__PURE__ */ (0,
|
|
3901
|
+
children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
|
|
3818
3902
|
setEmailVal(email);
|
|
3819
3903
|
setStep("verify");
|
|
3820
|
-
} }) : /* @__PURE__ */ (0,
|
|
3904
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(StepVerify, { type, email: emailVal, onSuccess: onLogin })
|
|
3821
3905
|
}
|
|
3822
3906
|
);
|
|
3823
3907
|
}
|
|
@@ -3847,7 +3931,7 @@ function useAppConfig() {
|
|
|
3847
3931
|
}
|
|
3848
3932
|
|
|
3849
3933
|
// src/components/LoginBox/index.tsx
|
|
3850
|
-
var
|
|
3934
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
3851
3935
|
var RecommendItem = ({
|
|
3852
3936
|
icon,
|
|
3853
3937
|
name,
|
|
@@ -3856,20 +3940,20 @@ var RecommendItem = ({
|
|
|
3856
3940
|
children,
|
|
3857
3941
|
footer
|
|
3858
3942
|
}) => {
|
|
3859
|
-
return /* @__PURE__ */ (0,
|
|
3860
|
-
/* @__PURE__ */ (0,
|
|
3861
|
-
/* @__PURE__ */ (0,
|
|
3862
|
-
/* @__PURE__ */ (0,
|
|
3863
|
-
/* @__PURE__ */ (0,
|
|
3943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-recommend-method", children: [
|
|
3944
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-recommend-method-item", onClick, children: [
|
|
3945
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-recommend-method-content", children: [
|
|
3946
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-recommend-method-icon", children: icon }),
|
|
3947
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "matchid-login-recommend-method-name", children: name })
|
|
3864
3948
|
] }),
|
|
3865
|
-
footer ? footer : children ? /* @__PURE__ */ (0,
|
|
3949
|
+
footer ? footer : children ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
3866
3950
|
ArrowDownIcon,
|
|
3867
3951
|
{
|
|
3868
3952
|
className: `matchid-login-recommend-method-arrow ${showChildren ? "matchid-login-recommend-method-arrow-active" : ""}`,
|
|
3869
3953
|
size: 20,
|
|
3870
3954
|
color: "var(--matchid-arrow-color)"
|
|
3871
3955
|
}
|
|
3872
|
-
) : /* @__PURE__ */ (0,
|
|
3956
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
3873
3957
|
ArrowRightIcon,
|
|
3874
3958
|
{
|
|
3875
3959
|
className: "matchid-login-recommend-method-arrow",
|
|
@@ -3878,7 +3962,7 @@ var RecommendItem = ({
|
|
|
3878
3962
|
}
|
|
3879
3963
|
)
|
|
3880
3964
|
] }),
|
|
3881
|
-
children && /* @__PURE__ */ (0,
|
|
3965
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
3882
3966
|
"div",
|
|
3883
3967
|
{
|
|
3884
3968
|
className: `matchid-login-recommend-method-popover ${showChildren ? "matchid-login-recommend-method-popover-active" : ""}`,
|
|
@@ -3943,75 +4027,80 @@ function LoginBox({
|
|
|
3943
4027
|
const isDownMd = useDownMd();
|
|
3944
4028
|
const methodMap = {
|
|
3945
4029
|
wallet: {
|
|
3946
|
-
icon: /* @__PURE__ */ (0,
|
|
4030
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(WalletIcon, { size: isDownMd ? 36 : 40 }),
|
|
3947
4031
|
name: intl.formatMessage({ id: "wallet" }),
|
|
3948
4032
|
onClick: () => setShowWallet(!showWallet),
|
|
3949
4033
|
type: "wallet"
|
|
3950
4034
|
},
|
|
3951
4035
|
email: {
|
|
3952
|
-
icon: /* @__PURE__ */ (0,
|
|
4036
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
|
|
3953
4037
|
name: intl.formatMessage({ id: "email" }),
|
|
3954
4038
|
onClick: () => {
|
|
3955
4039
|
setEmailOpen(true);
|
|
3956
4040
|
}
|
|
3957
4041
|
},
|
|
3958
4042
|
google: {
|
|
3959
|
-
icon: /* @__PURE__ */ (0,
|
|
4043
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(GoogleIcon, { size: isDownMd ? 36 : 40 }),
|
|
3960
4044
|
name: "Google",
|
|
3961
4045
|
onClick: () => login("google")
|
|
3962
4046
|
},
|
|
3963
4047
|
twitter: {
|
|
3964
|
-
icon: /* @__PURE__ */ (0,
|
|
4048
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(XIcon, { size: isDownMd ? 36 : 40 }),
|
|
3965
4049
|
name: "X",
|
|
3966
4050
|
onClick: () => login("twitter")
|
|
3967
4051
|
},
|
|
3968
4052
|
telegram: {
|
|
3969
|
-
icon: /* @__PURE__ */ (0,
|
|
4053
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TelegramIcon, { size: isDownMd ? 36 : 40 }),
|
|
3970
4054
|
name: "Telegram",
|
|
3971
4055
|
onClick: () => login("telegram")
|
|
3972
4056
|
},
|
|
3973
4057
|
github: {
|
|
3974
|
-
icon: /* @__PURE__ */ (0,
|
|
4058
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(GithubIcon, { size: isDownMd ? 36 : 40 }),
|
|
3975
4059
|
name: "Github",
|
|
3976
4060
|
onClick: () => login("github")
|
|
3977
4061
|
},
|
|
3978
4062
|
discord: {
|
|
3979
|
-
icon: /* @__PURE__ */ (0,
|
|
4063
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(DiscordIcon, { size: isDownMd ? 36 : 40 }),
|
|
3980
4064
|
name: "Discord",
|
|
3981
4065
|
onClick: () => login("discord")
|
|
3982
4066
|
},
|
|
3983
4067
|
linkedin: {
|
|
3984
|
-
icon: /* @__PURE__ */ (0,
|
|
4068
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
|
|
3985
4069
|
name: "LinkedIn",
|
|
3986
4070
|
onClick: () => login("linkedin")
|
|
3987
4071
|
},
|
|
3988
4072
|
facebook: {
|
|
3989
|
-
icon: /* @__PURE__ */ (0,
|
|
4073
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FacebookIcon, { size: isDownMd ? 36 : 40 }),
|
|
3990
4074
|
name: "Facebook",
|
|
3991
4075
|
onClick: () => login("facebook")
|
|
3992
4076
|
},
|
|
3993
4077
|
youtube: {
|
|
3994
|
-
icon: /* @__PURE__ */ (0,
|
|
4078
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
|
|
3995
4079
|
name: "Youtube",
|
|
3996
4080
|
onClick: () => login("youtube")
|
|
4081
|
+
},
|
|
4082
|
+
kakao: {
|
|
4083
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(KakaoIcon, { size: isDownMd ? 36 : 40 }),
|
|
4084
|
+
name: "Kakao",
|
|
4085
|
+
onClick: () => login("kakao")
|
|
3997
4086
|
}
|
|
3998
4087
|
};
|
|
3999
4088
|
const { walletMap } = useWalletConfig();
|
|
4000
|
-
return /* @__PURE__ */ (0,
|
|
4001
|
-
(!inModal || !emailOpen) && /* @__PURE__ */ (0,
|
|
4002
|
-
/* @__PURE__ */ (0,
|
|
4003
|
-
return /* @__PURE__ */ (0,
|
|
4089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
|
|
4090
|
+
(!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-box", children: [
|
|
4091
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
|
|
4092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4004
4093
|
RecommendItem,
|
|
4005
4094
|
{
|
|
4006
4095
|
icon: methodMap[m]?.icon,
|
|
4007
4096
|
name: methodMap[m]?.name,
|
|
4008
4097
|
onClick: methodMap[m]?.onClick,
|
|
4009
4098
|
showChildren: m == "wallet" && showWallet,
|
|
4010
|
-
children: m == "wallet" && /* @__PURE__ */ (0,
|
|
4011
|
-
/* @__PURE__ */ (0,
|
|
4012
|
-
/* @__PURE__ */ (0,
|
|
4099
|
+
children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
|
|
4100
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
|
|
4101
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
|
|
4013
4102
|
const m2 = walletMap[n];
|
|
4014
|
-
return /* @__PURE__ */ (0,
|
|
4103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
4015
4104
|
"div",
|
|
4016
4105
|
{
|
|
4017
4106
|
className: "matchid-login-recommend-wallet-item",
|
|
@@ -4019,16 +4108,16 @@ function LoginBox({
|
|
|
4019
4108
|
login(m2.method);
|
|
4020
4109
|
},
|
|
4021
4110
|
children: [
|
|
4022
|
-
/* @__PURE__ */ (0,
|
|
4023
|
-
/* @__PURE__ */ (0,
|
|
4024
|
-
/* @__PURE__ */ (0,
|
|
4111
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
|
|
4112
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
|
|
4113
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4025
4114
|
"div",
|
|
4026
4115
|
{
|
|
4027
4116
|
className: "matchid-login-recommend-wallet-item-hover-icon",
|
|
4028
4117
|
children: m2.activeIcon
|
|
4029
4118
|
}
|
|
4030
4119
|
),
|
|
4031
|
-
/* @__PURE__ */ (0,
|
|
4120
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4032
4121
|
"span",
|
|
4033
4122
|
{
|
|
4034
4123
|
className: "matchid-login-recommend-wallet-item-name",
|
|
@@ -4036,7 +4125,7 @@ function LoginBox({
|
|
|
4036
4125
|
}
|
|
4037
4126
|
)
|
|
4038
4127
|
] }),
|
|
4039
|
-
/* @__PURE__ */ (0,
|
|
4128
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4040
4129
|
ArrowRightIcon,
|
|
4041
4130
|
{
|
|
4042
4131
|
className: "matchid-login-recommend-wallet-item-arrow",
|
|
@@ -4054,10 +4143,48 @@ function LoginBox({
|
|
|
4054
4143
|
m
|
|
4055
4144
|
);
|
|
4056
4145
|
}) }),
|
|
4057
|
-
|
|
4058
|
-
/* @__PURE__ */ (0,
|
|
4059
|
-
|
|
4060
|
-
|
|
4146
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-privacy-policy", children: [
|
|
4147
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-privacy-policy-content", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4148
|
+
import_react_intl10.FormattedMessage,
|
|
4149
|
+
{
|
|
4150
|
+
id: "loginAgreement",
|
|
4151
|
+
values: {
|
|
4152
|
+
termsLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4153
|
+
"a",
|
|
4154
|
+
{
|
|
4155
|
+
href: TERMS_OF_SERVICE_URL,
|
|
4156
|
+
target: "_blank",
|
|
4157
|
+
rel: "noopener noreferrer",
|
|
4158
|
+
className: "matchid-privacy-policy-content-link",
|
|
4159
|
+
children: chunks
|
|
4160
|
+
}
|
|
4161
|
+
),
|
|
4162
|
+
privacyLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4163
|
+
"a",
|
|
4164
|
+
{
|
|
4165
|
+
href: PRIVACY_POLICY_URL,
|
|
4166
|
+
target: "_blank",
|
|
4167
|
+
rel: "noopener noreferrer",
|
|
4168
|
+
className: "matchid-privacy-policy-content-link",
|
|
4169
|
+
children: chunks
|
|
4170
|
+
}
|
|
4171
|
+
)
|
|
4172
|
+
}
|
|
4173
|
+
}
|
|
4174
|
+
) }),
|
|
4175
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-privacy-policy-powered-by", children: [
|
|
4176
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react_intl10.FormattedMessage, { id: "poweredBy" }),
|
|
4177
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(MatchIdIcon_default, {})
|
|
4178
|
+
] })
|
|
4179
|
+
] }),
|
|
4180
|
+
methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-other", children: [
|
|
4181
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-other-line-box", children: [
|
|
4182
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-other-line" }),
|
|
4183
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react_intl10.FormattedMessage, { id: "otherLoginMethods" }) }),
|
|
4184
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-other-line" })
|
|
4185
|
+
] }),
|
|
4186
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
4187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4061
4188
|
"div",
|
|
4062
4189
|
{
|
|
4063
4190
|
className: "matchid-login-method-item",
|
|
@@ -4070,7 +4197,7 @@ function LoginBox({
|
|
|
4070
4197
|
}) })
|
|
4071
4198
|
] })
|
|
4072
4199
|
] }),
|
|
4073
|
-
/* @__PURE__ */ (0,
|
|
4200
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4074
4201
|
EmailModal,
|
|
4075
4202
|
{
|
|
4076
4203
|
isOpen: emailOpen,
|
|
@@ -4090,40 +4217,40 @@ var import_react28 = require("react");
|
|
|
4090
4217
|
|
|
4091
4218
|
// src/components/LoginPanel/index.tsx
|
|
4092
4219
|
var import_react_intl11 = require("react-intl");
|
|
4093
|
-
var
|
|
4220
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
4094
4221
|
function LoginPanel({
|
|
4095
4222
|
header,
|
|
4096
4223
|
onClose,
|
|
4097
4224
|
...props
|
|
4098
4225
|
}) {
|
|
4099
4226
|
const isDownMd = useDownMd();
|
|
4100
|
-
return /* @__PURE__ */ (0,
|
|
4101
|
-
header ? header : /* @__PURE__ */ (0,
|
|
4102
|
-
/* @__PURE__ */ (0,
|
|
4103
|
-
/* @__PURE__ */ (0,
|
|
4104
|
-
/* @__PURE__ */ (0,
|
|
4227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-login-panel", children: [
|
|
4228
|
+
header ? header : /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-login-panel-header", children: [
|
|
4229
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-login-panel-header-content", children: [
|
|
4230
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react_intl11.FormattedMessage, { id: "loginTitle" }) }),
|
|
4231
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react_intl11.FormattedMessage, { id: "loginTips" }) })
|
|
4105
4232
|
] }),
|
|
4106
|
-
onClose && /* @__PURE__ */ (0,
|
|
4233
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
|
|
4107
4234
|
] }),
|
|
4108
|
-
/* @__PURE__ */ (0,
|
|
4109
|
-
/* @__PURE__ */ (0,
|
|
4235
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-login-panel-divide" }),
|
|
4236
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(LoginBox, { ...props }) })
|
|
4110
4237
|
] });
|
|
4111
4238
|
}
|
|
4112
4239
|
|
|
4113
4240
|
// src/components/LoginModal/index.tsx
|
|
4114
|
-
var
|
|
4241
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
4115
4242
|
function LoginModal({
|
|
4116
4243
|
isOpen = false,
|
|
4117
4244
|
width = 480,
|
|
4118
4245
|
...props
|
|
4119
4246
|
}) {
|
|
4120
4247
|
const { isLogin } = useUserInfo();
|
|
4121
|
-
return /* @__PURE__ */ (0,
|
|
4248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4122
4249
|
Modal,
|
|
4123
4250
|
{
|
|
4124
4251
|
isOpen: isOpen && !isLogin,
|
|
4125
4252
|
width,
|
|
4126
|
-
children: /* @__PURE__ */ (0,
|
|
4253
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(LoginPanel, { ...props, inModal: true })
|
|
4127
4254
|
}
|
|
4128
4255
|
);
|
|
4129
4256
|
}
|
|
@@ -4132,10 +4259,10 @@ function LoginModal({
|
|
|
4132
4259
|
var import_react27 = require("react");
|
|
4133
4260
|
|
|
4134
4261
|
// src/assets/icon/ProfileIcon.tsx
|
|
4135
|
-
var
|
|
4262
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
4136
4263
|
function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
4137
|
-
return /* @__PURE__ */ (0,
|
|
4138
|
-
/* @__PURE__ */ (0,
|
|
4264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
4265
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4139
4266
|
"path",
|
|
4140
4267
|
{
|
|
4141
4268
|
fillRule: "evenodd",
|
|
@@ -4144,7 +4271,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
4144
4271
|
fill: color
|
|
4145
4272
|
}
|
|
4146
4273
|
),
|
|
4147
|
-
/* @__PURE__ */ (0,
|
|
4274
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4148
4275
|
"path",
|
|
4149
4276
|
{
|
|
4150
4277
|
fillRule: "evenodd",
|
|
@@ -4158,7 +4285,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
4158
4285
|
|
|
4159
4286
|
// src/components/UserPopover/index.tsx
|
|
4160
4287
|
var import_react_intl12 = require("react-intl");
|
|
4161
|
-
var
|
|
4288
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
4162
4289
|
function UserContent() {
|
|
4163
4290
|
const { logout, address, username } = useUserInfo();
|
|
4164
4291
|
const [logouting, setLogouting] = (0, import_react27.useState)(false);
|
|
@@ -4179,34 +4306,34 @@ function UserContent() {
|
|
|
4179
4306
|
rightIcon,
|
|
4180
4307
|
onClick
|
|
4181
4308
|
}) => {
|
|
4182
|
-
return /* @__PURE__ */ (0,
|
|
4183
|
-
/* @__PURE__ */ (0,
|
|
4309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-user-popover-item", onClick, children: [
|
|
4310
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-user-popover-item-content`, children: [
|
|
4184
4311
|
icon,
|
|
4185
|
-
/* @__PURE__ */ (0,
|
|
4312
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "matchid-user-popover-item-text", children })
|
|
4186
4313
|
] }),
|
|
4187
4314
|
rightIcon
|
|
4188
4315
|
] });
|
|
4189
4316
|
};
|
|
4190
4317
|
const UserDivider = () => {
|
|
4191
|
-
return /* @__PURE__ */ (0,
|
|
4318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-user-popover-divider` });
|
|
4192
4319
|
};
|
|
4193
4320
|
const [usernameOpen, setUsernameOpen] = (0, import_react27.useState)(false);
|
|
4194
4321
|
const [copied, setCopied] = useCopyClipboard();
|
|
4195
4322
|
const intl = (0, import_react_intl12.useIntl)();
|
|
4196
|
-
return /* @__PURE__ */ (0,
|
|
4197
|
-
/* @__PURE__ */ (0,
|
|
4198
|
-
/* @__PURE__ */ (0,
|
|
4323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-user-popover-content", children: [
|
|
4324
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-user-popover-list", children: [
|
|
4325
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UserItem, { onClick: () => {
|
|
4199
4326
|
setCopied(address);
|
|
4200
|
-
}, icon: copied ? /* @__PURE__ */ (0,
|
|
4201
|
-
/* @__PURE__ */ (0,
|
|
4202
|
-
/* @__PURE__ */ (0,
|
|
4327
|
+
}, icon: copied ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CheckIcon, { size: 20, color: "#0ecb81" }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CopyIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CheckIcon, { size: 20, color: "var(--icon-color)" }), children: truncateAddress(address) }),
|
|
4328
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UserDivider, {}),
|
|
4329
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UserItem, { onClick: () => {
|
|
4203
4330
|
setUsernameOpen(true);
|
|
4204
|
-
}, icon: /* @__PURE__ */ (0,
|
|
4331
|
+
}, icon: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ProfileIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ArrowRightIcon, { size: 20, color: "var(--icon-color)" }), children: username || intl.formatMessage({
|
|
4205
4332
|
id: "setUsername"
|
|
4206
4333
|
}) })
|
|
4207
4334
|
] }),
|
|
4208
|
-
/* @__PURE__ */ (0,
|
|
4209
|
-
/* @__PURE__ */ (0,
|
|
4335
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl12.FormattedMessage, { id: "disconnect" }) }),
|
|
4336
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UsernameModal, { isOpen: usernameOpen, onClose: () => {
|
|
4210
4337
|
setUsernameOpen(false);
|
|
4211
4338
|
}, onSuccess: () => {
|
|
4212
4339
|
setUsernameOpen(false);
|
|
@@ -4217,12 +4344,12 @@ function UserPopover({
|
|
|
4217
4344
|
children,
|
|
4218
4345
|
...props
|
|
4219
4346
|
}) {
|
|
4220
|
-
return /* @__PURE__ */ (0,
|
|
4347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Popover, { ...props, content: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UserContent, {}), children });
|
|
4221
4348
|
}
|
|
4222
4349
|
|
|
4223
4350
|
// src/components/LoginButton/index.tsx
|
|
4224
4351
|
var import_react_intl13 = require("react-intl");
|
|
4225
|
-
var
|
|
4352
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
4226
4353
|
function LoginButton({
|
|
4227
4354
|
loginRender,
|
|
4228
4355
|
methods,
|
|
@@ -4238,8 +4365,8 @@ function LoginButton({
|
|
|
4238
4365
|
const { isLogin, username } = useUserInfo();
|
|
4239
4366
|
const [loginOpen, setLoginOpen] = (0, import_react28.useState)(false);
|
|
4240
4367
|
if (!isLogin) {
|
|
4241
|
-
return /* @__PURE__ */ (0,
|
|
4242
|
-
/* @__PURE__ */ (0,
|
|
4368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
|
|
4369
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
4243
4370
|
LoginModal,
|
|
4244
4371
|
{
|
|
4245
4372
|
methods,
|
|
@@ -4249,15 +4376,15 @@ function LoginButton({
|
|
|
4249
4376
|
onClose: () => setLoginOpen(false)
|
|
4250
4377
|
}
|
|
4251
4378
|
),
|
|
4252
|
-
/* @__PURE__ */ (0,
|
|
4253
|
-
/* @__PURE__ */ (0,
|
|
4254
|
-
/* @__PURE__ */ (0,
|
|
4379
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
|
|
4380
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(UnLoginIcon_default, {}),
|
|
4381
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl13.FormattedMessage, { id: "login" }) })
|
|
4255
4382
|
] })
|
|
4256
4383
|
] });
|
|
4257
4384
|
}
|
|
4258
|
-
return loginRender ? /* @__PURE__ */ (0,
|
|
4259
|
-
/* @__PURE__ */ (0,
|
|
4260
|
-
/* @__PURE__ */ (0,
|
|
4385
|
+
return loginRender ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_jsx_runtime92.Fragment, { children: loginRender }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(UserPopover, { position: popoverPosition, type: popoverType, gap: popoverGap, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Button, { onClick: onLoginClick, className: "matchid-login-btn", ...props, children: [
|
|
4386
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(LoginIcon_default, {}),
|
|
4387
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: username ? truncateAddress(username) : "MatchID " + intl.formatMessage({
|
|
4261
4388
|
id: "user"
|
|
4262
4389
|
}) })
|
|
4263
4390
|
] }) });
|
|
@@ -4266,15 +4393,15 @@ function LoginButton({
|
|
|
4266
4393
|
// src/components/UsernameModal/index.tsx
|
|
4267
4394
|
var import_react29 = require("react");
|
|
4268
4395
|
var import_react_intl14 = require("react-intl");
|
|
4269
|
-
var
|
|
4396
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
4270
4397
|
var ValidItem = ({
|
|
4271
4398
|
success = false,
|
|
4272
4399
|
text
|
|
4273
4400
|
}) => {
|
|
4274
4401
|
const isDownMd = useDownMd();
|
|
4275
|
-
return /* @__PURE__ */ (0,
|
|
4276
|
-
success ? /* @__PURE__ */ (0,
|
|
4277
|
-
/* @__PURE__ */ (0,
|
|
4402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
|
|
4403
|
+
success ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
|
|
4404
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { children: text })
|
|
4278
4405
|
] });
|
|
4279
4406
|
};
|
|
4280
4407
|
function UsernameModal({
|
|
@@ -4322,12 +4449,12 @@ function UsernameModal({
|
|
|
4322
4449
|
}
|
|
4323
4450
|
};
|
|
4324
4451
|
const intl = (0, import_react_intl14.useIntl)();
|
|
4325
|
-
return /* @__PURE__ */ (0,
|
|
4452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
|
|
4326
4453
|
id: username ? "editUsernameTitle" : "setUsernameTitle"
|
|
4327
|
-
}), children: /* @__PURE__ */ (0,
|
|
4328
|
-
/* @__PURE__ */ (0,
|
|
4454
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-username-box", children: [
|
|
4455
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Field, { label: intl.formatMessage({
|
|
4329
4456
|
id: "username"
|
|
4330
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
4457
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
4331
4458
|
Input,
|
|
4332
4459
|
{
|
|
4333
4460
|
placeholder: intl.formatMessage({
|
|
@@ -4340,8 +4467,8 @@ function UsernameModal({
|
|
|
4340
4467
|
value: val
|
|
4341
4468
|
}
|
|
4342
4469
|
) }),
|
|
4343
|
-
/* @__PURE__ */ (0,
|
|
4344
|
-
/* @__PURE__ */ (0,
|
|
4470
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-valid", children: [
|
|
4471
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
4345
4472
|
ValidItem,
|
|
4346
4473
|
{
|
|
4347
4474
|
success: isValid,
|
|
@@ -4350,16 +4477,16 @@ function UsernameModal({
|
|
|
4350
4477
|
})
|
|
4351
4478
|
}
|
|
4352
4479
|
),
|
|
4353
|
-
/* @__PURE__ */ (0,
|
|
4480
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ValidItem, { success: isLength, text: intl.formatMessage({
|
|
4354
4481
|
id: "usernameLengthError"
|
|
4355
4482
|
}) })
|
|
4356
4483
|
] }),
|
|
4357
|
-
/* @__PURE__ */ (0,
|
|
4484
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { disabled: !isSafe, loading: isSubmitting, style: {
|
|
4358
4485
|
marginTop: isDownMd ? "36px" : "64px"
|
|
4359
|
-
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
4360
|
-
/* @__PURE__ */ (0,
|
|
4486
|
+
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl14.FormattedMessage, { id: "confirm" }) }),
|
|
4487
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { style: {
|
|
4361
4488
|
marginTop: isDownMd ? "12px" : "24px"
|
|
4362
|
-
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0,
|
|
4489
|
+
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl14.FormattedMessage, { id: "cancel" }) })
|
|
4363
4490
|
] }) });
|
|
4364
4491
|
}
|
|
4365
4492
|
|
|
@@ -4378,7 +4505,7 @@ var walletConnectImage = wallet_default;
|
|
|
4378
4505
|
var walletSigningImage = signing_default;
|
|
4379
4506
|
|
|
4380
4507
|
// src/components/WalletModalContent/index.tsx
|
|
4381
|
-
var
|
|
4508
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
4382
4509
|
function WalletModalContent({
|
|
4383
4510
|
status,
|
|
4384
4511
|
error,
|
|
@@ -4448,15 +4575,15 @@ function WalletModalContent({
|
|
|
4448
4575
|
statusImage: walletConnectImage
|
|
4449
4576
|
};
|
|
4450
4577
|
}, [visible, connected, status, error, address]);
|
|
4451
|
-
return /* @__PURE__ */ (0,
|
|
4452
|
-
/* @__PURE__ */ (0,
|
|
4453
|
-
/* @__PURE__ */ (0,
|
|
4578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
4579
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
4580
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
4454
4581
|
width: 128,
|
|
4455
4582
|
height: 128
|
|
4456
4583
|
} }),
|
|
4457
|
-
/* @__PURE__ */ (0,
|
|
4584
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: pageData.isError ? "matchid-error" : "", children: pageData.text })
|
|
4458
4585
|
] }),
|
|
4459
|
-
/* @__PURE__ */ (0,
|
|
4586
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
4460
4587
|
Button,
|
|
4461
4588
|
{
|
|
4462
4589
|
block: true,
|
|
@@ -4532,15 +4659,15 @@ function WalletModalContentV2(props) {
|
|
|
4532
4659
|
statusImage: walletConnectImage
|
|
4533
4660
|
};
|
|
4534
4661
|
}, [props, submitting]);
|
|
4535
|
-
return /* @__PURE__ */ (0,
|
|
4536
|
-
/* @__PURE__ */ (0,
|
|
4537
|
-
/* @__PURE__ */ (0,
|
|
4662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
4663
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
4664
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
4538
4665
|
width: 128,
|
|
4539
4666
|
height: 128
|
|
4540
4667
|
} }),
|
|
4541
|
-
/* @__PURE__ */ (0,
|
|
4668
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: props.status == "error" ? "matchid-error" : "", children: pageData.text })
|
|
4542
4669
|
] }),
|
|
4543
|
-
/* @__PURE__ */ (0,
|
|
4670
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
4544
4671
|
Button,
|
|
4545
4672
|
{
|
|
4546
4673
|
block: true,
|
|
@@ -4604,7 +4731,7 @@ var import_wagmi2 = require("wagmi");
|
|
|
4604
4731
|
var import_ethers = require("ethers");
|
|
4605
4732
|
|
|
4606
4733
|
// node_modules/@wagmi/core/dist/esm/version.js
|
|
4607
|
-
var version = "2.
|
|
4734
|
+
var version = "2.17.1";
|
|
4608
4735
|
|
|
4609
4736
|
// node_modules/@wagmi/core/dist/esm/utils/getVersion.js
|
|
4610
4737
|
var getVersion2 = () => `@wagmi/core@${version}`;
|
|
@@ -4822,7 +4949,7 @@ async function getEthersSigner(config, { chainId } = {}) {
|
|
|
4822
4949
|
// src/components/EVMModal/index.tsx
|
|
4823
4950
|
var import_siwe = require("siwe");
|
|
4824
4951
|
var import_styles = require("@rainbow-me/rainbowkit/styles.css");
|
|
4825
|
-
var
|
|
4952
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
4826
4953
|
function WalletContent({
|
|
4827
4954
|
onSuccess,
|
|
4828
4955
|
type
|
|
@@ -4980,7 +5107,7 @@ function WalletContent({
|
|
|
4980
5107
|
setNonce(void 0);
|
|
4981
5108
|
setStatus("start");
|
|
4982
5109
|
};
|
|
4983
|
-
return /* @__PURE__ */ (0,
|
|
5110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
4984
5111
|
WalletModalContentV2,
|
|
4985
5112
|
{
|
|
4986
5113
|
status,
|
|
@@ -4998,14 +5125,14 @@ function EVMConnectModal({
|
|
|
4998
5125
|
...props
|
|
4999
5126
|
}) {
|
|
5000
5127
|
const intl = (0, import_react_intl15.useIntl)();
|
|
5001
|
-
return /* @__PURE__ */ (0,
|
|
5128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5002
5129
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5003
5130
|
}, {
|
|
5004
5131
|
name: "EVM"
|
|
5005
|
-
}), children: /* @__PURE__ */ (0,
|
|
5132
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(WalletContent, { onSuccess, type }) });
|
|
5006
5133
|
}
|
|
5007
5134
|
function EVMModal(props) {
|
|
5008
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5135
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_rainbowkit2.RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(EVMConnectModal, { ...props }) });
|
|
5009
5136
|
}
|
|
5010
5137
|
|
|
5011
5138
|
// src/components/TRONModal/index.tsx
|
|
@@ -5120,7 +5247,7 @@ var useTRONWallet = () => {
|
|
|
5120
5247
|
};
|
|
5121
5248
|
|
|
5122
5249
|
// src/components/TRONModal/index.tsx
|
|
5123
|
-
var
|
|
5250
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
5124
5251
|
function TRONConnectModal({
|
|
5125
5252
|
type = "login",
|
|
5126
5253
|
onSuccess,
|
|
@@ -5130,9 +5257,9 @@ function TRONConnectModal({
|
|
|
5130
5257
|
const intl = (0, import_react_intl16.useIntl)();
|
|
5131
5258
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
|
|
5132
5259
|
const iconMaps = {
|
|
5133
|
-
tronlink: /* @__PURE__ */ (0,
|
|
5134
|
-
bitget: /* @__PURE__ */ (0,
|
|
5135
|
-
okx: /* @__PURE__ */ (0,
|
|
5260
|
+
tronlink: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
|
|
5261
|
+
bitget: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(BitgetIcon, { size: isDownMd ? 36 : 40 }),
|
|
5262
|
+
okx: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(OKXIcon, { size: isDownMd ? 36 : 40 })
|
|
5136
5263
|
};
|
|
5137
5264
|
const { events, login } = useMatch();
|
|
5138
5265
|
const [status, setStatus] = (0, import_react34.useState)("");
|
|
@@ -5224,11 +5351,11 @@ function TRONConnectModal({
|
|
|
5224
5351
|
disconnect();
|
|
5225
5352
|
}
|
|
5226
5353
|
}, [props.isOpen]);
|
|
5227
|
-
return /* @__PURE__ */ (0,
|
|
5354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5228
5355
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5229
5356
|
}, {
|
|
5230
5357
|
name: "TRON"
|
|
5231
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5358
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
5232
5359
|
WalletModalContent,
|
|
5233
5360
|
{
|
|
5234
5361
|
error,
|
|
@@ -5241,9 +5368,9 @@ function TRONConnectModal({
|
|
|
5241
5368
|
setVisible: () => {
|
|
5242
5369
|
}
|
|
5243
5370
|
}
|
|
5244
|
-
) : /* @__PURE__ */ (0,
|
|
5371
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
5245
5372
|
installedWallets.map((wallet2) => {
|
|
5246
|
-
return /* @__PURE__ */ (0,
|
|
5373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
5247
5374
|
RecommendItem,
|
|
5248
5375
|
{
|
|
5249
5376
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -5256,14 +5383,14 @@ function TRONConnectModal({
|
|
|
5256
5383
|
);
|
|
5257
5384
|
}),
|
|
5258
5385
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
5259
|
-
return /* @__PURE__ */ (0,
|
|
5386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
5260
5387
|
RecommendItem,
|
|
5261
5388
|
{
|
|
5262
5389
|
icon: iconMaps[wallet2.walletKey],
|
|
5263
5390
|
name: wallet2.name,
|
|
5264
5391
|
onClick: () => {
|
|
5265
5392
|
},
|
|
5266
|
-
footer: /* @__PURE__ */ (0,
|
|
5393
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Button, { size: "sm", onClick: () => {
|
|
5267
5394
|
window.open(wallet2.website);
|
|
5268
5395
|
}, children: "Install" })
|
|
5269
5396
|
},
|
|
@@ -5273,14 +5400,14 @@ function TRONConnectModal({
|
|
|
5273
5400
|
] }) }) });
|
|
5274
5401
|
}
|
|
5275
5402
|
function TRONModal(props) {
|
|
5276
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5403
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TRONConnectModal, { ...props, type: props.type });
|
|
5277
5404
|
}
|
|
5278
5405
|
|
|
5279
5406
|
// src/components/TONModal/index.tsx
|
|
5280
5407
|
var import_react35 = __toESM(require("react"));
|
|
5281
5408
|
var import_react_intl17 = require("react-intl");
|
|
5282
5409
|
var import_ui_react = require("@tonconnect/ui-react");
|
|
5283
|
-
var
|
|
5410
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
5284
5411
|
function WalletContent2({
|
|
5285
5412
|
onSuccess,
|
|
5286
5413
|
type
|
|
@@ -5407,7 +5534,7 @@ function WalletContent2({
|
|
|
5407
5534
|
}
|
|
5408
5535
|
}
|
|
5409
5536
|
}, [state]);
|
|
5410
|
-
return /* @__PURE__ */ (0,
|
|
5537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5411
5538
|
WalletModalContent,
|
|
5412
5539
|
{
|
|
5413
5540
|
connected,
|
|
@@ -5441,20 +5568,20 @@ function TONConnectModal({
|
|
|
5441
5568
|
const intl = (0, import_react_intl17.useIntl)();
|
|
5442
5569
|
const { endpoints, appid } = useLocalStore_default();
|
|
5443
5570
|
const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
|
|
5444
|
-
return /* @__PURE__ */ (0,
|
|
5571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5445
5572
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5446
5573
|
}, {
|
|
5447
5574
|
name: "TON"
|
|
5448
|
-
}), children: /* @__PURE__ */ (0,
|
|
5575
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5449
5576
|
import_ui_react.TonConnectUIProvider,
|
|
5450
5577
|
{
|
|
5451
5578
|
manifestUrl,
|
|
5452
|
-
children: /* @__PURE__ */ (0,
|
|
5579
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(WalletContent2, { onSuccess, type })
|
|
5453
5580
|
}
|
|
5454
5581
|
) });
|
|
5455
5582
|
}
|
|
5456
5583
|
function TONModal(props) {
|
|
5457
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5584
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(TONConnectModal, { ...props });
|
|
5458
5585
|
}
|
|
5459
5586
|
|
|
5460
5587
|
// src/components/BTCModal/index.tsx
|
|
@@ -5677,7 +5804,7 @@ var useBTCWallet = () => {
|
|
|
5677
5804
|
};
|
|
5678
5805
|
|
|
5679
5806
|
// src/components/BTCModal/index.tsx
|
|
5680
|
-
var
|
|
5807
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
5681
5808
|
function BTCConnectModal({
|
|
5682
5809
|
type = "login",
|
|
5683
5810
|
onSuccess,
|
|
@@ -5687,10 +5814,10 @@ function BTCConnectModal({
|
|
|
5687
5814
|
const intl = (0, import_react_intl18.useIntl)();
|
|
5688
5815
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
|
|
5689
5816
|
const iconMaps = {
|
|
5690
|
-
leather: /* @__PURE__ */ (0,
|
|
5691
|
-
unisat: /* @__PURE__ */ (0,
|
|
5692
|
-
xverse: /* @__PURE__ */ (0,
|
|
5693
|
-
phantom: /* @__PURE__ */ (0,
|
|
5817
|
+
leather: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(LeatherIcon, { size: isDownMd ? 36 : 40 }),
|
|
5818
|
+
unisat: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(UnisatIcon, { size: isDownMd ? 36 : 40 }),
|
|
5819
|
+
xverse: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(XverseIcon, { size: isDownMd ? 36 : 40 }),
|
|
5820
|
+
phantom: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(PhantomIcon, { size: isDownMd ? 36 : 40 })
|
|
5694
5821
|
};
|
|
5695
5822
|
const { events, login } = useMatch();
|
|
5696
5823
|
const [status, setStatus] = (0, import_react37.useState)("");
|
|
@@ -5790,11 +5917,11 @@ function BTCConnectModal({
|
|
|
5790
5917
|
statusRef.current = "";
|
|
5791
5918
|
setError("");
|
|
5792
5919
|
};
|
|
5793
|
-
return /* @__PURE__ */ (0,
|
|
5920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5794
5921
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5795
5922
|
}, {
|
|
5796
5923
|
name: "BTC"
|
|
5797
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5924
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5798
5925
|
WalletModalContent,
|
|
5799
5926
|
{
|
|
5800
5927
|
error,
|
|
@@ -5807,9 +5934,9 @@ function BTCConnectModal({
|
|
|
5807
5934
|
setVisible: () => {
|
|
5808
5935
|
}
|
|
5809
5936
|
}
|
|
5810
|
-
) : /* @__PURE__ */ (0,
|
|
5937
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
5811
5938
|
installedWallets.map((wallet2) => {
|
|
5812
|
-
return /* @__PURE__ */ (0,
|
|
5939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5813
5940
|
RecommendItem,
|
|
5814
5941
|
{
|
|
5815
5942
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -5822,14 +5949,14 @@ function BTCConnectModal({
|
|
|
5822
5949
|
);
|
|
5823
5950
|
}),
|
|
5824
5951
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
5825
|
-
return /* @__PURE__ */ (0,
|
|
5952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5826
5953
|
RecommendItem,
|
|
5827
5954
|
{
|
|
5828
5955
|
icon: iconMaps[wallet2.walletKey],
|
|
5829
5956
|
name: wallet2.name,
|
|
5830
5957
|
onClick: () => {
|
|
5831
5958
|
},
|
|
5832
|
-
footer: /* @__PURE__ */ (0,
|
|
5959
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Button, { size: "sm", onClick: () => {
|
|
5833
5960
|
window.open(wallet2.website);
|
|
5834
5961
|
}, children: "Install" })
|
|
5835
5962
|
},
|
|
@@ -5839,13 +5966,13 @@ function BTCConnectModal({
|
|
|
5839
5966
|
] }) }) });
|
|
5840
5967
|
}
|
|
5841
5968
|
function BTCModal(props) {
|
|
5842
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5969
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(BTCConnectModal, { ...props });
|
|
5843
5970
|
}
|
|
5844
5971
|
|
|
5845
5972
|
// src/components/WalletModal/index.tsx
|
|
5846
5973
|
var import_react38 = require("react");
|
|
5847
5974
|
var import_react_intl19 = require("react-intl");
|
|
5848
|
-
var
|
|
5975
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
5849
5976
|
function WalletConnectModal({
|
|
5850
5977
|
type,
|
|
5851
5978
|
methods: _methods,
|
|
@@ -5863,13 +5990,13 @@ function WalletConnectModal({
|
|
|
5863
5990
|
const platform = config.platform.map((p) => p.toLowerCase());
|
|
5864
5991
|
return WALLET_METHODS.filter((m) => platform.includes(m));
|
|
5865
5992
|
}, [config.platform, _methods]);
|
|
5866
|
-
return /* @__PURE__ */ (0,
|
|
5993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5867
5994
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5868
5995
|
}, {
|
|
5869
5996
|
name: ""
|
|
5870
|
-
}), children: /* @__PURE__ */ (0,
|
|
5997
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-login-recommend-list", children: methods.map((method, index) => {
|
|
5871
5998
|
const m = walletMap[method];
|
|
5872
|
-
return /* @__PURE__ */ (0,
|
|
5999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
5873
6000
|
RecommendItem,
|
|
5874
6001
|
{
|
|
5875
6002
|
icon: m?.icon,
|
|
@@ -5883,12 +6010,12 @@ function WalletConnectModal({
|
|
|
5883
6010
|
}) }) }) });
|
|
5884
6011
|
}
|
|
5885
6012
|
function WalletModal(props) {
|
|
5886
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
6013
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(WalletConnectModal, { ...props });
|
|
5887
6014
|
}
|
|
5888
6015
|
|
|
5889
6016
|
// src/components/AlphaAvatar/index.tsx
|
|
5890
6017
|
var import_react39 = require("react");
|
|
5891
|
-
var
|
|
6018
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
5892
6019
|
function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
5893
6020
|
const [avatar, setAvatar] = (0, import_react39.useState)(void 0);
|
|
5894
6021
|
(0, import_react39.useEffect)(() => {
|
|
@@ -5897,7 +6024,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
5897
6024
|
setAvatar(char);
|
|
5898
6025
|
}
|
|
5899
6026
|
}, [name]);
|
|
5900
|
-
return /* @__PURE__ */ (0,
|
|
6027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
5901
6028
|
width: size,
|
|
5902
6029
|
height: size,
|
|
5903
6030
|
fontSize: Math.ceil(size / 2)
|
|
@@ -5905,7 +6032,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
5905
6032
|
}
|
|
5906
6033
|
|
|
5907
6034
|
// src/components/WalletAsset/index.tsx
|
|
5908
|
-
var
|
|
6035
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
5909
6036
|
function WalletAsset({
|
|
5910
6037
|
onAssetClick,
|
|
5911
6038
|
matchWalletAssetsOptions
|
|
@@ -5915,7 +6042,7 @@ function WalletAsset({
|
|
|
5915
6042
|
list: walletAssets.mergedAssets
|
|
5916
6043
|
});
|
|
5917
6044
|
const { list } = useMatchChain();
|
|
5918
|
-
return /* @__PURE__ */ (0,
|
|
6045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5919
6046
|
const clickFunc = onAssetClick && onAssetClick(n);
|
|
5920
6047
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5921
6048
|
const getFooterColor = () => {
|
|
@@ -5930,11 +6057,11 @@ function WalletAsset({
|
|
|
5930
6057
|
}
|
|
5931
6058
|
return "";
|
|
5932
6059
|
};
|
|
5933
|
-
return /* @__PURE__ */ (0,
|
|
6060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-wallet-asset-item`, onClick: clickFunc, style: {
|
|
5934
6061
|
cursor: clickFunc ? "pointer" : "default"
|
|
5935
6062
|
}, children: [
|
|
5936
|
-
/* @__PURE__ */ (0,
|
|
5937
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
6063
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
|
|
6064
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-wallet-asset-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
5938
6065
|
AlphaAvatar2,
|
|
5939
6066
|
{
|
|
5940
6067
|
className: `matchid-wallet-asset-icon`,
|
|
@@ -5942,12 +6069,12 @@ function WalletAsset({
|
|
|
5942
6069
|
name: n.symbol || n.name || ""
|
|
5943
6070
|
}
|
|
5944
6071
|
),
|
|
5945
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6072
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
|
|
5946
6073
|
] }),
|
|
5947
|
-
/* @__PURE__ */ (0,
|
|
5948
|
-
/* @__PURE__ */ (0,
|
|
5949
|
-
"price" in n && /* @__PURE__ */ (0,
|
|
5950
|
-
/* @__PURE__ */ (0,
|
|
6074
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-wallet-asset-info`, children: [
|
|
6075
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
|
|
6076
|
+
"price" in n && /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-wallet-asset-content`, children: [
|
|
6077
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
5951
6078
|
NumberFormatter,
|
|
5952
6079
|
{
|
|
5953
6080
|
value: n.price,
|
|
@@ -5955,7 +6082,7 @@ function WalletAsset({
|
|
|
5955
6082
|
tFixNum: 2
|
|
5956
6083
|
}
|
|
5957
6084
|
) }),
|
|
5958
|
-
/* @__PURE__ */ (0,
|
|
6085
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
5959
6086
|
NumberFormatter,
|
|
5960
6087
|
{
|
|
5961
6088
|
value: n.value,
|
|
@@ -5964,15 +6091,15 @@ function WalletAsset({
|
|
|
5964
6091
|
}
|
|
5965
6092
|
) })
|
|
5966
6093
|
] }),
|
|
5967
|
-
/* @__PURE__ */ (0,
|
|
5968
|
-
/* @__PURE__ */ (0,
|
|
6094
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-wallet-asset-footer`, children: [
|
|
6095
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
5969
6096
|
NumberFormatter,
|
|
5970
6097
|
{
|
|
5971
6098
|
value: n.balance,
|
|
5972
6099
|
tFixNum: 3
|
|
5973
6100
|
}
|
|
5974
6101
|
) }),
|
|
5975
|
-
"price_change_24h" in n && /* @__PURE__ */ (0,
|
|
6102
|
+
"price_change_24h" in n && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: `matchid-wallet-asset-change ${getFooterColor()}`, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
5976
6103
|
NumberFormatter,
|
|
5977
6104
|
{
|
|
5978
6105
|
prefix: `${(n?.price_change_24h || 0) < 0 ? "-" : "+"} `,
|
|
@@ -5991,7 +6118,7 @@ function WalletAsset({
|
|
|
5991
6118
|
var import_react40 = require("react");
|
|
5992
6119
|
var import_viem15 = require("viem");
|
|
5993
6120
|
var import_react_intl20 = require("react-intl");
|
|
5994
|
-
var
|
|
6121
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
5995
6122
|
function Input2({
|
|
5996
6123
|
onChange,
|
|
5997
6124
|
placeholder,
|
|
@@ -6001,8 +6128,8 @@ function Input2({
|
|
|
6001
6128
|
error,
|
|
6002
6129
|
size = "df"
|
|
6003
6130
|
}) {
|
|
6004
|
-
return /* @__PURE__ */ (0,
|
|
6005
|
-
/* @__PURE__ */ (0,
|
|
6131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
|
|
6132
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
6006
6133
|
"input",
|
|
6007
6134
|
{
|
|
6008
6135
|
placeholder,
|
|
@@ -6013,7 +6140,7 @@ function Input2({
|
|
|
6013
6140
|
className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
|
|
6014
6141
|
}
|
|
6015
6142
|
),
|
|
6016
|
-
error && /* @__PURE__ */ (0,
|
|
6143
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "matchid-token-input-error-text", children: error })
|
|
6017
6144
|
] });
|
|
6018
6145
|
}
|
|
6019
6146
|
function TokenSend({
|
|
@@ -6141,24 +6268,24 @@ function TokenSend({
|
|
|
6141
6268
|
window.removeEventListener("message", receiveMessage);
|
|
6142
6269
|
};
|
|
6143
6270
|
}, []);
|
|
6144
|
-
return /* @__PURE__ */ (0,
|
|
6145
|
-
/* @__PURE__ */ (0,
|
|
6146
|
-
/* @__PURE__ */ (0,
|
|
6147
|
-
/* @__PURE__ */ (0,
|
|
6148
|
-
/* @__PURE__ */ (0,
|
|
6149
|
-
/* @__PURE__ */ (0,
|
|
6150
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
6271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_intl20.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-send-box`, children: [
|
|
6272
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
6273
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-amount-content`, children: [
|
|
6274
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-amount-header`, children: [
|
|
6275
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_intl20.FormattedMessage, { id: "amount" }) }),
|
|
6276
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
|
|
6277
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
6151
6278
|
"img",
|
|
6152
6279
|
{
|
|
6153
6280
|
src: token?.icon,
|
|
6154
6281
|
alt: token?.symbol,
|
|
6155
6282
|
className: `matchid-token-amount-chain-icon`
|
|
6156
6283
|
}
|
|
6157
|
-
) : /* @__PURE__ */ (0,
|
|
6158
|
-
/* @__PURE__ */ (0,
|
|
6284
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
|
|
6285
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { children: token?.symbol })
|
|
6159
6286
|
] })
|
|
6160
6287
|
] }),
|
|
6161
|
-
/* @__PURE__ */ (0,
|
|
6288
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
6162
6289
|
Input2,
|
|
6163
6290
|
{
|
|
6164
6291
|
type: "text",
|
|
@@ -6171,18 +6298,18 @@ function TokenSend({
|
|
|
6171
6298
|
error: error.amount || txError
|
|
6172
6299
|
}
|
|
6173
6300
|
),
|
|
6174
|
-
/* @__PURE__ */ (0,
|
|
6175
|
-
/* @__PURE__ */ (0,
|
|
6176
|
-
/* @__PURE__ */ (0,
|
|
6301
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
|
|
6302
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-amount-title`, children: [
|
|
6303
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_intl20.FormattedMessage, { id: "balance" }),
|
|
6177
6304
|
":"
|
|
6178
6305
|
] }),
|
|
6179
|
-
/* @__PURE__ */ (0,
|
|
6306
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
|
|
6180
6307
|
] }),
|
|
6181
|
-
/* @__PURE__ */ (0,
|
|
6308
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
6182
6309
|
] }),
|
|
6183
|
-
/* @__PURE__ */ (0,
|
|
6184
|
-
/* @__PURE__ */ (0,
|
|
6185
|
-
/* @__PURE__ */ (0,
|
|
6310
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-address-content`, children: [
|
|
6311
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_intl20.FormattedMessage, { id: "receiveTitle" }) }) }),
|
|
6312
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
6186
6313
|
Input2,
|
|
6187
6314
|
{
|
|
6188
6315
|
type: "text",
|
|
@@ -6198,7 +6325,7 @@ function TokenSend({
|
|
|
6198
6325
|
)
|
|
6199
6326
|
] })
|
|
6200
6327
|
] }),
|
|
6201
|
-
/* @__PURE__ */ (0,
|
|
6328
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
6202
6329
|
Button,
|
|
6203
6330
|
{
|
|
6204
6331
|
size: "lg",
|
|
@@ -6207,7 +6334,7 @@ function TokenSend({
|
|
|
6207
6334
|
disabled: !canSend || !!txError,
|
|
6208
6335
|
onClick: onNext,
|
|
6209
6336
|
loading: loading || sending,
|
|
6210
|
-
children: /* @__PURE__ */ (0,
|
|
6337
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_intl20.FormattedMessage, { id: "next" })
|
|
6211
6338
|
}
|
|
6212
6339
|
)
|
|
6213
6340
|
] }) });
|
|
@@ -6215,7 +6342,7 @@ function TokenSend({
|
|
|
6215
6342
|
|
|
6216
6343
|
// src/components/TokenDetail/index.tsx
|
|
6217
6344
|
var import_react_intl21 = require("react-intl");
|
|
6218
|
-
var
|
|
6345
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
6219
6346
|
function TokenDetail({
|
|
6220
6347
|
onClose,
|
|
6221
6348
|
token
|
|
@@ -6225,41 +6352,41 @@ function TokenDetail({
|
|
|
6225
6352
|
const chain = chainList?.find((m) => m.id.toString() === token.chain_id);
|
|
6226
6353
|
const onSend = () => {
|
|
6227
6354
|
modal.show((props) => {
|
|
6228
|
-
return /* @__PURE__ */ (0,
|
|
6355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(TokenSend, { onClose: () => {
|
|
6229
6356
|
props.close();
|
|
6230
6357
|
onClose();
|
|
6231
6358
|
}, onBack: props.close, zIndex: props.zIndex, token });
|
|
6232
6359
|
});
|
|
6233
6360
|
};
|
|
6234
6361
|
const intl = (0, import_react_intl21.useIntl)();
|
|
6235
|
-
return /* @__PURE__ */ (0,
|
|
6362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(ModalDrawer, { isOpen: true, title: intl.formatMessage({
|
|
6236
6363
|
id: "tokenDetails"
|
|
6237
|
-
}), onClose, children: /* @__PURE__ */ (0,
|
|
6238
|
-
/* @__PURE__ */ (0,
|
|
6239
|
-
/* @__PURE__ */ (0,
|
|
6240
|
-
/* @__PURE__ */ (0,
|
|
6241
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
6242
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6364
|
+
}), onClose, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-detail`, children: [
|
|
6365
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-main`, children: [
|
|
6366
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-info`, children: [
|
|
6367
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-logo`, children: [
|
|
6368
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("img", { src: token.icon, alt: token.symbol, className: `matchid-token-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(AlphaAvatar, { className: `matchid-token-icon`, size: 48, name: token.symbol || token.name || "" }),
|
|
6369
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-token-chain` })
|
|
6243
6370
|
] }),
|
|
6244
|
-
/* @__PURE__ */ (0,
|
|
6245
|
-
/* @__PURE__ */ (0,
|
|
6371
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-name`, children: [
|
|
6372
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10 }),
|
|
6246
6373
|
" ",
|
|
6247
6374
|
token.symbol
|
|
6248
6375
|
] })
|
|
6249
6376
|
] }),
|
|
6250
|
-
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0,
|
|
6251
|
-
/* @__PURE__ */ (0,
|
|
6252
|
-
/* @__PURE__ */ (0,
|
|
6377
|
+
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-contract`, children: [
|
|
6378
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "matchid-token-contract-title", children: "Contract address" }),
|
|
6379
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "matchid-token-contract-address", children: token.address })
|
|
6253
6380
|
] })
|
|
6254
6381
|
] }),
|
|
6255
|
-
/* @__PURE__ */ (0,
|
|
6382
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react_intl21.FormattedMessage, { id: "send" }) })
|
|
6256
6383
|
] }) });
|
|
6257
6384
|
}
|
|
6258
6385
|
|
|
6259
6386
|
// src/components/TokenSendList/index.tsx
|
|
6260
6387
|
var import_react41 = require("react");
|
|
6261
6388
|
var import_react_intl22 = require("react-intl");
|
|
6262
|
-
var
|
|
6389
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
6263
6390
|
function TokenSendList({ close }) {
|
|
6264
6391
|
const isDownMd = useDownMd();
|
|
6265
6392
|
const walletAssets = useMatchWalletAssets();
|
|
@@ -6271,16 +6398,16 @@ function TokenSendList({ close }) {
|
|
|
6271
6398
|
const modal = useModal();
|
|
6272
6399
|
const onNext = () => {
|
|
6273
6400
|
checked && modal.show((props) => {
|
|
6274
|
-
return /* @__PURE__ */ (0,
|
|
6401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(TokenSend, { onClose: () => {
|
|
6275
6402
|
props.close();
|
|
6276
6403
|
close();
|
|
6277
6404
|
}, onBack: props.close, zIndex: props.zIndex, token: checked });
|
|
6278
6405
|
});
|
|
6279
6406
|
};
|
|
6280
|
-
return /* @__PURE__ */ (0,
|
|
6281
|
-
/* @__PURE__ */ (0,
|
|
6407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "matchid-token-send-list-box", children: [
|
|
6408
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
6282
6409
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
6283
|
-
return /* @__PURE__ */ (0,
|
|
6410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
6284
6411
|
"div",
|
|
6285
6412
|
{
|
|
6286
6413
|
className: `matchid-token-send-item ${checked?.address == n.address ? "matchid-token-send-chekced" : ""}`,
|
|
@@ -6288,10 +6415,10 @@ function TokenSendList({ close }) {
|
|
|
6288
6415
|
setChecked(n);
|
|
6289
6416
|
},
|
|
6290
6417
|
children: [
|
|
6291
|
-
/* @__PURE__ */ (0,
|
|
6292
|
-
/* @__PURE__ */ (0,
|
|
6293
|
-
/* @__PURE__ */ (0,
|
|
6294
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
6418
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
|
|
6419
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
6420
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "matchid-token-send-logo", children: [
|
|
6421
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
6295
6422
|
AlphaAvatar2,
|
|
6296
6423
|
{
|
|
6297
6424
|
className: `matchid-token-send-icon`,
|
|
@@ -6299,7 +6426,7 @@ function TokenSendList({ close }) {
|
|
|
6299
6426
|
name: n.symbol || n.name || ""
|
|
6300
6427
|
}
|
|
6301
6428
|
),
|
|
6302
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6429
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
6303
6430
|
"img",
|
|
6304
6431
|
{
|
|
6305
6432
|
src: chain.iconUrl,
|
|
@@ -6308,9 +6435,9 @@ function TokenSendList({ close }) {
|
|
|
6308
6435
|
}
|
|
6309
6436
|
)
|
|
6310
6437
|
] }),
|
|
6311
|
-
/* @__PURE__ */ (0,
|
|
6312
|
-
/* @__PURE__ */ (0,
|
|
6313
|
-
/* @__PURE__ */ (0,
|
|
6438
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: `matchid-token-send-info`, children: [
|
|
6439
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
|
|
6440
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
|
|
6314
6441
|
] })
|
|
6315
6442
|
] })
|
|
6316
6443
|
]
|
|
@@ -6318,7 +6445,7 @@ function TokenSendList({ close }) {
|
|
|
6318
6445
|
index
|
|
6319
6446
|
);
|
|
6320
6447
|
}) }),
|
|
6321
|
-
/* @__PURE__ */ (0,
|
|
6448
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl22.FormattedMessage, { id: "next" }) })
|
|
6322
6449
|
] });
|
|
6323
6450
|
}
|
|
6324
6451
|
|
|
@@ -6328,7 +6455,7 @@ var import_react42 = require("react");
|
|
|
6328
6455
|
var import_viem16 = require("viem");
|
|
6329
6456
|
var import_viem17 = require("viem");
|
|
6330
6457
|
var import_react_intl23 = require("react-intl");
|
|
6331
|
-
var
|
|
6458
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
6332
6459
|
var Item = ({ data }) => {
|
|
6333
6460
|
const { address } = useWallet();
|
|
6334
6461
|
const isOut = data.from.toLowerCase() == address.toLowerCase();
|
|
@@ -6415,18 +6542,18 @@ var Item = ({ data }) => {
|
|
|
6415
6542
|
}
|
|
6416
6543
|
return chain?.nativeCurrency.symbol || chain?.nativeCurrency.name;
|
|
6417
6544
|
}, [transferType, chain, contracts, chainId, data.to]);
|
|
6418
|
-
return /* @__PURE__ */ (0,
|
|
6545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
6419
6546
|
"a",
|
|
6420
6547
|
{
|
|
6421
6548
|
href: explorerLink(`tx/${data.hash}`),
|
|
6422
6549
|
target: "_blank",
|
|
6423
6550
|
className: `matchid-transaction-item`,
|
|
6424
6551
|
children: [
|
|
6425
|
-
/* @__PURE__ */ (0,
|
|
6426
|
-
/* @__PURE__ */ (0,
|
|
6427
|
-
/* @__PURE__ */ (0,
|
|
6428
|
-
/* @__PURE__ */ (0,
|
|
6429
|
-
/* @__PURE__ */ (0,
|
|
6552
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: `matchid-transacton-item-container`, children: [
|
|
6553
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
|
|
6554
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: `matchid-transaction-item-details`, children: [
|
|
6555
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
|
|
6556
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
6430
6557
|
"div",
|
|
6431
6558
|
{
|
|
6432
6559
|
className: `matchid-transaction-item-timestamp`,
|
|
@@ -6435,11 +6562,11 @@ var Item = ({ data }) => {
|
|
|
6435
6562
|
)
|
|
6436
6563
|
] })
|
|
6437
6564
|
] }),
|
|
6438
|
-
/* @__PURE__ */ (0,
|
|
6439
|
-
/* @__PURE__ */ (0,
|
|
6440
|
-
status == "loading" && /* @__PURE__ */ (0,
|
|
6441
|
-
status == "success" && /* @__PURE__ */ (0,
|
|
6442
|
-
status == "error" && /* @__PURE__ */ (0,
|
|
6565
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
|
|
6566
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(NumberFormatter, { value: amount, tFixNum: 6, prefix: isOut ? "-" : "+", suffix: " " + symbol }),
|
|
6567
|
+
status == "loading" && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(LoadingIcon_default, { color: "#000000", size: 16, rotate: true }),
|
|
6568
|
+
status == "success" && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(CheckRoundIcon, { size: 16 }),
|
|
6569
|
+
status == "error" && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(InfoRoundIcon, { size: 16 })
|
|
6443
6570
|
] })
|
|
6444
6571
|
]
|
|
6445
6572
|
}
|
|
@@ -6449,19 +6576,19 @@ function TransactionList({
|
|
|
6449
6576
|
scrollableTarget
|
|
6450
6577
|
}) {
|
|
6451
6578
|
const { fetchMoreData, hasMore, items } = useMatchWalletRecords();
|
|
6452
|
-
return /* @__PURE__ */ (0,
|
|
6579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
6453
6580
|
import_react_infinite_scroll_component.default,
|
|
6454
6581
|
{
|
|
6455
6582
|
scrollableTarget,
|
|
6456
6583
|
dataLength: items.length,
|
|
6457
6584
|
next: fetchMoreData,
|
|
6458
6585
|
hasMore,
|
|
6459
|
-
loader: /* @__PURE__ */ (0,
|
|
6460
|
-
/* @__PURE__ */ (0,
|
|
6586
|
+
loader: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "matchid-list-nomore", children: [
|
|
6587
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
|
|
6461
6588
|
"Loading..."
|
|
6462
6589
|
] }),
|
|
6463
|
-
endMessage: items.length > 0 ? /* @__PURE__ */ (0,
|
|
6464
|
-
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0,
|
|
6590
|
+
endMessage: items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react_intl23.FormattedMessage, { id: "noMoreRecords" }) }) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react_intl23.FormattedMessage, { id: "noRecords" }) }),
|
|
6591
|
+
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "mt-[150px]" }) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Item, { data: item }, index)) })
|
|
6465
6592
|
}
|
|
6466
6593
|
);
|
|
6467
6594
|
}
|