@matchain/matchid-sdk-react 0.1.56 → 0.1.57-alpha.1
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-KFB23MLQ.mjs → chunk-6RNCNC65.mjs} +353 -217
- package/dist/chunk-6RNCNC65.mjs.map +1 -0
- package/dist/{chunk-GD7URBBZ.mjs → chunk-7SUDHG7S.mjs} +41 -1
- package/dist/chunk-7SUDHG7S.mjs.map +1 -0
- package/dist/{chunk-NYE6DBEZ.mjs → chunk-EAZNOQRK.mjs} +2 -2
- package/dist/components.d.mts +3 -3
- package/dist/components.d.ts +3 -3
- package/dist/components.js +498 -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 +599 -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-EAZNOQRK.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,12 @@ function StepEmail(props) {
|
|
|
1585
1621
|
value: emailVal
|
|
1586
1622
|
}
|
|
1587
1623
|
) }),
|
|
1588
|
-
/* @__PURE__ */ (0,
|
|
1624
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(Button, { disabled: !canContinue, style: {
|
|
1589
1625
|
marginTop: "64px"
|
|
1590
|
-
}, onClick: onContinue, size: "lg", block: true, highlight: true, children:
|
|
1626
|
+
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: [
|
|
1627
|
+
"99999",
|
|
1628
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react_intl2.FormattedMessage, { id: "continue" })
|
|
1629
|
+
] })
|
|
1591
1630
|
] });
|
|
1592
1631
|
}
|
|
1593
1632
|
|
|
@@ -2010,7 +2049,7 @@ var import_react10 = require("react");
|
|
|
2010
2049
|
var import_react_dom = require("react-dom");
|
|
2011
2050
|
|
|
2012
2051
|
// src/ui/Drawer/index.tsx
|
|
2013
|
-
var
|
|
2052
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2014
2053
|
function Drawer({
|
|
2015
2054
|
children,
|
|
2016
2055
|
showClose = true,
|
|
@@ -2021,15 +2060,15 @@ function Drawer({
|
|
|
2021
2060
|
onBack
|
|
2022
2061
|
}) {
|
|
2023
2062
|
if (!isOpen) {
|
|
2024
|
-
return /* @__PURE__ */ (0,
|
|
2063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, {});
|
|
2025
2064
|
}
|
|
2026
|
-
return /* @__PURE__ */ (0,
|
|
2027
|
-
/* @__PURE__ */ (0,
|
|
2028
|
-
/* @__PURE__ */ (0,
|
|
2029
|
-
onBack && /* @__PURE__ */ (0,
|
|
2065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "matchid-drawer", children: [
|
|
2066
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: `matchid-drawer-header matchid-flex`, children: [
|
|
2067
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: `matchid-drawer-header-content matchid-flex`, children: [
|
|
2068
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ArrowLeftIcon, { height: 25, width: 24, className: "matchid-drawer-header-back", onClick: onBack }),
|
|
2030
2069
|
title
|
|
2031
2070
|
] }),
|
|
2032
|
-
showClose && /* @__PURE__ */ (0,
|
|
2071
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
|
|
2033
2072
|
] }),
|
|
2034
2073
|
children
|
|
2035
2074
|
] }) });
|
|
@@ -2039,7 +2078,7 @@ function Drawer({
|
|
|
2039
2078
|
var import_react7 = require("react");
|
|
2040
2079
|
|
|
2041
2080
|
// src/ui/ModalDrawer/index.tsx
|
|
2042
|
-
var
|
|
2081
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2043
2082
|
function ModalDrawer({
|
|
2044
2083
|
title,
|
|
2045
2084
|
drawerTitleVisible = true,
|
|
@@ -2047,9 +2086,9 @@ function ModalDrawer({
|
|
|
2047
2086
|
}) {
|
|
2048
2087
|
const isDownMd = useDownMd();
|
|
2049
2088
|
if (isDownMd) {
|
|
2050
|
-
return /* @__PURE__ */ (0,
|
|
2089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ModalWithHeader, { ...props, title });
|
|
2051
2090
|
}
|
|
2052
|
-
return /* @__PURE__ */ (0,
|
|
2091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
|
|
2053
2092
|
}
|
|
2054
2093
|
|
|
2055
2094
|
// src/assets/lottie/confirm.json
|
|
@@ -2117,7 +2156,7 @@ function useHash({
|
|
|
2117
2156
|
}
|
|
2118
2157
|
|
|
2119
2158
|
// src/ui/HashPanel/index.tsx
|
|
2120
|
-
var
|
|
2159
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2121
2160
|
function HashPanel({
|
|
2122
2161
|
hash,
|
|
2123
2162
|
chain,
|
|
@@ -2177,14 +2216,14 @@ function HashPanel({
|
|
|
2177
2216
|
}
|
|
2178
2217
|
}, [hashQuery.data]);
|
|
2179
2218
|
const link = chain ? `${chain?.blockExplorers?.default.url}/tx/${hash}` : "";
|
|
2180
|
-
return /* @__PURE__ */ (0,
|
|
2219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2181
2220
|
ModalDrawer,
|
|
2182
2221
|
{
|
|
2183
2222
|
isOpen,
|
|
2184
2223
|
showClose: true,
|
|
2185
2224
|
onClose,
|
|
2186
2225
|
zIndex,
|
|
2187
|
-
title: /* @__PURE__ */ (0,
|
|
2226
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2188
2227
|
"div",
|
|
2189
2228
|
{
|
|
2190
2229
|
className: "matchid-hashpanel-header",
|
|
@@ -2194,33 +2233,33 @@ function HashPanel({
|
|
|
2194
2233
|
children: statusValue.text
|
|
2195
2234
|
}
|
|
2196
2235
|
),
|
|
2197
|
-
children: /* @__PURE__ */ (0,
|
|
2198
|
-
/* @__PURE__ */ (0,
|
|
2199
|
-
/* @__PURE__ */ (0,
|
|
2236
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "matchid-hashpanel-box", children: [
|
|
2237
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "matchid-hashpanel-content", children: [
|
|
2238
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: `matchid-hashpanel-status`, style: {
|
|
2200
2239
|
color: statusValue.color
|
|
2201
2240
|
}, children: statusValue.text }),
|
|
2202
|
-
statusValue.lottie && /* @__PURE__ */ (0,
|
|
2241
|
+
statusValue.lottie && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Lottie_default, { animationData: statusValue.lottie, style: {
|
|
2203
2242
|
width: "96px",
|
|
2204
2243
|
height: "96px"
|
|
2205
2244
|
} }),
|
|
2206
|
-
hash && /* @__PURE__ */ (0,
|
|
2245
|
+
hash && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
|
|
2207
2246
|
"Hash:",
|
|
2208
|
-
/* @__PURE__ */ (0,
|
|
2247
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("a", { href: link, target: "_blank", children: hash })
|
|
2209
2248
|
] }),
|
|
2210
|
-
error && /* @__PURE__ */ (0,
|
|
2249
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "matchid-hashpanel-text", children: error })
|
|
2211
2250
|
] }),
|
|
2212
|
-
/* @__PURE__ */ (0,
|
|
2251
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
|
|
2213
2252
|
] })
|
|
2214
2253
|
}
|
|
2215
2254
|
);
|
|
2216
2255
|
}
|
|
2217
2256
|
function HashPanel_default(props) {
|
|
2218
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
2257
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(HashPanel, { ...props });
|
|
2219
2258
|
}
|
|
2220
2259
|
|
|
2221
2260
|
// src/ui/Popover/index.tsx
|
|
2222
2261
|
var import_react8 = require("react");
|
|
2223
|
-
var
|
|
2262
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2224
2263
|
function Popover({
|
|
2225
2264
|
children,
|
|
2226
2265
|
content,
|
|
@@ -2230,7 +2269,7 @@ function Popover({
|
|
|
2230
2269
|
gap = "20px"
|
|
2231
2270
|
}) {
|
|
2232
2271
|
const [active, setActive] = (0, import_react8.useState)(false);
|
|
2233
|
-
return children && /* @__PURE__ */ (0,
|
|
2272
|
+
return children && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
2234
2273
|
"div",
|
|
2235
2274
|
{
|
|
2236
2275
|
onClick: () => {
|
|
@@ -2241,20 +2280,20 @@ function Popover({
|
|
|
2241
2280
|
className: `matchid-popover-box matchid-popover-${position} matchid-popover-${type} ${className} ${type == "click" && active ? "matchid-popover-click-active" : ""}`,
|
|
2242
2281
|
children: [
|
|
2243
2282
|
children,
|
|
2244
|
-
/* @__PURE__ */ (0,
|
|
2283
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { style: {
|
|
2245
2284
|
paddingTop: gap
|
|
2246
|
-
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0,
|
|
2285
|
+
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: `matchid-popover-content`, children: content }) })
|
|
2247
2286
|
]
|
|
2248
2287
|
}
|
|
2249
2288
|
);
|
|
2250
2289
|
}
|
|
2251
2290
|
|
|
2252
2291
|
// src/ui/Switch/index.tsx
|
|
2253
|
-
var
|
|
2292
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2254
2293
|
|
|
2255
2294
|
// src/ui/AlphaAvatar/index.tsx
|
|
2256
2295
|
var import_react9 = require("react");
|
|
2257
|
-
var
|
|
2296
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2258
2297
|
function AlphaAvatar({
|
|
2259
2298
|
name,
|
|
2260
2299
|
size = "default",
|
|
@@ -2271,7 +2310,7 @@ function AlphaAvatar({
|
|
|
2271
2310
|
return "";
|
|
2272
2311
|
}, [name]);
|
|
2273
2312
|
const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
|
|
2274
|
-
return /* @__PURE__ */ (0,
|
|
2313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
2275
2314
|
width: numberSize,
|
|
2276
2315
|
height: numberSize,
|
|
2277
2316
|
fontSize: Math.ceil(numberSize / 2),
|
|
@@ -2280,7 +2319,7 @@ function AlphaAvatar({
|
|
|
2280
2319
|
}
|
|
2281
2320
|
|
|
2282
2321
|
// src/ui/Radio/index.tsx
|
|
2283
|
-
var
|
|
2322
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2284
2323
|
function Radio({
|
|
2285
2324
|
checked = false,
|
|
2286
2325
|
onChange,
|
|
@@ -2289,23 +2328,23 @@ function Radio({
|
|
|
2289
2328
|
className = "",
|
|
2290
2329
|
style = {}
|
|
2291
2330
|
}) {
|
|
2292
|
-
return /* @__PURE__ */ (0,
|
|
2331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
|
|
2293
2332
|
width: size,
|
|
2294
2333
|
height: size,
|
|
2295
2334
|
...style,
|
|
2296
2335
|
// @ts-ignore
|
|
2297
2336
|
"--matchid-radio-checked": color
|
|
2298
|
-
}, children: checked && /* @__PURE__ */ (0,
|
|
2337
|
+
}, children: checked && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: `matchid-radio-content`, style: {
|
|
2299
2338
|
width: Math.floor(size * 0.7),
|
|
2300
2339
|
height: Math.floor(size * 0.7)
|
|
2301
2340
|
} }) });
|
|
2302
2341
|
}
|
|
2303
2342
|
|
|
2304
2343
|
// src/ui/Skeleton/index.tsx
|
|
2305
|
-
var
|
|
2344
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2306
2345
|
|
|
2307
2346
|
// src/ui/Tabs/index.tsx
|
|
2308
|
-
var
|
|
2347
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
2309
2348
|
|
|
2310
2349
|
// src/ui/Lottie/index.tsx
|
|
2311
2350
|
var import_lottie_react = require("lottie-react");
|
|
@@ -2321,10 +2360,10 @@ var LazyLottie = (props) => {
|
|
|
2321
2360
|
var Lottie_default = LazyLottie;
|
|
2322
2361
|
|
|
2323
2362
|
// src/ui/Checkbox/index.tsx
|
|
2324
|
-
var
|
|
2363
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
2325
2364
|
|
|
2326
2365
|
// src/context/ModalContext.tsx
|
|
2327
|
-
var
|
|
2366
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
2328
2367
|
var ModalContext = (0, import_react10.createContext)(null);
|
|
2329
2368
|
function useModal() {
|
|
2330
2369
|
const context = (0, import_react10.useContext)(ModalContext);
|
|
@@ -2365,7 +2404,7 @@ var useTransactionStore = (0, import_zustand3.create)((0, import_middleware2.dev
|
|
|
2365
2404
|
var useTransactionStore_default = useTransactionStore;
|
|
2366
2405
|
|
|
2367
2406
|
// src/hooks/useWallet.tsx
|
|
2368
|
-
var
|
|
2407
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
2369
2408
|
var AppClientId = "react-sdk-" + getVersion();
|
|
2370
2409
|
function useWallet() {
|
|
2371
2410
|
const { address, wallet: walletConfig } = useLocalStore_default();
|
|
@@ -2539,12 +2578,12 @@ function useWallet() {
|
|
|
2539
2578
|
address: evmAccount.address
|
|
2540
2579
|
});
|
|
2541
2580
|
modal.show((props) => {
|
|
2542
|
-
return /* @__PURE__ */ (0,
|
|
2581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
|
|
2543
2582
|
});
|
|
2544
2583
|
return txHash;
|
|
2545
2584
|
} catch (error) {
|
|
2546
2585
|
modal.show((props) => {
|
|
2547
|
-
return /* @__PURE__ */ (0,
|
|
2586
|
+
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
2587
|
});
|
|
2549
2588
|
throw error;
|
|
2550
2589
|
}
|
|
@@ -2622,7 +2661,7 @@ function useCopyClipboard(timeout = 500) {
|
|
|
2622
2661
|
// src/context/ToastContext.tsx
|
|
2623
2662
|
var import_react13 = require("react");
|
|
2624
2663
|
var import_react_dom2 = require("react-dom");
|
|
2625
|
-
var
|
|
2664
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
2626
2665
|
var ToastContext = (0, import_react13.createContext)(null);
|
|
2627
2666
|
|
|
2628
2667
|
// src/hooks/api/wallet.ts
|
|
@@ -2684,7 +2723,7 @@ function useImportTokenListQuery({
|
|
|
2684
2723
|
var import_react14 = require("react");
|
|
2685
2724
|
var import_viem5 = require("viem");
|
|
2686
2725
|
var import_react_intl3 = require("react-intl");
|
|
2687
|
-
var
|
|
2726
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
2688
2727
|
function useMatchChain() {
|
|
2689
2728
|
const chainListQuery = useChainListQuery();
|
|
2690
2729
|
const modal = useModal();
|
|
@@ -2715,28 +2754,28 @@ function useMatchChain() {
|
|
|
2715
2754
|
const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
|
|
2716
2755
|
const [selectedChainId, setSelectedChainId] = (0, import_react14.useState)(storeChainId2);
|
|
2717
2756
|
const isDownMd = useDownMd();
|
|
2718
|
-
return /* @__PURE__ */ (0,
|
|
2719
|
-
/* @__PURE__ */ (0,
|
|
2720
|
-
return /* @__PURE__ */ (0,
|
|
2757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: `matchid-change-network-box`, children: [
|
|
2758
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
|
|
2759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
2721
2760
|
"div",
|
|
2722
2761
|
{
|
|
2723
2762
|
onClick: () => setSelectedChainId(item.id),
|
|
2724
2763
|
className: `matchid-change-network-item ${selectedChainId == item.id ? "matchid-change-network-selected" : ""}`,
|
|
2725
2764
|
children: [
|
|
2726
|
-
/* @__PURE__ */ (0,
|
|
2727
|
-
/* @__PURE__ */ (0,
|
|
2728
|
-
/* @__PURE__ */ (0,
|
|
2765
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
|
|
2766
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
|
|
2767
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
|
|
2729
2768
|
] }),
|
|
2730
|
-
/* @__PURE__ */ (0,
|
|
2769
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
|
|
2731
2770
|
]
|
|
2732
2771
|
},
|
|
2733
2772
|
index
|
|
2734
2773
|
);
|
|
2735
2774
|
}) }),
|
|
2736
|
-
/* @__PURE__ */ (0,
|
|
2775
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
|
|
2737
2776
|
setChainId2(selectedChainId || 0);
|
|
2738
2777
|
close();
|
|
2739
|
-
}, block: true, children: /* @__PURE__ */ (0,
|
|
2778
|
+
}, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react_intl3.FormattedMessage, { id: "confirm" }) })
|
|
2740
2779
|
] });
|
|
2741
2780
|
}
|
|
2742
2781
|
const showChangeNetwork = () => {
|
|
@@ -2780,6 +2819,8 @@ var import_react_query5 = require("@tanstack/react-query");
|
|
|
2780
2819
|
var EMAIL_INTERVAL = 60;
|
|
2781
2820
|
var EMAIL_CODE_LENGTH = 6;
|
|
2782
2821
|
var NATIVE_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
2822
|
+
var TERMS_OF_SERVICE_URL = "https://docs.google.com/document/d/1QbagOOBhi50niC2mn4pJAd9pyNlvm1MSwcKWuP9YB80/edit?usp=sharing";
|
|
2823
|
+
var PRIVACY_POLICY_URL = "https://docs.google.com/document/d/1YOUUOmNXbA7qy79YckxhPMLWBj_WDiUp6mkJPNq_XCk/edit?usp=sharing";
|
|
2783
2824
|
|
|
2784
2825
|
// src/hooks/useMatchWallet.tsx
|
|
2785
2826
|
var import_viem8 = require("viem");
|
|
@@ -2854,10 +2895,10 @@ var import_viem6 = require("viem");
|
|
|
2854
2895
|
var import_react_query3 = require("@tanstack/react-query");
|
|
2855
2896
|
|
|
2856
2897
|
// src/components/ImportToken/index.tsx
|
|
2857
|
-
var
|
|
2898
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
2858
2899
|
|
|
2859
2900
|
// src/hooks/useMatchWallet.tsx
|
|
2860
|
-
var
|
|
2901
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
2861
2902
|
function useMatchWalletRecords() {
|
|
2862
2903
|
const [hasMore, setHasMore] = (0, import_react16.useState)(true);
|
|
2863
2904
|
const [items, setItems] = (0, import_react16.useState)([]);
|
|
@@ -3166,39 +3207,39 @@ var CACHE_TTL2 = 86400 * 30 * 1e3;
|
|
|
3166
3207
|
var import_zustand5 = require("zustand");
|
|
3167
3208
|
|
|
3168
3209
|
// src/hooks/useConfig.tsx
|
|
3169
|
-
var
|
|
3210
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
3170
3211
|
var DEFAULT_WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
3171
3212
|
var WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
3172
3213
|
function useWalletConfig() {
|
|
3173
3214
|
const isDownMd = useDownMd();
|
|
3174
3215
|
const walletMap = {
|
|
3175
3216
|
evm: {
|
|
3176
|
-
icon: /* @__PURE__ */ (0,
|
|
3177
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3217
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(EVMDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3218
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(EVMLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3178
3219
|
name: "EVM",
|
|
3179
3220
|
method: "evm"
|
|
3180
3221
|
},
|
|
3181
3222
|
sol: {
|
|
3182
|
-
icon: /* @__PURE__ */ (0,
|
|
3183
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3223
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(SOLDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3224
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(SOLLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3184
3225
|
name: "SOL",
|
|
3185
3226
|
method: "sol"
|
|
3186
3227
|
},
|
|
3187
3228
|
btc: {
|
|
3188
|
-
icon: /* @__PURE__ */ (0,
|
|
3189
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3229
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(BTCDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3230
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(BTCLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3190
3231
|
name: "BTC",
|
|
3191
3232
|
method: "btc"
|
|
3192
3233
|
},
|
|
3193
3234
|
tron: {
|
|
3194
|
-
icon: /* @__PURE__ */ (0,
|
|
3195
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3235
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TRXDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3236
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TRXLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3196
3237
|
name: "TRON",
|
|
3197
3238
|
method: "tron"
|
|
3198
3239
|
},
|
|
3199
3240
|
ton: {
|
|
3200
|
-
icon: /* @__PURE__ */ (0,
|
|
3201
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3241
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TonLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3242
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TonLightIcon2, { size: isDownMd ? 36 : 40 }),
|
|
3202
3243
|
name: "TON",
|
|
3203
3244
|
method: "ton"
|
|
3204
3245
|
}
|
|
@@ -3246,18 +3287,29 @@ var useWalletModalStore = (0, import_zustand5.create)((set) => ({
|
|
|
3246
3287
|
open: (type, methods = DEFAULT_WALLET_METHODS) => set({ isOpen: true, type, methods }),
|
|
3247
3288
|
close: () => set({ isOpen: false })
|
|
3248
3289
|
}));
|
|
3290
|
+
var useEmailModalStore = (0, import_zustand5.create)((set) => ({
|
|
3291
|
+
isOpen: false,
|
|
3292
|
+
type: "",
|
|
3293
|
+
open: (type) => set({ isOpen: true, type }),
|
|
3294
|
+
close: () => set({ isOpen: false })
|
|
3295
|
+
}));
|
|
3249
3296
|
|
|
3250
3297
|
// src/components/CEXBindModal/index.tsx
|
|
3251
3298
|
var import_react19 = require("react");
|
|
3252
3299
|
var import_react_intl6 = require("react-intl");
|
|
3253
|
-
var
|
|
3300
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3254
3301
|
|
|
3255
3302
|
// src/context/BusinessProvider.tsx
|
|
3256
3303
|
var import_react_query8 = require("@tanstack/react-query");
|
|
3257
|
-
|
|
3304
|
+
|
|
3305
|
+
// src/components/BindEmailModal/index.tsx
|
|
3306
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3307
|
+
|
|
3308
|
+
// src/context/BusinessProvider.tsx
|
|
3309
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
3258
3310
|
|
|
3259
3311
|
// src/context/index.tsx
|
|
3260
|
-
var
|
|
3312
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
3261
3313
|
|
|
3262
3314
|
// src/hooks/useWalletInit.ts
|
|
3263
3315
|
var import_react20 = require("react");
|
|
@@ -3337,7 +3389,7 @@ var matchTest = /* @__PURE__ */ (0, import_viem12.defineChain)({
|
|
|
3337
3389
|
|
|
3338
3390
|
// src/MatchContext.tsx
|
|
3339
3391
|
var import_wagmi = require("wagmi");
|
|
3340
|
-
var
|
|
3392
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
3341
3393
|
var queryClient = new import_react_query9.QueryClient();
|
|
3342
3394
|
var wagmiConfig = (0, import_rainbowkit.getDefaultConfig)({
|
|
3343
3395
|
appName: "MatchID",
|
|
@@ -3389,6 +3441,7 @@ function useUserInfo() {
|
|
|
3389
3441
|
const { open: BTCOpen } = useBTCModalStore();
|
|
3390
3442
|
const { open: CEXBindOpen } = useCEXBindModalStore();
|
|
3391
3443
|
const walletModalStore = useWalletModalStore();
|
|
3444
|
+
const emailModalStore = useEmailModalStore();
|
|
3392
3445
|
const getRedirectUri = () => {
|
|
3393
3446
|
return encodeURIComponent(window.location.href);
|
|
3394
3447
|
};
|
|
@@ -3482,6 +3535,7 @@ function useUserInfo() {
|
|
|
3482
3535
|
case "github":
|
|
3483
3536
|
case "linkedin":
|
|
3484
3537
|
case "facebook":
|
|
3538
|
+
case "kakao":
|
|
3485
3539
|
return await loginByMethod(method);
|
|
3486
3540
|
default:
|
|
3487
3541
|
throw new Error("unsupported method");
|
|
@@ -3566,6 +3620,8 @@ function useUserInfo() {
|
|
|
3566
3620
|
return TONOpen("bind");
|
|
3567
3621
|
case "btc":
|
|
3568
3622
|
return BTCOpen("bind");
|
|
3623
|
+
case "email":
|
|
3624
|
+
return emailModalStore.open("bind");
|
|
3569
3625
|
case "telegram":
|
|
3570
3626
|
return await bindTelegram();
|
|
3571
3627
|
case "twitter":
|
|
@@ -3575,6 +3631,7 @@ function useUserInfo() {
|
|
|
3575
3631
|
case "linkedin":
|
|
3576
3632
|
case "facebook":
|
|
3577
3633
|
case "youtube":
|
|
3634
|
+
case "kakao":
|
|
3578
3635
|
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
3636
|
matchlog_default.log("link", link);
|
|
3580
3637
|
return window.open(
|
|
@@ -3589,6 +3646,31 @@ function useUserInfo() {
|
|
|
3589
3646
|
const bindCex = (type) => {
|
|
3590
3647
|
return CEXBindOpen(type);
|
|
3591
3648
|
};
|
|
3649
|
+
const bindByEmail = async ({ email, code }) => {
|
|
3650
|
+
try {
|
|
3651
|
+
const obj = {
|
|
3652
|
+
email,
|
|
3653
|
+
verification_key: emailLoginKey,
|
|
3654
|
+
verification_code: code
|
|
3655
|
+
};
|
|
3656
|
+
const res = await verifyEmailCodeApi(obj);
|
|
3657
|
+
if (res && res.data && isSuccess(res)) {
|
|
3658
|
+
events && events.onBind && events.onBind({
|
|
3659
|
+
type: "email"
|
|
3660
|
+
});
|
|
3661
|
+
eventManager_default.emit("onBind", {
|
|
3662
|
+
type: "email"
|
|
3663
|
+
});
|
|
3664
|
+
return true;
|
|
3665
|
+
} else {
|
|
3666
|
+
throw new Error(res.message);
|
|
3667
|
+
}
|
|
3668
|
+
} catch (error) {
|
|
3669
|
+
console.error("bindByEmail", error);
|
|
3670
|
+
throw error;
|
|
3671
|
+
}
|
|
3672
|
+
return false;
|
|
3673
|
+
};
|
|
3592
3674
|
const getAuthInfo = async (method) => {
|
|
3593
3675
|
const element_id = "auth_iframe";
|
|
3594
3676
|
if (document.getElementById(element_id)) {
|
|
@@ -3657,6 +3739,7 @@ function useUserInfo() {
|
|
|
3657
3739
|
auth,
|
|
3658
3740
|
login: loginMethod,
|
|
3659
3741
|
bind,
|
|
3742
|
+
bindByEmail,
|
|
3660
3743
|
getAuthInfo,
|
|
3661
3744
|
invite
|
|
3662
3745
|
};
|
|
@@ -3665,10 +3748,10 @@ function useUserInfo() {
|
|
|
3665
3748
|
// src/components/EmailModal/StepVerify.tsx
|
|
3666
3749
|
var import_react24 = require("react");
|
|
3667
3750
|
var import_react_intl8 = require("react-intl");
|
|
3668
|
-
var
|
|
3751
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
3669
3752
|
function StepVerify(props) {
|
|
3670
3753
|
const intl = (0, import_react_intl8.useIntl)();
|
|
3671
|
-
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
3754
|
+
const { getLoginEmailCode, loginByEmail, bindByEmail } = useUserInfo();
|
|
3672
3755
|
const [error, setError] = (0, import_react24.useState)("");
|
|
3673
3756
|
const [code, setCode] = (0, import_react24.useState)("");
|
|
3674
3757
|
const [sending, setSending] = (0, import_react24.useState)(false);
|
|
@@ -3728,7 +3811,10 @@ function StepVerify(props) {
|
|
|
3728
3811
|
try {
|
|
3729
3812
|
setError("");
|
|
3730
3813
|
setSubmitting(true);
|
|
3731
|
-
const res = await
|
|
3814
|
+
const res = props.type === "bind" ? await bindByEmail({
|
|
3815
|
+
email: props.email,
|
|
3816
|
+
code
|
|
3817
|
+
}) : await loginByEmail({
|
|
3732
3818
|
email: props.email,
|
|
3733
3819
|
code
|
|
3734
3820
|
});
|
|
@@ -3742,17 +3828,17 @@ function StepVerify(props) {
|
|
|
3742
3828
|
setSubmitting(false);
|
|
3743
3829
|
}
|
|
3744
3830
|
};
|
|
3745
|
-
return /* @__PURE__ */ (0,
|
|
3746
|
-
/* @__PURE__ */ (0,
|
|
3747
|
-
/* @__PURE__ */ (0,
|
|
3748
|
-
/* @__PURE__ */ (0,
|
|
3749
|
-
/* @__PURE__ */ (0,
|
|
3750
|
-
/* @__PURE__ */ (0,
|
|
3831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-email-verify-box", children: [
|
|
3832
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-email-verify-header", children: [
|
|
3833
|
+
/* @__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 }) }),
|
|
3834
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-email-verify-header-content", children: [
|
|
3835
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-email-verify-header-value", children: props.email }),
|
|
3836
|
+
/* @__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
3837
|
] })
|
|
3752
3838
|
] }),
|
|
3753
|
-
/* @__PURE__ */ (0,
|
|
3839
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Field, { label: intl.formatMessage({
|
|
3754
3840
|
id: "verificationCode"
|
|
3755
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
3841
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
3756
3842
|
Input,
|
|
3757
3843
|
{
|
|
3758
3844
|
placeholder: intl.formatMessage({
|
|
@@ -3762,7 +3848,7 @@ function StepVerify(props) {
|
|
|
3762
3848
|
maxLength: codeLength,
|
|
3763
3849
|
onChange: (e) => setCode(e.target.value),
|
|
3764
3850
|
value: code,
|
|
3765
|
-
after: /* @__PURE__ */ (0,
|
|
3851
|
+
after: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
3766
3852
|
Button,
|
|
3767
3853
|
{
|
|
3768
3854
|
highlight: true,
|
|
@@ -3781,19 +3867,20 @@ function StepVerify(props) {
|
|
|
3781
3867
|
)
|
|
3782
3868
|
}
|
|
3783
3869
|
) }),
|
|
3784
|
-
/* @__PURE__ */ (0,
|
|
3870
|
+
/* @__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
3871
|
] });
|
|
3786
3872
|
}
|
|
3787
3873
|
|
|
3788
3874
|
// src/components/EmailModal/index.tsx
|
|
3789
3875
|
var import_react_intl9 = require("react-intl");
|
|
3790
|
-
var
|
|
3876
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
3791
3877
|
function EmailModal({
|
|
3792
3878
|
isOpen = false,
|
|
3793
3879
|
width = 480,
|
|
3794
3880
|
onClose,
|
|
3795
3881
|
onBack,
|
|
3796
|
-
onLogin
|
|
3882
|
+
onLogin,
|
|
3883
|
+
type = "login"
|
|
3797
3884
|
}) {
|
|
3798
3885
|
const [step, setStep] = (0, import_react25.useState)("input");
|
|
3799
3886
|
const [emailVal, setEmailVal] = (0, import_react25.useState)("");
|
|
@@ -3804,7 +3891,7 @@ function EmailModal({
|
|
|
3804
3891
|
setEmailVal("");
|
|
3805
3892
|
}
|
|
3806
3893
|
}, [isOpen]);
|
|
3807
|
-
return /* @__PURE__ */ (0,
|
|
3894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
3808
3895
|
ModalWithHeader,
|
|
3809
3896
|
{
|
|
3810
3897
|
isOpen,
|
|
@@ -3814,10 +3901,10 @@ function EmailModal({
|
|
|
3814
3901
|
id: "email"
|
|
3815
3902
|
}),
|
|
3816
3903
|
onBack: step == "verify" ? () => setStep("input") : onBack,
|
|
3817
|
-
children: step === "input" ? /* @__PURE__ */ (0,
|
|
3904
|
+
children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
|
|
3818
3905
|
setEmailVal(email);
|
|
3819
3906
|
setStep("verify");
|
|
3820
|
-
} }) : /* @__PURE__ */ (0,
|
|
3907
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(StepVerify, { type, email: emailVal, onSuccess: onLogin })
|
|
3821
3908
|
}
|
|
3822
3909
|
);
|
|
3823
3910
|
}
|
|
@@ -3847,7 +3934,7 @@ function useAppConfig() {
|
|
|
3847
3934
|
}
|
|
3848
3935
|
|
|
3849
3936
|
// src/components/LoginBox/index.tsx
|
|
3850
|
-
var
|
|
3937
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
3851
3938
|
var RecommendItem = ({
|
|
3852
3939
|
icon,
|
|
3853
3940
|
name,
|
|
@@ -3856,20 +3943,20 @@ var RecommendItem = ({
|
|
|
3856
3943
|
children,
|
|
3857
3944
|
footer
|
|
3858
3945
|
}) => {
|
|
3859
|
-
return /* @__PURE__ */ (0,
|
|
3860
|
-
/* @__PURE__ */ (0,
|
|
3861
|
-
/* @__PURE__ */ (0,
|
|
3862
|
-
/* @__PURE__ */ (0,
|
|
3863
|
-
/* @__PURE__ */ (0,
|
|
3946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-recommend-method", children: [
|
|
3947
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-recommend-method-item", onClick, children: [
|
|
3948
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-recommend-method-content", children: [
|
|
3949
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-recommend-method-icon", children: icon }),
|
|
3950
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "matchid-login-recommend-method-name", children: name })
|
|
3864
3951
|
] }),
|
|
3865
|
-
footer ? footer : children ? /* @__PURE__ */ (0,
|
|
3952
|
+
footer ? footer : children ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
3866
3953
|
ArrowDownIcon,
|
|
3867
3954
|
{
|
|
3868
3955
|
className: `matchid-login-recommend-method-arrow ${showChildren ? "matchid-login-recommend-method-arrow-active" : ""}`,
|
|
3869
3956
|
size: 20,
|
|
3870
3957
|
color: "var(--matchid-arrow-color)"
|
|
3871
3958
|
}
|
|
3872
|
-
) : /* @__PURE__ */ (0,
|
|
3959
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
3873
3960
|
ArrowRightIcon,
|
|
3874
3961
|
{
|
|
3875
3962
|
className: "matchid-login-recommend-method-arrow",
|
|
@@ -3878,7 +3965,7 @@ var RecommendItem = ({
|
|
|
3878
3965
|
}
|
|
3879
3966
|
)
|
|
3880
3967
|
] }),
|
|
3881
|
-
children && /* @__PURE__ */ (0,
|
|
3968
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
3882
3969
|
"div",
|
|
3883
3970
|
{
|
|
3884
3971
|
className: `matchid-login-recommend-method-popover ${showChildren ? "matchid-login-recommend-method-popover-active" : ""}`,
|
|
@@ -3943,75 +4030,80 @@ function LoginBox({
|
|
|
3943
4030
|
const isDownMd = useDownMd();
|
|
3944
4031
|
const methodMap = {
|
|
3945
4032
|
wallet: {
|
|
3946
|
-
icon: /* @__PURE__ */ (0,
|
|
4033
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(WalletIcon, { size: isDownMd ? 36 : 40 }),
|
|
3947
4034
|
name: intl.formatMessage({ id: "wallet" }),
|
|
3948
4035
|
onClick: () => setShowWallet(!showWallet),
|
|
3949
4036
|
type: "wallet"
|
|
3950
4037
|
},
|
|
3951
4038
|
email: {
|
|
3952
|
-
icon: /* @__PURE__ */ (0,
|
|
4039
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
|
|
3953
4040
|
name: intl.formatMessage({ id: "email" }),
|
|
3954
4041
|
onClick: () => {
|
|
3955
4042
|
setEmailOpen(true);
|
|
3956
4043
|
}
|
|
3957
4044
|
},
|
|
3958
4045
|
google: {
|
|
3959
|
-
icon: /* @__PURE__ */ (0,
|
|
4046
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(GoogleIcon, { size: isDownMd ? 36 : 40 }),
|
|
3960
4047
|
name: "Google",
|
|
3961
4048
|
onClick: () => login("google")
|
|
3962
4049
|
},
|
|
3963
4050
|
twitter: {
|
|
3964
|
-
icon: /* @__PURE__ */ (0,
|
|
4051
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(XIcon, { size: isDownMd ? 36 : 40 }),
|
|
3965
4052
|
name: "X",
|
|
3966
4053
|
onClick: () => login("twitter")
|
|
3967
4054
|
},
|
|
3968
4055
|
telegram: {
|
|
3969
|
-
icon: /* @__PURE__ */ (0,
|
|
4056
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TelegramIcon, { size: isDownMd ? 36 : 40 }),
|
|
3970
4057
|
name: "Telegram",
|
|
3971
4058
|
onClick: () => login("telegram")
|
|
3972
4059
|
},
|
|
3973
4060
|
github: {
|
|
3974
|
-
icon: /* @__PURE__ */ (0,
|
|
4061
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(GithubIcon, { size: isDownMd ? 36 : 40 }),
|
|
3975
4062
|
name: "Github",
|
|
3976
4063
|
onClick: () => login("github")
|
|
3977
4064
|
},
|
|
3978
4065
|
discord: {
|
|
3979
|
-
icon: /* @__PURE__ */ (0,
|
|
4066
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(DiscordIcon, { size: isDownMd ? 36 : 40 }),
|
|
3980
4067
|
name: "Discord",
|
|
3981
4068
|
onClick: () => login("discord")
|
|
3982
4069
|
},
|
|
3983
4070
|
linkedin: {
|
|
3984
|
-
icon: /* @__PURE__ */ (0,
|
|
4071
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
|
|
3985
4072
|
name: "LinkedIn",
|
|
3986
4073
|
onClick: () => login("linkedin")
|
|
3987
4074
|
},
|
|
3988
4075
|
facebook: {
|
|
3989
|
-
icon: /* @__PURE__ */ (0,
|
|
4076
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FacebookIcon, { size: isDownMd ? 36 : 40 }),
|
|
3990
4077
|
name: "Facebook",
|
|
3991
4078
|
onClick: () => login("facebook")
|
|
3992
4079
|
},
|
|
3993
4080
|
youtube: {
|
|
3994
|
-
icon: /* @__PURE__ */ (0,
|
|
4081
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
|
|
3995
4082
|
name: "Youtube",
|
|
3996
4083
|
onClick: () => login("youtube")
|
|
4084
|
+
},
|
|
4085
|
+
kakao: {
|
|
4086
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(KakaoIcon, { size: isDownMd ? 36 : 40 }),
|
|
4087
|
+
name: "Kakao",
|
|
4088
|
+
onClick: () => login("kakao")
|
|
3997
4089
|
}
|
|
3998
4090
|
};
|
|
3999
4091
|
const { walletMap } = useWalletConfig();
|
|
4000
|
-
return /* @__PURE__ */ (0,
|
|
4001
|
-
(!inModal || !emailOpen) && /* @__PURE__ */ (0,
|
|
4002
|
-
/* @__PURE__ */ (0,
|
|
4003
|
-
return /* @__PURE__ */ (0,
|
|
4092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
|
|
4093
|
+
(!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-box", children: [
|
|
4094
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
|
|
4095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4004
4096
|
RecommendItem,
|
|
4005
4097
|
{
|
|
4006
4098
|
icon: methodMap[m]?.icon,
|
|
4007
4099
|
name: methodMap[m]?.name,
|
|
4008
4100
|
onClick: methodMap[m]?.onClick,
|
|
4009
4101
|
showChildren: m == "wallet" && showWallet,
|
|
4010
|
-
children: m == "wallet" && /* @__PURE__ */ (0,
|
|
4011
|
-
/* @__PURE__ */ (0,
|
|
4012
|
-
/* @__PURE__ */ (0,
|
|
4102
|
+
children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
|
|
4103
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
|
|
4104
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
|
|
4013
4105
|
const m2 = walletMap[n];
|
|
4014
|
-
return /* @__PURE__ */ (0,
|
|
4106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
4015
4107
|
"div",
|
|
4016
4108
|
{
|
|
4017
4109
|
className: "matchid-login-recommend-wallet-item",
|
|
@@ -4019,16 +4111,16 @@ function LoginBox({
|
|
|
4019
4111
|
login(m2.method);
|
|
4020
4112
|
},
|
|
4021
4113
|
children: [
|
|
4022
|
-
/* @__PURE__ */ (0,
|
|
4023
|
-
/* @__PURE__ */ (0,
|
|
4024
|
-
/* @__PURE__ */ (0,
|
|
4114
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
|
|
4115
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
|
|
4116
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4025
4117
|
"div",
|
|
4026
4118
|
{
|
|
4027
4119
|
className: "matchid-login-recommend-wallet-item-hover-icon",
|
|
4028
4120
|
children: m2.activeIcon
|
|
4029
4121
|
}
|
|
4030
4122
|
),
|
|
4031
|
-
/* @__PURE__ */ (0,
|
|
4123
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4032
4124
|
"span",
|
|
4033
4125
|
{
|
|
4034
4126
|
className: "matchid-login-recommend-wallet-item-name",
|
|
@@ -4036,7 +4128,7 @@ function LoginBox({
|
|
|
4036
4128
|
}
|
|
4037
4129
|
)
|
|
4038
4130
|
] }),
|
|
4039
|
-
/* @__PURE__ */ (0,
|
|
4131
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4040
4132
|
ArrowRightIcon,
|
|
4041
4133
|
{
|
|
4042
4134
|
className: "matchid-login-recommend-wallet-item-arrow",
|
|
@@ -4054,10 +4146,48 @@ function LoginBox({
|
|
|
4054
4146
|
m
|
|
4055
4147
|
);
|
|
4056
4148
|
}) }),
|
|
4057
|
-
|
|
4058
|
-
/* @__PURE__ */ (0,
|
|
4059
|
-
|
|
4060
|
-
|
|
4149
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-privacy-policy", children: [
|
|
4150
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-privacy-policy-content", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4151
|
+
import_react_intl10.FormattedMessage,
|
|
4152
|
+
{
|
|
4153
|
+
id: "loginAgreement",
|
|
4154
|
+
values: {
|
|
4155
|
+
termsLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4156
|
+
"a",
|
|
4157
|
+
{
|
|
4158
|
+
href: TERMS_OF_SERVICE_URL,
|
|
4159
|
+
target: "_blank",
|
|
4160
|
+
rel: "noopener noreferrer",
|
|
4161
|
+
className: "matchid-privacy-policy-content-link",
|
|
4162
|
+
children: chunks
|
|
4163
|
+
}
|
|
4164
|
+
),
|
|
4165
|
+
privacyLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4166
|
+
"a",
|
|
4167
|
+
{
|
|
4168
|
+
href: PRIVACY_POLICY_URL,
|
|
4169
|
+
target: "_blank",
|
|
4170
|
+
rel: "noopener noreferrer",
|
|
4171
|
+
className: "matchid-privacy-policy-content-link",
|
|
4172
|
+
children: chunks
|
|
4173
|
+
}
|
|
4174
|
+
)
|
|
4175
|
+
}
|
|
4176
|
+
}
|
|
4177
|
+
) }),
|
|
4178
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-privacy-policy-powered-by", children: [
|
|
4179
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react_intl10.FormattedMessage, { id: "poweredBy" }),
|
|
4180
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(MatchIdIcon_default, {})
|
|
4181
|
+
] })
|
|
4182
|
+
] }),
|
|
4183
|
+
methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-other", children: [
|
|
4184
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-login-other-line-box", children: [
|
|
4185
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-other-line" }),
|
|
4186
|
+
/* @__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" }) }),
|
|
4187
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-other-line" })
|
|
4188
|
+
] }),
|
|
4189
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
4190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4061
4191
|
"div",
|
|
4062
4192
|
{
|
|
4063
4193
|
className: "matchid-login-method-item",
|
|
@@ -4070,7 +4200,7 @@ function LoginBox({
|
|
|
4070
4200
|
}) })
|
|
4071
4201
|
] })
|
|
4072
4202
|
] }),
|
|
4073
|
-
/* @__PURE__ */ (0,
|
|
4203
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4074
4204
|
EmailModal,
|
|
4075
4205
|
{
|
|
4076
4206
|
isOpen: emailOpen,
|
|
@@ -4090,40 +4220,40 @@ var import_react28 = require("react");
|
|
|
4090
4220
|
|
|
4091
4221
|
// src/components/LoginPanel/index.tsx
|
|
4092
4222
|
var import_react_intl11 = require("react-intl");
|
|
4093
|
-
var
|
|
4223
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
4094
4224
|
function LoginPanel({
|
|
4095
4225
|
header,
|
|
4096
4226
|
onClose,
|
|
4097
4227
|
...props
|
|
4098
4228
|
}) {
|
|
4099
4229
|
const isDownMd = useDownMd();
|
|
4100
|
-
return /* @__PURE__ */ (0,
|
|
4101
|
-
header ? header : /* @__PURE__ */ (0,
|
|
4102
|
-
/* @__PURE__ */ (0,
|
|
4103
|
-
/* @__PURE__ */ (0,
|
|
4104
|
-
/* @__PURE__ */ (0,
|
|
4230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-login-panel", children: [
|
|
4231
|
+
header ? header : /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-login-panel-header", children: [
|
|
4232
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-login-panel-header-content", children: [
|
|
4233
|
+
/* @__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" }) }),
|
|
4234
|
+
/* @__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
4235
|
] }),
|
|
4106
|
-
onClose && /* @__PURE__ */ (0,
|
|
4236
|
+
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
4237
|
] }),
|
|
4108
|
-
/* @__PURE__ */ (0,
|
|
4109
|
-
/* @__PURE__ */ (0,
|
|
4238
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-login-panel-divide" }),
|
|
4239
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(LoginBox, { ...props }) })
|
|
4110
4240
|
] });
|
|
4111
4241
|
}
|
|
4112
4242
|
|
|
4113
4243
|
// src/components/LoginModal/index.tsx
|
|
4114
|
-
var
|
|
4244
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
4115
4245
|
function LoginModal({
|
|
4116
4246
|
isOpen = false,
|
|
4117
4247
|
width = 480,
|
|
4118
4248
|
...props
|
|
4119
4249
|
}) {
|
|
4120
4250
|
const { isLogin } = useUserInfo();
|
|
4121
|
-
return /* @__PURE__ */ (0,
|
|
4251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4122
4252
|
Modal,
|
|
4123
4253
|
{
|
|
4124
4254
|
isOpen: isOpen && !isLogin,
|
|
4125
4255
|
width,
|
|
4126
|
-
children: /* @__PURE__ */ (0,
|
|
4256
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(LoginPanel, { ...props, inModal: true })
|
|
4127
4257
|
}
|
|
4128
4258
|
);
|
|
4129
4259
|
}
|
|
@@ -4132,10 +4262,10 @@ function LoginModal({
|
|
|
4132
4262
|
var import_react27 = require("react");
|
|
4133
4263
|
|
|
4134
4264
|
// src/assets/icon/ProfileIcon.tsx
|
|
4135
|
-
var
|
|
4265
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
4136
4266
|
function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
4137
|
-
return /* @__PURE__ */ (0,
|
|
4138
|
-
/* @__PURE__ */ (0,
|
|
4267
|
+
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: [
|
|
4268
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4139
4269
|
"path",
|
|
4140
4270
|
{
|
|
4141
4271
|
fillRule: "evenodd",
|
|
@@ -4144,7 +4274,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
4144
4274
|
fill: color
|
|
4145
4275
|
}
|
|
4146
4276
|
),
|
|
4147
|
-
/* @__PURE__ */ (0,
|
|
4277
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4148
4278
|
"path",
|
|
4149
4279
|
{
|
|
4150
4280
|
fillRule: "evenodd",
|
|
@@ -4158,7 +4288,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
4158
4288
|
|
|
4159
4289
|
// src/components/UserPopover/index.tsx
|
|
4160
4290
|
var import_react_intl12 = require("react-intl");
|
|
4161
|
-
var
|
|
4291
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
4162
4292
|
function UserContent() {
|
|
4163
4293
|
const { logout, address, username } = useUserInfo();
|
|
4164
4294
|
const [logouting, setLogouting] = (0, import_react27.useState)(false);
|
|
@@ -4179,34 +4309,34 @@ function UserContent() {
|
|
|
4179
4309
|
rightIcon,
|
|
4180
4310
|
onClick
|
|
4181
4311
|
}) => {
|
|
4182
|
-
return /* @__PURE__ */ (0,
|
|
4183
|
-
/* @__PURE__ */ (0,
|
|
4312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-user-popover-item", onClick, children: [
|
|
4313
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-user-popover-item-content`, children: [
|
|
4184
4314
|
icon,
|
|
4185
|
-
/* @__PURE__ */ (0,
|
|
4315
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "matchid-user-popover-item-text", children })
|
|
4186
4316
|
] }),
|
|
4187
4317
|
rightIcon
|
|
4188
4318
|
] });
|
|
4189
4319
|
};
|
|
4190
4320
|
const UserDivider = () => {
|
|
4191
|
-
return /* @__PURE__ */ (0,
|
|
4321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-user-popover-divider` });
|
|
4192
4322
|
};
|
|
4193
4323
|
const [usernameOpen, setUsernameOpen] = (0, import_react27.useState)(false);
|
|
4194
4324
|
const [copied, setCopied] = useCopyClipboard();
|
|
4195
4325
|
const intl = (0, import_react_intl12.useIntl)();
|
|
4196
|
-
return /* @__PURE__ */ (0,
|
|
4197
|
-
/* @__PURE__ */ (0,
|
|
4198
|
-
/* @__PURE__ */ (0,
|
|
4326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-user-popover-content", children: [
|
|
4327
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-user-popover-list", children: [
|
|
4328
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UserItem, { onClick: () => {
|
|
4199
4329
|
setCopied(address);
|
|
4200
|
-
}, icon: copied ? /* @__PURE__ */ (0,
|
|
4201
|
-
/* @__PURE__ */ (0,
|
|
4202
|
-
/* @__PURE__ */ (0,
|
|
4330
|
+
}, 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) }),
|
|
4331
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UserDivider, {}),
|
|
4332
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UserItem, { onClick: () => {
|
|
4203
4333
|
setUsernameOpen(true);
|
|
4204
|
-
}, icon: /* @__PURE__ */ (0,
|
|
4334
|
+
}, 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
4335
|
id: "setUsername"
|
|
4206
4336
|
}) })
|
|
4207
4337
|
] }),
|
|
4208
|
-
/* @__PURE__ */ (0,
|
|
4209
|
-
/* @__PURE__ */ (0,
|
|
4338
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl12.FormattedMessage, { id: "disconnect" }) }),
|
|
4339
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UsernameModal, { isOpen: usernameOpen, onClose: () => {
|
|
4210
4340
|
setUsernameOpen(false);
|
|
4211
4341
|
}, onSuccess: () => {
|
|
4212
4342
|
setUsernameOpen(false);
|
|
@@ -4217,12 +4347,12 @@ function UserPopover({
|
|
|
4217
4347
|
children,
|
|
4218
4348
|
...props
|
|
4219
4349
|
}) {
|
|
4220
|
-
return /* @__PURE__ */ (0,
|
|
4350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Popover, { ...props, content: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UserContent, {}), children });
|
|
4221
4351
|
}
|
|
4222
4352
|
|
|
4223
4353
|
// src/components/LoginButton/index.tsx
|
|
4224
4354
|
var import_react_intl13 = require("react-intl");
|
|
4225
|
-
var
|
|
4355
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
4226
4356
|
function LoginButton({
|
|
4227
4357
|
loginRender,
|
|
4228
4358
|
methods,
|
|
@@ -4238,8 +4368,8 @@ function LoginButton({
|
|
|
4238
4368
|
const { isLogin, username } = useUserInfo();
|
|
4239
4369
|
const [loginOpen, setLoginOpen] = (0, import_react28.useState)(false);
|
|
4240
4370
|
if (!isLogin) {
|
|
4241
|
-
return /* @__PURE__ */ (0,
|
|
4242
|
-
/* @__PURE__ */ (0,
|
|
4371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
|
|
4372
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
4243
4373
|
LoginModal,
|
|
4244
4374
|
{
|
|
4245
4375
|
methods,
|
|
@@ -4249,15 +4379,15 @@ function LoginButton({
|
|
|
4249
4379
|
onClose: () => setLoginOpen(false)
|
|
4250
4380
|
}
|
|
4251
4381
|
),
|
|
4252
|
-
/* @__PURE__ */ (0,
|
|
4253
|
-
/* @__PURE__ */ (0,
|
|
4254
|
-
/* @__PURE__ */ (0,
|
|
4382
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
|
|
4383
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(UnLoginIcon_default, {}),
|
|
4384
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl13.FormattedMessage, { id: "login" }) })
|
|
4255
4385
|
] })
|
|
4256
4386
|
] });
|
|
4257
4387
|
}
|
|
4258
|
-
return loginRender ? /* @__PURE__ */ (0,
|
|
4259
|
-
/* @__PURE__ */ (0,
|
|
4260
|
-
/* @__PURE__ */ (0,
|
|
4388
|
+
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: [
|
|
4389
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(LoginIcon_default, {}),
|
|
4390
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: username ? truncateAddress(username) : "MatchID " + intl.formatMessage({
|
|
4261
4391
|
id: "user"
|
|
4262
4392
|
}) })
|
|
4263
4393
|
] }) });
|
|
@@ -4266,15 +4396,15 @@ function LoginButton({
|
|
|
4266
4396
|
// src/components/UsernameModal/index.tsx
|
|
4267
4397
|
var import_react29 = require("react");
|
|
4268
4398
|
var import_react_intl14 = require("react-intl");
|
|
4269
|
-
var
|
|
4399
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
4270
4400
|
var ValidItem = ({
|
|
4271
4401
|
success = false,
|
|
4272
4402
|
text
|
|
4273
4403
|
}) => {
|
|
4274
4404
|
const isDownMd = useDownMd();
|
|
4275
|
-
return /* @__PURE__ */ (0,
|
|
4276
|
-
success ? /* @__PURE__ */ (0,
|
|
4277
|
-
/* @__PURE__ */ (0,
|
|
4405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
|
|
4406
|
+
success ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
|
|
4407
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { children: text })
|
|
4278
4408
|
] });
|
|
4279
4409
|
};
|
|
4280
4410
|
function UsernameModal({
|
|
@@ -4322,12 +4452,12 @@ function UsernameModal({
|
|
|
4322
4452
|
}
|
|
4323
4453
|
};
|
|
4324
4454
|
const intl = (0, import_react_intl14.useIntl)();
|
|
4325
|
-
return /* @__PURE__ */ (0,
|
|
4455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
|
|
4326
4456
|
id: username ? "editUsernameTitle" : "setUsernameTitle"
|
|
4327
|
-
}), children: /* @__PURE__ */ (0,
|
|
4328
|
-
/* @__PURE__ */ (0,
|
|
4457
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-username-box", children: [
|
|
4458
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Field, { label: intl.formatMessage({
|
|
4329
4459
|
id: "username"
|
|
4330
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
4460
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
4331
4461
|
Input,
|
|
4332
4462
|
{
|
|
4333
4463
|
placeholder: intl.formatMessage({
|
|
@@ -4340,8 +4470,8 @@ function UsernameModal({
|
|
|
4340
4470
|
value: val
|
|
4341
4471
|
}
|
|
4342
4472
|
) }),
|
|
4343
|
-
/* @__PURE__ */ (0,
|
|
4344
|
-
/* @__PURE__ */ (0,
|
|
4473
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-valid", children: [
|
|
4474
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
4345
4475
|
ValidItem,
|
|
4346
4476
|
{
|
|
4347
4477
|
success: isValid,
|
|
@@ -4350,16 +4480,16 @@ function UsernameModal({
|
|
|
4350
4480
|
})
|
|
4351
4481
|
}
|
|
4352
4482
|
),
|
|
4353
|
-
/* @__PURE__ */ (0,
|
|
4483
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ValidItem, { success: isLength, text: intl.formatMessage({
|
|
4354
4484
|
id: "usernameLengthError"
|
|
4355
4485
|
}) })
|
|
4356
4486
|
] }),
|
|
4357
|
-
/* @__PURE__ */ (0,
|
|
4487
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { disabled: !isSafe, loading: isSubmitting, style: {
|
|
4358
4488
|
marginTop: isDownMd ? "36px" : "64px"
|
|
4359
|
-
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
4360
|
-
/* @__PURE__ */ (0,
|
|
4489
|
+
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl14.FormattedMessage, { id: "confirm" }) }),
|
|
4490
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { style: {
|
|
4361
4491
|
marginTop: isDownMd ? "12px" : "24px"
|
|
4362
|
-
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0,
|
|
4492
|
+
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl14.FormattedMessage, { id: "cancel" }) })
|
|
4363
4493
|
] }) });
|
|
4364
4494
|
}
|
|
4365
4495
|
|
|
@@ -4378,7 +4508,7 @@ var walletConnectImage = wallet_default;
|
|
|
4378
4508
|
var walletSigningImage = signing_default;
|
|
4379
4509
|
|
|
4380
4510
|
// src/components/WalletModalContent/index.tsx
|
|
4381
|
-
var
|
|
4511
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
4382
4512
|
function WalletModalContent({
|
|
4383
4513
|
status,
|
|
4384
4514
|
error,
|
|
@@ -4448,15 +4578,15 @@ function WalletModalContent({
|
|
|
4448
4578
|
statusImage: walletConnectImage
|
|
4449
4579
|
};
|
|
4450
4580
|
}, [visible, connected, status, error, address]);
|
|
4451
|
-
return /* @__PURE__ */ (0,
|
|
4452
|
-
/* @__PURE__ */ (0,
|
|
4453
|
-
/* @__PURE__ */ (0,
|
|
4581
|
+
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: [
|
|
4582
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
4583
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
4454
4584
|
width: 128,
|
|
4455
4585
|
height: 128
|
|
4456
4586
|
} }),
|
|
4457
|
-
/* @__PURE__ */ (0,
|
|
4587
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: pageData.isError ? "matchid-error" : "", children: pageData.text })
|
|
4458
4588
|
] }),
|
|
4459
|
-
/* @__PURE__ */ (0,
|
|
4589
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
4460
4590
|
Button,
|
|
4461
4591
|
{
|
|
4462
4592
|
block: true,
|
|
@@ -4532,15 +4662,15 @@ function WalletModalContentV2(props) {
|
|
|
4532
4662
|
statusImage: walletConnectImage
|
|
4533
4663
|
};
|
|
4534
4664
|
}, [props, submitting]);
|
|
4535
|
-
return /* @__PURE__ */ (0,
|
|
4536
|
-
/* @__PURE__ */ (0,
|
|
4537
|
-
/* @__PURE__ */ (0,
|
|
4665
|
+
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: [
|
|
4666
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
4667
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
4538
4668
|
width: 128,
|
|
4539
4669
|
height: 128
|
|
4540
4670
|
} }),
|
|
4541
|
-
/* @__PURE__ */ (0,
|
|
4671
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: props.status == "error" ? "matchid-error" : "", children: pageData.text })
|
|
4542
4672
|
] }),
|
|
4543
|
-
/* @__PURE__ */ (0,
|
|
4673
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
4544
4674
|
Button,
|
|
4545
4675
|
{
|
|
4546
4676
|
block: true,
|
|
@@ -4604,7 +4734,7 @@ var import_wagmi2 = require("wagmi");
|
|
|
4604
4734
|
var import_ethers = require("ethers");
|
|
4605
4735
|
|
|
4606
4736
|
// node_modules/@wagmi/core/dist/esm/version.js
|
|
4607
|
-
var version = "2.
|
|
4737
|
+
var version = "2.17.1";
|
|
4608
4738
|
|
|
4609
4739
|
// node_modules/@wagmi/core/dist/esm/utils/getVersion.js
|
|
4610
4740
|
var getVersion2 = () => `@wagmi/core@${version}`;
|
|
@@ -4822,7 +4952,7 @@ async function getEthersSigner(config, { chainId } = {}) {
|
|
|
4822
4952
|
// src/components/EVMModal/index.tsx
|
|
4823
4953
|
var import_siwe = require("siwe");
|
|
4824
4954
|
var import_styles = require("@rainbow-me/rainbowkit/styles.css");
|
|
4825
|
-
var
|
|
4955
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
4826
4956
|
function WalletContent({
|
|
4827
4957
|
onSuccess,
|
|
4828
4958
|
type
|
|
@@ -4980,7 +5110,7 @@ function WalletContent({
|
|
|
4980
5110
|
setNonce(void 0);
|
|
4981
5111
|
setStatus("start");
|
|
4982
5112
|
};
|
|
4983
|
-
return /* @__PURE__ */ (0,
|
|
5113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
4984
5114
|
WalletModalContentV2,
|
|
4985
5115
|
{
|
|
4986
5116
|
status,
|
|
@@ -4998,14 +5128,14 @@ function EVMConnectModal({
|
|
|
4998
5128
|
...props
|
|
4999
5129
|
}) {
|
|
5000
5130
|
const intl = (0, import_react_intl15.useIntl)();
|
|
5001
|
-
return /* @__PURE__ */ (0,
|
|
5131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5002
5132
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5003
5133
|
}, {
|
|
5004
5134
|
name: "EVM"
|
|
5005
|
-
}), children: /* @__PURE__ */ (0,
|
|
5135
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(WalletContent, { onSuccess, type }) });
|
|
5006
5136
|
}
|
|
5007
5137
|
function EVMModal(props) {
|
|
5008
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5138
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_rainbowkit2.RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(EVMConnectModal, { ...props }) });
|
|
5009
5139
|
}
|
|
5010
5140
|
|
|
5011
5141
|
// src/components/TRONModal/index.tsx
|
|
@@ -5120,7 +5250,7 @@ var useTRONWallet = () => {
|
|
|
5120
5250
|
};
|
|
5121
5251
|
|
|
5122
5252
|
// src/components/TRONModal/index.tsx
|
|
5123
|
-
var
|
|
5253
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
5124
5254
|
function TRONConnectModal({
|
|
5125
5255
|
type = "login",
|
|
5126
5256
|
onSuccess,
|
|
@@ -5130,9 +5260,9 @@ function TRONConnectModal({
|
|
|
5130
5260
|
const intl = (0, import_react_intl16.useIntl)();
|
|
5131
5261
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
|
|
5132
5262
|
const iconMaps = {
|
|
5133
|
-
tronlink: /* @__PURE__ */ (0,
|
|
5134
|
-
bitget: /* @__PURE__ */ (0,
|
|
5135
|
-
okx: /* @__PURE__ */ (0,
|
|
5263
|
+
tronlink: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
|
|
5264
|
+
bitget: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(BitgetIcon, { size: isDownMd ? 36 : 40 }),
|
|
5265
|
+
okx: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(OKXIcon, { size: isDownMd ? 36 : 40 })
|
|
5136
5266
|
};
|
|
5137
5267
|
const { events, login } = useMatch();
|
|
5138
5268
|
const [status, setStatus] = (0, import_react34.useState)("");
|
|
@@ -5224,11 +5354,11 @@ function TRONConnectModal({
|
|
|
5224
5354
|
disconnect();
|
|
5225
5355
|
}
|
|
5226
5356
|
}, [props.isOpen]);
|
|
5227
|
-
return /* @__PURE__ */ (0,
|
|
5357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5228
5358
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5229
5359
|
}, {
|
|
5230
5360
|
name: "TRON"
|
|
5231
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5361
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
5232
5362
|
WalletModalContent,
|
|
5233
5363
|
{
|
|
5234
5364
|
error,
|
|
@@ -5241,9 +5371,9 @@ function TRONConnectModal({
|
|
|
5241
5371
|
setVisible: () => {
|
|
5242
5372
|
}
|
|
5243
5373
|
}
|
|
5244
|
-
) : /* @__PURE__ */ (0,
|
|
5374
|
+
) : /* @__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
5375
|
installedWallets.map((wallet2) => {
|
|
5246
|
-
return /* @__PURE__ */ (0,
|
|
5376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
5247
5377
|
RecommendItem,
|
|
5248
5378
|
{
|
|
5249
5379
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -5256,14 +5386,14 @@ function TRONConnectModal({
|
|
|
5256
5386
|
);
|
|
5257
5387
|
}),
|
|
5258
5388
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
5259
|
-
return /* @__PURE__ */ (0,
|
|
5389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
5260
5390
|
RecommendItem,
|
|
5261
5391
|
{
|
|
5262
5392
|
icon: iconMaps[wallet2.walletKey],
|
|
5263
5393
|
name: wallet2.name,
|
|
5264
5394
|
onClick: () => {
|
|
5265
5395
|
},
|
|
5266
|
-
footer: /* @__PURE__ */ (0,
|
|
5396
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Button, { size: "sm", onClick: () => {
|
|
5267
5397
|
window.open(wallet2.website);
|
|
5268
5398
|
}, children: "Install" })
|
|
5269
5399
|
},
|
|
@@ -5273,14 +5403,14 @@ function TRONConnectModal({
|
|
|
5273
5403
|
] }) }) });
|
|
5274
5404
|
}
|
|
5275
5405
|
function TRONModal(props) {
|
|
5276
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5406
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TRONConnectModal, { ...props, type: props.type });
|
|
5277
5407
|
}
|
|
5278
5408
|
|
|
5279
5409
|
// src/components/TONModal/index.tsx
|
|
5280
5410
|
var import_react35 = __toESM(require("react"));
|
|
5281
5411
|
var import_react_intl17 = require("react-intl");
|
|
5282
5412
|
var import_ui_react = require("@tonconnect/ui-react");
|
|
5283
|
-
var
|
|
5413
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
5284
5414
|
function WalletContent2({
|
|
5285
5415
|
onSuccess,
|
|
5286
5416
|
type
|
|
@@ -5407,7 +5537,7 @@ function WalletContent2({
|
|
|
5407
5537
|
}
|
|
5408
5538
|
}
|
|
5409
5539
|
}, [state]);
|
|
5410
|
-
return /* @__PURE__ */ (0,
|
|
5540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5411
5541
|
WalletModalContent,
|
|
5412
5542
|
{
|
|
5413
5543
|
connected,
|
|
@@ -5441,20 +5571,20 @@ function TONConnectModal({
|
|
|
5441
5571
|
const intl = (0, import_react_intl17.useIntl)();
|
|
5442
5572
|
const { endpoints, appid } = useLocalStore_default();
|
|
5443
5573
|
const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
|
|
5444
|
-
return /* @__PURE__ */ (0,
|
|
5574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5445
5575
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5446
5576
|
}, {
|
|
5447
5577
|
name: "TON"
|
|
5448
|
-
}), children: /* @__PURE__ */ (0,
|
|
5578
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5449
5579
|
import_ui_react.TonConnectUIProvider,
|
|
5450
5580
|
{
|
|
5451
5581
|
manifestUrl,
|
|
5452
|
-
children: /* @__PURE__ */ (0,
|
|
5582
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(WalletContent2, { onSuccess, type })
|
|
5453
5583
|
}
|
|
5454
5584
|
) });
|
|
5455
5585
|
}
|
|
5456
5586
|
function TONModal(props) {
|
|
5457
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5587
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(TONConnectModal, { ...props });
|
|
5458
5588
|
}
|
|
5459
5589
|
|
|
5460
5590
|
// src/components/BTCModal/index.tsx
|
|
@@ -5677,7 +5807,7 @@ var useBTCWallet = () => {
|
|
|
5677
5807
|
};
|
|
5678
5808
|
|
|
5679
5809
|
// src/components/BTCModal/index.tsx
|
|
5680
|
-
var
|
|
5810
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
5681
5811
|
function BTCConnectModal({
|
|
5682
5812
|
type = "login",
|
|
5683
5813
|
onSuccess,
|
|
@@ -5687,10 +5817,10 @@ function BTCConnectModal({
|
|
|
5687
5817
|
const intl = (0, import_react_intl18.useIntl)();
|
|
5688
5818
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
|
|
5689
5819
|
const iconMaps = {
|
|
5690
|
-
leather: /* @__PURE__ */ (0,
|
|
5691
|
-
unisat: /* @__PURE__ */ (0,
|
|
5692
|
-
xverse: /* @__PURE__ */ (0,
|
|
5693
|
-
phantom: /* @__PURE__ */ (0,
|
|
5820
|
+
leather: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(LeatherIcon, { size: isDownMd ? 36 : 40 }),
|
|
5821
|
+
unisat: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(UnisatIcon, { size: isDownMd ? 36 : 40 }),
|
|
5822
|
+
xverse: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(XverseIcon, { size: isDownMd ? 36 : 40 }),
|
|
5823
|
+
phantom: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(PhantomIcon, { size: isDownMd ? 36 : 40 })
|
|
5694
5824
|
};
|
|
5695
5825
|
const { events, login } = useMatch();
|
|
5696
5826
|
const [status, setStatus] = (0, import_react37.useState)("");
|
|
@@ -5790,11 +5920,11 @@ function BTCConnectModal({
|
|
|
5790
5920
|
statusRef.current = "";
|
|
5791
5921
|
setError("");
|
|
5792
5922
|
};
|
|
5793
|
-
return /* @__PURE__ */ (0,
|
|
5923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5794
5924
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5795
5925
|
}, {
|
|
5796
5926
|
name: "BTC"
|
|
5797
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5927
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5798
5928
|
WalletModalContent,
|
|
5799
5929
|
{
|
|
5800
5930
|
error,
|
|
@@ -5807,9 +5937,9 @@ function BTCConnectModal({
|
|
|
5807
5937
|
setVisible: () => {
|
|
5808
5938
|
}
|
|
5809
5939
|
}
|
|
5810
|
-
) : /* @__PURE__ */ (0,
|
|
5940
|
+
) : /* @__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
5941
|
installedWallets.map((wallet2) => {
|
|
5812
|
-
return /* @__PURE__ */ (0,
|
|
5942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5813
5943
|
RecommendItem,
|
|
5814
5944
|
{
|
|
5815
5945
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -5822,14 +5952,14 @@ function BTCConnectModal({
|
|
|
5822
5952
|
);
|
|
5823
5953
|
}),
|
|
5824
5954
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
5825
|
-
return /* @__PURE__ */ (0,
|
|
5955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5826
5956
|
RecommendItem,
|
|
5827
5957
|
{
|
|
5828
5958
|
icon: iconMaps[wallet2.walletKey],
|
|
5829
5959
|
name: wallet2.name,
|
|
5830
5960
|
onClick: () => {
|
|
5831
5961
|
},
|
|
5832
|
-
footer: /* @__PURE__ */ (0,
|
|
5962
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Button, { size: "sm", onClick: () => {
|
|
5833
5963
|
window.open(wallet2.website);
|
|
5834
5964
|
}, children: "Install" })
|
|
5835
5965
|
},
|
|
@@ -5839,13 +5969,13 @@ function BTCConnectModal({
|
|
|
5839
5969
|
] }) }) });
|
|
5840
5970
|
}
|
|
5841
5971
|
function BTCModal(props) {
|
|
5842
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5972
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(BTCConnectModal, { ...props });
|
|
5843
5973
|
}
|
|
5844
5974
|
|
|
5845
5975
|
// src/components/WalletModal/index.tsx
|
|
5846
5976
|
var import_react38 = require("react");
|
|
5847
5977
|
var import_react_intl19 = require("react-intl");
|
|
5848
|
-
var
|
|
5978
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
5849
5979
|
function WalletConnectModal({
|
|
5850
5980
|
type,
|
|
5851
5981
|
methods: _methods,
|
|
@@ -5863,13 +5993,13 @@ function WalletConnectModal({
|
|
|
5863
5993
|
const platform = config.platform.map((p) => p.toLowerCase());
|
|
5864
5994
|
return WALLET_METHODS.filter((m) => platform.includes(m));
|
|
5865
5995
|
}, [config.platform, _methods]);
|
|
5866
|
-
return /* @__PURE__ */ (0,
|
|
5996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5867
5997
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5868
5998
|
}, {
|
|
5869
5999
|
name: ""
|
|
5870
|
-
}), children: /* @__PURE__ */ (0,
|
|
6000
|
+
}), 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
6001
|
const m = walletMap[method];
|
|
5872
|
-
return /* @__PURE__ */ (0,
|
|
6002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
5873
6003
|
RecommendItem,
|
|
5874
6004
|
{
|
|
5875
6005
|
icon: m?.icon,
|
|
@@ -5883,12 +6013,12 @@ function WalletConnectModal({
|
|
|
5883
6013
|
}) }) }) });
|
|
5884
6014
|
}
|
|
5885
6015
|
function WalletModal(props) {
|
|
5886
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
6016
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(WalletConnectModal, { ...props });
|
|
5887
6017
|
}
|
|
5888
6018
|
|
|
5889
6019
|
// src/components/AlphaAvatar/index.tsx
|
|
5890
6020
|
var import_react39 = require("react");
|
|
5891
|
-
var
|
|
6021
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
5892
6022
|
function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
5893
6023
|
const [avatar, setAvatar] = (0, import_react39.useState)(void 0);
|
|
5894
6024
|
(0, import_react39.useEffect)(() => {
|
|
@@ -5897,7 +6027,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
5897
6027
|
setAvatar(char);
|
|
5898
6028
|
}
|
|
5899
6029
|
}, [name]);
|
|
5900
|
-
return /* @__PURE__ */ (0,
|
|
6030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
5901
6031
|
width: size,
|
|
5902
6032
|
height: size,
|
|
5903
6033
|
fontSize: Math.ceil(size / 2)
|
|
@@ -5905,7 +6035,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
5905
6035
|
}
|
|
5906
6036
|
|
|
5907
6037
|
// src/components/WalletAsset/index.tsx
|
|
5908
|
-
var
|
|
6038
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
5909
6039
|
function WalletAsset({
|
|
5910
6040
|
onAssetClick,
|
|
5911
6041
|
matchWalletAssetsOptions
|
|
@@ -5915,7 +6045,7 @@ function WalletAsset({
|
|
|
5915
6045
|
list: walletAssets.mergedAssets
|
|
5916
6046
|
});
|
|
5917
6047
|
const { list } = useMatchChain();
|
|
5918
|
-
return /* @__PURE__ */ (0,
|
|
6048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5919
6049
|
const clickFunc = onAssetClick && onAssetClick(n);
|
|
5920
6050
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5921
6051
|
const getFooterColor = () => {
|
|
@@ -5930,11 +6060,11 @@ function WalletAsset({
|
|
|
5930
6060
|
}
|
|
5931
6061
|
return "";
|
|
5932
6062
|
};
|
|
5933
|
-
return /* @__PURE__ */ (0,
|
|
6063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-wallet-asset-item`, onClick: clickFunc, style: {
|
|
5934
6064
|
cursor: clickFunc ? "pointer" : "default"
|
|
5935
6065
|
}, children: [
|
|
5936
|
-
/* @__PURE__ */ (0,
|
|
5937
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
6066
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
|
|
6067
|
+
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
6068
|
AlphaAvatar2,
|
|
5939
6069
|
{
|
|
5940
6070
|
className: `matchid-wallet-asset-icon`,
|
|
@@ -5942,12 +6072,12 @@ function WalletAsset({
|
|
|
5942
6072
|
name: n.symbol || n.name || ""
|
|
5943
6073
|
}
|
|
5944
6074
|
),
|
|
5945
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6075
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
|
|
5946
6076
|
] }),
|
|
5947
|
-
/* @__PURE__ */ (0,
|
|
5948
|
-
/* @__PURE__ */ (0,
|
|
5949
|
-
"price" in n && /* @__PURE__ */ (0,
|
|
5950
|
-
/* @__PURE__ */ (0,
|
|
6077
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-wallet-asset-info`, children: [
|
|
6078
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
|
|
6079
|
+
"price" in n && /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-wallet-asset-content`, children: [
|
|
6080
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
5951
6081
|
NumberFormatter,
|
|
5952
6082
|
{
|
|
5953
6083
|
value: n.price,
|
|
@@ -5955,7 +6085,7 @@ function WalletAsset({
|
|
|
5955
6085
|
tFixNum: 2
|
|
5956
6086
|
}
|
|
5957
6087
|
) }),
|
|
5958
|
-
/* @__PURE__ */ (0,
|
|
6088
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
5959
6089
|
NumberFormatter,
|
|
5960
6090
|
{
|
|
5961
6091
|
value: n.value,
|
|
@@ -5964,15 +6094,15 @@ function WalletAsset({
|
|
|
5964
6094
|
}
|
|
5965
6095
|
) })
|
|
5966
6096
|
] }),
|
|
5967
|
-
/* @__PURE__ */ (0,
|
|
5968
|
-
/* @__PURE__ */ (0,
|
|
6097
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: `matchid-wallet-asset-footer`, children: [
|
|
6098
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
5969
6099
|
NumberFormatter,
|
|
5970
6100
|
{
|
|
5971
6101
|
value: n.balance,
|
|
5972
6102
|
tFixNum: 3
|
|
5973
6103
|
}
|
|
5974
6104
|
) }),
|
|
5975
|
-
"price_change_24h" in n && /* @__PURE__ */ (0,
|
|
6105
|
+
"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
6106
|
NumberFormatter,
|
|
5977
6107
|
{
|
|
5978
6108
|
prefix: `${(n?.price_change_24h || 0) < 0 ? "-" : "+"} `,
|
|
@@ -5991,7 +6121,7 @@ function WalletAsset({
|
|
|
5991
6121
|
var import_react40 = require("react");
|
|
5992
6122
|
var import_viem15 = require("viem");
|
|
5993
6123
|
var import_react_intl20 = require("react-intl");
|
|
5994
|
-
var
|
|
6124
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
5995
6125
|
function Input2({
|
|
5996
6126
|
onChange,
|
|
5997
6127
|
placeholder,
|
|
@@ -6001,8 +6131,8 @@ function Input2({
|
|
|
6001
6131
|
error,
|
|
6002
6132
|
size = "df"
|
|
6003
6133
|
}) {
|
|
6004
|
-
return /* @__PURE__ */ (0,
|
|
6005
|
-
/* @__PURE__ */ (0,
|
|
6134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
|
|
6135
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
6006
6136
|
"input",
|
|
6007
6137
|
{
|
|
6008
6138
|
placeholder,
|
|
@@ -6013,7 +6143,7 @@ function Input2({
|
|
|
6013
6143
|
className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
|
|
6014
6144
|
}
|
|
6015
6145
|
),
|
|
6016
|
-
error && /* @__PURE__ */ (0,
|
|
6146
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "matchid-token-input-error-text", children: error })
|
|
6017
6147
|
] });
|
|
6018
6148
|
}
|
|
6019
6149
|
function TokenSend({
|
|
@@ -6141,24 +6271,24 @@ function TokenSend({
|
|
|
6141
6271
|
window.removeEventListener("message", receiveMessage);
|
|
6142
6272
|
};
|
|
6143
6273
|
}, []);
|
|
6144
|
-
return /* @__PURE__ */ (0,
|
|
6145
|
-
/* @__PURE__ */ (0,
|
|
6146
|
-
/* @__PURE__ */ (0,
|
|
6147
|
-
/* @__PURE__ */ (0,
|
|
6148
|
-
/* @__PURE__ */ (0,
|
|
6149
|
-
/* @__PURE__ */ (0,
|
|
6150
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
6274
|
+
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: [
|
|
6275
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
6276
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-amount-content`, children: [
|
|
6277
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-amount-header`, children: [
|
|
6278
|
+
/* @__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" }) }),
|
|
6279
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
|
|
6280
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
6151
6281
|
"img",
|
|
6152
6282
|
{
|
|
6153
6283
|
src: token?.icon,
|
|
6154
6284
|
alt: token?.symbol,
|
|
6155
6285
|
className: `matchid-token-amount-chain-icon`
|
|
6156
6286
|
}
|
|
6157
|
-
) : /* @__PURE__ */ (0,
|
|
6158
|
-
/* @__PURE__ */ (0,
|
|
6287
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
|
|
6288
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { children: token?.symbol })
|
|
6159
6289
|
] })
|
|
6160
6290
|
] }),
|
|
6161
|
-
/* @__PURE__ */ (0,
|
|
6291
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
6162
6292
|
Input2,
|
|
6163
6293
|
{
|
|
6164
6294
|
type: "text",
|
|
@@ -6171,18 +6301,18 @@ function TokenSend({
|
|
|
6171
6301
|
error: error.amount || txError
|
|
6172
6302
|
}
|
|
6173
6303
|
),
|
|
6174
|
-
/* @__PURE__ */ (0,
|
|
6175
|
-
/* @__PURE__ */ (0,
|
|
6176
|
-
/* @__PURE__ */ (0,
|
|
6304
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
|
|
6305
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-amount-title`, children: [
|
|
6306
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_intl20.FormattedMessage, { id: "balance" }),
|
|
6177
6307
|
":"
|
|
6178
6308
|
] }),
|
|
6179
|
-
/* @__PURE__ */ (0,
|
|
6309
|
+
/* @__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
6310
|
] }),
|
|
6181
|
-
/* @__PURE__ */ (0,
|
|
6311
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
6182
6312
|
] }),
|
|
6183
|
-
/* @__PURE__ */ (0,
|
|
6184
|
-
/* @__PURE__ */ (0,
|
|
6185
|
-
/* @__PURE__ */ (0,
|
|
6313
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: `matchid-token-address-content`, children: [
|
|
6314
|
+
/* @__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" }) }) }),
|
|
6315
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
6186
6316
|
Input2,
|
|
6187
6317
|
{
|
|
6188
6318
|
type: "text",
|
|
@@ -6198,7 +6328,7 @@ function TokenSend({
|
|
|
6198
6328
|
)
|
|
6199
6329
|
] })
|
|
6200
6330
|
] }),
|
|
6201
|
-
/* @__PURE__ */ (0,
|
|
6331
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
6202
6332
|
Button,
|
|
6203
6333
|
{
|
|
6204
6334
|
size: "lg",
|
|
@@ -6207,7 +6337,7 @@ function TokenSend({
|
|
|
6207
6337
|
disabled: !canSend || !!txError,
|
|
6208
6338
|
onClick: onNext,
|
|
6209
6339
|
loading: loading || sending,
|
|
6210
|
-
children: /* @__PURE__ */ (0,
|
|
6340
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_intl20.FormattedMessage, { id: "next" })
|
|
6211
6341
|
}
|
|
6212
6342
|
)
|
|
6213
6343
|
] }) });
|
|
@@ -6215,7 +6345,7 @@ function TokenSend({
|
|
|
6215
6345
|
|
|
6216
6346
|
// src/components/TokenDetail/index.tsx
|
|
6217
6347
|
var import_react_intl21 = require("react-intl");
|
|
6218
|
-
var
|
|
6348
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
6219
6349
|
function TokenDetail({
|
|
6220
6350
|
onClose,
|
|
6221
6351
|
token
|
|
@@ -6225,41 +6355,41 @@ function TokenDetail({
|
|
|
6225
6355
|
const chain = chainList?.find((m) => m.id.toString() === token.chain_id);
|
|
6226
6356
|
const onSend = () => {
|
|
6227
6357
|
modal.show((props) => {
|
|
6228
|
-
return /* @__PURE__ */ (0,
|
|
6358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(TokenSend, { onClose: () => {
|
|
6229
6359
|
props.close();
|
|
6230
6360
|
onClose();
|
|
6231
6361
|
}, onBack: props.close, zIndex: props.zIndex, token });
|
|
6232
6362
|
});
|
|
6233
6363
|
};
|
|
6234
6364
|
const intl = (0, import_react_intl21.useIntl)();
|
|
6235
|
-
return /* @__PURE__ */ (0,
|
|
6365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(ModalDrawer, { isOpen: true, title: intl.formatMessage({
|
|
6236
6366
|
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,
|
|
6367
|
+
}), onClose, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-detail`, children: [
|
|
6368
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-main`, children: [
|
|
6369
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-info`, children: [
|
|
6370
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-logo`, children: [
|
|
6371
|
+
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 || "" }),
|
|
6372
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-token-chain` })
|
|
6243
6373
|
] }),
|
|
6244
|
-
/* @__PURE__ */ (0,
|
|
6245
|
-
/* @__PURE__ */ (0,
|
|
6374
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-name`, children: [
|
|
6375
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10 }),
|
|
6246
6376
|
" ",
|
|
6247
6377
|
token.symbol
|
|
6248
6378
|
] })
|
|
6249
6379
|
] }),
|
|
6250
|
-
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0,
|
|
6251
|
-
/* @__PURE__ */ (0,
|
|
6252
|
-
/* @__PURE__ */ (0,
|
|
6380
|
+
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-token-contract`, children: [
|
|
6381
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "matchid-token-contract-title", children: "Contract address" }),
|
|
6382
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "matchid-token-contract-address", children: token.address })
|
|
6253
6383
|
] })
|
|
6254
6384
|
] }),
|
|
6255
|
-
/* @__PURE__ */ (0,
|
|
6385
|
+
/* @__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
6386
|
] }) });
|
|
6257
6387
|
}
|
|
6258
6388
|
|
|
6259
6389
|
// src/components/TokenSendList/index.tsx
|
|
6260
6390
|
var import_react41 = require("react");
|
|
6261
6391
|
var import_react_intl22 = require("react-intl");
|
|
6262
|
-
var
|
|
6392
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
6263
6393
|
function TokenSendList({ close }) {
|
|
6264
6394
|
const isDownMd = useDownMd();
|
|
6265
6395
|
const walletAssets = useMatchWalletAssets();
|
|
@@ -6271,16 +6401,16 @@ function TokenSendList({ close }) {
|
|
|
6271
6401
|
const modal = useModal();
|
|
6272
6402
|
const onNext = () => {
|
|
6273
6403
|
checked && modal.show((props) => {
|
|
6274
|
-
return /* @__PURE__ */ (0,
|
|
6404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(TokenSend, { onClose: () => {
|
|
6275
6405
|
props.close();
|
|
6276
6406
|
close();
|
|
6277
6407
|
}, onBack: props.close, zIndex: props.zIndex, token: checked });
|
|
6278
6408
|
});
|
|
6279
6409
|
};
|
|
6280
|
-
return /* @__PURE__ */ (0,
|
|
6281
|
-
/* @__PURE__ */ (0,
|
|
6410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "matchid-token-send-list-box", children: [
|
|
6411
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
6282
6412
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
6283
|
-
return /* @__PURE__ */ (0,
|
|
6413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
6284
6414
|
"div",
|
|
6285
6415
|
{
|
|
6286
6416
|
className: `matchid-token-send-item ${checked?.address == n.address ? "matchid-token-send-chekced" : ""}`,
|
|
@@ -6288,10 +6418,10 @@ function TokenSendList({ close }) {
|
|
|
6288
6418
|
setChecked(n);
|
|
6289
6419
|
},
|
|
6290
6420
|
children: [
|
|
6291
|
-
/* @__PURE__ */ (0,
|
|
6292
|
-
/* @__PURE__ */ (0,
|
|
6293
|
-
/* @__PURE__ */ (0,
|
|
6294
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
6421
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
|
|
6422
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
6423
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "matchid-token-send-logo", children: [
|
|
6424
|
+
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
6425
|
AlphaAvatar2,
|
|
6296
6426
|
{
|
|
6297
6427
|
className: `matchid-token-send-icon`,
|
|
@@ -6299,7 +6429,7 @@ function TokenSendList({ close }) {
|
|
|
6299
6429
|
name: n.symbol || n.name || ""
|
|
6300
6430
|
}
|
|
6301
6431
|
),
|
|
6302
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6432
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
6303
6433
|
"img",
|
|
6304
6434
|
{
|
|
6305
6435
|
src: chain.iconUrl,
|
|
@@ -6308,9 +6438,9 @@ function TokenSendList({ close }) {
|
|
|
6308
6438
|
}
|
|
6309
6439
|
)
|
|
6310
6440
|
] }),
|
|
6311
|
-
/* @__PURE__ */ (0,
|
|
6312
|
-
/* @__PURE__ */ (0,
|
|
6313
|
-
/* @__PURE__ */ (0,
|
|
6441
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: `matchid-token-send-info`, children: [
|
|
6442
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
|
|
6443
|
+
/* @__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
6444
|
] })
|
|
6315
6445
|
] })
|
|
6316
6446
|
]
|
|
@@ -6318,7 +6448,7 @@ function TokenSendList({ close }) {
|
|
|
6318
6448
|
index
|
|
6319
6449
|
);
|
|
6320
6450
|
}) }),
|
|
6321
|
-
/* @__PURE__ */ (0,
|
|
6451
|
+
/* @__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
6452
|
] });
|
|
6323
6453
|
}
|
|
6324
6454
|
|
|
@@ -6328,7 +6458,7 @@ var import_react42 = require("react");
|
|
|
6328
6458
|
var import_viem16 = require("viem");
|
|
6329
6459
|
var import_viem17 = require("viem");
|
|
6330
6460
|
var import_react_intl23 = require("react-intl");
|
|
6331
|
-
var
|
|
6461
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
6332
6462
|
var Item = ({ data }) => {
|
|
6333
6463
|
const { address } = useWallet();
|
|
6334
6464
|
const isOut = data.from.toLowerCase() == address.toLowerCase();
|
|
@@ -6415,18 +6545,18 @@ var Item = ({ data }) => {
|
|
|
6415
6545
|
}
|
|
6416
6546
|
return chain?.nativeCurrency.symbol || chain?.nativeCurrency.name;
|
|
6417
6547
|
}, [transferType, chain, contracts, chainId, data.to]);
|
|
6418
|
-
return /* @__PURE__ */ (0,
|
|
6548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
6419
6549
|
"a",
|
|
6420
6550
|
{
|
|
6421
6551
|
href: explorerLink(`tx/${data.hash}`),
|
|
6422
6552
|
target: "_blank",
|
|
6423
6553
|
className: `matchid-transaction-item`,
|
|
6424
6554
|
children: [
|
|
6425
|
-
/* @__PURE__ */ (0,
|
|
6426
|
-
/* @__PURE__ */ (0,
|
|
6427
|
-
/* @__PURE__ */ (0,
|
|
6428
|
-
/* @__PURE__ */ (0,
|
|
6429
|
-
/* @__PURE__ */ (0,
|
|
6555
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: `matchid-transacton-item-container`, children: [
|
|
6556
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
|
|
6557
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: `matchid-transaction-item-details`, children: [
|
|
6558
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
|
|
6559
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
6430
6560
|
"div",
|
|
6431
6561
|
{
|
|
6432
6562
|
className: `matchid-transaction-item-timestamp`,
|
|
@@ -6435,11 +6565,11 @@ var Item = ({ data }) => {
|
|
|
6435
6565
|
)
|
|
6436
6566
|
] })
|
|
6437
6567
|
] }),
|
|
6438
|
-
/* @__PURE__ */ (0,
|
|
6439
|
-
/* @__PURE__ */ (0,
|
|
6440
|
-
status == "loading" && /* @__PURE__ */ (0,
|
|
6441
|
-
status == "success" && /* @__PURE__ */ (0,
|
|
6442
|
-
status == "error" && /* @__PURE__ */ (0,
|
|
6568
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
|
|
6569
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(NumberFormatter, { value: amount, tFixNum: 6, prefix: isOut ? "-" : "+", suffix: " " + symbol }),
|
|
6570
|
+
status == "loading" && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(LoadingIcon_default, { color: "#000000", size: 16, rotate: true }),
|
|
6571
|
+
status == "success" && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(CheckRoundIcon, { size: 16 }),
|
|
6572
|
+
status == "error" && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(InfoRoundIcon, { size: 16 })
|
|
6443
6573
|
] })
|
|
6444
6574
|
]
|
|
6445
6575
|
}
|
|
@@ -6449,19 +6579,19 @@ function TransactionList({
|
|
|
6449
6579
|
scrollableTarget
|
|
6450
6580
|
}) {
|
|
6451
6581
|
const { fetchMoreData, hasMore, items } = useMatchWalletRecords();
|
|
6452
|
-
return /* @__PURE__ */ (0,
|
|
6582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
6453
6583
|
import_react_infinite_scroll_component.default,
|
|
6454
6584
|
{
|
|
6455
6585
|
scrollableTarget,
|
|
6456
6586
|
dataLength: items.length,
|
|
6457
6587
|
next: fetchMoreData,
|
|
6458
6588
|
hasMore,
|
|
6459
|
-
loader: /* @__PURE__ */ (0,
|
|
6460
|
-
/* @__PURE__ */ (0,
|
|
6589
|
+
loader: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "matchid-list-nomore", children: [
|
|
6590
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
|
|
6461
6591
|
"Loading..."
|
|
6462
6592
|
] }),
|
|
6463
|
-
endMessage: items.length > 0 ? /* @__PURE__ */ (0,
|
|
6464
|
-
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0,
|
|
6593
|
+
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" }) }),
|
|
6594
|
+
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
6595
|
}
|
|
6466
6596
|
);
|
|
6467
6597
|
}
|