@matchain/matchid-sdk-react 0.1.53-alpha.2 → 0.1.53-alpha.20
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/assets/icon/index.d.mts +4 -144
- package/dist/assets/icon/index.d.ts +4 -144
- package/dist/assets/icon/index.js +54 -0
- package/dist/assets/icon/index.js.map +1 -1
- package/dist/assets/icon/index.mjs +5 -1
- package/dist/chunk-3CR66BEX.mjs +19 -0
- package/dist/chunk-3CR66BEX.mjs.map +1 -0
- package/dist/{chunk-W5A6WY7Y.mjs → chunk-CLMSEFOV.mjs} +5808 -4749
- package/dist/chunk-CLMSEFOV.mjs.map +1 -0
- package/dist/{chunk-LHNKZISB.mjs → chunk-FKXS2XRG.mjs} +114 -2
- package/dist/chunk-FKXS2XRG.mjs.map +1 -0
- package/dist/{chunk-MX7N57AH.mjs → chunk-IZOOVZAD.mjs} +11 -6
- package/dist/chunk-IZOOVZAD.mjs.map +1 -0
- package/dist/{chunk-HYQ3T6WW.mjs → chunk-JX73EY6V.mjs} +2 -14
- package/dist/chunk-JX73EY6V.mjs.map +1 -0
- package/dist/{chunk-FB5MHLWX.mjs → chunk-X5HGL3ZX.mjs} +45 -3
- package/dist/chunk-X5HGL3ZX.mjs.map +1 -0
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +1568 -504
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +11 -4
- package/dist/config/chains/index.mjs +2 -1
- package/dist/hooks/api/index.d.mts +3 -2
- package/dist/hooks/api/index.d.ts +3 -2
- package/dist/hooks/api/index.js +393 -82
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +9 -8
- package/dist/hooks/index.d.mts +3 -2
- package/dist/hooks/index.d.ts +3 -2
- package/dist/hooks/index.js +620 -463
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +5 -4
- package/dist/index-B1T3lcwo.d.mts +203 -0
- package/dist/{index-Df-WlkXq.d.ts → index-B6Tmp2HR.d.ts} +25 -5
- package/dist/index-B6pp5UQe.d.ts +203 -0
- package/dist/{index-IwwXQ_QV.d.ts → index-BR3CyOOn.d.ts} +5 -2
- package/dist/{index-CZqdmQu1.d.mts → index-BeTS09HM.d.mts} +41 -17
- package/dist/{index-iWHaT8HV.d.mts → index-BxHKPC5n.d.mts} +1 -1
- package/dist/{index-B8cUP7cH.d.ts → index-CA7lhjpa.d.mts} +25 -5
- package/dist/{index-yy3VTdFU.d.mts → index-CRoZ0p2b.d.ts} +25 -5
- package/dist/{index-BCGJczpk.d.mts → index-CXPCmoIu.d.mts} +5 -2
- package/dist/{index-Bil_db2f.d.mts → index-Ce3oCu6-.d.mts} +19 -16
- package/dist/{index-DNJuiNdz.d.mts → index-Ci_ub_5y.d.mts} +25 -5
- package/dist/{index-BsL6zo6a.d.ts → index-DKV8v6s_.d.ts} +1 -1
- package/dist/{index-K5vXmiRX.d.ts → index-Dnjr-WPp.d.ts} +41 -17
- package/dist/{index-BS-NO8Y2.d.ts → index-IHigYscw.d.ts} +19 -16
- package/dist/index.css +132 -13
- package/dist/index.d.mts +9 -7
- package/dist/index.d.ts +9 -7
- package/dist/index.js +1956 -793
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -8
- package/dist/request-B0CyrGFT.d.mts +15 -0
- package/dist/request-B0CyrGFT.d.ts +15 -0
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/{types-CZbR7ERa.d.mts → types-mRkAnXBf.d.mts} +17 -1
- package/dist/{types-CZbR7ERa.d.ts → types-mRkAnXBf.d.ts} +17 -1
- package/dist/ui/index.d.mts +3 -3
- package/dist/ui/index.d.ts +3 -3
- package/dist/ui/index.js +109 -61
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +8 -4
- package/dist/utils/index.d.mts +3 -2
- package/dist/utils/index.d.ts +3 -2
- package/dist/utils/index.js +10 -4
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +3 -1
- package/example/dist/assets/Arc-R3PUWRPJ-CUdEQO8X.js +1 -0
- package/example/dist/assets/Brave-24BM36UM-C6C5mkTK.js +1 -0
- package/example/dist/assets/Browser-4R4QKTV2-D3ON1q-S.js +1 -0
- package/example/dist/assets/Chrome-TLI42HDP-BgiVz-ma.js +1 -0
- package/example/dist/assets/Edge-AZ34LAFM-EBh9cG_z.js +1 -0
- package/example/dist/assets/Firefox-ZDK7RHKK-5nyhB0sj.js +1 -0
- package/example/dist/assets/Linux-VYP66PDO--MOvpQUa.js +1 -0
- package/example/dist/assets/Macos-5QL4JBJE-DLNYPiln.js +1 -0
- package/example/dist/assets/Opera-BKMCKUXC-CCypmVaM.js +1 -0
- package/example/dist/assets/Safari-PXQIVS6N-B-Lfxb9r.js +1 -0
- package/example/dist/assets/Windows-GTAT3OTE-K9Pt3pUF.js +1 -0
- package/example/dist/assets/apechain-COEQ5RUI-0TDoXOYf.js +1 -0
- package/example/dist/assets/ar_AR-ZRPPM56D-d2WEfzQ_.js +1349 -0
- package/example/dist/assets/arbitrum-HW44W6XR-hPA5bMPt.js +1 -0
- package/example/dist/assets/assets-NU2OP443-COMs-Mo6.js +1 -0
- package/example/dist/assets/avalanche-MXEFEDSW-DcC5FNt3.js +1 -0
- package/example/dist/assets/base-Z4LFBE5D-DHfqMzJC.js +1 -0
- package/example/dist/assets/berachain-ZN3U5LDZ-CAvW_8ws.js +1 -0
- package/example/dist/assets/bitgetWallet-CLYTW54T-Wwn2QYd0.js +1 -0
- package/example/dist/assets/blast-46UQLYYY-BV_Xlsq4.js +1 -0
- package/example/dist/assets/bsc-RVE67I5L-DVYEF0vl.js +1 -0
- package/example/dist/assets/ccip-BhIcA6Sl.js +1 -0
- package/example/dist/assets/celo-E6XU57FO-C5IguUgF.js +1 -0
- package/example/dist/assets/coinbaseWallet-WWX6LF36-BMRj6mTC.js +1 -0
- package/example/dist/assets/connect-MR6XDLIE-BET5HMNk.js +1 -0
- package/example/dist/assets/create-X4WFHLCW-De9pC3ym.js +1 -0
- package/example/dist/assets/cronos-ROYR77VZ-Prn3LRPZ.js +1 -0
- package/example/dist/assets/de_DE-GYZFZXWH-CYZf24IR.js +1349 -0
- package/example/dist/assets/degen-7ROC3GCY-9HqAkHtZ.js +1 -0
- package/example/dist/assets/es_419-OGVOQEFZ-D6BJPTeQ.js +1349 -0
- package/example/dist/assets/ethereum-RFBAMUVK-WsW8NXqo.js +1 -0
- package/example/dist/assets/events-CkdpRqBF.js +1 -0
- package/example/dist/assets/flow-NBCRNYVF-D2XasjKk.js +1 -0
- package/example/dist/assets/fr_FR-Q5QBQBX2-lQoTmpTH.js +1349 -0
- package/example/dist/assets/gnosis-Y56LN66M-D4_J-ZQH.js +1 -0
- package/example/dist/assets/gravity-LMEBVSFN-DLxWpxhy.js +1 -0
- package/example/dist/assets/hardhat-NEEC6JX7-DzuWQYyS.js +1 -0
- package/example/dist/assets/hi_IN-7I7LRHGW-CTQjmeYe.js +1349 -0
- package/example/dist/assets/hooks.module-C5ONEBEq.js +1 -0
- package/example/dist/assets/hyperevm-J6CONVCX-C6oeYIAP.js +1 -0
- package/example/dist/assets/id_ID-ZMGZ2JFV-CgKQKAmU.js +1349 -0
- package/example/dist/assets/index-BG5XIZpE.js +3 -0
- package/example/dist/assets/index-BsarjAeg.js +1 -0
- package/example/dist/assets/index-DK7UFFe7.js +7 -0
- package/example/dist/assets/index-DPb8sz1C.js +54 -0
- package/example/dist/assets/index-JbpWt42F.js +1 -0
- package/example/dist/assets/index-YsGNa18R.css +1 -0
- package/example/dist/assets/index-kAjO6hfy.js +2 -0
- package/example/dist/assets/index-qgo91dsq.js +3942 -0
- package/example/dist/assets/index.es-D44wzsQe.js +71 -0
- package/example/dist/assets/injectedWallet-H7LYKTQS-CAHJNGc-.js +1 -0
- package/example/dist/assets/ink-4U4ZVNAB-AlM1MLfQ.js +1 -0
- package/example/dist/assets/ja_JP-NYBCHQTZ-CMaBl8Za.js +1349 -0
- package/example/dist/assets/kaia-A33DVQBT-Fgclbhio.js +1 -0
- package/example/dist/assets/ko_KR-67WE736M-DHWhIjcm.js +1349 -0
- package/example/dist/assets/linea-IALBSJQC-Cmyd7vgA.js +1 -0
- package/example/dist/assets/login-CWDTIDNK-DhDUYE4b.js +1 -0
- package/example/dist/assets/manta-5V6W5D7G-BnjsGzeJ.js +1 -0
- package/example/dist/assets/mantle-KBL3OIYT-DIpe0poV.js +1 -0
- package/example/dist/assets/metaMaskWallet-YFHEHW7V-BggUDXad.js +1 -0
- package/example/dist/assets/metaMaskWallet-YFHEHW7V-DBxkXEyI.js +1 -0
- package/example/dist/assets/ms_MY-65AJIBUS-BLlUrxe6.js +1349 -0
- package/example/dist/assets/okxWallet-GJMKZIND-Ctk5JsJ6.js +1 -0
- package/example/dist/assets/optimism-YWJ3IQHA-DYER-OR5.js +1 -0
- package/example/dist/assets/polygon-WWEUOMKW-CNBYSB1T.js +1 -0
- package/example/dist/assets/pt_BR-DMJANC65-DMs4DrlC.js +1349 -0
- package/example/dist/assets/rainbowWallet-2SR6TVBF-kimcGeuf.js +1 -0
- package/example/dist/assets/refresh-HJGJRASX-D0rkc63_.js +1 -0
- package/example/dist/assets/ronin-PNHX5V6H-BS-WPXjQ.js +1 -0
- package/example/dist/assets/ru_RU-WER7RQ6A-DsJK55uv.js +1349 -0
- package/example/dist/assets/safeWallet-VUYZPLY4-CXnodgMs.js +1 -0
- package/example/dist/assets/sanko-RHQYXGM5-OX010CbN.js +1 -0
- package/example/dist/assets/scan-DEOT2M37-1-mJ5OyF.js +1 -0
- package/example/dist/assets/scroll-MCKFTBRS-C2gqZSab.js +1 -0
- package/example/dist/assets/sign-A7IJEUT5-CGsRnPrd.js +1 -0
- package/example/dist/assets/th_TH-JOSHEZ6D-Cp87mIRZ.js +1349 -0
- package/example/dist/assets/tr_TR-EAMG2YPO-C52_xfsf.js +1349 -0
- package/example/dist/assets/uk_UA-GO2TRVWA-C1C1400t.js +1349 -0
- package/example/dist/assets/unichain-OQ3BZUDH-CyMLDmFg.js +1 -0
- package/example/dist/assets/vi_VN-5HLLSOJA-Dj7ferOp.js +1349 -0
- package/example/dist/assets/walletConnectWallet-FNSU4KNU-B0ci71fU.js +1 -0
- package/example/dist/assets/walletConnectWallet-FNSU4KNU-CBpCuHbd.js +1 -0
- package/example/dist/assets/xdc-X7V4QFNF-CSGs0o6M.js +1 -0
- package/example/dist/assets/zetachain-BMJKVYBN-IK2CZBr3.js +1 -0
- package/example/dist/assets/zh_CN-THPIFVWJ-Cbp71xMR.js +1349 -0
- package/example/dist/assets/zh_HK-R7XP4TGF-CyJtfKGw.js +1349 -0
- package/example/dist/assets/zh_TW-F5LD752V-AHFgsYw-.js +1349 -0
- package/example/dist/assets/zksync-UWUXFL74-Bt0brpXu.js +1 -0
- package/example/dist/assets/zora-YZH32HP3-CY3tp3EJ.js +1 -0
- package/example/dist/index.html +2 -2
- package/example/package.json +3 -1
- package/example/src/App.tsx +30 -7
- package/example/src/pages/Contact/index.tsx +90 -0
- package/example/src/pages/UI/components/Tabs.tsx +18 -0
- package/example/src/pages/UI/index.tsx +2 -0
- package/example/src/pages/User/index.tsx +7 -1
- package/package.json +5 -1
- package/dist/chunk-4A2YPGO3.mjs +0 -97
- package/dist/chunk-4A2YPGO3.mjs.map +0 -1
- package/dist/chunk-FB5MHLWX.mjs.map +0 -1
- package/dist/chunk-HYQ3T6WW.mjs.map +0 -1
- package/dist/chunk-LHNKZISB.mjs.map +0 -1
- package/dist/chunk-MX7N57AH.mjs.map +0 -1
- package/dist/chunk-W5A6WY7Y.mjs.map +0 -1
- package/example/dist/assets/TransportWebHID-BEu7tC0r.js +0 -1
- package/example/dist/assets/bignumber-iG7K-qxw.js +0 -10
- package/example/dist/assets/ccip-a6wQ1Vcb.js +0 -1
- package/example/dist/assets/draggabilly-CRYR_S0q.js +0 -14
- package/example/dist/assets/index--dp9m9Ep.js +0 -1
- package/example/dist/assets/index-BDTHolFv.js +0 -569
- package/example/dist/assets/index-BZl59qLb.js +0 -179
- package/example/dist/assets/index-BmMbYNHO.js +0 -303
- package/example/dist/assets/index-C7cxVRDF.js +0 -1677
- package/example/dist/assets/index-CJk171Yb.js +0 -1
- package/example/dist/assets/index-CQiBesAa.js +0 -3
- package/example/dist/assets/index-D62loNA9.js +0 -3
- package/example/dist/assets/index-DqyX3FG6.js +0 -1
- package/example/dist/assets/index-Gy3FXGhr.css +0 -1
- package/example/dist/assets/inherits_browser-BlmhoU4v.js +0 -1
- package/example/dist/assets/solanaEmbed.esm-Djn-u4Vn.js +0 -38
package/dist/components/index.js
CHANGED
|
@@ -32,6 +32,9 @@ var components_exports = {};
|
|
|
32
32
|
__export(components_exports, {
|
|
33
33
|
BTCModal: () => BTCModal,
|
|
34
34
|
Button: () => Button,
|
|
35
|
+
ContactCard: () => ContactCard,
|
|
36
|
+
ContactList: () => ContactList,
|
|
37
|
+
EVMModal: () => EVMModal,
|
|
35
38
|
EmailModal: () => EmailModal,
|
|
36
39
|
Field: () => Field,
|
|
37
40
|
Input: () => Input,
|
|
@@ -1183,6 +1186,56 @@ function ArrowSendIcon({
|
|
|
1183
1186
|
) });
|
|
1184
1187
|
}
|
|
1185
1188
|
|
|
1189
|
+
// src/assets/icon/PhantomIcon.tsx
|
|
1190
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1191
|
+
function PhantomIcon({
|
|
1192
|
+
size = 128,
|
|
1193
|
+
...props
|
|
1194
|
+
}) {
|
|
1195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("svg", { width: size, height: size, ...props, viewBox: "0 0 128 128", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
1196
|
+
"path",
|
|
1197
|
+
{
|
|
1198
|
+
fill: "#ab9ff2",
|
|
1199
|
+
d: "m53.520552,86.603299c-5.9423,9.106 -15.8999,20.63 -29.1497,20.63c-6.2636,0 -12.2864,-2.578 -12.2866,-13.779c-0.0005,-28.5271 38.946,-72.687 75.0825,-72.6876c20.557,-0.0004 28.749,14.2625 28.749,30.4597c0,20.7903 -13.491,44.5629 -26.901,44.5629c-4.256,0 -6.344,-2.337 -6.344,-6.043c0,-0.967 0.16,-2.015 0.482,-3.143c-4.578,7.816 -13.411,15.07 -21.6822,15.07c-6.0227,0 -9.074,-3.788 -9.0741,-9.107c0,-1.934 0.4015,-3.948 1.1241,-5.963zm26.8222,-43.9027c-3.271,0.0058 -5.501,2.7849 -5.494,6.7495c0.007,3.9646 2.247,6.8152 5.518,6.8095c3.192,-0.0057 5.421,-2.8641 5.414,-6.8288c-0.007,-3.9646 -2.246,-6.7358 -5.438,-6.7302zm17.351,-0.0189c-3.271,0.0058 -5.501,2.7849 -5.494,6.7495c0.007,3.9646 2.246,6.8152 5.518,6.8095c3.192,-0.0056 5.421,-2.8641 5.414,-6.8288c-0.007,-3.9646 -2.246,-6.7358 -5.438,-6.7302z",
|
|
1200
|
+
clipRule: "evenodd",
|
|
1201
|
+
fillRule: "evenodd"
|
|
1202
|
+
}
|
|
1203
|
+
) });
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
// src/assets/icon/MoreIcon.tsx
|
|
1207
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1208
|
+
function MoreIcon({
|
|
1209
|
+
width = "11",
|
|
1210
|
+
height = "3",
|
|
1211
|
+
color = "black",
|
|
1212
|
+
...props
|
|
1213
|
+
}) {
|
|
1214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width, height, viewBox: "0 0 11 3", fill: "none", ...props, children: [
|
|
1215
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1216
|
+
"path",
|
|
1217
|
+
{
|
|
1218
|
+
d: "M2.3335 1.33325C2.3335 1.88554 1.88578 2.33325 1.3335 2.33325C0.781211 2.33325 0.333496 1.88554 0.333496 1.33325C0.333496 0.780967 0.781211 0.333252 1.3335 0.333252C1.88578 0.333252 2.3335 0.780967 2.3335 1.33325Z",
|
|
1219
|
+
fill: color
|
|
1220
|
+
}
|
|
1221
|
+
),
|
|
1222
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1223
|
+
"path",
|
|
1224
|
+
{
|
|
1225
|
+
d: "M6.3335 1.33325C6.3335 1.88554 5.88578 2.33325 5.3335 2.33325C4.78121 2.33325 4.3335 1.88554 4.3335 1.33325C4.3335 0.780967 4.78121 0.333252 5.3335 0.333252C5.88578 0.333252 6.3335 0.780967 6.3335 1.33325Z",
|
|
1226
|
+
fill: color
|
|
1227
|
+
}
|
|
1228
|
+
),
|
|
1229
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1230
|
+
"path",
|
|
1231
|
+
{
|
|
1232
|
+
d: "M10.3335 1.33325C10.3335 1.88554 9.88578 2.33325 9.3335 2.33325C8.78121 2.33325 8.3335 1.88554 8.3335 1.33325C8.3335 0.780967 8.78121 0.333252 9.3335 0.333252C9.88578 0.333252 10.3335 0.780967 10.3335 1.33325Z",
|
|
1233
|
+
fill: color
|
|
1234
|
+
}
|
|
1235
|
+
)
|
|
1236
|
+
] });
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1186
1239
|
// src/hooks/useLayout.tsx
|
|
1187
1240
|
var import_react = require("react");
|
|
1188
1241
|
function useDownMd() {
|
|
@@ -1201,7 +1254,7 @@ function useDownMd() {
|
|
|
1201
1254
|
|
|
1202
1255
|
// src/ui/Overlay/index.tsx
|
|
1203
1256
|
var import_react2 = require("react");
|
|
1204
|
-
var
|
|
1257
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1205
1258
|
function Overlay({
|
|
1206
1259
|
isOpen = false,
|
|
1207
1260
|
children,
|
|
@@ -1217,7 +1270,7 @@ function Overlay({
|
|
|
1217
1270
|
document.body.style.overflow = "";
|
|
1218
1271
|
};
|
|
1219
1272
|
}, [isOpen]);
|
|
1220
|
-
return isOpen ? /* @__PURE__ */ (0,
|
|
1273
|
+
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
1221
1274
|
"div",
|
|
1222
1275
|
{
|
|
1223
1276
|
className: "matchid-overlay",
|
|
@@ -1226,11 +1279,11 @@ function Overlay({
|
|
|
1226
1279
|
},
|
|
1227
1280
|
children
|
|
1228
1281
|
}
|
|
1229
|
-
) : /* @__PURE__ */ (0,
|
|
1282
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, {});
|
|
1230
1283
|
}
|
|
1231
1284
|
|
|
1232
1285
|
// src/ui/Modal/index.tsx
|
|
1233
|
-
var
|
|
1286
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1234
1287
|
function Modal({
|
|
1235
1288
|
children,
|
|
1236
1289
|
isOpen,
|
|
@@ -1238,10 +1291,10 @@ function Modal({
|
|
|
1238
1291
|
zIndex = 100,
|
|
1239
1292
|
className = ""
|
|
1240
1293
|
}) {
|
|
1241
|
-
return /* @__PURE__ */ (0,
|
|
1294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: `matchid-modal ${className}`, style: {
|
|
1242
1295
|
width
|
|
1243
1296
|
}, children: [
|
|
1244
|
-
/* @__PURE__ */ (0,
|
|
1297
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "matchid-modal-mobile-header" }),
|
|
1245
1298
|
children
|
|
1246
1299
|
] }) });
|
|
1247
1300
|
}
|
|
@@ -1255,13 +1308,13 @@ function ModalWithHeader({
|
|
|
1255
1308
|
...props
|
|
1256
1309
|
}) {
|
|
1257
1310
|
const isDownMd = useDownMd();
|
|
1258
|
-
return /* @__PURE__ */ (0,
|
|
1259
|
-
/* @__PURE__ */ (0,
|
|
1260
|
-
/* @__PURE__ */ (0,
|
|
1261
|
-
onBack && /* @__PURE__ */ (0,
|
|
1262
|
-
/* @__PURE__ */ (0,
|
|
1311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Modal, { ...props, children: [
|
|
1312
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
|
|
1313
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "matchid-modal-header-content", children: [
|
|
1314
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
|
|
1315
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "matchid-modal-header-title", children: title })
|
|
1263
1316
|
] }),
|
|
1264
|
-
onClose && /* @__PURE__ */ (0,
|
|
1317
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
|
|
1265
1318
|
] }),
|
|
1266
1319
|
children
|
|
1267
1320
|
] });
|
|
@@ -1272,7 +1325,7 @@ var import_react4 = require("react");
|
|
|
1272
1325
|
|
|
1273
1326
|
// src/utils/index.tsx
|
|
1274
1327
|
var import_moment = __toESM(require("moment"));
|
|
1275
|
-
var
|
|
1328
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1276
1329
|
var getVersion = () => {
|
|
1277
1330
|
return "0.0.2";
|
|
1278
1331
|
};
|
|
@@ -1285,12 +1338,12 @@ var isValidEmail = (email) => {
|
|
|
1285
1338
|
var isValidUsername = (username) => {
|
|
1286
1339
|
return /^[a-zA-Z0-9_-]+$/.test(username);
|
|
1287
1340
|
};
|
|
1288
|
-
function truncateAddress(address) {
|
|
1289
|
-
if (address.length <=
|
|
1341
|
+
function truncateAddress(address, startLen = 4, endLen = 4) {
|
|
1342
|
+
if (address.length <= startLen + endLen) {
|
|
1290
1343
|
return address;
|
|
1291
1344
|
}
|
|
1292
|
-
const start = address.slice(0,
|
|
1293
|
-
const end = address.slice(-
|
|
1345
|
+
const start = address.slice(0, startLen);
|
|
1346
|
+
const end = address.slice(-endLen);
|
|
1294
1347
|
return `${start}...${end}`;
|
|
1295
1348
|
}
|
|
1296
1349
|
function getAppClientId() {
|
|
@@ -1318,10 +1371,10 @@ var NumberFormatter = ({
|
|
|
1318
1371
|
const [intPart, decimalPart] = numberValue.toString().split(".");
|
|
1319
1372
|
const intFormat = separator ? intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : intPart;
|
|
1320
1373
|
if (Math.abs(parseFloat(numberValue)) >= 1) {
|
|
1321
|
-
return /* @__PURE__ */ (0,
|
|
1322
|
-
prefix && /* @__PURE__ */ (0,
|
|
1323
|
-
/* @__PURE__ */ (0,
|
|
1324
|
-
decimalPart ? /* @__PURE__ */ (0,
|
|
1374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className, children: [
|
|
1375
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
1376
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: intClassName, children: intFormat }),
|
|
1377
|
+
decimalPart ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: decimalClassName, children: [
|
|
1325
1378
|
".",
|
|
1326
1379
|
decimalPart.substring(0, fixNum)
|
|
1327
1380
|
] }) : "",
|
|
@@ -1338,30 +1391,30 @@ var NumberFormatter = ({
|
|
|
1338
1391
|
}
|
|
1339
1392
|
}
|
|
1340
1393
|
if (zeroCount < tFixNum) {
|
|
1341
|
-
return /* @__PURE__ */ (0,
|
|
1342
|
-
prefix && /* @__PURE__ */ (0,
|
|
1343
|
-
/* @__PURE__ */ (0,
|
|
1344
|
-
/* @__PURE__ */ (0,
|
|
1394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className, children: [
|
|
1395
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
1396
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: intClassName, children: intFormat }),
|
|
1397
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: decimalClassName, children: [
|
|
1345
1398
|
".",
|
|
1346
1399
|
decimalPart.substring(0, tFixNum)
|
|
1347
1400
|
] }),
|
|
1348
1401
|
suffix
|
|
1349
1402
|
] });
|
|
1350
1403
|
}
|
|
1351
|
-
return /* @__PURE__ */ (0,
|
|
1352
|
-
prefix && /* @__PURE__ */ (0,
|
|
1353
|
-
/* @__PURE__ */ (0,
|
|
1354
|
-
/* @__PURE__ */ (0,
|
|
1404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className, children: [
|
|
1405
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
1406
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: intClassName, children: intFormat }),
|
|
1407
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: decimalClassName, children: [
|
|
1355
1408
|
".0",
|
|
1356
|
-
/* @__PURE__ */ (0,
|
|
1409
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("sub", { children: zeroCount }),
|
|
1357
1410
|
decimalPart?.substring(zeroCount, zeroCount + tFixNum - 2)
|
|
1358
1411
|
] }),
|
|
1359
1412
|
suffix
|
|
1360
1413
|
] });
|
|
1361
1414
|
}
|
|
1362
|
-
return /* @__PURE__ */ (0,
|
|
1363
|
-
prefix && /* @__PURE__ */ (0,
|
|
1364
|
-
/* @__PURE__ */ (0,
|
|
1415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className, children: [
|
|
1416
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
1417
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: intClassName, children: intPart }),
|
|
1365
1418
|
suffix
|
|
1366
1419
|
] });
|
|
1367
1420
|
};
|
|
@@ -1377,9 +1430,13 @@ var formatDate = (value, formatString = "YYYY-MM-DD HH:mm:ss") => {
|
|
|
1377
1430
|
var isInTgApp = () => {
|
|
1378
1431
|
return !!window.TelegramWebviewProxy;
|
|
1379
1432
|
};
|
|
1433
|
+
function bytesToBase64(bytes) {
|
|
1434
|
+
const binString = String.fromCodePoint(...bytes);
|
|
1435
|
+
return btoa(binString);
|
|
1436
|
+
}
|
|
1380
1437
|
|
|
1381
1438
|
// src/ui/Button/index.tsx
|
|
1382
|
-
var
|
|
1439
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
1383
1440
|
function Button({
|
|
1384
1441
|
size = "df",
|
|
1385
1442
|
disabled = false,
|
|
@@ -1398,7 +1455,7 @@ function Button({
|
|
|
1398
1455
|
onClick && onClick();
|
|
1399
1456
|
}
|
|
1400
1457
|
};
|
|
1401
|
-
return /* @__PURE__ */ (0,
|
|
1458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
1402
1459
|
"button",
|
|
1403
1460
|
{
|
|
1404
1461
|
type,
|
|
@@ -1408,14 +1465,14 @@ function Button({
|
|
|
1408
1465
|
...style
|
|
1409
1466
|
},
|
|
1410
1467
|
onClick: onAction,
|
|
1411
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
1468
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
|
|
1412
1469
|
}
|
|
1413
1470
|
);
|
|
1414
1471
|
}
|
|
1415
1472
|
|
|
1416
1473
|
// src/ui/Input/index.tsx
|
|
1417
1474
|
var import_react3 = require("react");
|
|
1418
|
-
var
|
|
1475
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1419
1476
|
function Input({
|
|
1420
1477
|
onChange,
|
|
1421
1478
|
type,
|
|
@@ -1425,17 +1482,17 @@ function Input({
|
|
|
1425
1482
|
}) {
|
|
1426
1483
|
const [inputType, setInputType] = (0, import_react3.useState)(type);
|
|
1427
1484
|
const isDownMd = useDownMd();
|
|
1428
|
-
return /* @__PURE__ */ (0,
|
|
1485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
1429
1486
|
"div",
|
|
1430
1487
|
{
|
|
1431
1488
|
className: `matchid-input-box ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
1432
1489
|
children: [
|
|
1433
|
-
/* @__PURE__ */ (0,
|
|
1434
|
-
props.value && props.value.length > 0 && /* @__PURE__ */ (0,
|
|
1490
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" }),
|
|
1491
|
+
props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
|
|
1435
1492
|
if (onChange) {
|
|
1436
1493
|
onChange({ target: { value: "" } });
|
|
1437
1494
|
}
|
|
1438
|
-
}, children: /* @__PURE__ */ (0,
|
|
1495
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
1439
1496
|
DeleteRoundIcon,
|
|
1440
1497
|
{
|
|
1441
1498
|
height: isDownMd ? 16 : 21,
|
|
@@ -1443,9 +1500,9 @@ function Input({
|
|
|
1443
1500
|
color: "var(--matchid-input-delete-icon-color)"
|
|
1444
1501
|
}
|
|
1445
1502
|
) }),
|
|
1446
|
-
type === "password" && /* @__PURE__ */ (0,
|
|
1503
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
|
|
1447
1504
|
setInputType(inputType === "password" ? "text" : "password");
|
|
1448
|
-
}, children: inputType === "password" ? /* @__PURE__ */ (0,
|
|
1505
|
+
}, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
|
|
1449
1506
|
after
|
|
1450
1507
|
]
|
|
1451
1508
|
}
|
|
@@ -1453,7 +1510,7 @@ function Input({
|
|
|
1453
1510
|
}
|
|
1454
1511
|
|
|
1455
1512
|
// src/ui/Field/index.tsx
|
|
1456
|
-
var
|
|
1513
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
1457
1514
|
function Field({
|
|
1458
1515
|
label,
|
|
1459
1516
|
children,
|
|
@@ -1461,19 +1518,19 @@ function Field({
|
|
|
1461
1518
|
required,
|
|
1462
1519
|
className = ""
|
|
1463
1520
|
}) {
|
|
1464
|
-
return /* @__PURE__ */ (0,
|
|
1465
|
-
/* @__PURE__ */ (0,
|
|
1466
|
-
required && /* @__PURE__ */ (0,
|
|
1521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
|
|
1522
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "matchid-field-label", children: [
|
|
1523
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "matchid-field-required", children: "*" }),
|
|
1467
1524
|
label
|
|
1468
1525
|
] }),
|
|
1469
1526
|
children,
|
|
1470
|
-
error && /* @__PURE__ */ (0,
|
|
1527
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "matchid-field-error", children: error })
|
|
1471
1528
|
] });
|
|
1472
1529
|
}
|
|
1473
1530
|
|
|
1474
1531
|
// src/components/EmailModal/StepEmail.tsx
|
|
1475
1532
|
var import_react_intl = require("react-intl");
|
|
1476
|
-
var
|
|
1533
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
1477
1534
|
function StepEmail(props) {
|
|
1478
1535
|
const intl = (0, import_react_intl.useIntl)();
|
|
1479
1536
|
const [emailVal, setEmailVal] = (0, import_react4.useState)("");
|
|
@@ -1488,10 +1545,10 @@ function StepEmail(props) {
|
|
|
1488
1545
|
const onContinue = async () => {
|
|
1489
1546
|
props.onContinue(emailVal);
|
|
1490
1547
|
};
|
|
1491
|
-
return /* @__PURE__ */ (0,
|
|
1492
|
-
/* @__PURE__ */ (0,
|
|
1548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "matchid-email-email-box", children: [
|
|
1549
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Field, { label: intl.formatMessage({
|
|
1493
1550
|
id: "emailAddress"
|
|
1494
|
-
}), children: /* @__PURE__ */ (0,
|
|
1551
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1495
1552
|
Input,
|
|
1496
1553
|
{
|
|
1497
1554
|
placeholder: intl.formatMessage({
|
|
@@ -1501,9 +1558,9 @@ function StepEmail(props) {
|
|
|
1501
1558
|
value: emailVal
|
|
1502
1559
|
}
|
|
1503
1560
|
) }),
|
|
1504
|
-
/* @__PURE__ */ (0,
|
|
1561
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button, { disabled: !canContinue, style: {
|
|
1505
1562
|
marginTop: "64px"
|
|
1506
|
-
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
1563
|
+
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react_intl.FormattedMessage, { id: "continue" }) })
|
|
1507
1564
|
] });
|
|
1508
1565
|
}
|
|
1509
1566
|
|
|
@@ -1801,6 +1858,54 @@ var tgAppLoginInitApi = () => {
|
|
|
1801
1858
|
method: "GET"
|
|
1802
1859
|
});
|
|
1803
1860
|
};
|
|
1861
|
+
var getContactListApi = (data) => {
|
|
1862
|
+
return request_default({
|
|
1863
|
+
url: `/api/v1/contacts/list`,
|
|
1864
|
+
method: "POST",
|
|
1865
|
+
data
|
|
1866
|
+
});
|
|
1867
|
+
};
|
|
1868
|
+
var searchContactsApi = (data) => {
|
|
1869
|
+
return request_default({
|
|
1870
|
+
url: `/api/v1/contacts/search`,
|
|
1871
|
+
method: "POST",
|
|
1872
|
+
data
|
|
1873
|
+
});
|
|
1874
|
+
};
|
|
1875
|
+
var addContactsApi = (data) => {
|
|
1876
|
+
return request_default({
|
|
1877
|
+
url: `/api/v1/contacts/add`,
|
|
1878
|
+
method: "POST",
|
|
1879
|
+
data
|
|
1880
|
+
});
|
|
1881
|
+
};
|
|
1882
|
+
var acceptContactsApi = (data) => {
|
|
1883
|
+
return request_default({
|
|
1884
|
+
url: `/api/v1/contacts/accept`,
|
|
1885
|
+
method: "POST",
|
|
1886
|
+
data
|
|
1887
|
+
});
|
|
1888
|
+
};
|
|
1889
|
+
var delContactsApi = (data) => {
|
|
1890
|
+
return request_default({
|
|
1891
|
+
url: `/api/v1/contacts/del`,
|
|
1892
|
+
method: "POST",
|
|
1893
|
+
data
|
|
1894
|
+
});
|
|
1895
|
+
};
|
|
1896
|
+
var getContractsInfoApi = () => {
|
|
1897
|
+
return retryRequest({
|
|
1898
|
+
url: `/api/v1/contacts/info`,
|
|
1899
|
+
method: "GET"
|
|
1900
|
+
});
|
|
1901
|
+
};
|
|
1902
|
+
var userInviteApi = (data) => {
|
|
1903
|
+
return request_default({
|
|
1904
|
+
url: `/api/v1/user/invite`,
|
|
1905
|
+
method: "POST",
|
|
1906
|
+
data
|
|
1907
|
+
});
|
|
1908
|
+
};
|
|
1804
1909
|
|
|
1805
1910
|
// src/store/useLocalStore.ts
|
|
1806
1911
|
var persistedState = (0, import_middleware.persist)(
|
|
@@ -1915,11 +2020,11 @@ var import_react10 = require("react");
|
|
|
1915
2020
|
var import_viem4 = require("viem");
|
|
1916
2021
|
|
|
1917
2022
|
// src/context/ModalContext.tsx
|
|
1918
|
-
var import_react9 = require("react");
|
|
2023
|
+
var import_react9 = __toESM(require("react"));
|
|
1919
2024
|
var import_react_dom = require("react-dom");
|
|
1920
2025
|
|
|
1921
2026
|
// src/ui/Drawer/index.tsx
|
|
1922
|
-
var
|
|
2027
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
1923
2028
|
function Drawer({
|
|
1924
2029
|
children,
|
|
1925
2030
|
showClose = true,
|
|
@@ -1930,15 +2035,15 @@ function Drawer({
|
|
|
1930
2035
|
onBack
|
|
1931
2036
|
}) {
|
|
1932
2037
|
if (!isOpen) {
|
|
1933
|
-
return /* @__PURE__ */ (0,
|
|
2038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, {});
|
|
1934
2039
|
}
|
|
1935
|
-
return /* @__PURE__ */ (0,
|
|
1936
|
-
/* @__PURE__ */ (0,
|
|
1937
|
-
/* @__PURE__ */ (0,
|
|
1938
|
-
onBack && /* @__PURE__ */ (0,
|
|
2040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "matchid-drawer", children: [
|
|
2041
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: `matchid-drawer-header matchid-flex`, children: [
|
|
2042
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: `matchid-drawer-header-content matchid-flex`, children: [
|
|
2043
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ArrowLeftIcon, { height: 25, width: 24, className: "matchid-drawer-header-back", onClick: onBack }),
|
|
1939
2044
|
title
|
|
1940
2045
|
] }),
|
|
1941
|
-
showClose && /* @__PURE__ */ (0,
|
|
2046
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
|
|
1942
2047
|
] }),
|
|
1943
2048
|
children
|
|
1944
2049
|
] }) });
|
|
@@ -1948,7 +2053,7 @@ function Drawer({
|
|
|
1948
2053
|
var import_react6 = require("react");
|
|
1949
2054
|
|
|
1950
2055
|
// src/ui/ModalDrawer/index.tsx
|
|
1951
|
-
var
|
|
2056
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
1952
2057
|
function ModalDrawer({
|
|
1953
2058
|
title,
|
|
1954
2059
|
drawerTitleVisible = true,
|
|
@@ -1956,9 +2061,9 @@ function ModalDrawer({
|
|
|
1956
2061
|
}) {
|
|
1957
2062
|
const isDownMd = useDownMd();
|
|
1958
2063
|
if (isDownMd) {
|
|
1959
|
-
return /* @__PURE__ */ (0,
|
|
2064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ModalWithHeader, { ...props, title });
|
|
1960
2065
|
}
|
|
1961
|
-
return /* @__PURE__ */ (0,
|
|
2066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
|
|
1962
2067
|
}
|
|
1963
2068
|
|
|
1964
2069
|
// src/assets/img/confirm.gif
|
|
@@ -2014,7 +2119,7 @@ function useHash({
|
|
|
2014
2119
|
}
|
|
2015
2120
|
|
|
2016
2121
|
// src/ui/HashPanel/index.tsx
|
|
2017
|
-
var
|
|
2122
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2018
2123
|
function HashPanel({
|
|
2019
2124
|
hash,
|
|
2020
2125
|
chain,
|
|
@@ -2073,14 +2178,14 @@ function HashPanel({
|
|
|
2073
2178
|
}
|
|
2074
2179
|
}, [hashQuery.data]);
|
|
2075
2180
|
const link = chain ? `${chain?.blockExplorers?.default.url}/tx/${hash}` : "";
|
|
2076
|
-
return /* @__PURE__ */ (0,
|
|
2181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2077
2182
|
ModalDrawer,
|
|
2078
2183
|
{
|
|
2079
2184
|
isOpen,
|
|
2080
2185
|
showClose: true,
|
|
2081
2186
|
onClose,
|
|
2082
2187
|
zIndex,
|
|
2083
|
-
title: /* @__PURE__ */ (0,
|
|
2188
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2084
2189
|
"div",
|
|
2085
2190
|
{
|
|
2086
2191
|
className: "matchid-hashpanel-header",
|
|
@@ -2090,29 +2195,29 @@ function HashPanel({
|
|
|
2090
2195
|
children: statusValue.text
|
|
2091
2196
|
}
|
|
2092
2197
|
),
|
|
2093
|
-
children: /* @__PURE__ */ (0,
|
|
2094
|
-
/* @__PURE__ */ (0,
|
|
2095
|
-
/* @__PURE__ */ (0,
|
|
2198
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "matchid-hashpanel-box", children: [
|
|
2199
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "matchid-hashpanel-content", children: [
|
|
2200
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: `matchid-hashpanel-status`, style: {
|
|
2096
2201
|
color: statusValue.color
|
|
2097
2202
|
}, children: statusValue.text }),
|
|
2098
|
-
/* @__PURE__ */ (0,
|
|
2099
|
-
hash && /* @__PURE__ */ (0,
|
|
2203
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("img", { src: statusValue.icon, alt: statusValue.text, className: `matchid-hashpanel-img` }),
|
|
2204
|
+
hash && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
|
|
2100
2205
|
"Hash:",
|
|
2101
|
-
/* @__PURE__ */ (0,
|
|
2206
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("a", { href: link, target: "_blank", children: hash })
|
|
2102
2207
|
] })
|
|
2103
2208
|
] }),
|
|
2104
|
-
/* @__PURE__ */ (0,
|
|
2209
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
|
|
2105
2210
|
] })
|
|
2106
2211
|
}
|
|
2107
2212
|
);
|
|
2108
2213
|
}
|
|
2109
2214
|
function HashPanel_default(props) {
|
|
2110
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
2215
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HashPanel, { ...props });
|
|
2111
2216
|
}
|
|
2112
2217
|
|
|
2113
2218
|
// src/ui/Popover/index.tsx
|
|
2114
2219
|
var import_react7 = require("react");
|
|
2115
|
-
var
|
|
2220
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2116
2221
|
function Popover({
|
|
2117
2222
|
children,
|
|
2118
2223
|
content,
|
|
@@ -2122,7 +2227,7 @@ function Popover({
|
|
|
2122
2227
|
gap = "20px"
|
|
2123
2228
|
}) {
|
|
2124
2229
|
const [active, setActive] = (0, import_react7.useState)(false);
|
|
2125
|
-
return children && /* @__PURE__ */ (0,
|
|
2230
|
+
return children && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
2126
2231
|
"div",
|
|
2127
2232
|
{
|
|
2128
2233
|
onClick: () => {
|
|
@@ -2133,20 +2238,20 @@ function Popover({
|
|
|
2133
2238
|
className: `matchid-popover-box matchid-popover-${position} matchid-popover-${type} ${className} ${type == "click" && active ? "matchid-popover-click-active" : ""}`,
|
|
2134
2239
|
children: [
|
|
2135
2240
|
children,
|
|
2136
|
-
/* @__PURE__ */ (0,
|
|
2241
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { style: {
|
|
2137
2242
|
paddingTop: gap
|
|
2138
|
-
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0,
|
|
2243
|
+
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: `matchid-popover-content`, children: content }) })
|
|
2139
2244
|
]
|
|
2140
2245
|
}
|
|
2141
2246
|
);
|
|
2142
2247
|
}
|
|
2143
2248
|
|
|
2144
2249
|
// src/ui/Switch/index.tsx
|
|
2145
|
-
var
|
|
2250
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2146
2251
|
|
|
2147
2252
|
// src/ui/AlphaAvatar/index.tsx
|
|
2148
2253
|
var import_react8 = require("react");
|
|
2149
|
-
var
|
|
2254
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2150
2255
|
function AlphaAvatar({
|
|
2151
2256
|
name,
|
|
2152
2257
|
size = "default",
|
|
@@ -2163,7 +2268,7 @@ function AlphaAvatar({
|
|
|
2163
2268
|
return "";
|
|
2164
2269
|
}, [name]);
|
|
2165
2270
|
const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
|
|
2166
|
-
return /* @__PURE__ */ (0,
|
|
2271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
2167
2272
|
width: numberSize,
|
|
2168
2273
|
height: numberSize,
|
|
2169
2274
|
fontSize: Math.ceil(numberSize / 2),
|
|
@@ -2172,7 +2277,7 @@ function AlphaAvatar({
|
|
|
2172
2277
|
}
|
|
2173
2278
|
|
|
2174
2279
|
// src/ui/Radio/index.tsx
|
|
2175
|
-
var
|
|
2280
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2176
2281
|
function Radio({
|
|
2177
2282
|
checked = false,
|
|
2178
2283
|
onChange,
|
|
@@ -2181,20 +2286,53 @@ function Radio({
|
|
|
2181
2286
|
className = "",
|
|
2182
2287
|
style = {}
|
|
2183
2288
|
}) {
|
|
2184
|
-
return /* @__PURE__ */ (0,
|
|
2289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
|
|
2185
2290
|
width: size,
|
|
2186
2291
|
height: size,
|
|
2187
2292
|
...style,
|
|
2188
2293
|
// @ts-ignore
|
|
2189
2294
|
"--matchid-radio-checked": color
|
|
2190
|
-
}, children: checked && /* @__PURE__ */ (0,
|
|
2295
|
+
}, children: checked && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: `matchid-radio-content`, style: {
|
|
2191
2296
|
width: Math.floor(size * 0.7),
|
|
2192
2297
|
height: Math.floor(size * 0.7)
|
|
2193
2298
|
} }) });
|
|
2194
2299
|
}
|
|
2195
2300
|
|
|
2301
|
+
// src/ui/Skeleton/index.tsx
|
|
2302
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2303
|
+
var Skeleton = ({
|
|
2304
|
+
style = {},
|
|
2305
|
+
className = "",
|
|
2306
|
+
width = 40,
|
|
2307
|
+
height = 40,
|
|
2308
|
+
radius = 5,
|
|
2309
|
+
loading = true,
|
|
2310
|
+
children
|
|
2311
|
+
}) => {
|
|
2312
|
+
if (!loading) {
|
|
2313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_jsx_runtime65.Fragment, { children });
|
|
2314
|
+
}
|
|
2315
|
+
const skeletonStyle = {
|
|
2316
|
+
width,
|
|
2317
|
+
height,
|
|
2318
|
+
borderRadius: radius,
|
|
2319
|
+
...style
|
|
2320
|
+
};
|
|
2321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2322
|
+
"div",
|
|
2323
|
+
{
|
|
2324
|
+
className: "matchid-skeleton " + className,
|
|
2325
|
+
style: skeletonStyle
|
|
2326
|
+
}
|
|
2327
|
+
);
|
|
2328
|
+
};
|
|
2329
|
+
var Skeleton_default = Skeleton;
|
|
2330
|
+
|
|
2331
|
+
// src/ui/Tabs/index.tsx
|
|
2332
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2333
|
+
|
|
2196
2334
|
// src/context/ModalContext.tsx
|
|
2197
|
-
var
|
|
2335
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2198
2336
|
var ModalContext = (0, import_react9.createContext)(null);
|
|
2199
2337
|
function useModal() {
|
|
2200
2338
|
const context = (0, import_react9.useContext)(ModalContext);
|
|
@@ -2235,7 +2373,7 @@ var useTransactionStore = (0, import_zustand3.create)((0, import_middleware2.dev
|
|
|
2235
2373
|
var useTransactionStore_default = useTransactionStore;
|
|
2236
2374
|
|
|
2237
2375
|
// src/hooks/useWallet.tsx
|
|
2238
|
-
var
|
|
2376
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2239
2377
|
var AppClientId = "react-sdk-" + getVersion();
|
|
2240
2378
|
function useWallet() {
|
|
2241
2379
|
const { address, wallet: walletConfig } = useLocalStore_default();
|
|
@@ -2408,7 +2546,7 @@ function useWallet() {
|
|
|
2408
2546
|
address: evmAccount.address
|
|
2409
2547
|
});
|
|
2410
2548
|
modal.show((props) => {
|
|
2411
|
-
return /* @__PURE__ */ (0,
|
|
2549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
|
|
2412
2550
|
});
|
|
2413
2551
|
clearInterval(window.matchProvider.transactionMessageIntervalMap[transactionId].interval);
|
|
2414
2552
|
delete window.matchProvider.transactionMessageIntervalMap[transactionId];
|
|
@@ -2485,8 +2623,15 @@ function useCopyClipboard(timeout = 500) {
|
|
|
2485
2623
|
// src/context/ToastContext.tsx
|
|
2486
2624
|
var import_react12 = require("react");
|
|
2487
2625
|
var import_react_dom2 = require("react-dom");
|
|
2488
|
-
var
|
|
2626
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2489
2627
|
var ToastContext = (0, import_react12.createContext)(null);
|
|
2628
|
+
function useToast() {
|
|
2629
|
+
const context = (0, import_react12.useContext)(ToastContext);
|
|
2630
|
+
if (!context) {
|
|
2631
|
+
throw new Error("useToast must be used within a ToastProvider");
|
|
2632
|
+
}
|
|
2633
|
+
return context;
|
|
2634
|
+
}
|
|
2490
2635
|
|
|
2491
2636
|
// src/hooks/api/wallet.ts
|
|
2492
2637
|
var import_react_query2 = require("@tanstack/react-query");
|
|
@@ -2547,7 +2692,7 @@ function useImportTokenListQuery({
|
|
|
2547
2692
|
var import_react13 = require("react");
|
|
2548
2693
|
var import_viem5 = require("viem");
|
|
2549
2694
|
var import_react_intl2 = require("react-intl");
|
|
2550
|
-
var
|
|
2695
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2551
2696
|
function useMatchChain() {
|
|
2552
2697
|
const chainListQuery = useChainListQuery();
|
|
2553
2698
|
const modal = useModal();
|
|
@@ -2578,28 +2723,28 @@ function useMatchChain() {
|
|
|
2578
2723
|
const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
|
|
2579
2724
|
const [selectedChainId, setSelectedChainId] = (0, import_react13.useState)(storeChainId2);
|
|
2580
2725
|
const isDownMd = useDownMd();
|
|
2581
|
-
return /* @__PURE__ */ (0,
|
|
2582
|
-
/* @__PURE__ */ (0,
|
|
2583
|
-
return /* @__PURE__ */ (0,
|
|
2726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: `matchid-change-network-box`, children: [
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
|
|
2728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
2584
2729
|
"div",
|
|
2585
2730
|
{
|
|
2586
2731
|
onClick: () => setSelectedChainId(item.id),
|
|
2587
2732
|
className: `matchid-change-network-item ${selectedChainId == item.id ? "matchid-change-network-selected" : ""}`,
|
|
2588
2733
|
children: [
|
|
2589
|
-
/* @__PURE__ */ (0,
|
|
2590
|
-
/* @__PURE__ */ (0,
|
|
2591
|
-
/* @__PURE__ */ (0,
|
|
2734
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
|
|
2735
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
|
|
2736
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
|
|
2592
2737
|
] }),
|
|
2593
|
-
/* @__PURE__ */ (0,
|
|
2738
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
|
|
2594
2739
|
]
|
|
2595
2740
|
},
|
|
2596
2741
|
index
|
|
2597
2742
|
);
|
|
2598
2743
|
}) }),
|
|
2599
|
-
/* @__PURE__ */ (0,
|
|
2744
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
|
|
2600
2745
|
setChainId2(selectedChainId || 0);
|
|
2601
2746
|
close();
|
|
2602
|
-
}, block: true, children: /* @__PURE__ */ (0,
|
|
2747
|
+
}, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react_intl2.FormattedMessage, { id: "confirm" }) })
|
|
2603
2748
|
] });
|
|
2604
2749
|
}
|
|
2605
2750
|
const showChangeNetwork = () => {
|
|
@@ -2717,10 +2862,10 @@ var import_viem6 = require("viem");
|
|
|
2717
2862
|
var import_react_query3 = require("@tanstack/react-query");
|
|
2718
2863
|
|
|
2719
2864
|
// src/components/ImportToken/index.tsx
|
|
2720
|
-
var
|
|
2865
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
2721
2866
|
|
|
2722
2867
|
// src/hooks/useMatchWallet.tsx
|
|
2723
|
-
var
|
|
2868
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
2724
2869
|
function useMatchWalletRecords() {
|
|
2725
2870
|
const [hasMore, setHasMore] = (0, import_react15.useState)(true);
|
|
2726
2871
|
const [items, setItems] = (0, import_react15.useState)([]);
|
|
@@ -3029,39 +3174,39 @@ var CACHE_TTL2 = 86400 * 30 * 1e3;
|
|
|
3029
3174
|
var import_zustand5 = require("zustand");
|
|
3030
3175
|
|
|
3031
3176
|
// src/hooks/useConfig.tsx
|
|
3032
|
-
var
|
|
3177
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3033
3178
|
var DEFAULT_WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
3034
3179
|
var WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
3035
3180
|
function useWalletConfig() {
|
|
3036
3181
|
const isDownMd = useDownMd();
|
|
3037
3182
|
const walletMap = {
|
|
3038
3183
|
evm: {
|
|
3039
|
-
icon: /* @__PURE__ */ (0,
|
|
3040
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3184
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(EVMDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3185
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(EVMLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3041
3186
|
name: "EVM",
|
|
3042
3187
|
method: "evm"
|
|
3043
3188
|
},
|
|
3044
3189
|
sol: {
|
|
3045
|
-
icon: /* @__PURE__ */ (0,
|
|
3046
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3190
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(SOLDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3191
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(SOLLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3047
3192
|
name: "SOL",
|
|
3048
3193
|
method: "sol"
|
|
3049
3194
|
},
|
|
3050
3195
|
btc: {
|
|
3051
|
-
icon: /* @__PURE__ */ (0,
|
|
3052
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3196
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(BTCDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3197
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(BTCLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3053
3198
|
name: "BTC",
|
|
3054
3199
|
method: "btc"
|
|
3055
3200
|
},
|
|
3056
3201
|
tron: {
|
|
3057
|
-
icon: /* @__PURE__ */ (0,
|
|
3058
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3202
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TRXDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
3203
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TRXLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3059
3204
|
name: "TRON",
|
|
3060
3205
|
method: "tron"
|
|
3061
3206
|
},
|
|
3062
3207
|
ton: {
|
|
3063
|
-
icon: /* @__PURE__ */ (0,
|
|
3064
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
3208
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TonLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
3209
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TonLightIcon2, { size: isDownMd ? 36 : 40 }),
|
|
3065
3210
|
name: "TON",
|
|
3066
3211
|
method: "ton"
|
|
3067
3212
|
}
|
|
@@ -3090,6 +3235,12 @@ var useBTCModalStore = (0, import_zustand5.create)((set) => ({
|
|
|
3090
3235
|
open: (type) => set({ isOpen: true, type }),
|
|
3091
3236
|
close: () => set({ isOpen: false })
|
|
3092
3237
|
}));
|
|
3238
|
+
var useEVMModalStore = (0, import_zustand5.create)((set) => ({
|
|
3239
|
+
isOpen: false,
|
|
3240
|
+
type: "",
|
|
3241
|
+
open: (type) => set({ isOpen: true, type }),
|
|
3242
|
+
close: () => set({ isOpen: false })
|
|
3243
|
+
}));
|
|
3093
3244
|
var useCEXBindModalStore = (0, import_zustand5.create)((set) => ({
|
|
3094
3245
|
type: "",
|
|
3095
3246
|
isOpen: false,
|
|
@@ -3107,14 +3258,14 @@ var useWalletModalStore = (0, import_zustand5.create)((set) => ({
|
|
|
3107
3258
|
// src/components/CEXBindModal/index.tsx
|
|
3108
3259
|
var import_react18 = require("react");
|
|
3109
3260
|
var import_react_intl5 = require("react-intl");
|
|
3110
|
-
var
|
|
3261
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3111
3262
|
|
|
3112
3263
|
// src/context/BusinessProvider.tsx
|
|
3113
3264
|
var import_react_query8 = require("@tanstack/react-query");
|
|
3114
|
-
var
|
|
3265
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
3115
3266
|
|
|
3116
3267
|
// src/context/index.tsx
|
|
3117
|
-
var
|
|
3268
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
3118
3269
|
|
|
3119
3270
|
// src/hooks/useWalletInit.ts
|
|
3120
3271
|
var import_react19 = require("react");
|
|
@@ -3126,8 +3277,93 @@ var import_react20 = require("react");
|
|
|
3126
3277
|
// src/MatchContext.tsx
|
|
3127
3278
|
var import_react_query9 = require("@tanstack/react-query");
|
|
3128
3279
|
var import_react_intl6 = require("react-intl");
|
|
3129
|
-
var
|
|
3280
|
+
var import_rainbowkit = require("@rainbow-me/rainbowkit");
|
|
3281
|
+
var import_wallets = require("@rainbow-me/rainbowkit/wallets");
|
|
3282
|
+
var import_chains = require("wagmi/chains");
|
|
3283
|
+
|
|
3284
|
+
// src/config/chains/MatchMain.ts
|
|
3285
|
+
var import_viem11 = require("viem");
|
|
3286
|
+
var matchMain = /* @__PURE__ */ (0, import_viem11.defineChain)({
|
|
3287
|
+
//定义match链
|
|
3288
|
+
id: 698,
|
|
3289
|
+
name: "Matchain",
|
|
3290
|
+
nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
|
|
3291
|
+
rpcUrls: {
|
|
3292
|
+
default: {
|
|
3293
|
+
http: ["https://rpc.matchain.io"]
|
|
3294
|
+
}
|
|
3295
|
+
},
|
|
3296
|
+
blockExplorers: {
|
|
3297
|
+
default: {
|
|
3298
|
+
name: "Matchscan",
|
|
3299
|
+
url: "https://matchscan.io/",
|
|
3300
|
+
apiUrl: "https://matchscan.io/api"
|
|
3301
|
+
}
|
|
3302
|
+
},
|
|
3303
|
+
iconUrl: "https://matchscan.io/static/identicon_logos/blockies.png",
|
|
3304
|
+
contracts: {
|
|
3305
|
+
multicall3: {
|
|
3306
|
+
address: "0xca11bde05977b3631167028862be2a173976ca11"
|
|
3307
|
+
}
|
|
3308
|
+
}
|
|
3309
|
+
// testnet: true,
|
|
3310
|
+
});
|
|
3311
|
+
|
|
3312
|
+
// src/config/chains/MatchTest.ts
|
|
3313
|
+
var import_viem12 = require("viem");
|
|
3314
|
+
var matchTest = /* @__PURE__ */ (0, import_viem12.defineChain)({
|
|
3315
|
+
//定义matchTest链
|
|
3316
|
+
id: 699,
|
|
3317
|
+
name: "MatchTest",
|
|
3318
|
+
nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
|
|
3319
|
+
rpcUrls: {
|
|
3320
|
+
default: {
|
|
3321
|
+
http: ["https://testnet-rpc.matchain.io"]
|
|
3322
|
+
}
|
|
3323
|
+
},
|
|
3324
|
+
blockExplorers: {
|
|
3325
|
+
default: {
|
|
3326
|
+
name: "Matchscan",
|
|
3327
|
+
url: "https://testnet.matchscan.io/",
|
|
3328
|
+
apiUrl: "https://testnet.matchscan.io/api"
|
|
3329
|
+
}
|
|
3330
|
+
},
|
|
3331
|
+
iconUrl: "https://testnet.matchscan.io/static/identicon_logos/blockies.png",
|
|
3332
|
+
contracts: {
|
|
3333
|
+
multicall3: {
|
|
3334
|
+
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
3335
|
+
blockCreated: 751532
|
|
3336
|
+
},
|
|
3337
|
+
ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
|
|
3338
|
+
ensUniversalResolver: {
|
|
3339
|
+
address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",
|
|
3340
|
+
blockCreated: 5317080
|
|
3341
|
+
}
|
|
3342
|
+
}
|
|
3343
|
+
// testnet: true,
|
|
3344
|
+
});
|
|
3345
|
+
|
|
3346
|
+
// src/MatchContext.tsx
|
|
3347
|
+
var import_wagmi = require("wagmi");
|
|
3348
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
3130
3349
|
var queryClient = new import_react_query9.QueryClient();
|
|
3350
|
+
var wagmiConfig = (0, import_rainbowkit.getDefaultConfig)({
|
|
3351
|
+
appName: "MatchID",
|
|
3352
|
+
projectId: "9ac6ea7e07860f04616fb311b447dee9",
|
|
3353
|
+
wallets: [
|
|
3354
|
+
{
|
|
3355
|
+
groupName: "Recommended",
|
|
3356
|
+
wallets: [
|
|
3357
|
+
import_wallets.metaMaskWallet,
|
|
3358
|
+
import_wallets.walletConnectWallet,
|
|
3359
|
+
import_wallets.okxWallet,
|
|
3360
|
+
import_wallets.bitgetWallet,
|
|
3361
|
+
import_wallets.injectedWallet
|
|
3362
|
+
]
|
|
3363
|
+
}
|
|
3364
|
+
],
|
|
3365
|
+
chains: [import_chains.mainnet, import_chains.polygon, import_chains.optimism, import_chains.arbitrum, import_chains.base, matchMain, matchTest, import_chains.bsc]
|
|
3366
|
+
});
|
|
3131
3367
|
var MatchContext = (0, import_react21.createContext)(void 0);
|
|
3132
3368
|
var useMatch = () => {
|
|
3133
3369
|
const context = (0, import_react21.useContext)(MatchContext);
|
|
@@ -3155,6 +3391,7 @@ function useUserInfo() {
|
|
|
3155
3391
|
const { setTgAppAuthCode, emailLoginKey, setEmailLoginKey } = useStore_default();
|
|
3156
3392
|
const isDownMd = useDownMd();
|
|
3157
3393
|
const { events, login } = useMatch();
|
|
3394
|
+
const { open: EVMOpen } = useEVMModalStore();
|
|
3158
3395
|
const { open: TRONOpen } = useTRONModalStore();
|
|
3159
3396
|
const { open: TONOpen } = useTONModalStore();
|
|
3160
3397
|
const { open: BTCOpen } = useBTCModalStore();
|
|
@@ -3231,7 +3468,8 @@ function useUserInfo() {
|
|
|
3231
3468
|
case "wallet":
|
|
3232
3469
|
return walletModalStore.open("login", extra?.methods);
|
|
3233
3470
|
case "evm":
|
|
3234
|
-
return
|
|
3471
|
+
return EVMOpen("login");
|
|
3472
|
+
// return window.open(`${endpoints.auth}login/wallet?appid=${appid}&locale=${locale}`)
|
|
3235
3473
|
case "sol":
|
|
3236
3474
|
if (isDownMd) {
|
|
3237
3475
|
return window.location.href = `${endpoints.auth}login/sol?appid=${appid}&locale=${locale}&redirect_uri=${getRedirectUri()}`;
|
|
@@ -3323,7 +3561,8 @@ function useUserInfo() {
|
|
|
3323
3561
|
case "wallet":
|
|
3324
3562
|
return walletModalStore.open("bind", extra?.methods);
|
|
3325
3563
|
case "evm":
|
|
3326
|
-
return
|
|
3564
|
+
return EVMOpen("bind");
|
|
3565
|
+
// return window.open(`${endpoints.auth}bind/wallet?appid=${appid}&locale=${locale}&st=` + encodeURIComponent(encodeBase64(token)))
|
|
3327
3566
|
case "sol":
|
|
3328
3567
|
if (isDownMd) {
|
|
3329
3568
|
return window.location.href = `${endpoints.auth}bind/sol?appid=${appid}&locale=${locale}&st=${encodeURIComponent(encodeBase64(token))}&redirect_uri=${getRedirectUri()}`;
|
|
@@ -3398,6 +3637,11 @@ function useUserInfo() {
|
|
|
3398
3637
|
window.addEventListener("message", authMessageHandle);
|
|
3399
3638
|
});
|
|
3400
3639
|
};
|
|
3640
|
+
const invite = async (invite_code) => {
|
|
3641
|
+
return await userInviteApi({
|
|
3642
|
+
invite_code
|
|
3643
|
+
});
|
|
3644
|
+
};
|
|
3401
3645
|
return {
|
|
3402
3646
|
loginByMethod,
|
|
3403
3647
|
loginByTelegram,
|
|
@@ -3421,14 +3665,15 @@ function useUserInfo() {
|
|
|
3421
3665
|
auth,
|
|
3422
3666
|
login: loginMethod,
|
|
3423
3667
|
bind,
|
|
3424
|
-
getAuthInfo
|
|
3668
|
+
getAuthInfo,
|
|
3669
|
+
invite
|
|
3425
3670
|
};
|
|
3426
3671
|
}
|
|
3427
3672
|
|
|
3428
3673
|
// src/components/EmailModal/StepVerify.tsx
|
|
3429
3674
|
var import_react23 = require("react");
|
|
3430
3675
|
var import_react_intl7 = require("react-intl");
|
|
3431
|
-
var
|
|
3676
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
3432
3677
|
function StepVerify(props) {
|
|
3433
3678
|
const intl = (0, import_react_intl7.useIntl)();
|
|
3434
3679
|
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
@@ -3505,17 +3750,17 @@ function StepVerify(props) {
|
|
|
3505
3750
|
setSubmitting(false);
|
|
3506
3751
|
}
|
|
3507
3752
|
};
|
|
3508
|
-
return /* @__PURE__ */ (0,
|
|
3509
|
-
/* @__PURE__ */ (0,
|
|
3510
|
-
/* @__PURE__ */ (0,
|
|
3511
|
-
/* @__PURE__ */ (0,
|
|
3512
|
-
/* @__PURE__ */ (0,
|
|
3513
|
-
/* @__PURE__ */ (0,
|
|
3753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-email-verify-box", children: [
|
|
3754
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-email-verify-header", children: [
|
|
3755
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
|
|
3756
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "matchid-email-verify-header-content", children: [
|
|
3757
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-email-verify-header-value", children: props.email }),
|
|
3758
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react_intl7.FormattedMessage, { id: "sendEmailTips" }) })
|
|
3514
3759
|
] })
|
|
3515
3760
|
] }),
|
|
3516
|
-
/* @__PURE__ */ (0,
|
|
3761
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Field, { label: intl.formatMessage({
|
|
3517
3762
|
id: "verificationCode"
|
|
3518
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
3763
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
3519
3764
|
Input,
|
|
3520
3765
|
{
|
|
3521
3766
|
placeholder: intl.formatMessage({
|
|
@@ -3525,7 +3770,7 @@ function StepVerify(props) {
|
|
|
3525
3770
|
maxLength: codeLength,
|
|
3526
3771
|
onChange: (e) => setCode(e.target.value),
|
|
3527
3772
|
value: code,
|
|
3528
|
-
after: /* @__PURE__ */ (0,
|
|
3773
|
+
after: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
3529
3774
|
Button,
|
|
3530
3775
|
{
|
|
3531
3776
|
highlight: true,
|
|
@@ -3544,13 +3789,13 @@ function StepVerify(props) {
|
|
|
3544
3789
|
)
|
|
3545
3790
|
}
|
|
3546
3791
|
) }),
|
|
3547
|
-
/* @__PURE__ */ (0,
|
|
3792
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Button, { disabled: !canContinue, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react_intl7.FormattedMessage, { id: "continue" }) })
|
|
3548
3793
|
] });
|
|
3549
3794
|
}
|
|
3550
3795
|
|
|
3551
3796
|
// src/components/EmailModal/index.tsx
|
|
3552
3797
|
var import_react_intl8 = require("react-intl");
|
|
3553
|
-
var
|
|
3798
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
3554
3799
|
function EmailModal({
|
|
3555
3800
|
isOpen = false,
|
|
3556
3801
|
width = 480,
|
|
@@ -3567,7 +3812,7 @@ function EmailModal({
|
|
|
3567
3812
|
setEmailVal("");
|
|
3568
3813
|
}
|
|
3569
3814
|
}, [isOpen]);
|
|
3570
|
-
return /* @__PURE__ */ (0,
|
|
3815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
3571
3816
|
ModalWithHeader,
|
|
3572
3817
|
{
|
|
3573
3818
|
isOpen,
|
|
@@ -3577,10 +3822,10 @@ function EmailModal({
|
|
|
3577
3822
|
id: "email"
|
|
3578
3823
|
}),
|
|
3579
3824
|
onBack: step == "verify" ? () => setStep("input") : onBack,
|
|
3580
|
-
children: step === "input" ? /* @__PURE__ */ (0,
|
|
3825
|
+
children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
|
|
3581
3826
|
setEmailVal(email);
|
|
3582
3827
|
setStep("verify");
|
|
3583
|
-
} }) : /* @__PURE__ */ (0,
|
|
3828
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(StepVerify, { email: emailVal, onSuccess: onLogin })
|
|
3584
3829
|
}
|
|
3585
3830
|
);
|
|
3586
3831
|
}
|
|
@@ -3610,7 +3855,7 @@ function useAppConfig() {
|
|
|
3610
3855
|
}
|
|
3611
3856
|
|
|
3612
3857
|
// src/components/LoginBox/index.tsx
|
|
3613
|
-
var
|
|
3858
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3614
3859
|
var RecommendItem = ({
|
|
3615
3860
|
icon,
|
|
3616
3861
|
name,
|
|
@@ -3619,20 +3864,20 @@ var RecommendItem = ({
|
|
|
3619
3864
|
children,
|
|
3620
3865
|
footer
|
|
3621
3866
|
}) => {
|
|
3622
|
-
return /* @__PURE__ */ (0,
|
|
3623
|
-
/* @__PURE__ */ (0,
|
|
3624
|
-
/* @__PURE__ */ (0,
|
|
3625
|
-
/* @__PURE__ */ (0,
|
|
3626
|
-
/* @__PURE__ */ (0,
|
|
3867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-recommend-method", children: [
|
|
3868
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-recommend-method-item", onClick, children: [
|
|
3869
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-recommend-method-content", children: [
|
|
3870
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-recommend-method-icon", children: icon }),
|
|
3871
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "matchid-login-recommend-method-name", children: name })
|
|
3627
3872
|
] }),
|
|
3628
|
-
footer ? footer : children ? /* @__PURE__ */ (0,
|
|
3873
|
+
footer ? footer : children ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3629
3874
|
ArrowDownIcon,
|
|
3630
3875
|
{
|
|
3631
3876
|
className: `matchid-login-recommend-method-arrow ${showChildren ? "matchid-login-recommend-method-arrow-active" : ""}`,
|
|
3632
3877
|
size: 20,
|
|
3633
3878
|
color: "var(--matchid-arrow-color)"
|
|
3634
3879
|
}
|
|
3635
|
-
) : /* @__PURE__ */ (0,
|
|
3880
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3636
3881
|
ArrowRightIcon,
|
|
3637
3882
|
{
|
|
3638
3883
|
className: "matchid-login-recommend-method-arrow",
|
|
@@ -3641,7 +3886,7 @@ var RecommendItem = ({
|
|
|
3641
3886
|
}
|
|
3642
3887
|
)
|
|
3643
3888
|
] }),
|
|
3644
|
-
children && /* @__PURE__ */ (0,
|
|
3889
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3645
3890
|
"div",
|
|
3646
3891
|
{
|
|
3647
3892
|
className: `matchid-login-recommend-method-popover ${showChildren ? "matchid-login-recommend-method-popover-active" : ""}`,
|
|
@@ -3706,75 +3951,75 @@ function LoginBox({
|
|
|
3706
3951
|
const isDownMd = useDownMd();
|
|
3707
3952
|
const methodMap = {
|
|
3708
3953
|
wallet: {
|
|
3709
|
-
icon: /* @__PURE__ */ (0,
|
|
3954
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(WalletIcon, { size: isDownMd ? 36 : 40 }),
|
|
3710
3955
|
name: intl.formatMessage({ id: "wallet" }),
|
|
3711
3956
|
onClick: () => setShowWallet(!showWallet),
|
|
3712
3957
|
type: "wallet"
|
|
3713
3958
|
},
|
|
3714
3959
|
email: {
|
|
3715
|
-
icon: /* @__PURE__ */ (0,
|
|
3960
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
|
|
3716
3961
|
name: intl.formatMessage({ id: "email" }),
|
|
3717
3962
|
onClick: () => {
|
|
3718
3963
|
setEmailOpen(true);
|
|
3719
3964
|
}
|
|
3720
3965
|
},
|
|
3721
3966
|
google: {
|
|
3722
|
-
icon: /* @__PURE__ */ (0,
|
|
3967
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(GoogleIcon, { size: isDownMd ? 36 : 40 }),
|
|
3723
3968
|
name: "Google",
|
|
3724
3969
|
onClick: () => login("google")
|
|
3725
3970
|
},
|
|
3726
3971
|
twitter: {
|
|
3727
|
-
icon: /* @__PURE__ */ (0,
|
|
3972
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(XIcon, { size: isDownMd ? 36 : 40 }),
|
|
3728
3973
|
name: "X",
|
|
3729
3974
|
onClick: () => login("twitter")
|
|
3730
3975
|
},
|
|
3731
3976
|
telegram: {
|
|
3732
|
-
icon: /* @__PURE__ */ (0,
|
|
3977
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TelegramIcon, { size: isDownMd ? 36 : 40 }),
|
|
3733
3978
|
name: "Telegram",
|
|
3734
3979
|
onClick: () => login("telegram")
|
|
3735
3980
|
},
|
|
3736
3981
|
github: {
|
|
3737
|
-
icon: /* @__PURE__ */ (0,
|
|
3982
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(GithubIcon, { size: isDownMd ? 36 : 40 }),
|
|
3738
3983
|
name: "Github",
|
|
3739
3984
|
onClick: () => login("github")
|
|
3740
3985
|
},
|
|
3741
3986
|
discord: {
|
|
3742
|
-
icon: /* @__PURE__ */ (0,
|
|
3987
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(DiscordIcon, { size: isDownMd ? 36 : 40 }),
|
|
3743
3988
|
name: "Discord",
|
|
3744
3989
|
onClick: () => login("discord")
|
|
3745
3990
|
},
|
|
3746
3991
|
linkedin: {
|
|
3747
|
-
icon: /* @__PURE__ */ (0,
|
|
3992
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
|
|
3748
3993
|
name: "LinkedIn",
|
|
3749
3994
|
onClick: () => login("linkedin")
|
|
3750
3995
|
},
|
|
3751
3996
|
facebook: {
|
|
3752
|
-
icon: /* @__PURE__ */ (0,
|
|
3997
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(FacebookIcon, { size: isDownMd ? 36 : 40 }),
|
|
3753
3998
|
name: "Facebook",
|
|
3754
3999
|
onClick: () => login("facebook")
|
|
3755
4000
|
},
|
|
3756
4001
|
youtube: {
|
|
3757
|
-
icon: /* @__PURE__ */ (0,
|
|
4002
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
|
|
3758
4003
|
name: "Youtube",
|
|
3759
4004
|
onClick: () => login("youtube")
|
|
3760
4005
|
}
|
|
3761
4006
|
};
|
|
3762
4007
|
const { walletMap } = useWalletConfig();
|
|
3763
|
-
return /* @__PURE__ */ (0,
|
|
3764
|
-
(!inModal || !emailOpen) && /* @__PURE__ */ (0,
|
|
3765
|
-
/* @__PURE__ */ (0,
|
|
3766
|
-
return /* @__PURE__ */ (0,
|
|
4008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
|
|
4009
|
+
(!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-box", children: [
|
|
4010
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
|
|
4011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3767
4012
|
RecommendItem,
|
|
3768
4013
|
{
|
|
3769
4014
|
icon: methodMap[m]?.icon,
|
|
3770
4015
|
name: methodMap[m]?.name,
|
|
3771
4016
|
onClick: methodMap[m]?.onClick,
|
|
3772
4017
|
showChildren: m == "wallet" && showWallet,
|
|
3773
|
-
children: m == "wallet" && /* @__PURE__ */ (0,
|
|
3774
|
-
/* @__PURE__ */ (0,
|
|
3775
|
-
/* @__PURE__ */ (0,
|
|
4018
|
+
children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
|
|
4019
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
|
|
4020
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
|
|
3776
4021
|
const m2 = walletMap[n];
|
|
3777
|
-
return /* @__PURE__ */ (0,
|
|
4022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
3778
4023
|
"div",
|
|
3779
4024
|
{
|
|
3780
4025
|
className: "matchid-login-recommend-wallet-item",
|
|
@@ -3782,16 +4027,16 @@ function LoginBox({
|
|
|
3782
4027
|
login(m2.method);
|
|
3783
4028
|
},
|
|
3784
4029
|
children: [
|
|
3785
|
-
/* @__PURE__ */ (0,
|
|
3786
|
-
/* @__PURE__ */ (0,
|
|
3787
|
-
/* @__PURE__ */ (0,
|
|
4030
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
|
|
4031
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
|
|
4032
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3788
4033
|
"div",
|
|
3789
4034
|
{
|
|
3790
4035
|
className: "matchid-login-recommend-wallet-item-hover-icon",
|
|
3791
4036
|
children: m2.activeIcon
|
|
3792
4037
|
}
|
|
3793
4038
|
),
|
|
3794
|
-
/* @__PURE__ */ (0,
|
|
4039
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3795
4040
|
"span",
|
|
3796
4041
|
{
|
|
3797
4042
|
className: "matchid-login-recommend-wallet-item-name",
|
|
@@ -3799,7 +4044,7 @@ function LoginBox({
|
|
|
3799
4044
|
}
|
|
3800
4045
|
)
|
|
3801
4046
|
] }),
|
|
3802
|
-
/* @__PURE__ */ (0,
|
|
4047
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3803
4048
|
ArrowRightIcon,
|
|
3804
4049
|
{
|
|
3805
4050
|
className: "matchid-login-recommend-wallet-item-arrow",
|
|
@@ -3817,10 +4062,10 @@ function LoginBox({
|
|
|
3817
4062
|
m
|
|
3818
4063
|
);
|
|
3819
4064
|
}) }),
|
|
3820
|
-
methodConfig.methods.length > 0 && /* @__PURE__ */ (0,
|
|
3821
|
-
/* @__PURE__ */ (0,
|
|
3822
|
-
/* @__PURE__ */ (0,
|
|
3823
|
-
return /* @__PURE__ */ (0,
|
|
4065
|
+
methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-other", children: [
|
|
4066
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_intl9.FormattedMessage, { id: "otherLoginMethods" }) }),
|
|
4067
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
4068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3824
4069
|
"div",
|
|
3825
4070
|
{
|
|
3826
4071
|
className: "matchid-login-method-item",
|
|
@@ -3833,7 +4078,7 @@ function LoginBox({
|
|
|
3833
4078
|
}) })
|
|
3834
4079
|
] })
|
|
3835
4080
|
] }),
|
|
3836
|
-
/* @__PURE__ */ (0,
|
|
4081
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
3837
4082
|
EmailModal,
|
|
3838
4083
|
{
|
|
3839
4084
|
isOpen: emailOpen,
|
|
@@ -3853,40 +4098,40 @@ var import_react27 = require("react");
|
|
|
3853
4098
|
|
|
3854
4099
|
// src/components/LoginPanel/index.tsx
|
|
3855
4100
|
var import_react_intl10 = require("react-intl");
|
|
3856
|
-
var
|
|
4101
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3857
4102
|
function LoginPanel({
|
|
3858
4103
|
header,
|
|
3859
4104
|
onClose,
|
|
3860
4105
|
...props
|
|
3861
4106
|
}) {
|
|
3862
4107
|
const isDownMd = useDownMd();
|
|
3863
|
-
return /* @__PURE__ */ (0,
|
|
3864
|
-
header ? header : /* @__PURE__ */ (0,
|
|
3865
|
-
/* @__PURE__ */ (0,
|
|
3866
|
-
/* @__PURE__ */ (0,
|
|
3867
|
-
/* @__PURE__ */ (0,
|
|
4108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-login-panel", children: [
|
|
4109
|
+
header ? header : /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-login-panel-header", children: [
|
|
4110
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-login-panel-header-content", children: [
|
|
4111
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl10.FormattedMessage, { id: "loginTitle" }) }),
|
|
4112
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl10.FormattedMessage, { id: "loginTips" }) })
|
|
3868
4113
|
] }),
|
|
3869
|
-
onClose && /* @__PURE__ */ (0,
|
|
4114
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
|
|
3870
4115
|
] }),
|
|
3871
|
-
/* @__PURE__ */ (0,
|
|
3872
|
-
/* @__PURE__ */ (0,
|
|
4116
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-login-panel-divide" }),
|
|
4117
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(LoginBox, { ...props }) })
|
|
3873
4118
|
] });
|
|
3874
4119
|
}
|
|
3875
4120
|
|
|
3876
4121
|
// src/components/LoginModal/index.tsx
|
|
3877
|
-
var
|
|
4122
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
3878
4123
|
function LoginModal({
|
|
3879
4124
|
isOpen = false,
|
|
3880
4125
|
width = 480,
|
|
3881
4126
|
...props
|
|
3882
4127
|
}) {
|
|
3883
4128
|
const { isLogin } = useUserInfo();
|
|
3884
|
-
return /* @__PURE__ */ (0,
|
|
4129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
3885
4130
|
Modal,
|
|
3886
4131
|
{
|
|
3887
4132
|
isOpen: isOpen && !isLogin,
|
|
3888
4133
|
width,
|
|
3889
|
-
children: /* @__PURE__ */ (0,
|
|
4134
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(LoginPanel, { ...props, inModal: true })
|
|
3890
4135
|
}
|
|
3891
4136
|
);
|
|
3892
4137
|
}
|
|
@@ -3895,10 +4140,10 @@ function LoginModal({
|
|
|
3895
4140
|
var import_react26 = require("react");
|
|
3896
4141
|
|
|
3897
4142
|
// src/assets/icon/ProfileIcon.tsx
|
|
3898
|
-
var
|
|
4143
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
3899
4144
|
function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
3900
|
-
return /* @__PURE__ */ (0,
|
|
3901
|
-
/* @__PURE__ */ (0,
|
|
4145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
4146
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
3902
4147
|
"path",
|
|
3903
4148
|
{
|
|
3904
4149
|
fillRule: "evenodd",
|
|
@@ -3907,7 +4152,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
3907
4152
|
fill: color
|
|
3908
4153
|
}
|
|
3909
4154
|
),
|
|
3910
|
-
/* @__PURE__ */ (0,
|
|
4155
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
3911
4156
|
"path",
|
|
3912
4157
|
{
|
|
3913
4158
|
fillRule: "evenodd",
|
|
@@ -3921,7 +4166,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
3921
4166
|
|
|
3922
4167
|
// src/components/UserPopover/index.tsx
|
|
3923
4168
|
var import_react_intl11 = require("react-intl");
|
|
3924
|
-
var
|
|
4169
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
3925
4170
|
function UserContent() {
|
|
3926
4171
|
const { logout, address, username } = useUserInfo();
|
|
3927
4172
|
const [logouting, setLogouting] = (0, import_react26.useState)(false);
|
|
@@ -3942,34 +4187,34 @@ function UserContent() {
|
|
|
3942
4187
|
rightIcon,
|
|
3943
4188
|
onClick
|
|
3944
4189
|
}) => {
|
|
3945
|
-
return /* @__PURE__ */ (0,
|
|
3946
|
-
/* @__PURE__ */ (0,
|
|
4190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-user-popover-item", onClick, children: [
|
|
4191
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: `matchid-user-popover-item-content`, children: [
|
|
3947
4192
|
icon,
|
|
3948
|
-
/* @__PURE__ */ (0,
|
|
4193
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "matchid-user-popover-item-text", children })
|
|
3949
4194
|
] }),
|
|
3950
4195
|
rightIcon
|
|
3951
4196
|
] });
|
|
3952
4197
|
};
|
|
3953
4198
|
const UserDivider = () => {
|
|
3954
|
-
return /* @__PURE__ */ (0,
|
|
4199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: `matchid-user-popover-divider` });
|
|
3955
4200
|
};
|
|
3956
4201
|
const [usernameOpen, setUsernameOpen] = (0, import_react26.useState)(false);
|
|
3957
4202
|
const [copied, setCopied] = useCopyClipboard();
|
|
3958
4203
|
const intl = (0, import_react_intl11.useIntl)();
|
|
3959
|
-
return /* @__PURE__ */ (0,
|
|
3960
|
-
/* @__PURE__ */ (0,
|
|
3961
|
-
/* @__PURE__ */ (0,
|
|
4204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-user-popover-content", children: [
|
|
4205
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "matchid-user-popover-list", children: [
|
|
4206
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(UserItem, { onClick: () => {
|
|
3962
4207
|
setCopied(address);
|
|
3963
|
-
}, icon: copied ? /* @__PURE__ */ (0,
|
|
3964
|
-
/* @__PURE__ */ (0,
|
|
3965
|
-
/* @__PURE__ */ (0,
|
|
4208
|
+
}, icon: copied ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CheckIcon, { size: 20, color: "#0ecb81" }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CopyIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CheckIcon, { size: 20, color: "var(--icon-color)" }), children: truncateAddress(address) }),
|
|
4209
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(UserDivider, {}),
|
|
4210
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(UserItem, { onClick: () => {
|
|
3966
4211
|
setUsernameOpen(true);
|
|
3967
|
-
}, icon: /* @__PURE__ */ (0,
|
|
4212
|
+
}, icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ProfileIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ArrowRightIcon, { size: 20, color: "var(--icon-color)" }), children: username || intl.formatMessage({
|
|
3968
4213
|
id: "setUsername"
|
|
3969
4214
|
}) })
|
|
3970
4215
|
] }),
|
|
3971
|
-
/* @__PURE__ */ (0,
|
|
3972
|
-
/* @__PURE__ */ (0,
|
|
4216
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_intl11.FormattedMessage, { id: "disconnect" }) }),
|
|
4217
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(UsernameModal, { isOpen: usernameOpen, onClose: () => {
|
|
3973
4218
|
setUsernameOpen(false);
|
|
3974
4219
|
}, onSuccess: () => {
|
|
3975
4220
|
setUsernameOpen(false);
|
|
@@ -3980,12 +4225,12 @@ function UserPopover({
|
|
|
3980
4225
|
children,
|
|
3981
4226
|
...props
|
|
3982
4227
|
}) {
|
|
3983
|
-
return /* @__PURE__ */ (0,
|
|
4228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Popover, { ...props, content: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(UserContent, {}), children });
|
|
3984
4229
|
}
|
|
3985
4230
|
|
|
3986
4231
|
// src/components/LoginButton/index.tsx
|
|
3987
4232
|
var import_react_intl12 = require("react-intl");
|
|
3988
|
-
var
|
|
4233
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
3989
4234
|
function LoginButton({
|
|
3990
4235
|
loginRender,
|
|
3991
4236
|
methods,
|
|
@@ -4001,8 +4246,8 @@ function LoginButton({
|
|
|
4001
4246
|
const { isLogin, username } = useUserInfo();
|
|
4002
4247
|
const [loginOpen, setLoginOpen] = (0, import_react27.useState)(false);
|
|
4003
4248
|
if (!isLogin) {
|
|
4004
|
-
return /* @__PURE__ */ (0,
|
|
4005
|
-
/* @__PURE__ */ (0,
|
|
4249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
|
|
4250
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4006
4251
|
LoginModal,
|
|
4007
4252
|
{
|
|
4008
4253
|
methods,
|
|
@@ -4012,15 +4257,15 @@ function LoginButton({
|
|
|
4012
4257
|
onClose: () => setLoginOpen(false)
|
|
4013
4258
|
}
|
|
4014
4259
|
),
|
|
4015
|
-
/* @__PURE__ */ (0,
|
|
4016
|
-
/* @__PURE__ */ (0,
|
|
4017
|
-
/* @__PURE__ */ (0,
|
|
4260
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
|
|
4261
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(UnLoginIcon_default, {}),
|
|
4262
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl12.FormattedMessage, { id: "login" }) })
|
|
4018
4263
|
] })
|
|
4019
4264
|
] });
|
|
4020
4265
|
}
|
|
4021
|
-
return loginRender ? /* @__PURE__ */ (0,
|
|
4022
|
-
/* @__PURE__ */ (0,
|
|
4023
|
-
/* @__PURE__ */ (0,
|
|
4266
|
+
return loginRender ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_jsx_runtime85.Fragment, { children: loginRender }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(UserPopover, { position: popoverPosition, type: popoverType, gap: popoverGap, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(Button, { onClick: onLoginClick, className: "matchid-login-btn", ...props, children: [
|
|
4267
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(LoginIcon_default, {}),
|
|
4268
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: username ? truncateAddress(username) : "MatchID " + intl.formatMessage({
|
|
4024
4269
|
id: "user"
|
|
4025
4270
|
}) })
|
|
4026
4271
|
] }) });
|
|
@@ -4029,15 +4274,15 @@ function LoginButton({
|
|
|
4029
4274
|
// src/components/UsernameModal/index.tsx
|
|
4030
4275
|
var import_react28 = require("react");
|
|
4031
4276
|
var import_react_intl13 = require("react-intl");
|
|
4032
|
-
var
|
|
4277
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
4033
4278
|
var ValidItem = ({
|
|
4034
4279
|
success = false,
|
|
4035
4280
|
text
|
|
4036
4281
|
}) => {
|
|
4037
4282
|
const isDownMd = useDownMd();
|
|
4038
|
-
return /* @__PURE__ */ (0,
|
|
4039
|
-
success ? /* @__PURE__ */ (0,
|
|
4040
|
-
/* @__PURE__ */ (0,
|
|
4283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
|
|
4284
|
+
success ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
|
|
4285
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: text })
|
|
4041
4286
|
] });
|
|
4042
4287
|
};
|
|
4043
4288
|
function UsernameModal({
|
|
@@ -4085,12 +4330,12 @@ function UsernameModal({
|
|
|
4085
4330
|
}
|
|
4086
4331
|
};
|
|
4087
4332
|
const intl = (0, import_react_intl13.useIntl)();
|
|
4088
|
-
return /* @__PURE__ */ (0,
|
|
4333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
|
|
4089
4334
|
id: username ? "editUsernameTitle" : "setUsernameTitle"
|
|
4090
|
-
}), children: /* @__PURE__ */ (0,
|
|
4091
|
-
/* @__PURE__ */ (0,
|
|
4335
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-username-box", children: [
|
|
4336
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Field, { label: intl.formatMessage({
|
|
4092
4337
|
id: "username"
|
|
4093
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
4338
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
4094
4339
|
Input,
|
|
4095
4340
|
{
|
|
4096
4341
|
placeholder: intl.formatMessage({
|
|
@@ -4103,8 +4348,8 @@ function UsernameModal({
|
|
|
4103
4348
|
value: val
|
|
4104
4349
|
}
|
|
4105
4350
|
) }),
|
|
4106
|
-
/* @__PURE__ */ (0,
|
|
4107
|
-
/* @__PURE__ */ (0,
|
|
4351
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-valid", children: [
|
|
4352
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
4108
4353
|
ValidItem,
|
|
4109
4354
|
{
|
|
4110
4355
|
success: isValid,
|
|
@@ -4113,21 +4358,21 @@ function UsernameModal({
|
|
|
4113
4358
|
})
|
|
4114
4359
|
}
|
|
4115
4360
|
),
|
|
4116
|
-
/* @__PURE__ */ (0,
|
|
4361
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ValidItem, { success: isLength, text: intl.formatMessage({
|
|
4117
4362
|
id: "usernameLengthError"
|
|
4118
4363
|
}) })
|
|
4119
4364
|
] }),
|
|
4120
|
-
/* @__PURE__ */ (0,
|
|
4365
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Button, { disabled: !isSafe, loading: isSubmitting, style: {
|
|
4121
4366
|
marginTop: isDownMd ? "36px" : "64px"
|
|
4122
|
-
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
4123
|
-
/* @__PURE__ */ (0,
|
|
4367
|
+
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl13.FormattedMessage, { id: "confirm" }) }),
|
|
4368
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Button, { style: {
|
|
4124
4369
|
marginTop: isDownMd ? "12px" : "24px"
|
|
4125
|
-
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0,
|
|
4370
|
+
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl13.FormattedMessage, { id: "cancel" }) })
|
|
4126
4371
|
] }) });
|
|
4127
4372
|
}
|
|
4128
4373
|
|
|
4129
|
-
// src/components/
|
|
4130
|
-
var import_react31 =
|
|
4374
|
+
// src/components/EVMModal/index.tsx
|
|
4375
|
+
var import_react31 = require("react");
|
|
4131
4376
|
var import_react_intl14 = require("react-intl");
|
|
4132
4377
|
|
|
4133
4378
|
// src/components/WalletModalContent/index.tsx
|
|
@@ -4141,7 +4386,7 @@ var walletConnectImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEA
|
|
|
4141
4386
|
var walletSigningImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAABAsUlEQVR4Xu19CXQ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Ds721xQUKB890QxOiUqKyuDEeCTkpISumvXLlq1ahU99NBDdP/99xNi/DFqcNiwYcxOSNw7EEFecNcR4+ErMcz7hRde0Gb22bNnz+nU1FRF/egjxfgcMboYzp8/H/zll1+qvz9/Xj3/1VfqVwYWFRWhu0e9cOGCto20sLBQo3gz8P4ust/Bk3kwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDN/x/wHjsXZ4EUApzgAAAABJRU5ErkJggg==";
|
|
4142
4387
|
|
|
4143
4388
|
// src/components/WalletModalContent/index.tsx
|
|
4144
|
-
var
|
|
4389
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
4145
4390
|
function WalletModalContent({
|
|
4146
4391
|
status,
|
|
4147
4392
|
error,
|
|
@@ -4211,12 +4456,12 @@ function WalletModalContent({
|
|
|
4211
4456
|
statusImage: walletConnectImage
|
|
4212
4457
|
};
|
|
4213
4458
|
}, [visible, connected, status, error, address]);
|
|
4214
|
-
return /* @__PURE__ */ (0,
|
|
4215
|
-
/* @__PURE__ */ (0,
|
|
4216
|
-
/* @__PURE__ */ (0,
|
|
4217
|
-
/* @__PURE__ */ (0,
|
|
4459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
4460
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
4461
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("img", { src: pageData.statusImage }),
|
|
4462
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: pageData.isError ? "matchid-error" : "", children: pageData.text })
|
|
4218
4463
|
] }),
|
|
4219
|
-
/* @__PURE__ */ (0,
|
|
4464
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4220
4465
|
Button,
|
|
4221
4466
|
{
|
|
4222
4467
|
block: true,
|
|
@@ -4229,65 +4474,599 @@ function WalletModalContent({
|
|
|
4229
4474
|
)
|
|
4230
4475
|
] }) });
|
|
4231
4476
|
}
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
method: "tron_requestAccounts",
|
|
4249
|
-
params: window.tronLink.tronlinkParams
|
|
4250
|
-
}
|
|
4251
|
-
);
|
|
4477
|
+
function WalletModalContentV2(props) {
|
|
4478
|
+
const [submitting, setSubmitting] = (0, import_react29.useState)(false);
|
|
4479
|
+
const pageData = (0, import_react29.useMemo)(() => {
|
|
4480
|
+
const { status } = props;
|
|
4481
|
+
if (status == "success") {
|
|
4482
|
+
return {
|
|
4483
|
+
btnText: "Disconnect Wallet",
|
|
4484
|
+
btnClick: async () => {
|
|
4485
|
+
setSubmitting(true);
|
|
4486
|
+
await props.onDisconnect?.();
|
|
4487
|
+
setSubmitting(false);
|
|
4488
|
+
},
|
|
4489
|
+
text: "Wallet connection successful!",
|
|
4490
|
+
statusImage: walletConnectedImage,
|
|
4491
|
+
btnLoading: submitting
|
|
4492
|
+
};
|
|
4252
4493
|
}
|
|
4253
|
-
if (
|
|
4254
|
-
|
|
4494
|
+
if (status == "error") {
|
|
4495
|
+
return {
|
|
4496
|
+
text: props.error || "Unknown Error",
|
|
4497
|
+
btnText: "Reconnect Wallet",
|
|
4498
|
+
btnClick: async () => {
|
|
4499
|
+
setSubmitting(true);
|
|
4500
|
+
await props.onError?.();
|
|
4501
|
+
setSubmitting(false);
|
|
4502
|
+
},
|
|
4503
|
+
statusImage: walletErrorImage,
|
|
4504
|
+
isError: true,
|
|
4505
|
+
btnLoading: submitting
|
|
4506
|
+
};
|
|
4255
4507
|
}
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
};
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4508
|
+
if (status == "nonce") {
|
|
4509
|
+
return {
|
|
4510
|
+
btnLoading: true,
|
|
4511
|
+
text: "Connecting",
|
|
4512
|
+
statusImage: walletConnectingImage
|
|
4513
|
+
};
|
|
4514
|
+
}
|
|
4515
|
+
if (status == "signer") {
|
|
4516
|
+
return {
|
|
4517
|
+
btnLoading: true,
|
|
4518
|
+
text: "Signing",
|
|
4519
|
+
statusImage: walletSigningImage
|
|
4520
|
+
};
|
|
4521
|
+
}
|
|
4522
|
+
if (status == "connecting") {
|
|
4523
|
+
return {
|
|
4524
|
+
btnLoading: true,
|
|
4525
|
+
text: "Connecting",
|
|
4526
|
+
statusImage: walletConnectingImage
|
|
4527
|
+
};
|
|
4528
|
+
}
|
|
4529
|
+
return {
|
|
4530
|
+
btnText: "Connect Wallet",
|
|
4531
|
+
btnClick: async () => {
|
|
4532
|
+
setSubmitting(true);
|
|
4533
|
+
await props.onConnect?.();
|
|
4534
|
+
setSubmitting(false);
|
|
4535
|
+
},
|
|
4536
|
+
text: "Please Connect your wallet",
|
|
4537
|
+
statusImage: walletConnectImage
|
|
4538
|
+
};
|
|
4539
|
+
}, [props, submitting]);
|
|
4540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
4541
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
4542
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("img", { src: pageData.statusImage }),
|
|
4543
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: props.status == "error" ? "matchid-error" : "", children: pageData.text })
|
|
4544
|
+
] }),
|
|
4545
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
4546
|
+
Button,
|
|
4547
|
+
{
|
|
4548
|
+
block: true,
|
|
4549
|
+
size: "lg",
|
|
4550
|
+
onClick: pageData.btnClick,
|
|
4551
|
+
loading: pageData.btnLoading,
|
|
4552
|
+
disabled: pageData.btnDisabled,
|
|
4553
|
+
children: pageData.btnText
|
|
4554
|
+
}
|
|
4555
|
+
)
|
|
4556
|
+
] }) });
|
|
4557
|
+
}
|
|
4558
|
+
|
|
4559
|
+
// src/components/EVMModal/index.tsx
|
|
4560
|
+
var import_rainbowkit2 = require("@rainbow-me/rainbowkit");
|
|
4561
|
+
var import_wagmi3 = require("wagmi");
|
|
4562
|
+
|
|
4563
|
+
// src/hooks/useWalletBox.ts
|
|
4564
|
+
var import_react30 = require("react");
|
|
4565
|
+
function useWalletBox({
|
|
4566
|
+
onInit
|
|
4567
|
+
}) {
|
|
4568
|
+
const [status, setStateStatus] = (0, import_react30.useState)("start");
|
|
4569
|
+
const [error, setError] = (0, import_react30.useState)("");
|
|
4570
|
+
const statusRef = (0, import_react30.useRef)(status);
|
|
4571
|
+
const [nonce, setNonce] = (0, import_react30.useState)();
|
|
4572
|
+
const setStatus = (status2) => {
|
|
4573
|
+
statusRef.current = status2;
|
|
4574
|
+
setStateStatus(status2);
|
|
4575
|
+
};
|
|
4576
|
+
const init = () => {
|
|
4577
|
+
setError("");
|
|
4578
|
+
setNonce(null);
|
|
4579
|
+
};
|
|
4580
|
+
(0, import_react30.useEffect)(() => {
|
|
4581
|
+
init();
|
|
4582
|
+
onInit({
|
|
4583
|
+
setStatus
|
|
4584
|
+
});
|
|
4585
|
+
return () => {
|
|
4586
|
+
setStatus("start");
|
|
4587
|
+
setNonce(null);
|
|
4588
|
+
setError("");
|
|
4589
|
+
};
|
|
4590
|
+
}, []);
|
|
4591
|
+
return {
|
|
4592
|
+
status,
|
|
4593
|
+
statusRef,
|
|
4594
|
+
setStatus,
|
|
4595
|
+
error,
|
|
4596
|
+
setError,
|
|
4597
|
+
nonce,
|
|
4598
|
+
setNonce,
|
|
4599
|
+
init
|
|
4600
|
+
};
|
|
4601
|
+
}
|
|
4602
|
+
|
|
4603
|
+
// src/hooks/useEthersSigner.ts
|
|
4604
|
+
var React8 = __toESM(require("react"));
|
|
4605
|
+
var import_wagmi2 = require("wagmi");
|
|
4606
|
+
var import_ethers = require("ethers");
|
|
4607
|
+
|
|
4608
|
+
// node_modules/@wagmi/core/dist/esm/version.js
|
|
4609
|
+
var version = "2.16.3";
|
|
4610
|
+
|
|
4611
|
+
// node_modules/@wagmi/core/dist/esm/utils/getVersion.js
|
|
4612
|
+
var getVersion2 = () => `@wagmi/core@${version}`;
|
|
4613
|
+
|
|
4614
|
+
// node_modules/@wagmi/core/dist/esm/errors/base.js
|
|
4615
|
+
var __classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
4616
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4617
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4618
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
4619
|
+
};
|
|
4620
|
+
var _BaseError_instances;
|
|
4621
|
+
var _BaseError_walk;
|
|
4622
|
+
var BaseError = class _BaseError extends Error {
|
|
4623
|
+
get docsBaseUrl() {
|
|
4624
|
+
return "https://wagmi.sh/core";
|
|
4625
|
+
}
|
|
4626
|
+
get version() {
|
|
4627
|
+
return getVersion2();
|
|
4628
|
+
}
|
|
4629
|
+
constructor(shortMessage, options = {}) {
|
|
4630
|
+
super();
|
|
4631
|
+
_BaseError_instances.add(this);
|
|
4632
|
+
Object.defineProperty(this, "details", {
|
|
4633
|
+
enumerable: true,
|
|
4634
|
+
configurable: true,
|
|
4635
|
+
writable: true,
|
|
4636
|
+
value: void 0
|
|
4637
|
+
});
|
|
4638
|
+
Object.defineProperty(this, "docsPath", {
|
|
4639
|
+
enumerable: true,
|
|
4640
|
+
configurable: true,
|
|
4641
|
+
writable: true,
|
|
4642
|
+
value: void 0
|
|
4643
|
+
});
|
|
4644
|
+
Object.defineProperty(this, "metaMessages", {
|
|
4645
|
+
enumerable: true,
|
|
4646
|
+
configurable: true,
|
|
4647
|
+
writable: true,
|
|
4648
|
+
value: void 0
|
|
4649
|
+
});
|
|
4650
|
+
Object.defineProperty(this, "shortMessage", {
|
|
4651
|
+
enumerable: true,
|
|
4652
|
+
configurable: true,
|
|
4653
|
+
writable: true,
|
|
4654
|
+
value: void 0
|
|
4655
|
+
});
|
|
4656
|
+
Object.defineProperty(this, "name", {
|
|
4657
|
+
enumerable: true,
|
|
4658
|
+
configurable: true,
|
|
4659
|
+
writable: true,
|
|
4660
|
+
value: "WagmiCoreError"
|
|
4661
|
+
});
|
|
4662
|
+
const details = options.cause instanceof _BaseError ? options.cause.details : options.cause?.message ? options.cause.message : options.details;
|
|
4663
|
+
const docsPath = options.cause instanceof _BaseError ? options.cause.docsPath || options.docsPath : options.docsPath;
|
|
4664
|
+
this.message = [
|
|
4665
|
+
shortMessage || "An error occurred.",
|
|
4666
|
+
"",
|
|
4667
|
+
...options.metaMessages ? [...options.metaMessages, ""] : [],
|
|
4668
|
+
...docsPath ? [
|
|
4669
|
+
`Docs: ${this.docsBaseUrl}${docsPath}.html${options.docsSlug ? `#${options.docsSlug}` : ""}`
|
|
4670
|
+
] : [],
|
|
4671
|
+
...details ? [`Details: ${details}`] : [],
|
|
4672
|
+
`Version: ${this.version}`
|
|
4673
|
+
].join("\n");
|
|
4674
|
+
if (options.cause)
|
|
4675
|
+
this.cause = options.cause;
|
|
4676
|
+
this.details = details;
|
|
4677
|
+
this.docsPath = docsPath;
|
|
4678
|
+
this.metaMessages = options.metaMessages;
|
|
4679
|
+
this.shortMessage = shortMessage;
|
|
4680
|
+
}
|
|
4681
|
+
walk(fn) {
|
|
4682
|
+
return __classPrivateFieldGet(this, _BaseError_instances, "m", _BaseError_walk).call(this, this, fn);
|
|
4683
|
+
}
|
|
4684
|
+
};
|
|
4685
|
+
_BaseError_instances = /* @__PURE__ */ new WeakSet(), _BaseError_walk = function _BaseError_walk2(err, fn) {
|
|
4686
|
+
if (fn?.(err))
|
|
4687
|
+
return err;
|
|
4688
|
+
if (err.cause)
|
|
4689
|
+
return __classPrivateFieldGet(this, _BaseError_instances, "m", _BaseError_walk2).call(this, err.cause, fn);
|
|
4690
|
+
return err;
|
|
4691
|
+
};
|
|
4692
|
+
|
|
4693
|
+
// node_modules/@wagmi/core/dist/esm/errors/config.js
|
|
4694
|
+
var ConnectorNotConnectedError = class extends BaseError {
|
|
4695
|
+
constructor() {
|
|
4696
|
+
super("Connector not connected.");
|
|
4697
|
+
Object.defineProperty(this, "name", {
|
|
4698
|
+
enumerable: true,
|
|
4699
|
+
configurable: true,
|
|
4700
|
+
writable: true,
|
|
4701
|
+
value: "ConnectorNotConnectedError"
|
|
4702
|
+
});
|
|
4703
|
+
}
|
|
4704
|
+
};
|
|
4705
|
+
var ConnectorAccountNotFoundError = class extends BaseError {
|
|
4706
|
+
constructor({ address, connector }) {
|
|
4707
|
+
super(`Account "${address}" not found for connector "${connector.name}".`);
|
|
4708
|
+
Object.defineProperty(this, "name", {
|
|
4709
|
+
enumerable: true,
|
|
4710
|
+
configurable: true,
|
|
4711
|
+
writable: true,
|
|
4712
|
+
value: "ConnectorAccountNotFoundError"
|
|
4713
|
+
});
|
|
4714
|
+
}
|
|
4715
|
+
};
|
|
4716
|
+
var ConnectorChainMismatchError = class extends BaseError {
|
|
4717
|
+
constructor({ connectionChainId, connectorChainId }) {
|
|
4718
|
+
super(`The current chain of the connector (id: ${connectorChainId}) does not match the connection's chain (id: ${connectionChainId}).`, {
|
|
4719
|
+
metaMessages: [
|
|
4720
|
+
`Current Chain ID: ${connectorChainId}`,
|
|
4721
|
+
`Expected Chain ID: ${connectionChainId}`
|
|
4722
|
+
]
|
|
4723
|
+
});
|
|
4724
|
+
Object.defineProperty(this, "name", {
|
|
4725
|
+
enumerable: true,
|
|
4726
|
+
configurable: true,
|
|
4727
|
+
writable: true,
|
|
4728
|
+
value: "ConnectorChainMismatchError"
|
|
4729
|
+
});
|
|
4730
|
+
}
|
|
4731
|
+
};
|
|
4732
|
+
var ConnectorUnavailableReconnectingError = class extends BaseError {
|
|
4733
|
+
constructor({ connector }) {
|
|
4734
|
+
super(`Connector "${connector.name}" unavailable while reconnecting.`, {
|
|
4735
|
+
details: [
|
|
4736
|
+
"During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.",
|
|
4737
|
+
"All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.",
|
|
4738
|
+
"This error commonly occurs for connectors that asynchronously inject after reconnection has already started."
|
|
4739
|
+
].join(" ")
|
|
4740
|
+
});
|
|
4741
|
+
Object.defineProperty(this, "name", {
|
|
4742
|
+
enumerable: true,
|
|
4743
|
+
configurable: true,
|
|
4744
|
+
writable: true,
|
|
4745
|
+
value: "ConnectorUnavailableReconnectingError"
|
|
4746
|
+
});
|
|
4747
|
+
}
|
|
4748
|
+
};
|
|
4749
|
+
|
|
4750
|
+
// node_modules/@wagmi/core/dist/esm/actions/getConnectorClient.js
|
|
4751
|
+
var import_viem13 = require("viem");
|
|
4752
|
+
var import_utils9 = require("viem/utils");
|
|
4753
|
+
async function getConnectorClient(config, parameters = {}) {
|
|
4754
|
+
let connection;
|
|
4755
|
+
if (parameters.connector) {
|
|
4756
|
+
const { connector: connector2 } = parameters;
|
|
4757
|
+
if (config.state.status === "reconnecting" && !connector2.getAccounts && !connector2.getChainId)
|
|
4758
|
+
throw new ConnectorUnavailableReconnectingError({ connector: connector2 });
|
|
4759
|
+
const [accounts, chainId2] = await Promise.all([
|
|
4760
|
+
connector2.getAccounts(),
|
|
4761
|
+
connector2.getChainId()
|
|
4762
|
+
]);
|
|
4763
|
+
connection = {
|
|
4764
|
+
accounts,
|
|
4765
|
+
chainId: chainId2,
|
|
4766
|
+
connector: connector2
|
|
4767
|
+
};
|
|
4768
|
+
} else
|
|
4769
|
+
connection = config.state.connections.get(config.state.current);
|
|
4770
|
+
if (!connection)
|
|
4771
|
+
throw new ConnectorNotConnectedError();
|
|
4772
|
+
const chainId = parameters.chainId ?? connection.chainId;
|
|
4773
|
+
const connectorChainId = await connection.connector.getChainId();
|
|
4774
|
+
if (connectorChainId !== connection.chainId)
|
|
4775
|
+
throw new ConnectorChainMismatchError({
|
|
4776
|
+
connectionChainId: connection.chainId,
|
|
4777
|
+
connectorChainId
|
|
4778
|
+
});
|
|
4779
|
+
const connector = connection.connector;
|
|
4780
|
+
if (connector.getClient)
|
|
4781
|
+
return connector.getClient({ chainId });
|
|
4782
|
+
const account = (0, import_utils9.parseAccount)(parameters.account ?? connection.accounts[0]);
|
|
4783
|
+
account.address = (0, import_utils9.getAddress)(account.address);
|
|
4784
|
+
if (parameters.account && !connection.accounts.some((x) => x.toLowerCase() === account.address.toLowerCase()))
|
|
4785
|
+
throw new ConnectorAccountNotFoundError({
|
|
4786
|
+
address: account.address,
|
|
4787
|
+
connector
|
|
4788
|
+
});
|
|
4789
|
+
const chain = config.chains.find((chain2) => chain2.id === chainId);
|
|
4790
|
+
const provider = await connection.connector.getProvider({ chainId });
|
|
4791
|
+
return (0, import_viem13.createClient)({
|
|
4792
|
+
account,
|
|
4793
|
+
chain,
|
|
4794
|
+
name: "Connector Client",
|
|
4795
|
+
transport: (opts) => (0, import_viem13.custom)(provider)({ ...opts, retryCount: 0 })
|
|
4796
|
+
});
|
|
4797
|
+
}
|
|
4798
|
+
|
|
4799
|
+
// node_modules/@wagmi/core/dist/esm/exports/index.js
|
|
4800
|
+
var import_viem14 = require("viem");
|
|
4801
|
+
|
|
4802
|
+
// src/hooks/useEthersSigner.ts
|
|
4803
|
+
function clientToSigner(client) {
|
|
4804
|
+
const { account, chain, transport } = client;
|
|
4805
|
+
const network = {
|
|
4806
|
+
chainId: chain.id,
|
|
4807
|
+
name: chain.name,
|
|
4808
|
+
ensAddress: chain.contracts?.ensRegistry?.address
|
|
4809
|
+
};
|
|
4810
|
+
const provider = new import_ethers.providers.Web3Provider(transport, network);
|
|
4811
|
+
const signer = provider.getSigner(account.address);
|
|
4812
|
+
return signer;
|
|
4813
|
+
}
|
|
4814
|
+
async function getEthersSigner(config, { chainId } = {}) {
|
|
4815
|
+
const client = await getConnectorClient(config, { chainId });
|
|
4816
|
+
return clientToSigner(client);
|
|
4817
|
+
}
|
|
4818
|
+
|
|
4819
|
+
// src/components/EVMModal/index.tsx
|
|
4820
|
+
var import_siwe = require("siwe");
|
|
4821
|
+
var import_styles = require("@rainbow-me/rainbowkit/styles.css");
|
|
4822
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
4823
|
+
function WalletContent({
|
|
4824
|
+
onSuccess,
|
|
4825
|
+
type
|
|
4826
|
+
}) {
|
|
4827
|
+
const config = (0, import_wagmi3.useConfig)();
|
|
4828
|
+
const { openConnectModal, connectModalOpen } = (0, import_rainbowkit2.useConnectModal)();
|
|
4829
|
+
const { address, connector, isConnected } = (0, import_wagmi3.useAccount)();
|
|
4830
|
+
const { disconnectAsync } = (0, import_wagmi3.useDisconnect)({ config });
|
|
4831
|
+
const chainId = (0, import_wagmi3.useChainId)();
|
|
4832
|
+
const { events, login } = useMatch();
|
|
4833
|
+
const [inited, setInited] = (0, import_react31.useState)(false);
|
|
4834
|
+
const { status, setStatus, error, setError, statusRef, nonce, setNonce, init } = useWalletBox({
|
|
4835
|
+
onInit: async ({ setStatus: setStatus2 }) => {
|
|
4836
|
+
setStatus2("start");
|
|
4837
|
+
}
|
|
4838
|
+
});
|
|
4839
|
+
(0, import_react31.useEffect)(() => {
|
|
4840
|
+
matchlog_default.log(`status=${status}`, `connectModalOpen=${connectModalOpen}`, `address=${address}`, `isConnected=${isConnected}`);
|
|
4841
|
+
}, [status, connectModalOpen, isConnected, address]);
|
|
4842
|
+
(0, import_react31.useEffect)(() => {
|
|
4843
|
+
if (connectModalOpen) {
|
|
4844
|
+
setStatus("connecting");
|
|
4845
|
+
return;
|
|
4846
|
+
}
|
|
4847
|
+
if (!connectModalOpen && address) {
|
|
4848
|
+
toLoginInWallet(address);
|
|
4849
|
+
return;
|
|
4850
|
+
}
|
|
4851
|
+
if (!connectModalOpen && !address) {
|
|
4852
|
+
setStatus("start");
|
|
4853
|
+
}
|
|
4854
|
+
}, [connectModalOpen, address]);
|
|
4855
|
+
(0, import_react31.useEffect)(() => {
|
|
4856
|
+
if (openConnectModal && !isConnected && !inited) {
|
|
4857
|
+
openConnectModal && openConnectModal();
|
|
4858
|
+
setInited(true);
|
|
4859
|
+
}
|
|
4860
|
+
}, [openConnectModal, inited]);
|
|
4861
|
+
const toLoginInWallet = async (address2) => {
|
|
4862
|
+
if (statusRef.current != "start" && statusRef.current != "connecting") return;
|
|
4863
|
+
try {
|
|
4864
|
+
if (!address2) {
|
|
4865
|
+
throw new Error("Wallet address is empty");
|
|
4866
|
+
}
|
|
4867
|
+
setStatus("nonce");
|
|
4868
|
+
const res = type == "bind" ? await getWalletInitApi({
|
|
4869
|
+
address: address2,
|
|
4870
|
+
type: "EVM"
|
|
4871
|
+
}) : await getWalletNonceApi({ address: address2, type: "EVM" });
|
|
4872
|
+
if (!isSuccess(res)) {
|
|
4873
|
+
throw new Error(res.message);
|
|
4874
|
+
}
|
|
4875
|
+
setNonce(res.data.nonce);
|
|
4876
|
+
} catch (error2) {
|
|
4877
|
+
console.error("toLoginInWallet", error2);
|
|
4878
|
+
setStatus("error");
|
|
4879
|
+
setError(error2.message);
|
|
4880
|
+
}
|
|
4881
|
+
};
|
|
4882
|
+
const signature = (0, import_react31.useCallback)(async () => {
|
|
4883
|
+
if (!nonce || status != "nonce") {
|
|
4884
|
+
return;
|
|
4885
|
+
}
|
|
4886
|
+
try {
|
|
4887
|
+
const signer = await getEthersSigner(config);
|
|
4888
|
+
if (!signer) return;
|
|
4889
|
+
matchlog_default.log("signature", nonce, status);
|
|
4890
|
+
if (!address) {
|
|
4891
|
+
throw new Error("Wallet address is empty");
|
|
4892
|
+
}
|
|
4893
|
+
setStatus("signer");
|
|
4894
|
+
const params = {
|
|
4895
|
+
domain: window.location.host,
|
|
4896
|
+
address,
|
|
4897
|
+
statement: "By signing, you are proving you own this wallet and logging in. This does not initiate a transaction or cost any fees.",
|
|
4898
|
+
uri: window.location.origin,
|
|
4899
|
+
nonce,
|
|
4900
|
+
version: "1",
|
|
4901
|
+
chainId
|
|
4902
|
+
};
|
|
4903
|
+
const message = new import_siwe.SiweMessage({ ...params });
|
|
4904
|
+
const signature2 = await signer.signMessage(message.prepareMessage());
|
|
4905
|
+
const obj = {
|
|
4906
|
+
type: "EVM",
|
|
4907
|
+
address,
|
|
4908
|
+
signature: signature2,
|
|
4909
|
+
message: `${message.prepareMessage()}`,
|
|
4910
|
+
connector_type: connector?.type || "",
|
|
4911
|
+
wallet_client_type: connector?.name || ""
|
|
4912
|
+
};
|
|
4913
|
+
const res = type == "bind" ? await toBindWalletApi(obj) : await loginByWalletApi(obj);
|
|
4914
|
+
if (!isSuccess(res)) {
|
|
4915
|
+
throw new Error(res.message);
|
|
4916
|
+
}
|
|
4917
|
+
matchlog_default.log(res);
|
|
4918
|
+
setStatus("success");
|
|
4919
|
+
if (type == "bind") {
|
|
4920
|
+
events.onBind && events.onBind({
|
|
4921
|
+
type: "evm"
|
|
4922
|
+
});
|
|
4923
|
+
eventManager_default.emit("onBind", {
|
|
4924
|
+
type: "evm"
|
|
4925
|
+
});
|
|
4926
|
+
} else {
|
|
4927
|
+
await login({
|
|
4928
|
+
token: `${res.data.token_type} ${res.data.access_token}`
|
|
4929
|
+
});
|
|
4930
|
+
}
|
|
4931
|
+
onSuccess && onSuccess();
|
|
4932
|
+
} catch (error2) {
|
|
4933
|
+
console.error("signature", error2);
|
|
4934
|
+
setStatus("error");
|
|
4935
|
+
setError(error2.reason || error2.message);
|
|
4936
|
+
}
|
|
4937
|
+
}, [nonce, status, address]);
|
|
4938
|
+
(0, import_react31.useEffect)(() => {
|
|
4939
|
+
if (signature) {
|
|
4940
|
+
signature();
|
|
4941
|
+
}
|
|
4942
|
+
}, [signature]);
|
|
4943
|
+
const onError = async () => {
|
|
4944
|
+
if (isConnected) {
|
|
4945
|
+
try {
|
|
4946
|
+
await disconnectAsync();
|
|
4947
|
+
} catch (error2) {
|
|
4948
|
+
console.error("disconnectAsync", error2);
|
|
4949
|
+
}
|
|
4950
|
+
}
|
|
4951
|
+
setError("");
|
|
4952
|
+
setNonce(void 0);
|
|
4953
|
+
setStatus("start");
|
|
4954
|
+
openConnectModal?.();
|
|
4955
|
+
};
|
|
4956
|
+
const onConnect = async () => {
|
|
4957
|
+
if (isConnected) {
|
|
4958
|
+
try {
|
|
4959
|
+
await disconnectAsync();
|
|
4960
|
+
} catch (error2) {
|
|
4961
|
+
console.error("disconnectAsync", error2);
|
|
4962
|
+
}
|
|
4963
|
+
}
|
|
4964
|
+
setError("");
|
|
4965
|
+
setNonce(void 0);
|
|
4966
|
+
openConnectModal?.();
|
|
4967
|
+
};
|
|
4968
|
+
const onDisconnect = async () => {
|
|
4969
|
+
if (isConnected) {
|
|
4970
|
+
try {
|
|
4971
|
+
await disconnectAsync();
|
|
4972
|
+
} catch (error2) {
|
|
4973
|
+
console.error("disconnectAsync", error2);
|
|
4974
|
+
}
|
|
4975
|
+
}
|
|
4976
|
+
setError("");
|
|
4977
|
+
setNonce(void 0);
|
|
4978
|
+
setStatus("start");
|
|
4979
|
+
};
|
|
4980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4981
|
+
WalletModalContentV2,
|
|
4982
|
+
{
|
|
4983
|
+
status,
|
|
4984
|
+
onSuccess: async () => onSuccess?.(),
|
|
4985
|
+
error,
|
|
4986
|
+
onError,
|
|
4987
|
+
onConnect,
|
|
4988
|
+
onDisconnect
|
|
4989
|
+
}
|
|
4990
|
+
);
|
|
4991
|
+
}
|
|
4992
|
+
function EVMConnectModal({
|
|
4993
|
+
type = "login",
|
|
4994
|
+
onSuccess,
|
|
4995
|
+
...props
|
|
4996
|
+
}) {
|
|
4997
|
+
const intl = (0, import_react_intl14.useIntl)();
|
|
4998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4999
|
+
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5000
|
+
}, {
|
|
5001
|
+
name: "EVM"
|
|
5002
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(WalletContent, { onSuccess, type }) });
|
|
5003
|
+
}
|
|
5004
|
+
function EVMModal(props) {
|
|
5005
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(EVMConnectModal, { ...props });
|
|
5006
|
+
}
|
|
5007
|
+
|
|
5008
|
+
// src/components/TRONModal/index.tsx
|
|
5009
|
+
var import_react33 = __toESM(require("react"));
|
|
5010
|
+
var import_react_intl15 = require("react-intl");
|
|
5011
|
+
|
|
5012
|
+
// src/lib/tron/TronLinkAdapter.ts
|
|
5013
|
+
var TronLinkAdapter = class {
|
|
5014
|
+
constructor() {
|
|
5015
|
+
this.name = "TronLink Wallet";
|
|
5016
|
+
this.website = "https://www.tronlink.org/";
|
|
5017
|
+
this.walletKey = "tronlink";
|
|
5018
|
+
}
|
|
5019
|
+
async isInstalled() {
|
|
5020
|
+
return typeof window.tronWeb !== "undefined" && typeof window.tronLink !== "undefined";
|
|
5021
|
+
}
|
|
5022
|
+
async connect() {
|
|
5023
|
+
if (!await this.isInstalled()) throw new Error("TronLink Wallet is not installed");
|
|
5024
|
+
if (!window.tronWeb.defaultAddress.base58) {
|
|
5025
|
+
await window.tronWeb.request(
|
|
5026
|
+
{
|
|
5027
|
+
method: "tron_requestAccounts",
|
|
5028
|
+
params: window.tronLink.tronlinkParams
|
|
5029
|
+
}
|
|
5030
|
+
);
|
|
5031
|
+
}
|
|
5032
|
+
if (!window.tronWeb.defaultAddress.base58) {
|
|
5033
|
+
throw new Error("Your should unlink your wallet and try again");
|
|
5034
|
+
}
|
|
5035
|
+
return window.tronWeb.defaultAddress.base58;
|
|
5036
|
+
}
|
|
5037
|
+
async signMessage(message) {
|
|
5038
|
+
return await window.tronWeb.trx.signMessageV2(message);
|
|
5039
|
+
}
|
|
5040
|
+
};
|
|
5041
|
+
|
|
5042
|
+
// src/hooks/useTRONWallet.ts
|
|
5043
|
+
var import_react32 = require("react");
|
|
5044
|
+
|
|
5045
|
+
// src/lib/tron/BitgetAdapter.ts
|
|
5046
|
+
var BitgetAdapter = class {
|
|
5047
|
+
constructor() {
|
|
5048
|
+
this.name = "Bitget Wallet";
|
|
5049
|
+
this.website = "https://web3.bitget.com/zh-CN/wallet-download";
|
|
5050
|
+
this.walletKey = "bitget";
|
|
5051
|
+
}
|
|
5052
|
+
async isInstalled() {
|
|
5053
|
+
return typeof window.bitkeep !== "undefined" && typeof window.bitkeep.tronWeb !== "undefined" && typeof window.bitkeep.tronLink !== "undefined";
|
|
5054
|
+
}
|
|
5055
|
+
async connect() {
|
|
5056
|
+
if (!await this.isInstalled()) throw new Error("Bitkeep Wallet is not installed");
|
|
5057
|
+
await window.bitkeep.tronLink.request({ method: "tron_requestAccounts" });
|
|
5058
|
+
return window.bitkeep.tronWeb.defaultAddress.base58;
|
|
5059
|
+
}
|
|
5060
|
+
async signMessage(message) {
|
|
5061
|
+
return await window.bitkeep.tronWeb.trx.signMessageV2(message);
|
|
5062
|
+
}
|
|
5063
|
+
};
|
|
5064
|
+
|
|
5065
|
+
// src/lib/tron/OKXAdapter.ts
|
|
5066
|
+
var OKXAdapter = class {
|
|
5067
|
+
constructor() {
|
|
5068
|
+
this.name = "OKX Wallet";
|
|
5069
|
+
this.website = "https://www.okx.com/zh-hans/download";
|
|
4291
5070
|
this.walletKey = "okx";
|
|
4292
5071
|
}
|
|
4293
5072
|
async isInstalled() {
|
|
@@ -4306,9 +5085,9 @@ var OKXAdapter = class {
|
|
|
4306
5085
|
// src/hooks/useTRONWallet.ts
|
|
4307
5086
|
var useTRONWallet = () => {
|
|
4308
5087
|
const wallets = [new TronLinkAdapter(), new BitgetAdapter(), new OKXAdapter()];
|
|
4309
|
-
const [installedWallets, setInstalledWallets] = (0,
|
|
4310
|
-
const [address, setAddress] = (0,
|
|
4311
|
-
(0,
|
|
5088
|
+
const [installedWallets, setInstalledWallets] = (0, import_react32.useState)([]);
|
|
5089
|
+
const [address, setAddress] = (0, import_react32.useState)(null);
|
|
5090
|
+
(0, import_react32.useEffect)(() => {
|
|
4312
5091
|
const getInstalled = async () => {
|
|
4313
5092
|
const installed = await Promise.all(wallets.map((wallet2) => wallet2.isInstalled().then((isInstalled) => ({
|
|
4314
5093
|
wallet: wallet2,
|
|
@@ -4318,11 +5097,11 @@ var useTRONWallet = () => {
|
|
|
4318
5097
|
};
|
|
4319
5098
|
getInstalled();
|
|
4320
5099
|
}, []);
|
|
4321
|
-
const [wallet, chooseWallet] = (0,
|
|
5100
|
+
const [wallet, chooseWallet] = (0, import_react32.useState)(null);
|
|
4322
5101
|
const onConnect = async () => {
|
|
4323
5102
|
setAddress(await wallet.connect());
|
|
4324
5103
|
};
|
|
4325
|
-
(0,
|
|
5104
|
+
(0, import_react32.useEffect)(() => {
|
|
4326
5105
|
if (!wallet) {
|
|
4327
5106
|
setAddress(null);
|
|
4328
5107
|
}
|
|
@@ -4338,25 +5117,25 @@ var useTRONWallet = () => {
|
|
|
4338
5117
|
};
|
|
4339
5118
|
|
|
4340
5119
|
// src/components/TRONModal/index.tsx
|
|
4341
|
-
var
|
|
5120
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
4342
5121
|
function TRONConnectModal({
|
|
4343
5122
|
type = "login",
|
|
4344
5123
|
onSuccess,
|
|
4345
5124
|
...props
|
|
4346
5125
|
}) {
|
|
4347
5126
|
const isDownMd = useDownMd();
|
|
4348
|
-
const intl = (0,
|
|
5127
|
+
const intl = (0, import_react_intl15.useIntl)();
|
|
4349
5128
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
|
|
4350
5129
|
const iconMaps = {
|
|
4351
|
-
tronlink: /* @__PURE__ */ (0,
|
|
4352
|
-
bitget: /* @__PURE__ */ (0,
|
|
4353
|
-
okx: /* @__PURE__ */ (0,
|
|
5130
|
+
tronlink: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
|
|
5131
|
+
bitget: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(BitgetIcon, { size: isDownMd ? 36 : 40 }),
|
|
5132
|
+
okx: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(OKXIcon, { size: isDownMd ? 36 : 40 })
|
|
4354
5133
|
};
|
|
4355
5134
|
const { events, login } = useMatch();
|
|
4356
|
-
const [status, setStatus] = (0,
|
|
4357
|
-
const statusRef =
|
|
4358
|
-
const [error, setError] = (0,
|
|
4359
|
-
const connected = (0,
|
|
5135
|
+
const [status, setStatus] = (0, import_react33.useState)("");
|
|
5136
|
+
const statusRef = import_react33.default.useRef(status);
|
|
5137
|
+
const [error, setError] = (0, import_react33.useState)("");
|
|
5138
|
+
const connected = (0, import_react33.useMemo)(() => {
|
|
4360
5139
|
return !!address;
|
|
4361
5140
|
}, [address]);
|
|
4362
5141
|
const disconnect = async () => {
|
|
@@ -4424,7 +5203,7 @@ function TRONConnectModal({
|
|
|
4424
5203
|
statusRef.current = "";
|
|
4425
5204
|
}
|
|
4426
5205
|
};
|
|
4427
|
-
(0,
|
|
5206
|
+
(0, import_react33.useEffect)(() => {
|
|
4428
5207
|
if (wallet) {
|
|
4429
5208
|
console.log("onConnect");
|
|
4430
5209
|
onConnect();
|
|
@@ -4432,21 +5211,21 @@ function TRONConnectModal({
|
|
|
4432
5211
|
setStatus("");
|
|
4433
5212
|
}
|
|
4434
5213
|
}, [wallet]);
|
|
4435
|
-
(0,
|
|
5214
|
+
(0, import_react33.useEffect)(() => {
|
|
4436
5215
|
if (address) {
|
|
4437
5216
|
toLoginInWallet();
|
|
4438
5217
|
}
|
|
4439
5218
|
}, [address]);
|
|
4440
|
-
(0,
|
|
5219
|
+
(0, import_react33.useEffect)(() => {
|
|
4441
5220
|
if (!props.isOpen) {
|
|
4442
5221
|
disconnect();
|
|
4443
5222
|
}
|
|
4444
5223
|
}, [props.isOpen]);
|
|
4445
|
-
return /* @__PURE__ */ (0,
|
|
5224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4446
5225
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4447
5226
|
}, {
|
|
4448
5227
|
name: "TRON"
|
|
4449
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5228
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4450
5229
|
WalletModalContent,
|
|
4451
5230
|
{
|
|
4452
5231
|
error,
|
|
@@ -4459,9 +5238,9 @@ function TRONConnectModal({
|
|
|
4459
5238
|
setVisible: () => {
|
|
4460
5239
|
}
|
|
4461
5240
|
}
|
|
4462
|
-
) : /* @__PURE__ */ (0,
|
|
5241
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
4463
5242
|
installedWallets.map((wallet2) => {
|
|
4464
|
-
return /* @__PURE__ */ (0,
|
|
5243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4465
5244
|
RecommendItem,
|
|
4466
5245
|
{
|
|
4467
5246
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -4474,14 +5253,14 @@ function TRONConnectModal({
|
|
|
4474
5253
|
);
|
|
4475
5254
|
}),
|
|
4476
5255
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
4477
|
-
return /* @__PURE__ */ (0,
|
|
5256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4478
5257
|
RecommendItem,
|
|
4479
5258
|
{
|
|
4480
5259
|
icon: iconMaps[wallet2.walletKey],
|
|
4481
5260
|
name: wallet2.name,
|
|
4482
5261
|
onClick: () => {
|
|
4483
5262
|
},
|
|
4484
|
-
footer: /* @__PURE__ */ (0,
|
|
5263
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Button, { size: "sm", onClick: () => {
|
|
4485
5264
|
window.open(wallet2.website);
|
|
4486
5265
|
}, children: "Install" })
|
|
4487
5266
|
},
|
|
@@ -4491,28 +5270,28 @@ function TRONConnectModal({
|
|
|
4491
5270
|
] }) }) });
|
|
4492
5271
|
}
|
|
4493
5272
|
function TRONModal(props) {
|
|
4494
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5273
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(TRONConnectModal, { ...props, type: props.type });
|
|
4495
5274
|
}
|
|
4496
5275
|
|
|
4497
5276
|
// src/components/TONModal/index.tsx
|
|
4498
|
-
var
|
|
4499
|
-
var
|
|
5277
|
+
var import_react34 = __toESM(require("react"));
|
|
5278
|
+
var import_react_intl16 = require("react-intl");
|
|
4500
5279
|
var import_ui_react = require("@tonconnect/ui-react");
|
|
4501
|
-
var
|
|
4502
|
-
function
|
|
5280
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
5281
|
+
function WalletContent2({
|
|
4503
5282
|
onSuccess,
|
|
4504
5283
|
type
|
|
4505
5284
|
}) {
|
|
4506
5285
|
const { events, login } = useMatch();
|
|
4507
|
-
const [connected, setConnected] = (0,
|
|
5286
|
+
const [connected, setConnected] = (0, import_react34.useState)(false);
|
|
4508
5287
|
const wallet = (0, import_ui_react.useTonWallet)();
|
|
4509
5288
|
const userFriendlyAddress = (0, import_ui_react.useTonAddress)();
|
|
4510
5289
|
const [tonConnectUI] = (0, import_ui_react.useTonConnectUI)();
|
|
4511
5290
|
const { state, open, close } = (0, import_ui_react.useTonConnectModal)();
|
|
4512
|
-
const [status, setStatus] = (0,
|
|
4513
|
-
const statusRef =
|
|
4514
|
-
const [error, setError] = (0,
|
|
4515
|
-
(0,
|
|
5291
|
+
const [status, setStatus] = (0, import_react34.useState)("");
|
|
5292
|
+
const statusRef = import_react34.default.useRef(status);
|
|
5293
|
+
const [error, setError] = (0, import_react34.useState)("");
|
|
5294
|
+
(0, import_react34.useEffect)(() => {
|
|
4516
5295
|
const init = async () => {
|
|
4517
5296
|
if (tonConnectUI.connected) {
|
|
4518
5297
|
await tonConnectUI.disconnect();
|
|
@@ -4585,7 +5364,7 @@ function WalletContent({
|
|
|
4585
5364
|
}
|
|
4586
5365
|
});
|
|
4587
5366
|
}, []);
|
|
4588
|
-
(0,
|
|
5367
|
+
(0, import_react34.useEffect)(() => {
|
|
4589
5368
|
if (wallet) {
|
|
4590
5369
|
setConnected(true);
|
|
4591
5370
|
console.log("Wallet connected:", wallet);
|
|
@@ -4596,7 +5375,7 @@ function WalletContent({
|
|
|
4596
5375
|
setStatus("");
|
|
4597
5376
|
}
|
|
4598
5377
|
}, [wallet]);
|
|
4599
|
-
(0,
|
|
5378
|
+
(0, import_react34.useEffect)(() => {
|
|
4600
5379
|
console.log({
|
|
4601
5380
|
state,
|
|
4602
5381
|
wallet
|
|
@@ -4625,7 +5404,7 @@ function WalletContent({
|
|
|
4625
5404
|
}
|
|
4626
5405
|
}
|
|
4627
5406
|
}, [state]);
|
|
4628
|
-
return /* @__PURE__ */ (0,
|
|
5407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4629
5408
|
WalletModalContent,
|
|
4630
5409
|
{
|
|
4631
5410
|
connected,
|
|
@@ -4656,28 +5435,28 @@ function TONConnectModal({
|
|
|
4656
5435
|
onSuccess,
|
|
4657
5436
|
...props
|
|
4658
5437
|
}) {
|
|
4659
|
-
const intl = (0,
|
|
5438
|
+
const intl = (0, import_react_intl16.useIntl)();
|
|
4660
5439
|
const { endpoints, appid } = useLocalStore_default();
|
|
4661
5440
|
const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
|
|
4662
|
-
return /* @__PURE__ */ (0,
|
|
5441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4663
5442
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4664
5443
|
}, {
|
|
4665
5444
|
name: "TON"
|
|
4666
|
-
}), children: /* @__PURE__ */ (0,
|
|
5445
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4667
5446
|
import_ui_react.TonConnectUIProvider,
|
|
4668
5447
|
{
|
|
4669
5448
|
manifestUrl,
|
|
4670
|
-
children: /* @__PURE__ */ (0,
|
|
5449
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(WalletContent2, { onSuccess, type })
|
|
4671
5450
|
}
|
|
4672
5451
|
) });
|
|
4673
5452
|
}
|
|
4674
5453
|
function TONModal(props) {
|
|
4675
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5454
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(TONConnectModal, { ...props });
|
|
4676
5455
|
}
|
|
4677
5456
|
|
|
4678
5457
|
// src/components/BTCModal/index.tsx
|
|
4679
|
-
var
|
|
4680
|
-
var
|
|
5458
|
+
var import_react36 = __toESM(require("react"));
|
|
5459
|
+
var import_react_intl17 = require("react-intl");
|
|
4681
5460
|
|
|
4682
5461
|
// src/lib/btc/UnisatAdapter.ts
|
|
4683
5462
|
var UnisatAdapter = class {
|
|
@@ -4817,7 +5596,7 @@ var LeatherAdapter = class {
|
|
|
4817
5596
|
return response.result.addresses[0].address;
|
|
4818
5597
|
}
|
|
4819
5598
|
async signMessage(message) {
|
|
4820
|
-
if (!await this.isInstalled()) throw new Error("
|
|
5599
|
+
if (!await this.isInstalled()) throw new Error("Leather Wallet is not installed");
|
|
4821
5600
|
const response = await window.LeatherProvider?.request("signMessage", { message });
|
|
4822
5601
|
matchlog_default.log("response", response);
|
|
4823
5602
|
return response.result.signature;
|
|
@@ -4825,12 +5604,47 @@ var LeatherAdapter = class {
|
|
|
4825
5604
|
};
|
|
4826
5605
|
|
|
4827
5606
|
// src/hooks/useBTCWallet.ts
|
|
4828
|
-
var
|
|
5607
|
+
var import_react35 = require("react");
|
|
5608
|
+
|
|
5609
|
+
// src/lib/btc/PhantomAdapter.ts
|
|
5610
|
+
var PhantomAdapter = class {
|
|
5611
|
+
constructor() {
|
|
5612
|
+
this.name = "Phantom Wallet";
|
|
5613
|
+
this.website = "https://www.phantom.com/";
|
|
5614
|
+
this.walletKey = "phantom";
|
|
5615
|
+
}
|
|
5616
|
+
async isInstalled() {
|
|
5617
|
+
return typeof window.phantom !== "undefined" && typeof window.phantom.bitcoin !== "undefined";
|
|
5618
|
+
}
|
|
5619
|
+
async connect() {
|
|
5620
|
+
if (!await this.isInstalled()) throw new Error("Phantom Wallet is not installed");
|
|
5621
|
+
const response = await window.phantom.bitcoin.requestAccounts();
|
|
5622
|
+
const ordinalAddress = response.find((n) => n.purpose == "ordinals");
|
|
5623
|
+
matchlog_default.log("Addresses:", ordinalAddress);
|
|
5624
|
+
if (!ordinalAddress) {
|
|
5625
|
+
throw new Error("No addresses found in Phantom Wallet");
|
|
5626
|
+
}
|
|
5627
|
+
return ordinalAddress.address;
|
|
5628
|
+
}
|
|
5629
|
+
async signMessage(message) {
|
|
5630
|
+
if (!await this.isInstalled()) throw new Error("Phantom Wallet is not installed");
|
|
5631
|
+
const address = await this.connect();
|
|
5632
|
+
try {
|
|
5633
|
+
const { signature } = await window.phantom.bitcoin.signMessage(address, new TextEncoder().encode(message));
|
|
5634
|
+
return bytesToBase64(signature);
|
|
5635
|
+
} catch (error) {
|
|
5636
|
+
console.error(error);
|
|
5637
|
+
throw error;
|
|
5638
|
+
}
|
|
5639
|
+
}
|
|
5640
|
+
};
|
|
5641
|
+
|
|
5642
|
+
// src/hooks/useBTCWallet.ts
|
|
4829
5643
|
var useBTCWallet = () => {
|
|
4830
|
-
const wallets = [new UnisatAdapter(), new XverseAdapter(), new LeatherAdapter()];
|
|
4831
|
-
const [installedWallets, setInstalledWallets] = (0,
|
|
4832
|
-
const [address, setAddress] = (0,
|
|
4833
|
-
(0,
|
|
5644
|
+
const wallets = [new UnisatAdapter(), new XverseAdapter(), new LeatherAdapter(), new PhantomAdapter()];
|
|
5645
|
+
const [installedWallets, setInstalledWallets] = (0, import_react35.useState)([]);
|
|
5646
|
+
const [address, setAddress] = (0, import_react35.useState)(null);
|
|
5647
|
+
(0, import_react35.useEffect)(() => {
|
|
4834
5648
|
const getInstalled = async () => {
|
|
4835
5649
|
const installed = await Promise.all(wallets.map((wallet2) => wallet2.isInstalled().then((isInstalled) => ({
|
|
4836
5650
|
wallet: wallet2,
|
|
@@ -4840,11 +5654,11 @@ var useBTCWallet = () => {
|
|
|
4840
5654
|
};
|
|
4841
5655
|
getInstalled();
|
|
4842
5656
|
}, []);
|
|
4843
|
-
const [wallet, chooseWallet] = (0,
|
|
5657
|
+
const [wallet, chooseWallet] = (0, import_react35.useState)(null);
|
|
4844
5658
|
const onConnect = async () => {
|
|
4845
5659
|
setAddress(await wallet.connect());
|
|
4846
5660
|
};
|
|
4847
|
-
(0,
|
|
5661
|
+
(0, import_react35.useEffect)(() => {
|
|
4848
5662
|
if (!wallet) {
|
|
4849
5663
|
setAddress(null);
|
|
4850
5664
|
}
|
|
@@ -4860,25 +5674,26 @@ var useBTCWallet = () => {
|
|
|
4860
5674
|
};
|
|
4861
5675
|
|
|
4862
5676
|
// src/components/BTCModal/index.tsx
|
|
4863
|
-
var
|
|
5677
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
4864
5678
|
function BTCConnectModal({
|
|
4865
5679
|
type = "login",
|
|
4866
5680
|
onSuccess,
|
|
4867
5681
|
...props
|
|
4868
5682
|
}) {
|
|
4869
5683
|
const isDownMd = useDownMd();
|
|
4870
|
-
const intl = (0,
|
|
5684
|
+
const intl = (0, import_react_intl17.useIntl)();
|
|
4871
5685
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
|
|
4872
5686
|
const iconMaps = {
|
|
4873
|
-
leather: /* @__PURE__ */ (0,
|
|
4874
|
-
unisat: /* @__PURE__ */ (0,
|
|
4875
|
-
xverse: /* @__PURE__ */ (0,
|
|
5687
|
+
leather: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(LeatherIcon, { size: isDownMd ? 36 : 40 }),
|
|
5688
|
+
unisat: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(UnisatIcon, { size: isDownMd ? 36 : 40 }),
|
|
5689
|
+
xverse: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(XverseIcon, { size: isDownMd ? 36 : 40 }),
|
|
5690
|
+
phantom: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(PhantomIcon, { size: isDownMd ? 36 : 40 })
|
|
4876
5691
|
};
|
|
4877
5692
|
const { events, login } = useMatch();
|
|
4878
|
-
const [status, setStatus] = (0,
|
|
4879
|
-
const statusRef =
|
|
4880
|
-
const [error, setError] = (0,
|
|
4881
|
-
const connected = (0,
|
|
5693
|
+
const [status, setStatus] = (0, import_react36.useState)("");
|
|
5694
|
+
const statusRef = import_react36.default.useRef(status);
|
|
5695
|
+
const [error, setError] = (0, import_react36.useState)("");
|
|
5696
|
+
const connected = (0, import_react36.useMemo)(() => {
|
|
4882
5697
|
return !!address;
|
|
4883
5698
|
}, [address]);
|
|
4884
5699
|
const disconnect = async () => {
|
|
@@ -4942,7 +5757,7 @@ function BTCConnectModal({
|
|
|
4942
5757
|
statusRef.current = "";
|
|
4943
5758
|
}
|
|
4944
5759
|
};
|
|
4945
|
-
(0,
|
|
5760
|
+
(0, import_react36.useEffect)(() => {
|
|
4946
5761
|
if (wallet) {
|
|
4947
5762
|
console.log("onConnect");
|
|
4948
5763
|
try {
|
|
@@ -4955,12 +5770,12 @@ function BTCConnectModal({
|
|
|
4955
5770
|
setStatus("");
|
|
4956
5771
|
}
|
|
4957
5772
|
}, [wallet]);
|
|
4958
|
-
(0,
|
|
5773
|
+
(0, import_react36.useEffect)(() => {
|
|
4959
5774
|
if (address) {
|
|
4960
5775
|
toLoginInWallet();
|
|
4961
5776
|
}
|
|
4962
5777
|
}, [address]);
|
|
4963
|
-
(0,
|
|
5778
|
+
(0, import_react36.useEffect)(() => {
|
|
4964
5779
|
if (!props.isOpen) {
|
|
4965
5780
|
disconnect();
|
|
4966
5781
|
}
|
|
@@ -4972,11 +5787,11 @@ function BTCConnectModal({
|
|
|
4972
5787
|
statusRef.current = "";
|
|
4973
5788
|
setError("");
|
|
4974
5789
|
};
|
|
4975
|
-
return /* @__PURE__ */ (0,
|
|
5790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4976
5791
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4977
5792
|
}, {
|
|
4978
5793
|
name: "BTC"
|
|
4979
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5794
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
4980
5795
|
WalletModalContent,
|
|
4981
5796
|
{
|
|
4982
5797
|
error,
|
|
@@ -4989,9 +5804,9 @@ function BTCConnectModal({
|
|
|
4989
5804
|
setVisible: () => {
|
|
4990
5805
|
}
|
|
4991
5806
|
}
|
|
4992
|
-
) : /* @__PURE__ */ (0,
|
|
5807
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
4993
5808
|
installedWallets.map((wallet2) => {
|
|
4994
|
-
return /* @__PURE__ */ (0,
|
|
5809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
4995
5810
|
RecommendItem,
|
|
4996
5811
|
{
|
|
4997
5812
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -5004,14 +5819,14 @@ function BTCConnectModal({
|
|
|
5004
5819
|
);
|
|
5005
5820
|
}),
|
|
5006
5821
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
5007
|
-
return /* @__PURE__ */ (0,
|
|
5822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
5008
5823
|
RecommendItem,
|
|
5009
5824
|
{
|
|
5010
5825
|
icon: iconMaps[wallet2.walletKey],
|
|
5011
5826
|
name: wallet2.name,
|
|
5012
5827
|
onClick: () => {
|
|
5013
5828
|
},
|
|
5014
|
-
footer: /* @__PURE__ */ (0,
|
|
5829
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Button, { size: "sm", onClick: () => {
|
|
5015
5830
|
window.open(wallet2.website);
|
|
5016
5831
|
}, children: "Install" })
|
|
5017
5832
|
},
|
|
@@ -5021,23 +5836,23 @@ function BTCConnectModal({
|
|
|
5021
5836
|
] }) }) });
|
|
5022
5837
|
}
|
|
5023
5838
|
function BTCModal(props) {
|
|
5024
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5839
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(BTCConnectModal, { ...props });
|
|
5025
5840
|
}
|
|
5026
5841
|
|
|
5027
5842
|
// src/components/WalletModal/index.tsx
|
|
5028
|
-
var
|
|
5029
|
-
var
|
|
5030
|
-
var
|
|
5843
|
+
var import_react37 = require("react");
|
|
5844
|
+
var import_react_intl18 = require("react-intl");
|
|
5845
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
5031
5846
|
function WalletConnectModal({
|
|
5032
5847
|
type,
|
|
5033
5848
|
methods: _methods,
|
|
5034
5849
|
...props
|
|
5035
5850
|
}) {
|
|
5036
|
-
const intl = (0,
|
|
5851
|
+
const intl = (0, import_react_intl18.useIntl)();
|
|
5037
5852
|
const { walletMap } = useWalletConfig();
|
|
5038
5853
|
const { bind, login } = useUserInfo();
|
|
5039
5854
|
const config = useAppConfig();
|
|
5040
|
-
const methods = (0,
|
|
5855
|
+
const methods = (0, import_react37.useMemo)(() => {
|
|
5041
5856
|
if (_methods) return _methods;
|
|
5042
5857
|
if (!config.platform) {
|
|
5043
5858
|
return [];
|
|
@@ -5045,13 +5860,13 @@ function WalletConnectModal({
|
|
|
5045
5860
|
const platform = config.platform.map((p) => p.toLowerCase());
|
|
5046
5861
|
return WALLET_METHODS.filter((m) => platform.includes(m));
|
|
5047
5862
|
}, [config.platform, _methods]);
|
|
5048
|
-
return /* @__PURE__ */ (0,
|
|
5863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5049
5864
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5050
5865
|
}, {
|
|
5051
5866
|
name: ""
|
|
5052
|
-
}), children: /* @__PURE__ */ (0,
|
|
5867
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "matchid-login-recommend-list", children: methods.map((method, index) => {
|
|
5053
5868
|
const m = walletMap[method];
|
|
5054
|
-
return /* @__PURE__ */ (0,
|
|
5869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5055
5870
|
RecommendItem,
|
|
5056
5871
|
{
|
|
5057
5872
|
icon: m?.icon,
|
|
@@ -5065,21 +5880,21 @@ function WalletConnectModal({
|
|
|
5065
5880
|
}) }) }) });
|
|
5066
5881
|
}
|
|
5067
5882
|
function WalletModal(props) {
|
|
5068
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5883
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(WalletConnectModal, { ...props });
|
|
5069
5884
|
}
|
|
5070
5885
|
|
|
5071
5886
|
// src/components/AlphaAvatar/index.tsx
|
|
5072
|
-
var
|
|
5073
|
-
var
|
|
5887
|
+
var import_react38 = require("react");
|
|
5888
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
5074
5889
|
function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
5075
|
-
const [avatar, setAvatar] = (0,
|
|
5076
|
-
(0,
|
|
5890
|
+
const [avatar, setAvatar] = (0, import_react38.useState)(void 0);
|
|
5891
|
+
(0, import_react38.useEffect)(() => {
|
|
5077
5892
|
if (name) {
|
|
5078
5893
|
const char = name[0].toUpperCase();
|
|
5079
5894
|
setAvatar(char);
|
|
5080
5895
|
}
|
|
5081
5896
|
}, [name]);
|
|
5082
|
-
return /* @__PURE__ */ (0,
|
|
5897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
5083
5898
|
width: size,
|
|
5084
5899
|
height: size,
|
|
5085
5900
|
fontSize: Math.ceil(size / 2)
|
|
@@ -5087,7 +5902,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
5087
5902
|
}
|
|
5088
5903
|
|
|
5089
5904
|
// src/components/WalletAsset/index.tsx
|
|
5090
|
-
var
|
|
5905
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
5091
5906
|
function WalletAsset({
|
|
5092
5907
|
onAssetClick,
|
|
5093
5908
|
matchWalletAssetsOptions
|
|
@@ -5097,7 +5912,7 @@ function WalletAsset({
|
|
|
5097
5912
|
list: walletAssets.mergedAssets
|
|
5098
5913
|
});
|
|
5099
5914
|
const { list } = useMatchChain();
|
|
5100
|
-
return /* @__PURE__ */ (0,
|
|
5915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5101
5916
|
const clickFunc = onAssetClick && onAssetClick(n);
|
|
5102
5917
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5103
5918
|
const getFooterColor = () => {
|
|
@@ -5112,11 +5927,11 @@ function WalletAsset({
|
|
|
5112
5927
|
}
|
|
5113
5928
|
return "";
|
|
5114
5929
|
};
|
|
5115
|
-
return /* @__PURE__ */ (0,
|
|
5930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-asset-item`, onClick: clickFunc, style: {
|
|
5116
5931
|
cursor: clickFunc ? "pointer" : "default"
|
|
5117
5932
|
}, children: [
|
|
5118
|
-
/* @__PURE__ */ (0,
|
|
5119
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
5933
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
|
|
5934
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-wallet-asset-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5120
5935
|
AlphaAvatar2,
|
|
5121
5936
|
{
|
|
5122
5937
|
className: `matchid-wallet-asset-icon`,
|
|
@@ -5124,12 +5939,12 @@ function WalletAsset({
|
|
|
5124
5939
|
name: n.symbol || n.name || ""
|
|
5125
5940
|
}
|
|
5126
5941
|
),
|
|
5127
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
5942
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
|
|
5128
5943
|
] }),
|
|
5129
|
-
/* @__PURE__ */ (0,
|
|
5130
|
-
/* @__PURE__ */ (0,
|
|
5131
|
-
"price" in n && /* @__PURE__ */ (0,
|
|
5132
|
-
/* @__PURE__ */ (0,
|
|
5944
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-asset-info`, children: [
|
|
5945
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
|
|
5946
|
+
"price" in n && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-asset-content`, children: [
|
|
5947
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5133
5948
|
NumberFormatter,
|
|
5134
5949
|
{
|
|
5135
5950
|
value: n.price,
|
|
@@ -5137,7 +5952,7 @@ function WalletAsset({
|
|
|
5137
5952
|
tFixNum: 2
|
|
5138
5953
|
}
|
|
5139
5954
|
) }),
|
|
5140
|
-
/* @__PURE__ */ (0,
|
|
5955
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5141
5956
|
NumberFormatter,
|
|
5142
5957
|
{
|
|
5143
5958
|
value: n.value,
|
|
@@ -5146,15 +5961,15 @@ function WalletAsset({
|
|
|
5146
5961
|
}
|
|
5147
5962
|
) })
|
|
5148
5963
|
] }),
|
|
5149
|
-
/* @__PURE__ */ (0,
|
|
5150
|
-
/* @__PURE__ */ (0,
|
|
5964
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-wallet-asset-footer`, children: [
|
|
5965
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5151
5966
|
NumberFormatter,
|
|
5152
5967
|
{
|
|
5153
5968
|
value: n.balance,
|
|
5154
5969
|
tFixNum: 3
|
|
5155
5970
|
}
|
|
5156
5971
|
) }),
|
|
5157
|
-
"price_change_24h" in n && /* @__PURE__ */ (0,
|
|
5972
|
+
"price_change_24h" in n && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-wallet-asset-change ${getFooterColor()}`, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5158
5973
|
NumberFormatter,
|
|
5159
5974
|
{
|
|
5160
5975
|
prefix: `${(n?.price_change_24h || 0) < 0 ? "-" : "+"} `,
|
|
@@ -5170,10 +5985,10 @@ function WalletAsset({
|
|
|
5170
5985
|
}
|
|
5171
5986
|
|
|
5172
5987
|
// src/components/TokenSend/index.tsx
|
|
5173
|
-
var
|
|
5174
|
-
var
|
|
5175
|
-
var
|
|
5176
|
-
var
|
|
5988
|
+
var import_react39 = require("react");
|
|
5989
|
+
var import_viem15 = require("viem");
|
|
5990
|
+
var import_react_intl19 = require("react-intl");
|
|
5991
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
5177
5992
|
function Input2({
|
|
5178
5993
|
onChange,
|
|
5179
5994
|
placeholder,
|
|
@@ -5183,8 +5998,8 @@ function Input2({
|
|
|
5183
5998
|
error,
|
|
5184
5999
|
size = "df"
|
|
5185
6000
|
}) {
|
|
5186
|
-
return /* @__PURE__ */ (0,
|
|
5187
|
-
/* @__PURE__ */ (0,
|
|
6001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
|
|
6002
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5188
6003
|
"input",
|
|
5189
6004
|
{
|
|
5190
6005
|
placeholder,
|
|
@@ -5195,7 +6010,7 @@ function Input2({
|
|
|
5195
6010
|
className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
|
|
5196
6011
|
}
|
|
5197
6012
|
),
|
|
5198
|
-
error && /* @__PURE__ */ (0,
|
|
6013
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "matchid-token-input-error-text", children: error })
|
|
5199
6014
|
] });
|
|
5200
6015
|
}
|
|
5201
6016
|
function TokenSend({
|
|
@@ -5205,36 +6020,36 @@ function TokenSend({
|
|
|
5205
6020
|
onBack
|
|
5206
6021
|
}) {
|
|
5207
6022
|
const { list: chainList } = useMatchChain();
|
|
5208
|
-
const intl = (0,
|
|
6023
|
+
const intl = (0, import_react_intl19.useIntl)();
|
|
5209
6024
|
const { createWalletClient: createWalletClient2 } = useWallet();
|
|
5210
6025
|
const isNative = token.address.toLowerCase() == NATIVE_TOKEN_ADDRESS;
|
|
5211
|
-
const chain = (0,
|
|
6026
|
+
const chain = (0, import_react39.useMemo)(() => {
|
|
5212
6027
|
return chainList?.find((m) => m.id.toString() === token.chain_id);
|
|
5213
6028
|
}, [chainList, token.chain_id]);
|
|
5214
|
-
const walletClient = (0,
|
|
6029
|
+
const walletClient = (0, import_react39.useMemo)(() => {
|
|
5215
6030
|
return createWalletClient2({
|
|
5216
6031
|
// @ts-ignore
|
|
5217
|
-
chain: (0,
|
|
5218
|
-
transport: (0,
|
|
6032
|
+
chain: (0, import_viem15.defineChain)(chain),
|
|
6033
|
+
transport: (0, import_viem15.http)()
|
|
5219
6034
|
});
|
|
5220
6035
|
}, [chain]);
|
|
5221
|
-
const [amount, setAmount] = (0,
|
|
5222
|
-
const [address, setAddress] = (0,
|
|
5223
|
-
const [loading, setLoading] = (0,
|
|
5224
|
-
const [sending, setSending] = (0,
|
|
5225
|
-
const [txError, setTxError] = (0,
|
|
5226
|
-
const transaction = (0,
|
|
6036
|
+
const [amount, setAmount] = (0, import_react39.useState)("");
|
|
6037
|
+
const [address, setAddress] = (0, import_react39.useState)("");
|
|
6038
|
+
const [loading, setLoading] = (0, import_react39.useState)(false);
|
|
6039
|
+
const [sending, setSending] = (0, import_react39.useState)(false);
|
|
6040
|
+
const [txError, setTxError] = (0, import_react39.useState)("");
|
|
6041
|
+
const transaction = (0, import_react39.useMemo)(() => {
|
|
5227
6042
|
const reg = /^0x[a-fA-F0-9]{40}$/;
|
|
5228
6043
|
if (!amount || !address || !reg.test(address)) {
|
|
5229
6044
|
return;
|
|
5230
6045
|
}
|
|
5231
|
-
const viemChain = (0,
|
|
6046
|
+
const viemChain = (0, import_viem15.defineChain)(chain);
|
|
5232
6047
|
const to = isNative ? address : token.address;
|
|
5233
|
-
const value = isNative ? (0,
|
|
5234
|
-
const data = isNative ? "0x" : (0,
|
|
5235
|
-
abi:
|
|
6048
|
+
const value = isNative ? (0, import_viem15.parseUnits)(amount, parseInt(token?.decimals || "18")) : BigInt(0);
|
|
6049
|
+
const data = isNative ? "0x" : (0, import_viem15.encodeFunctionData)({
|
|
6050
|
+
abi: import_viem15.erc20Abi,
|
|
5236
6051
|
functionName: "transfer",
|
|
5237
|
-
args: [address, (0,
|
|
6052
|
+
args: [address, (0, import_viem15.parseUnits)(amount, parseInt(token?.decimals || "18"))]
|
|
5238
6053
|
});
|
|
5239
6054
|
return {
|
|
5240
6055
|
to,
|
|
@@ -5254,7 +6069,7 @@ function TokenSend({
|
|
|
5254
6069
|
setLoading(false);
|
|
5255
6070
|
}
|
|
5256
6071
|
};
|
|
5257
|
-
const error = (0,
|
|
6072
|
+
const error = (0, import_react39.useMemo)(() => {
|
|
5258
6073
|
setTxError("");
|
|
5259
6074
|
let amountError = "";
|
|
5260
6075
|
let addressError = "";
|
|
@@ -5297,7 +6112,7 @@ function TokenSend({
|
|
|
5297
6112
|
setAmount(value);
|
|
5298
6113
|
}
|
|
5299
6114
|
};
|
|
5300
|
-
const canSend = (0,
|
|
6115
|
+
const canSend = (0, import_react39.useMemo)(() => {
|
|
5301
6116
|
return !error.amount && !error.address && amount && address;
|
|
5302
6117
|
}, [error]);
|
|
5303
6118
|
const onNext = async () => {
|
|
@@ -5307,7 +6122,7 @@ function TokenSend({
|
|
|
5307
6122
|
}
|
|
5308
6123
|
onClose();
|
|
5309
6124
|
};
|
|
5310
|
-
(0,
|
|
6125
|
+
(0, import_react39.useEffect)(() => {
|
|
5311
6126
|
const receiveMessage = (event) => {
|
|
5312
6127
|
if (event.data) {
|
|
5313
6128
|
if (event.data.source == "match-wallet") {
|
|
@@ -5323,24 +6138,24 @@ function TokenSend({
|
|
|
5323
6138
|
window.removeEventListener("message", receiveMessage);
|
|
5324
6139
|
};
|
|
5325
6140
|
}, []);
|
|
5326
|
-
return /* @__PURE__ */ (0,
|
|
5327
|
-
/* @__PURE__ */ (0,
|
|
5328
|
-
/* @__PURE__ */ (0,
|
|
5329
|
-
/* @__PURE__ */ (0,
|
|
5330
|
-
/* @__PURE__ */ (0,
|
|
5331
|
-
/* @__PURE__ */ (0,
|
|
5332
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
6141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl19.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-send-box`, children: [
|
|
6142
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
6143
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-amount-content`, children: [
|
|
6144
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-amount-header`, children: [
|
|
6145
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl19.FormattedMessage, { id: "amount" }) }),
|
|
6146
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
|
|
6147
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5333
6148
|
"img",
|
|
5334
6149
|
{
|
|
5335
6150
|
src: token?.icon,
|
|
5336
6151
|
alt: token?.symbol,
|
|
5337
6152
|
className: `matchid-token-amount-chain-icon`
|
|
5338
6153
|
}
|
|
5339
|
-
) : /* @__PURE__ */ (0,
|
|
5340
|
-
/* @__PURE__ */ (0,
|
|
6154
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
|
|
6155
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { children: token?.symbol })
|
|
5341
6156
|
] })
|
|
5342
6157
|
] }),
|
|
5343
|
-
/* @__PURE__ */ (0,
|
|
6158
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5344
6159
|
Input2,
|
|
5345
6160
|
{
|
|
5346
6161
|
type: "text",
|
|
@@ -5353,18 +6168,18 @@ function TokenSend({
|
|
|
5353
6168
|
error: error.amount || txError
|
|
5354
6169
|
}
|
|
5355
6170
|
),
|
|
5356
|
-
/* @__PURE__ */ (0,
|
|
5357
|
-
/* @__PURE__ */ (0,
|
|
5358
|
-
/* @__PURE__ */ (0,
|
|
6171
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
|
|
6172
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-amount-title`, children: [
|
|
6173
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl19.FormattedMessage, { id: "balance" }),
|
|
5359
6174
|
":"
|
|
5360
6175
|
] }),
|
|
5361
|
-
/* @__PURE__ */ (0,
|
|
6176
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
|
|
5362
6177
|
] }),
|
|
5363
|
-
/* @__PURE__ */ (0,
|
|
6178
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
5364
6179
|
] }),
|
|
5365
|
-
/* @__PURE__ */ (0,
|
|
5366
|
-
/* @__PURE__ */ (0,
|
|
5367
|
-
/* @__PURE__ */ (0,
|
|
6180
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-token-address-content`, children: [
|
|
6181
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl19.FormattedMessage, { id: "receiveTitle" }) }) }),
|
|
6182
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5368
6183
|
Input2,
|
|
5369
6184
|
{
|
|
5370
6185
|
type: "text",
|
|
@@ -5380,7 +6195,7 @@ function TokenSend({
|
|
|
5380
6195
|
)
|
|
5381
6196
|
] })
|
|
5382
6197
|
] }),
|
|
5383
|
-
/* @__PURE__ */ (0,
|
|
6198
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5384
6199
|
Button,
|
|
5385
6200
|
{
|
|
5386
6201
|
size: "lg",
|
|
@@ -5389,15 +6204,15 @@ function TokenSend({
|
|
|
5389
6204
|
disabled: !canSend || !!txError,
|
|
5390
6205
|
onClick: onNext,
|
|
5391
6206
|
loading: loading || sending,
|
|
5392
|
-
children: /* @__PURE__ */ (0,
|
|
6207
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl19.FormattedMessage, { id: "next" })
|
|
5393
6208
|
}
|
|
5394
6209
|
)
|
|
5395
6210
|
] }) });
|
|
5396
6211
|
}
|
|
5397
6212
|
|
|
5398
6213
|
// src/components/TokenDetail/index.tsx
|
|
5399
|
-
var
|
|
5400
|
-
var
|
|
6214
|
+
var import_react_intl20 = require("react-intl");
|
|
6215
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
5401
6216
|
function TokenDetail({
|
|
5402
6217
|
onClose,
|
|
5403
6218
|
token
|
|
@@ -5407,41 +6222,41 @@ function TokenDetail({
|
|
|
5407
6222
|
const chain = chainList?.find((m) => m.id.toString() === token.chain_id);
|
|
5408
6223
|
const onSend = () => {
|
|
5409
6224
|
modal.show((props) => {
|
|
5410
|
-
return /* @__PURE__ */ (0,
|
|
6225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TokenSend, { onClose: () => {
|
|
5411
6226
|
props.close();
|
|
5412
6227
|
onClose();
|
|
5413
6228
|
}, onBack: props.close, zIndex: props.zIndex, token });
|
|
5414
6229
|
});
|
|
5415
6230
|
};
|
|
5416
|
-
const intl = (0,
|
|
5417
|
-
return /* @__PURE__ */ (0,
|
|
6231
|
+
const intl = (0, import_react_intl20.useIntl)();
|
|
6232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ModalDrawer, { isOpen: true, title: intl.formatMessage({
|
|
5418
6233
|
id: "tokenDetails"
|
|
5419
|
-
}), onClose, children: /* @__PURE__ */ (0,
|
|
5420
|
-
/* @__PURE__ */ (0,
|
|
5421
|
-
/* @__PURE__ */ (0,
|
|
5422
|
-
/* @__PURE__ */ (0,
|
|
5423
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
5424
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6234
|
+
}), onClose, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-detail`, children: [
|
|
6235
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-main`, children: [
|
|
6236
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-info`, children: [
|
|
6237
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-logo`, children: [
|
|
6238
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("img", { src: token.icon, alt: token.symbol, className: `matchid-token-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(AlphaAvatar, { className: `matchid-token-icon`, size: 48, name: token.symbol || token.name || "" }),
|
|
6239
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-token-chain` })
|
|
5425
6240
|
] }),
|
|
5426
|
-
/* @__PURE__ */ (0,
|
|
5427
|
-
/* @__PURE__ */ (0,
|
|
6241
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-name`, children: [
|
|
6242
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10 }),
|
|
5428
6243
|
" ",
|
|
5429
6244
|
token.symbol
|
|
5430
6245
|
] })
|
|
5431
6246
|
] }),
|
|
5432
|
-
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0,
|
|
5433
|
-
/* @__PURE__ */ (0,
|
|
5434
|
-
/* @__PURE__ */ (0,
|
|
6247
|
+
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-token-contract`, children: [
|
|
6248
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "matchid-token-contract-title", children: "Contract address" }),
|
|
6249
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "matchid-token-contract-address", children: token.address })
|
|
5435
6250
|
] })
|
|
5436
6251
|
] }),
|
|
5437
|
-
/* @__PURE__ */ (0,
|
|
6252
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl20.FormattedMessage, { id: "send" }) })
|
|
5438
6253
|
] }) });
|
|
5439
6254
|
}
|
|
5440
6255
|
|
|
5441
6256
|
// src/components/TokenSendList/index.tsx
|
|
5442
|
-
var
|
|
5443
|
-
var
|
|
5444
|
-
var
|
|
6257
|
+
var import_react40 = require("react");
|
|
6258
|
+
var import_react_intl21 = require("react-intl");
|
|
6259
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
5445
6260
|
function TokenSendList({ close }) {
|
|
5446
6261
|
const isDownMd = useDownMd();
|
|
5447
6262
|
const walletAssets = useMatchWalletAssets();
|
|
@@ -5449,20 +6264,20 @@ function TokenSendList({ close }) {
|
|
|
5449
6264
|
list: walletAssets.mergedAssets
|
|
5450
6265
|
});
|
|
5451
6266
|
const { list } = useMatchChain();
|
|
5452
|
-
const [checked, setChecked] = (0,
|
|
6267
|
+
const [checked, setChecked] = (0, import_react40.useState)();
|
|
5453
6268
|
const modal = useModal();
|
|
5454
6269
|
const onNext = () => {
|
|
5455
6270
|
checked && modal.show((props) => {
|
|
5456
|
-
return /* @__PURE__ */ (0,
|
|
6271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(TokenSend, { onClose: () => {
|
|
5457
6272
|
props.close();
|
|
5458
6273
|
close();
|
|
5459
6274
|
}, onBack: props.close, zIndex: props.zIndex, token: checked });
|
|
5460
6275
|
});
|
|
5461
6276
|
};
|
|
5462
|
-
return /* @__PURE__ */ (0,
|
|
5463
|
-
/* @__PURE__ */ (0,
|
|
6277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "matchid-token-send-list-box", children: [
|
|
6278
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5464
6279
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5465
|
-
return /* @__PURE__ */ (0,
|
|
6280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
5466
6281
|
"div",
|
|
5467
6282
|
{
|
|
5468
6283
|
className: `matchid-token-send-item ${checked?.address == n.address ? "matchid-token-send-chekced" : ""}`,
|
|
@@ -5470,10 +6285,10 @@ function TokenSendList({ close }) {
|
|
|
5470
6285
|
setChecked(n);
|
|
5471
6286
|
},
|
|
5472
6287
|
children: [
|
|
5473
|
-
/* @__PURE__ */ (0,
|
|
5474
|
-
/* @__PURE__ */ (0,
|
|
5475
|
-
/* @__PURE__ */ (0,
|
|
5476
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
6288
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
|
|
6289
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
6290
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "matchid-token-send-logo", children: [
|
|
6291
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5477
6292
|
AlphaAvatar2,
|
|
5478
6293
|
{
|
|
5479
6294
|
className: `matchid-token-send-icon`,
|
|
@@ -5481,7 +6296,7 @@ function TokenSendList({ close }) {
|
|
|
5481
6296
|
name: n.symbol || n.name || ""
|
|
5482
6297
|
}
|
|
5483
6298
|
),
|
|
5484
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6299
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5485
6300
|
"img",
|
|
5486
6301
|
{
|
|
5487
6302
|
src: chain.iconUrl,
|
|
@@ -5490,9 +6305,9 @@ function TokenSendList({ close }) {
|
|
|
5490
6305
|
}
|
|
5491
6306
|
)
|
|
5492
6307
|
] }),
|
|
5493
|
-
/* @__PURE__ */ (0,
|
|
5494
|
-
/* @__PURE__ */ (0,
|
|
5495
|
-
/* @__PURE__ */ (0,
|
|
6308
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: `matchid-token-send-info`, children: [
|
|
6309
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
|
|
6310
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
|
|
5496
6311
|
] })
|
|
5497
6312
|
] })
|
|
5498
6313
|
]
|
|
@@ -5500,24 +6315,24 @@ function TokenSendList({ close }) {
|
|
|
5500
6315
|
index
|
|
5501
6316
|
);
|
|
5502
6317
|
}) }),
|
|
5503
|
-
/* @__PURE__ */ (0,
|
|
6318
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_intl21.FormattedMessage, { id: "next" }) })
|
|
5504
6319
|
] });
|
|
5505
6320
|
}
|
|
5506
6321
|
|
|
5507
6322
|
// src/components/TransactionList/index.tsx
|
|
5508
6323
|
var import_react_infinite_scroll_component = __toESM(require("react-infinite-scroll-component"));
|
|
5509
|
-
var
|
|
5510
|
-
var
|
|
5511
|
-
var
|
|
5512
|
-
var
|
|
5513
|
-
var
|
|
6324
|
+
var import_react41 = require("react");
|
|
6325
|
+
var import_viem16 = require("viem");
|
|
6326
|
+
var import_viem17 = require("viem");
|
|
6327
|
+
var import_react_intl22 = require("react-intl");
|
|
6328
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
5514
6329
|
var Item = ({ data }) => {
|
|
5515
6330
|
const { address } = useWallet();
|
|
5516
6331
|
const isOut = data.from.toLowerCase() == address.toLowerCase();
|
|
5517
6332
|
const { chain, chainId, explorerLink, formatUnits: chainFormatUnits } = useMatchChain();
|
|
5518
6333
|
const { contracts } = useContractStore_default();
|
|
5519
|
-
const [shouldRefetch, setShouldRefetch] = (0,
|
|
5520
|
-
const transferType = (0,
|
|
6334
|
+
const [shouldRefetch, setShouldRefetch] = (0, import_react41.useState)(true);
|
|
6335
|
+
const transferType = (0, import_react41.useMemo)(() => {
|
|
5521
6336
|
const methodId = data.input.substring(2, 10);
|
|
5522
6337
|
if (methodId == "095ea7b3") {
|
|
5523
6338
|
return "erc20_approve";
|
|
@@ -5527,38 +6342,38 @@ var Item = ({ data }) => {
|
|
|
5527
6342
|
}
|
|
5528
6343
|
return "unknown";
|
|
5529
6344
|
}, [data.input]);
|
|
5530
|
-
const to = (0,
|
|
6345
|
+
const to = (0, import_react41.useMemo)(() => {
|
|
5531
6346
|
if (!isOut) {
|
|
5532
6347
|
return data.from;
|
|
5533
6348
|
}
|
|
5534
6349
|
if (transferType == "erc20_transfer") {
|
|
5535
|
-
const decodeData = (0,
|
|
5536
|
-
abi:
|
|
6350
|
+
const decodeData = (0, import_viem16.decodeFunctionData)({
|
|
6351
|
+
abi: import_viem17.erc20Abi,
|
|
5537
6352
|
data: data.input
|
|
5538
6353
|
});
|
|
5539
6354
|
return decodeData.args[0];
|
|
5540
6355
|
}
|
|
5541
6356
|
return data.to;
|
|
5542
6357
|
}, [data.input, transferType, data.to, isOut]);
|
|
5543
|
-
const amount = (0,
|
|
6358
|
+
const amount = (0, import_react41.useMemo)(() => {
|
|
5544
6359
|
if (transferType == "erc20_transfer") {
|
|
5545
|
-
const decodeData = (0,
|
|
5546
|
-
abi:
|
|
6360
|
+
const decodeData = (0, import_viem16.decodeFunctionData)({
|
|
6361
|
+
abi: import_viem17.erc20Abi,
|
|
5547
6362
|
data: data.input
|
|
5548
6363
|
});
|
|
5549
6364
|
const value = decodeData.args[1];
|
|
5550
|
-
return (0,
|
|
6365
|
+
return (0, import_viem16.formatUnits)(value, contracts[`${chainId}-${data.to.toLowerCase()}`]?.decimals || 18);
|
|
5551
6366
|
}
|
|
5552
6367
|
return chainFormatUnits(BigInt(data.value));
|
|
5553
6368
|
}, [data.input, transferType, data.value, contracts, chainId, data.to]);
|
|
5554
6369
|
const hashQuery = useHash({
|
|
5555
6370
|
hash: data.hash,
|
|
5556
6371
|
//@ts-ignore
|
|
5557
|
-
chain: (0,
|
|
6372
|
+
chain: (0, import_viem16.defineChain)(chain),
|
|
5558
6373
|
refetchInterval: shouldRefetch ? 3e3 : false,
|
|
5559
6374
|
enabled: shouldRefetch && data.source == "local"
|
|
5560
6375
|
});
|
|
5561
|
-
const status = (0,
|
|
6376
|
+
const status = (0, import_react41.useMemo)(() => {
|
|
5562
6377
|
if (data.source == "matchain") {
|
|
5563
6378
|
switch (data.extra.status) {
|
|
5564
6379
|
case "ok":
|
|
@@ -5585,30 +6400,30 @@ var Item = ({ data }) => {
|
|
|
5585
6400
|
}
|
|
5586
6401
|
return "loading";
|
|
5587
6402
|
}, [data.extra?.status, data.source, hashQuery.data]);
|
|
5588
|
-
(0,
|
|
6403
|
+
(0, import_react41.useEffect)(() => {
|
|
5589
6404
|
if (data.hash) {
|
|
5590
6405
|
setShouldRefetch(status == "loading");
|
|
5591
6406
|
}
|
|
5592
6407
|
}, [status, data.hash]);
|
|
5593
|
-
const symbol = (0,
|
|
6408
|
+
const symbol = (0, import_react41.useMemo)(() => {
|
|
5594
6409
|
if (transferType == "erc20_transfer") {
|
|
5595
6410
|
const contract = contracts[`${chainId}-${data.to.toLowerCase()}`];
|
|
5596
6411
|
return contract?.symbol || contract?.name || "unknown";
|
|
5597
6412
|
}
|
|
5598
6413
|
return chain?.nativeCurrency.symbol || chain?.nativeCurrency.name;
|
|
5599
6414
|
}, [transferType, chain, contracts, chainId, data.to]);
|
|
5600
|
-
return /* @__PURE__ */ (0,
|
|
6415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
5601
6416
|
"a",
|
|
5602
6417
|
{
|
|
5603
6418
|
href: explorerLink(`tx/${data.hash}`),
|
|
5604
6419
|
target: "_blank",
|
|
5605
6420
|
className: `matchid-transaction-item`,
|
|
5606
6421
|
children: [
|
|
5607
|
-
/* @__PURE__ */ (0,
|
|
5608
|
-
/* @__PURE__ */ (0,
|
|
5609
|
-
/* @__PURE__ */ (0,
|
|
5610
|
-
/* @__PURE__ */ (0,
|
|
5611
|
-
/* @__PURE__ */ (0,
|
|
6422
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-transacton-item-container`, children: [
|
|
6423
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
|
|
6424
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-transaction-item-details`, children: [
|
|
6425
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
|
|
6426
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5612
6427
|
"div",
|
|
5613
6428
|
{
|
|
5614
6429
|
className: `matchid-transaction-item-timestamp`,
|
|
@@ -5617,11 +6432,11 @@ var Item = ({ data }) => {
|
|
|
5617
6432
|
)
|
|
5618
6433
|
] })
|
|
5619
6434
|
] }),
|
|
5620
|
-
/* @__PURE__ */ (0,
|
|
5621
|
-
/* @__PURE__ */ (0,
|
|
5622
|
-
status == "loading" && /* @__PURE__ */ (0,
|
|
5623
|
-
status == "success" && /* @__PURE__ */ (0,
|
|
5624
|
-
status == "error" && /* @__PURE__ */ (0,
|
|
6435
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
|
|
6436
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(NumberFormatter, { value: amount, tFixNum: 6, prefix: isOut ? "-" : "+", suffix: " " + symbol }),
|
|
6437
|
+
status == "loading" && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(LoadingIcon_default, { color: "#000000", size: 16, rotate: true }),
|
|
6438
|
+
status == "success" && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(CheckRoundIcon, { size: 16 }),
|
|
6439
|
+
status == "error" && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(InfoRoundIcon, { size: 16 })
|
|
5625
6440
|
] })
|
|
5626
6441
|
]
|
|
5627
6442
|
}
|
|
@@ -5631,19 +6446,265 @@ function TransactionList({
|
|
|
5631
6446
|
scrollableTarget
|
|
5632
6447
|
}) {
|
|
5633
6448
|
const { fetchMoreData, hasMore, items } = useMatchWalletRecords();
|
|
5634
|
-
return /* @__PURE__ */ (0,
|
|
6449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5635
6450
|
import_react_infinite_scroll_component.default,
|
|
5636
6451
|
{
|
|
5637
6452
|
scrollableTarget,
|
|
5638
6453
|
dataLength: items.length,
|
|
5639
6454
|
next: fetchMoreData,
|
|
5640
6455
|
hasMore,
|
|
5641
|
-
loader: /* @__PURE__ */ (0,
|
|
5642
|
-
/* @__PURE__ */ (0,
|
|
6456
|
+
loader: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "matchid-list-nomore", children: [
|
|
6457
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
|
|
5643
6458
|
"Loading..."
|
|
5644
6459
|
] }),
|
|
5645
|
-
endMessage: items.length > 0 ? /* @__PURE__ */ (0,
|
|
5646
|
-
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0,
|
|
6460
|
+
endMessage: items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl22.FormattedMessage, { id: "noMoreRecords" }) }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl22.FormattedMessage, { id: "noRecords" }) }),
|
|
6461
|
+
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "mt-[150px]" }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Item, { data: item }, index)) })
|
|
6462
|
+
}
|
|
6463
|
+
);
|
|
6464
|
+
}
|
|
6465
|
+
|
|
6466
|
+
// src/hooks/api/bind.ts
|
|
6467
|
+
var import_react_query11 = require("@tanstack/react-query");
|
|
6468
|
+
|
|
6469
|
+
// src/hooks/api/poh.ts
|
|
6470
|
+
var import_react_query12 = require("@tanstack/react-query");
|
|
6471
|
+
|
|
6472
|
+
// src/hooks/api/contact.ts
|
|
6473
|
+
var contact_exports = {};
|
|
6474
|
+
__export(contact_exports, {
|
|
6475
|
+
acceptContact: () => acceptContact,
|
|
6476
|
+
addContact: () => addContact,
|
|
6477
|
+
delContact: () => delContact,
|
|
6478
|
+
useContactInfo: () => useContactInfo,
|
|
6479
|
+
useContactList: () => useContactList,
|
|
6480
|
+
useContactSearch: () => useContactSearch
|
|
6481
|
+
});
|
|
6482
|
+
var import_react_query13 = require("@tanstack/react-query");
|
|
6483
|
+
var import_last = __toESM(require("lodash/last"));
|
|
6484
|
+
var import_react42 = require("react");
|
|
6485
|
+
function useContactList(page_size = 10, type = "Friend") {
|
|
6486
|
+
const { token } = useLocalStore_default();
|
|
6487
|
+
const limitIdRef = (0, import_react42.useRef)(0);
|
|
6488
|
+
const queryClient2 = (0, import_react_query13.useQueryClient)();
|
|
6489
|
+
const contactQuery = (0, import_react_query13.useInfiniteQuery)({
|
|
6490
|
+
queryKey: ["matchid-contacts-list", type, token],
|
|
6491
|
+
initialPageParam: 1,
|
|
6492
|
+
queryFn: async (args) => {
|
|
6493
|
+
console.log(args);
|
|
6494
|
+
if (args.pageParam <= 1) {
|
|
6495
|
+
limitIdRef.current = 0;
|
|
6496
|
+
}
|
|
6497
|
+
return (await getContactListApi({
|
|
6498
|
+
limit: page_size,
|
|
6499
|
+
limit_id: limitIdRef.current,
|
|
6500
|
+
type
|
|
6501
|
+
})).data;
|
|
6502
|
+
},
|
|
6503
|
+
getNextPageParam: (lastPage, allPages) => {
|
|
6504
|
+
if (!lastPage) return void 0;
|
|
6505
|
+
const lastPageNum = Math.ceil(lastPage.meta.total / page_size);
|
|
6506
|
+
return allPages.length >= lastPageNum ? void 0 : allPages.length + 1;
|
|
6507
|
+
}
|
|
6508
|
+
});
|
|
6509
|
+
(0, import_react42.useEffect)(() => {
|
|
6510
|
+
if (!contactQuery.data?.pages || contactQuery.data?.pages.length == 0) {
|
|
6511
|
+
limitIdRef.current = 0;
|
|
6512
|
+
} else {
|
|
6513
|
+
const lastPage = (0, import_last.default)(contactQuery.data?.pages);
|
|
6514
|
+
const items = lastPage?.items;
|
|
6515
|
+
if (!items || items.length == 0) {
|
|
6516
|
+
limitIdRef.current = 0;
|
|
6517
|
+
return;
|
|
6518
|
+
}
|
|
6519
|
+
const lastItem = (0, import_last.default)(items);
|
|
6520
|
+
limitIdRef.current = lastItem?.limit_id || 0;
|
|
6521
|
+
}
|
|
6522
|
+
}, [contactQuery.data?.pages]);
|
|
6523
|
+
(0, import_react42.useEffect)(() => {
|
|
6524
|
+
console.log("contactQuery.data", contactQuery.data);
|
|
6525
|
+
}, [contactQuery.data]);
|
|
6526
|
+
const data = (0, import_react42.useMemo)(() => {
|
|
6527
|
+
return (contactQuery.data?.pages ?? []).reduce(
|
|
6528
|
+
(a, b) => {
|
|
6529
|
+
return a.concat(b?.items ?? []);
|
|
6530
|
+
},
|
|
6531
|
+
[]
|
|
6532
|
+
);
|
|
6533
|
+
}, [contactQuery.data]);
|
|
6534
|
+
return {
|
|
6535
|
+
data,
|
|
6536
|
+
totalCount: contactQuery.hasNextPage ? ((0, import_last.default)(contactQuery.data?.pages ?? [])?.meta.total ?? 0) + 1 : (0, import_last.default)(contactQuery.data?.pages ?? [])?.meta.total ?? 0,
|
|
6537
|
+
loading: contactQuery.isLoading,
|
|
6538
|
+
loadingNextPage: contactQuery.isFetchingNextPage,
|
|
6539
|
+
hasNextPage: contactQuery.hasNextPage,
|
|
6540
|
+
onLoadMore: contactQuery.fetchNextPage
|
|
6541
|
+
};
|
|
6542
|
+
}
|
|
6543
|
+
function useContactSearch(keyword, options) {
|
|
6544
|
+
return (0, import_react_query13.useQuery)({
|
|
6545
|
+
queryKey: ["matchid-contacts-search", keyword],
|
|
6546
|
+
enabled: !!keyword,
|
|
6547
|
+
queryFn: async () => {
|
|
6548
|
+
return (await searchContactsApi({
|
|
6549
|
+
address: keyword
|
|
6550
|
+
})).data;
|
|
6551
|
+
},
|
|
6552
|
+
...options
|
|
6553
|
+
});
|
|
6554
|
+
}
|
|
6555
|
+
function useContactInfo(options) {
|
|
6556
|
+
const { token } = useUserInfo();
|
|
6557
|
+
return (0, import_react_query13.useQuery)({
|
|
6558
|
+
queryKey: ["matchid-contacts-info", token],
|
|
6559
|
+
enabled: !!token,
|
|
6560
|
+
queryFn: async () => {
|
|
6561
|
+
return (await getContractsInfoApi()).data;
|
|
6562
|
+
},
|
|
6563
|
+
...options
|
|
6564
|
+
});
|
|
6565
|
+
}
|
|
6566
|
+
var addContact = async (friend_id) => {
|
|
6567
|
+
const res = await addContactsApi({
|
|
6568
|
+
friend_id: typeof friend_id === "string" ? friend_id : friend_id.did
|
|
6569
|
+
});
|
|
6570
|
+
if (isSuccess(res)) {
|
|
6571
|
+
return true;
|
|
6572
|
+
}
|
|
6573
|
+
throw new Error(res.message);
|
|
6574
|
+
};
|
|
6575
|
+
var acceptContact = async (friend_id) => {
|
|
6576
|
+
const res = await acceptContactsApi({
|
|
6577
|
+
friend_id: typeof friend_id === "string" ? friend_id : friend_id.did
|
|
6578
|
+
});
|
|
6579
|
+
if (isSuccess(res)) {
|
|
6580
|
+
return true;
|
|
6581
|
+
}
|
|
6582
|
+
throw new Error(res.message);
|
|
6583
|
+
};
|
|
6584
|
+
var delContact = async (friend_id) => {
|
|
6585
|
+
const res = await delContactsApi({
|
|
6586
|
+
friend_id: typeof friend_id === "string" ? friend_id : friend_id.did
|
|
6587
|
+
});
|
|
6588
|
+
if (isSuccess(res)) {
|
|
6589
|
+
return true;
|
|
6590
|
+
}
|
|
6591
|
+
throw new Error(res.message);
|
|
6592
|
+
};
|
|
6593
|
+
|
|
6594
|
+
// src/components/ContactList/index.tsx
|
|
6595
|
+
var import_react_virtuoso = require("react-virtuoso");
|
|
6596
|
+
var import_react43 = require("react");
|
|
6597
|
+
var import_react_intl23 = require("react-intl");
|
|
6598
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
6599
|
+
function ContactCard({
|
|
6600
|
+
loading = false,
|
|
6601
|
+
data,
|
|
6602
|
+
action
|
|
6603
|
+
}) {
|
|
6604
|
+
const isDownMd = useDownMd();
|
|
6605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "matchid-flex matchid-contact-item", children: [
|
|
6606
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "matchid-contact-item-content", children: [
|
|
6607
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Skeleton_default, { width: isDownMd ? 36 : 48, height: isDownMd ? 36 : 48, radius: 100, loading, children: data?.avatar ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("img", { src: data?.avatar, className: "matchid-contact-item-avatar" }) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(AlphaAvatar, { size: isDownMd ? 36 : 48, name: data?.name || "MatchID" }) }),
|
|
6608
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "matchid-contact-item-info", children: [
|
|
6609
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-contact-item-name", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Skeleton_default, { width: 80, height: isDownMd ? 16 : 20, loading, children: data?.name || "MatchID User" }) }),
|
|
6610
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-contact-item-address", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Skeleton_default, { width: 80, height: isDownMd ? 12 : 16, loading, children: truncateAddress(data?.address || "", 6, 6) }) })
|
|
6611
|
+
] })
|
|
6612
|
+
] }),
|
|
6613
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-contact-item-action", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Skeleton_default, { width: 20, height: 20, loading, children: action() }) })
|
|
6614
|
+
] });
|
|
6615
|
+
}
|
|
6616
|
+
function RequestAction({ data, onSuccess }) {
|
|
6617
|
+
const [loading, setLoading] = (0, import_react43.useState)(false);
|
|
6618
|
+
const toast = useToast();
|
|
6619
|
+
const intl = (0, import_react_intl23.useIntl)();
|
|
6620
|
+
const onApprove = async () => {
|
|
6621
|
+
setLoading(true);
|
|
6622
|
+
try {
|
|
6623
|
+
await contact_exports.acceptContact(data);
|
|
6624
|
+
toast.success(intl.formatMessage({
|
|
6625
|
+
id: "approveSuccess"
|
|
6626
|
+
}));
|
|
6627
|
+
onSuccess && onSuccess(data);
|
|
6628
|
+
} catch (e) {
|
|
6629
|
+
console.error(e);
|
|
6630
|
+
toast.error(e.message);
|
|
6631
|
+
} finally {
|
|
6632
|
+
setLoading(false);
|
|
6633
|
+
}
|
|
6634
|
+
};
|
|
6635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Button, { size: "sm", onClick: onApprove, loading, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl23.FormattedMessage, { id: "Approve" }) });
|
|
6636
|
+
}
|
|
6637
|
+
function FriendsAction({
|
|
6638
|
+
data,
|
|
6639
|
+
onSuccess
|
|
6640
|
+
}) {
|
|
6641
|
+
const [loading, setLoading] = (0, import_react43.useState)(false);
|
|
6642
|
+
const toast = useToast();
|
|
6643
|
+
const intl = (0, import_react_intl23.useIntl)();
|
|
6644
|
+
const onRemove = async () => {
|
|
6645
|
+
setLoading(true);
|
|
6646
|
+
try {
|
|
6647
|
+
await contact_exports.delContact(data);
|
|
6648
|
+
toast.success(intl.formatMessage({
|
|
6649
|
+
id: "removeSuccess"
|
|
6650
|
+
}));
|
|
6651
|
+
onSuccess && onSuccess(data);
|
|
6652
|
+
} catch (e) {
|
|
6653
|
+
console.error(e);
|
|
6654
|
+
toast.error(e.message);
|
|
6655
|
+
} finally {
|
|
6656
|
+
setLoading(false);
|
|
6657
|
+
}
|
|
6658
|
+
};
|
|
6659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-remove-box", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Button, { size: "sm", loading, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl23.FormattedMessage, { id: "Remove" }) }) }), children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(MoreIcon, { className: "matchid-cursor-pointer" }) });
|
|
6660
|
+
}
|
|
6661
|
+
function ContactList({
|
|
6662
|
+
limit = 10,
|
|
6663
|
+
height = 660,
|
|
6664
|
+
type = "Friend"
|
|
6665
|
+
}) {
|
|
6666
|
+
const { loading, totalCount, data, onLoadMore } = contact_exports.useContactList(limit, type);
|
|
6667
|
+
const [hiddenList, setHiddenList] = (0, import_react43.useState)([]);
|
|
6668
|
+
const { address } = useWallet();
|
|
6669
|
+
(0, import_react43.useEffect)(() => {
|
|
6670
|
+
setHiddenList([]);
|
|
6671
|
+
}, [type]);
|
|
6672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
6673
|
+
import_react_virtuoso.Virtuoso,
|
|
6674
|
+
{
|
|
6675
|
+
style: {
|
|
6676
|
+
height
|
|
6677
|
+
},
|
|
6678
|
+
totalCount: loading ? 10 : totalCount,
|
|
6679
|
+
itemContent: (index) => {
|
|
6680
|
+
if (loading || !data[index]) {
|
|
6681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ContactCard, { loading: true });
|
|
6682
|
+
}
|
|
6683
|
+
if (hiddenList.includes(data[index].limit_id || 0)) {
|
|
6684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_jsx_runtime99.Fragment, {});
|
|
6685
|
+
}
|
|
6686
|
+
const item = data[index];
|
|
6687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ContactCard, { data: item, action: () => {
|
|
6688
|
+
if (address == item.address) {
|
|
6689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_jsx_runtime99.Fragment, {});
|
|
6690
|
+
}
|
|
6691
|
+
if (type == "Requests") {
|
|
6692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(RequestAction, { data: item, onSuccess: (data2) => {
|
|
6693
|
+
setHiddenList([...hiddenList, data2.limit_id || 0]);
|
|
6694
|
+
} });
|
|
6695
|
+
}
|
|
6696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(FriendsAction, { data: item, onSuccess: (data2) => {
|
|
6697
|
+
setHiddenList([...hiddenList, data2.limit_id || 0]);
|
|
6698
|
+
} });
|
|
6699
|
+
} });
|
|
6700
|
+
},
|
|
6701
|
+
endReached: () => {
|
|
6702
|
+
onLoadMore();
|
|
6703
|
+
},
|
|
6704
|
+
components: {
|
|
6705
|
+
EmptyPlaceholder: () => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-nomore", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl23.FormattedMessage, { id: type == "Friend" ? "noFriends" : "noRequests" }) }),
|
|
6706
|
+
Footer: data.length > 0 ? () => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "matchid-nomore", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl23.FormattedMessage, { id: "noMore" }) }) : void 0
|
|
6707
|
+
}
|
|
5647
6708
|
}
|
|
5648
6709
|
);
|
|
5649
6710
|
}
|
|
@@ -5651,6 +6712,9 @@ function TransactionList({
|
|
|
5651
6712
|
0 && (module.exports = {
|
|
5652
6713
|
BTCModal,
|
|
5653
6714
|
Button,
|
|
6715
|
+
ContactCard,
|
|
6716
|
+
ContactList,
|
|
6717
|
+
EVMModal,
|
|
5654
6718
|
EmailModal,
|
|
5655
6719
|
Field,
|
|
5656
6720
|
Input,
|