@matchain/matchid-sdk-react 0.1.53-alpha.2 → 0.1.53-alpha.4
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 -2
- package/dist/assets/icon/index.d.ts +4 -2
- package/dist/assets/icon/index.js +19 -0
- package/dist/assets/icon/index.js.map +1 -1
- package/dist/assets/icon/index.mjs +3 -1
- package/dist/chunk-3CR66BEX.mjs +19 -0
- package/dist/chunk-3CR66BEX.mjs.map +1 -0
- package/dist/{chunk-LHNKZISB.mjs → chunk-3USZ4ZZY.mjs} +20 -2
- package/dist/chunk-3USZ4ZZY.mjs.map +1 -0
- package/dist/{chunk-4A2YPGO3.mjs → chunk-4J3KZCLG.mjs} +2 -2
- package/dist/{chunk-HYQ3T6WW.mjs → chunk-JX73EY6V.mjs} +2 -14
- package/dist/chunk-JX73EY6V.mjs.map +1 -0
- package/dist/{chunk-MX7N57AH.mjs → chunk-OCQ2AIM3.mjs} +7 -2
- package/dist/{chunk-MX7N57AH.mjs.map → chunk-OCQ2AIM3.mjs.map} +1 -1
- package/dist/{chunk-FB5MHLWX.mjs → chunk-V2S54LGG.mjs} +2 -2
- package/dist/{chunk-W5A6WY7Y.mjs → chunk-XXZZYALJ.mjs} +807 -191
- package/dist/chunk-XXZZYALJ.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 +1111 -442
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +7 -4
- package/dist/config/chains/index.mjs +2 -1
- package/dist/hooks/api/index.d.mts +2 -2
- package/dist/hooks/api/index.d.ts +2 -2
- package/dist/hooks/api/index.js +202 -88
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +6 -5
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +515 -401
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +5 -4
- package/dist/{index-IwwXQ_QV.d.ts → index-BaYTgL99.d.mts} +3 -2
- package/dist/{index-B8cUP7cH.d.ts → index-BhU3hF7y.d.ts} +2 -2
- package/dist/{index-iWHaT8HV.d.mts → index-Bpd2gBNh.d.mts} +1 -1
- package/dist/{index-Df-WlkXq.d.ts → index-C5StsjWY.d.ts} +11 -4
- package/dist/{index-BS-NO8Y2.d.ts → index-CFqk8eNo.d.ts} +12 -12
- package/dist/{index-BCGJczpk.d.mts → index-D1QeVZyN.d.ts} +3 -2
- package/dist/{index-DNJuiNdz.d.mts → index-D_UNctDI.d.mts} +11 -4
- package/dist/{index-BsL6zo6a.d.ts → index-DaXXoRxr.d.ts} +1 -1
- package/dist/{index-K5vXmiRX.d.ts → index-Dt92N6yZ.d.ts} +1 -1
- package/dist/{index-CZqdmQu1.d.mts → index-W6yjuOKT.d.mts} +1 -1
- package/dist/{index-Bil_db2f.d.mts → index-mxbJ8CFx.d.mts} +12 -12
- package/dist/{index-yy3VTdFU.d.mts → index-wqqEUufi.d.mts} +2 -2
- package/dist/index.css +3 -0
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1297 -680
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -11
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/{types-CZbR7ERa.d.mts → types-Bx_FJ11s.d.mts} +2 -1
- package/dist/{types-CZbR7ERa.d.ts → types-Bx_FJ11s.d.ts} +2 -1
- package/dist/ui/index.d.mts +3 -3
- package/dist/ui/index.d.ts +3 -3
- package/dist/ui/index.js +62 -59
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +2 -2
- package/dist/utils/index.d.mts +2 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +3 -1
- package/example/dist/assets/ccip-nxE3Zma4.js +1 -0
- package/example/dist/assets/index-BFAv3rdU.css +1 -0
- package/example/dist/assets/index-DMWWRDPI.js +1658 -0
- package/example/dist/index.html +2 -2
- package/example/src/pages/User/index.tsx +7 -1
- package/package.json +2 -1
- package/dist/chunk-HYQ3T6WW.mjs.map +0 -1
- package/dist/chunk-LHNKZISB.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/{chunk-4A2YPGO3.mjs.map → chunk-4J3KZCLG.mjs.map} +0 -0
- /package/dist/{chunk-FB5MHLWX.mjs.map → chunk-V2S54LGG.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -44,7 +44,7 @@ __export(src_exports, {
|
|
|
44
44
|
module.exports = __toCommonJS(src_exports);
|
|
45
45
|
|
|
46
46
|
// src/MatchContext.tsx
|
|
47
|
-
var
|
|
47
|
+
var import_react41 = require("react");
|
|
48
48
|
|
|
49
49
|
// src/hooks/index.tsx
|
|
50
50
|
var hooks_exports = {};
|
|
@@ -675,6 +675,10 @@ var formatDate = (value, formatString = "YYYY-MM-DD HH:mm:ss") => {
|
|
|
675
675
|
var isInTgApp = () => {
|
|
676
676
|
return !!window.TelegramWebviewProxy;
|
|
677
677
|
};
|
|
678
|
+
function bytesToBase64(bytes) {
|
|
679
|
+
const binString = String.fromCodePoint(...bytes);
|
|
680
|
+
return btoa(binString);
|
|
681
|
+
}
|
|
678
682
|
|
|
679
683
|
// src/store/useModalStore.ts
|
|
680
684
|
var import_zustand2 = require("zustand");
|
|
@@ -1826,6 +1830,23 @@ function ArrowSendIcon({
|
|
|
1826
1830
|
) });
|
|
1827
1831
|
}
|
|
1828
1832
|
|
|
1833
|
+
// src/assets/icon/PhantomIcon.tsx
|
|
1834
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1835
|
+
function PhantomIcon({
|
|
1836
|
+
size = 128,
|
|
1837
|
+
...props
|
|
1838
|
+
}) {
|
|
1839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.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_runtime50.jsx)(
|
|
1840
|
+
"path",
|
|
1841
|
+
{
|
|
1842
|
+
fill: "#ab9ff2",
|
|
1843
|
+
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",
|
|
1844
|
+
clipRule: "evenodd",
|
|
1845
|
+
fillRule: "evenodd"
|
|
1846
|
+
}
|
|
1847
|
+
) });
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1829
1850
|
// src/hooks/useLayout.tsx
|
|
1830
1851
|
var useLayout_exports = {};
|
|
1831
1852
|
__export(useLayout_exports, {
|
|
@@ -1847,39 +1868,39 @@ function useDownMd() {
|
|
|
1847
1868
|
}
|
|
1848
1869
|
|
|
1849
1870
|
// src/hooks/useConfig.tsx
|
|
1850
|
-
var
|
|
1871
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1851
1872
|
var DEFAULT_WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
1852
1873
|
var WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
1853
1874
|
function useWalletConfig() {
|
|
1854
1875
|
const isDownMd = useDownMd();
|
|
1855
1876
|
const walletMap = {
|
|
1856
1877
|
evm: {
|
|
1857
|
-
icon: /* @__PURE__ */ (0,
|
|
1858
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
1878
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(EVMDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
1879
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(EVMLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
1859
1880
|
name: "EVM",
|
|
1860
1881
|
method: "evm"
|
|
1861
1882
|
},
|
|
1862
1883
|
sol: {
|
|
1863
|
-
icon: /* @__PURE__ */ (0,
|
|
1864
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
1884
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SOLDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
1885
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SOLLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
1865
1886
|
name: "SOL",
|
|
1866
1887
|
method: "sol"
|
|
1867
1888
|
},
|
|
1868
1889
|
btc: {
|
|
1869
|
-
icon: /* @__PURE__ */ (0,
|
|
1870
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
1890
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(BTCDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
1891
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(BTCLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
1871
1892
|
name: "BTC",
|
|
1872
1893
|
method: "btc"
|
|
1873
1894
|
},
|
|
1874
1895
|
tron: {
|
|
1875
|
-
icon: /* @__PURE__ */ (0,
|
|
1876
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
1896
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TRXDarkIcon, { size: isDownMd ? 36 : 40 }),
|
|
1897
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TRXLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
1877
1898
|
name: "TRON",
|
|
1878
1899
|
method: "tron"
|
|
1879
1900
|
},
|
|
1880
1901
|
ton: {
|
|
1881
|
-
icon: /* @__PURE__ */ (0,
|
|
1882
|
-
activeIcon: /* @__PURE__ */ (0,
|
|
1902
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TonLightIcon, { size: isDownMd ? 36 : 40 }),
|
|
1903
|
+
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TonLightIcon2, { size: isDownMd ? 36 : 40 }),
|
|
1883
1904
|
name: "TON",
|
|
1884
1905
|
method: "ton"
|
|
1885
1906
|
}
|
|
@@ -1908,6 +1929,12 @@ var useBTCModalStore = (0, import_zustand2.create)((set) => ({
|
|
|
1908
1929
|
open: (type) => set({ isOpen: true, type }),
|
|
1909
1930
|
close: () => set({ isOpen: false })
|
|
1910
1931
|
}));
|
|
1932
|
+
var useEVMModalStore = (0, import_zustand2.create)((set) => ({
|
|
1933
|
+
isOpen: false,
|
|
1934
|
+
type: "",
|
|
1935
|
+
open: (type) => set({ isOpen: true, type }),
|
|
1936
|
+
close: () => set({ isOpen: false })
|
|
1937
|
+
}));
|
|
1911
1938
|
var useCEXBindModalStore = (0, import_zustand2.create)((set) => ({
|
|
1912
1939
|
type: "",
|
|
1913
1940
|
isOpen: false,
|
|
@@ -1952,6 +1979,7 @@ function useUserInfo() {
|
|
|
1952
1979
|
const { setTgAppAuthCode, emailLoginKey, setEmailLoginKey } = useStore_default();
|
|
1953
1980
|
const isDownMd = useDownMd();
|
|
1954
1981
|
const { events, login } = useMatch();
|
|
1982
|
+
const { open: EVMOpen } = useEVMModalStore();
|
|
1955
1983
|
const { open: TRONOpen } = useTRONModalStore();
|
|
1956
1984
|
const { open: TONOpen } = useTONModalStore();
|
|
1957
1985
|
const { open: BTCOpen } = useBTCModalStore();
|
|
@@ -2028,7 +2056,8 @@ function useUserInfo() {
|
|
|
2028
2056
|
case "wallet":
|
|
2029
2057
|
return walletModalStore.open("login", extra?.methods);
|
|
2030
2058
|
case "evm":
|
|
2031
|
-
return
|
|
2059
|
+
return EVMOpen("login");
|
|
2060
|
+
// return window.open(`${endpoints.auth}login/wallet?appid=${appid}&locale=${locale}`)
|
|
2032
2061
|
case "sol":
|
|
2033
2062
|
if (isDownMd) {
|
|
2034
2063
|
return window.location.href = `${endpoints.auth}login/sol?appid=${appid}&locale=${locale}&redirect_uri=${getRedirectUri()}`;
|
|
@@ -2120,7 +2149,8 @@ function useUserInfo() {
|
|
|
2120
2149
|
case "wallet":
|
|
2121
2150
|
return walletModalStore.open("bind", extra?.methods);
|
|
2122
2151
|
case "evm":
|
|
2123
|
-
return
|
|
2152
|
+
return EVMOpen("bind");
|
|
2153
|
+
// return window.open(`${endpoints.auth}bind/wallet?appid=${appid}&locale=${locale}&st=` + encodeURIComponent(encodeBase64(token)))
|
|
2124
2154
|
case "sol":
|
|
2125
2155
|
if (isDownMd) {
|
|
2126
2156
|
return window.location.href = `${endpoints.auth}bind/sol?appid=${appid}&locale=${locale}&st=${encodeURIComponent(encodeBase64(token))}&redirect_uri=${getRedirectUri()}`;
|
|
@@ -2285,7 +2315,7 @@ __export(ui_exports, {
|
|
|
2285
2315
|
});
|
|
2286
2316
|
|
|
2287
2317
|
// src/ui/Button/index.tsx
|
|
2288
|
-
var
|
|
2318
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2289
2319
|
function Button({
|
|
2290
2320
|
size = "df",
|
|
2291
2321
|
disabled = false,
|
|
@@ -2304,7 +2334,7 @@ function Button({
|
|
|
2304
2334
|
onClick && onClick();
|
|
2305
2335
|
}
|
|
2306
2336
|
};
|
|
2307
|
-
return /* @__PURE__ */ (0,
|
|
2337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2308
2338
|
"button",
|
|
2309
2339
|
{
|
|
2310
2340
|
type,
|
|
@@ -2314,14 +2344,14 @@ function Button({
|
|
|
2314
2344
|
...style
|
|
2315
2345
|
},
|
|
2316
2346
|
onClick: onAction,
|
|
2317
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
2347
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
|
|
2318
2348
|
}
|
|
2319
2349
|
);
|
|
2320
2350
|
}
|
|
2321
2351
|
|
|
2322
2352
|
// src/ui/Overlay/index.tsx
|
|
2323
2353
|
var import_react4 = require("react");
|
|
2324
|
-
var
|
|
2354
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2325
2355
|
function Overlay({
|
|
2326
2356
|
isOpen = false,
|
|
2327
2357
|
children,
|
|
@@ -2337,7 +2367,7 @@ function Overlay({
|
|
|
2337
2367
|
document.body.style.overflow = "";
|
|
2338
2368
|
};
|
|
2339
2369
|
}, [isOpen]);
|
|
2340
|
-
return isOpen ? /* @__PURE__ */ (0,
|
|
2370
|
+
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2341
2371
|
"div",
|
|
2342
2372
|
{
|
|
2343
2373
|
className: "matchid-overlay",
|
|
@@ -2346,11 +2376,11 @@ function Overlay({
|
|
|
2346
2376
|
},
|
|
2347
2377
|
children
|
|
2348
2378
|
}
|
|
2349
|
-
) : /* @__PURE__ */ (0,
|
|
2379
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_jsx_runtime53.Fragment, {});
|
|
2350
2380
|
}
|
|
2351
2381
|
|
|
2352
2382
|
// src/ui/Drawer/index.tsx
|
|
2353
|
-
var
|
|
2383
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2354
2384
|
function Drawer({
|
|
2355
2385
|
children,
|
|
2356
2386
|
showClose = true,
|
|
@@ -2361,22 +2391,22 @@ function Drawer({
|
|
|
2361
2391
|
onBack
|
|
2362
2392
|
}) {
|
|
2363
2393
|
if (!isOpen) {
|
|
2364
|
-
return /* @__PURE__ */ (0,
|
|
2394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, {});
|
|
2365
2395
|
}
|
|
2366
|
-
return /* @__PURE__ */ (0,
|
|
2367
|
-
/* @__PURE__ */ (0,
|
|
2368
|
-
/* @__PURE__ */ (0,
|
|
2369
|
-
onBack && /* @__PURE__ */ (0,
|
|
2396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "matchid-drawer", children: [
|
|
2397
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: `matchid-drawer-header matchid-flex`, children: [
|
|
2398
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: `matchid-drawer-header-content matchid-flex`, children: [
|
|
2399
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ArrowLeftIcon, { height: 25, width: 24, className: "matchid-drawer-header-back", onClick: onBack }),
|
|
2370
2400
|
title
|
|
2371
2401
|
] }),
|
|
2372
|
-
showClose && /* @__PURE__ */ (0,
|
|
2402
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
|
|
2373
2403
|
] }),
|
|
2374
2404
|
children
|
|
2375
2405
|
] }) });
|
|
2376
2406
|
}
|
|
2377
2407
|
|
|
2378
2408
|
// src/ui/Field/index.tsx
|
|
2379
|
-
var
|
|
2409
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2380
2410
|
function Field({
|
|
2381
2411
|
label,
|
|
2382
2412
|
children,
|
|
@@ -2384,13 +2414,13 @@ function Field({
|
|
|
2384
2414
|
required,
|
|
2385
2415
|
className = ""
|
|
2386
2416
|
}) {
|
|
2387
|
-
return /* @__PURE__ */ (0,
|
|
2388
|
-
/* @__PURE__ */ (0,
|
|
2389
|
-
required && /* @__PURE__ */ (0,
|
|
2417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
|
|
2418
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "matchid-field-label", children: [
|
|
2419
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "matchid-field-required", children: "*" }),
|
|
2390
2420
|
label
|
|
2391
2421
|
] }),
|
|
2392
2422
|
children,
|
|
2393
|
-
error && /* @__PURE__ */ (0,
|
|
2423
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "matchid-field-error", children: error })
|
|
2394
2424
|
] });
|
|
2395
2425
|
}
|
|
2396
2426
|
|
|
@@ -2398,7 +2428,7 @@ function Field({
|
|
|
2398
2428
|
var import_react5 = require("react");
|
|
2399
2429
|
|
|
2400
2430
|
// src/ui/Modal/index.tsx
|
|
2401
|
-
var
|
|
2431
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2402
2432
|
function Modal({
|
|
2403
2433
|
children,
|
|
2404
2434
|
isOpen,
|
|
@@ -2406,10 +2436,10 @@ function Modal({
|
|
|
2406
2436
|
zIndex = 100,
|
|
2407
2437
|
className = ""
|
|
2408
2438
|
}) {
|
|
2409
|
-
return /* @__PURE__ */ (0,
|
|
2439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: `matchid-modal ${className}`, style: {
|
|
2410
2440
|
width
|
|
2411
2441
|
}, children: [
|
|
2412
|
-
/* @__PURE__ */ (0,
|
|
2442
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "matchid-modal-mobile-header" }),
|
|
2413
2443
|
children
|
|
2414
2444
|
] }) });
|
|
2415
2445
|
}
|
|
@@ -2423,20 +2453,20 @@ function ModalWithHeader({
|
|
|
2423
2453
|
...props
|
|
2424
2454
|
}) {
|
|
2425
2455
|
const isDownMd = useDownMd();
|
|
2426
|
-
return /* @__PURE__ */ (0,
|
|
2427
|
-
/* @__PURE__ */ (0,
|
|
2428
|
-
/* @__PURE__ */ (0,
|
|
2429
|
-
onBack && /* @__PURE__ */ (0,
|
|
2430
|
-
/* @__PURE__ */ (0,
|
|
2456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Modal, { ...props, children: [
|
|
2457
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
|
|
2458
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "matchid-modal-header-content", children: [
|
|
2459
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
|
|
2460
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "matchid-modal-header-title", children: title })
|
|
2431
2461
|
] }),
|
|
2432
|
-
onClose && /* @__PURE__ */ (0,
|
|
2462
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
|
|
2433
2463
|
] }),
|
|
2434
2464
|
children
|
|
2435
2465
|
] });
|
|
2436
2466
|
}
|
|
2437
2467
|
|
|
2438
2468
|
// src/ui/ModalDrawer/index.tsx
|
|
2439
|
-
var
|
|
2469
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2440
2470
|
function ModalDrawer({
|
|
2441
2471
|
title,
|
|
2442
2472
|
drawerTitleVisible = true,
|
|
@@ -2444,9 +2474,9 @@ function ModalDrawer({
|
|
|
2444
2474
|
}) {
|
|
2445
2475
|
const isDownMd = useDownMd();
|
|
2446
2476
|
if (isDownMd) {
|
|
2447
|
-
return /* @__PURE__ */ (0,
|
|
2477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ModalWithHeader, { ...props, title });
|
|
2448
2478
|
}
|
|
2449
|
-
return /* @__PURE__ */ (0,
|
|
2479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
|
|
2450
2480
|
}
|
|
2451
2481
|
|
|
2452
2482
|
// src/assets/img/confirm.gif
|
|
@@ -2502,7 +2532,7 @@ function useHash({
|
|
|
2502
2532
|
}
|
|
2503
2533
|
|
|
2504
2534
|
// src/ui/HashPanel/index.tsx
|
|
2505
|
-
var
|
|
2535
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2506
2536
|
function HashPanel({
|
|
2507
2537
|
hash,
|
|
2508
2538
|
chain,
|
|
@@ -2561,14 +2591,14 @@ function HashPanel({
|
|
|
2561
2591
|
}
|
|
2562
2592
|
}, [hashQuery.data]);
|
|
2563
2593
|
const link = chain ? `${chain?.blockExplorers?.default.url}/tx/${hash}` : "";
|
|
2564
|
-
return /* @__PURE__ */ (0,
|
|
2594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2565
2595
|
ModalDrawer,
|
|
2566
2596
|
{
|
|
2567
2597
|
isOpen,
|
|
2568
2598
|
showClose: true,
|
|
2569
2599
|
onClose,
|
|
2570
2600
|
zIndex,
|
|
2571
|
-
title: /* @__PURE__ */ (0,
|
|
2601
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2572
2602
|
"div",
|
|
2573
2603
|
{
|
|
2574
2604
|
className: "matchid-hashpanel-header",
|
|
@@ -2578,29 +2608,29 @@ function HashPanel({
|
|
|
2578
2608
|
children: statusValue.text
|
|
2579
2609
|
}
|
|
2580
2610
|
),
|
|
2581
|
-
children: /* @__PURE__ */ (0,
|
|
2582
|
-
/* @__PURE__ */ (0,
|
|
2583
|
-
/* @__PURE__ */ (0,
|
|
2611
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "matchid-hashpanel-box", children: [
|
|
2612
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "matchid-hashpanel-content", children: [
|
|
2613
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: `matchid-hashpanel-status`, style: {
|
|
2584
2614
|
color: statusValue.color
|
|
2585
2615
|
}, children: statusValue.text }),
|
|
2586
|
-
/* @__PURE__ */ (0,
|
|
2587
|
-
hash && /* @__PURE__ */ (0,
|
|
2616
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("img", { src: statusValue.icon, alt: statusValue.text, className: `matchid-hashpanel-img` }),
|
|
2617
|
+
hash && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
|
|
2588
2618
|
"Hash:",
|
|
2589
|
-
/* @__PURE__ */ (0,
|
|
2619
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("a", { href: link, target: "_blank", children: hash })
|
|
2590
2620
|
] })
|
|
2591
2621
|
] }),
|
|
2592
|
-
/* @__PURE__ */ (0,
|
|
2622
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
|
|
2593
2623
|
] })
|
|
2594
2624
|
}
|
|
2595
2625
|
);
|
|
2596
2626
|
}
|
|
2597
2627
|
function HashPanel_default(props) {
|
|
2598
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
2628
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(HashPanel, { ...props });
|
|
2599
2629
|
}
|
|
2600
2630
|
|
|
2601
2631
|
// src/ui/Input/index.tsx
|
|
2602
2632
|
var import_react6 = require("react");
|
|
2603
|
-
var
|
|
2633
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
2604
2634
|
function Input({
|
|
2605
2635
|
onChange,
|
|
2606
2636
|
type,
|
|
@@ -2610,17 +2640,17 @@ function Input({
|
|
|
2610
2640
|
}) {
|
|
2611
2641
|
const [inputType, setInputType] = (0, import_react6.useState)(type);
|
|
2612
2642
|
const isDownMd = useDownMd();
|
|
2613
|
-
return /* @__PURE__ */ (0,
|
|
2643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
2614
2644
|
"div",
|
|
2615
2645
|
{
|
|
2616
2646
|
className: `matchid-input-box ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
2617
2647
|
children: [
|
|
2618
|
-
/* @__PURE__ */ (0,
|
|
2619
|
-
props.value && props.value.length > 0 && /* @__PURE__ */ (0,
|
|
2648
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" }),
|
|
2649
|
+
props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
|
|
2620
2650
|
if (onChange) {
|
|
2621
2651
|
onChange({ target: { value: "" } });
|
|
2622
2652
|
}
|
|
2623
|
-
}, children: /* @__PURE__ */ (0,
|
|
2653
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
2624
2654
|
DeleteRoundIcon,
|
|
2625
2655
|
{
|
|
2626
2656
|
height: isDownMd ? 16 : 21,
|
|
@@ -2628,9 +2658,9 @@ function Input({
|
|
|
2628
2658
|
color: "var(--matchid-input-delete-icon-color)"
|
|
2629
2659
|
}
|
|
2630
2660
|
) }),
|
|
2631
|
-
type === "password" && /* @__PURE__ */ (0,
|
|
2661
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
|
|
2632
2662
|
setInputType(inputType === "password" ? "text" : "password");
|
|
2633
|
-
}, children: inputType === "password" ? /* @__PURE__ */ (0,
|
|
2663
|
+
}, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
|
|
2634
2664
|
after
|
|
2635
2665
|
]
|
|
2636
2666
|
}
|
|
@@ -2639,7 +2669,7 @@ function Input({
|
|
|
2639
2669
|
|
|
2640
2670
|
// src/ui/Popover/index.tsx
|
|
2641
2671
|
var import_react7 = require("react");
|
|
2642
|
-
var
|
|
2672
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2643
2673
|
function Popover({
|
|
2644
2674
|
children,
|
|
2645
2675
|
content,
|
|
@@ -2649,7 +2679,7 @@ function Popover({
|
|
|
2649
2679
|
gap = "20px"
|
|
2650
2680
|
}) {
|
|
2651
2681
|
const [active, setActive] = (0, import_react7.useState)(false);
|
|
2652
|
-
return children && /* @__PURE__ */ (0,
|
|
2682
|
+
return children && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
2653
2683
|
"div",
|
|
2654
2684
|
{
|
|
2655
2685
|
onClick: () => {
|
|
@@ -2660,16 +2690,16 @@ function Popover({
|
|
|
2660
2690
|
className: `matchid-popover-box matchid-popover-${position} matchid-popover-${type} ${className} ${type == "click" && active ? "matchid-popover-click-active" : ""}`,
|
|
2661
2691
|
children: [
|
|
2662
2692
|
children,
|
|
2663
|
-
/* @__PURE__ */ (0,
|
|
2693
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { style: {
|
|
2664
2694
|
paddingTop: gap
|
|
2665
|
-
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0,
|
|
2695
|
+
}, className: `matchid-popover-area`, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: `matchid-popover-content`, children: content }) })
|
|
2666
2696
|
]
|
|
2667
2697
|
}
|
|
2668
2698
|
);
|
|
2669
2699
|
}
|
|
2670
2700
|
|
|
2671
2701
|
// src/ui/Switch/index.tsx
|
|
2672
|
-
var
|
|
2702
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2673
2703
|
function Switch({
|
|
2674
2704
|
size = "default",
|
|
2675
2705
|
checked = false,
|
|
@@ -2684,12 +2714,12 @@ function Switch({
|
|
|
2684
2714
|
onChange && onChange(!checked);
|
|
2685
2715
|
}
|
|
2686
2716
|
};
|
|
2687
|
-
return /* @__PURE__ */ (0,
|
|
2717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { onClick, className: `matchid-switch matchid-switch-${size} ${checked ? "matchid-switch-checked" : ""} ${disabled ? "matchid-switch-disabled" : ""} ${loading ? "matchid-switch-loading" : ""}`, ...props, children: loading ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(LoadingIcon_default, { className: "matchid-switch-loading-icon", size: size == "default" ? 24 : 18, color: "var(--matchid-swicth-loading-color)" }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "matchid-switch-ball" }) });
|
|
2688
2718
|
}
|
|
2689
2719
|
|
|
2690
2720
|
// src/ui/AlphaAvatar/index.tsx
|
|
2691
2721
|
var import_react8 = require("react");
|
|
2692
|
-
var
|
|
2722
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2693
2723
|
function AlphaAvatar({
|
|
2694
2724
|
name,
|
|
2695
2725
|
size = "default",
|
|
@@ -2706,7 +2736,7 @@ function AlphaAvatar({
|
|
|
2706
2736
|
return "";
|
|
2707
2737
|
}, [name]);
|
|
2708
2738
|
const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
|
|
2709
|
-
return /* @__PURE__ */ (0,
|
|
2739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
2710
2740
|
width: numberSize,
|
|
2711
2741
|
height: numberSize,
|
|
2712
2742
|
fontSize: Math.ceil(numberSize / 2),
|
|
@@ -2715,7 +2745,7 @@ function AlphaAvatar({
|
|
|
2715
2745
|
}
|
|
2716
2746
|
|
|
2717
2747
|
// src/ui/Radio/index.tsx
|
|
2718
|
-
var
|
|
2748
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2719
2749
|
function Radio({
|
|
2720
2750
|
checked = false,
|
|
2721
2751
|
onChange,
|
|
@@ -2724,20 +2754,20 @@ function Radio({
|
|
|
2724
2754
|
className = "",
|
|
2725
2755
|
style = {}
|
|
2726
2756
|
}) {
|
|
2727
|
-
return /* @__PURE__ */ (0,
|
|
2757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
|
|
2728
2758
|
width: size,
|
|
2729
2759
|
height: size,
|
|
2730
2760
|
...style,
|
|
2731
2761
|
// @ts-ignore
|
|
2732
2762
|
"--matchid-radio-checked": color
|
|
2733
|
-
}, children: checked && /* @__PURE__ */ (0,
|
|
2763
|
+
}, children: checked && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: `matchid-radio-content`, style: {
|
|
2734
2764
|
width: Math.floor(size * 0.7),
|
|
2735
2765
|
height: Math.floor(size * 0.7)
|
|
2736
2766
|
} }) });
|
|
2737
2767
|
}
|
|
2738
2768
|
|
|
2739
2769
|
// src/context/ModalContext.tsx
|
|
2740
|
-
var
|
|
2770
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2741
2771
|
var ModalContext = (0, import_react9.createContext)(null);
|
|
2742
2772
|
function ModalProvider({ children }) {
|
|
2743
2773
|
const [modalState, setModalState] = (0, import_react9.useState)({
|
|
@@ -2777,7 +2807,7 @@ function ModalProvider({ children }) {
|
|
|
2777
2807
|
visible: true,
|
|
2778
2808
|
index: modalIndex,
|
|
2779
2809
|
zIndex: newZIndex,
|
|
2780
|
-
content: /* @__PURE__ */ (0,
|
|
2810
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ModalDrawer, { showClose: true, isOpen: true, onClose: () => closeModal(modalIndex), title: props.title, zIndex: newZIndex, onBack: props.onBack, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(props.content, { close: () => closeModal(modalIndex), zIndex: newZIndex }) })
|
|
2781
2811
|
}],
|
|
2782
2812
|
highestZIndex: newZIndex
|
|
2783
2813
|
};
|
|
@@ -2789,7 +2819,7 @@ function ModalProvider({ children }) {
|
|
|
2789
2819
|
document.body
|
|
2790
2820
|
) : null
|
|
2791
2821
|
);
|
|
2792
|
-
return /* @__PURE__ */ (0,
|
|
2822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(ModalContext.Provider, { value: { show, open }, children: [
|
|
2793
2823
|
children,
|
|
2794
2824
|
modalElements
|
|
2795
2825
|
] });
|
|
@@ -2833,7 +2863,7 @@ var useTransactionStore = (0, import_zustand4.create)((0, import_middleware2.dev
|
|
|
2833
2863
|
var useTransactionStore_default = useTransactionStore;
|
|
2834
2864
|
|
|
2835
2865
|
// src/hooks/useWallet.tsx
|
|
2836
|
-
var
|
|
2866
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2837
2867
|
var AppClientId = "react-sdk-" + getVersion();
|
|
2838
2868
|
function useWallet() {
|
|
2839
2869
|
const { address, wallet: walletConfig } = useLocalStore_default();
|
|
@@ -3006,7 +3036,7 @@ function useWallet() {
|
|
|
3006
3036
|
address: evmAccount.address
|
|
3007
3037
|
});
|
|
3008
3038
|
modal.show((props) => {
|
|
3009
|
-
return /* @__PURE__ */ (0,
|
|
3039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
|
|
3010
3040
|
});
|
|
3011
3041
|
clearInterval(window.matchProvider.transactionMessageIntervalMap[transactionId].interval);
|
|
3012
3042
|
delete window.matchProvider.transactionMessageIntervalMap[transactionId];
|
|
@@ -3083,7 +3113,7 @@ function useCopyClipboard(timeout = 500) {
|
|
|
3083
3113
|
// src/context/ToastContext.tsx
|
|
3084
3114
|
var import_react12 = require("react");
|
|
3085
3115
|
var import_react_dom2 = require("react-dom");
|
|
3086
|
-
var
|
|
3116
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3087
3117
|
var ToastContext = (0, import_react12.createContext)(null);
|
|
3088
3118
|
function ToastProvider({ children, zIndex = 299 }) {
|
|
3089
3119
|
const [toasts, setToasts] = (0, import_react12.useState)([]);
|
|
@@ -3096,28 +3126,28 @@ function ToastProvider({ children, zIndex = 299 }) {
|
|
|
3096
3126
|
setTimeout(() => removeToast(id), timeout);
|
|
3097
3127
|
}, [removeToast]);
|
|
3098
3128
|
const success = (0, import_react12.useCallback)((text, timeout) => {
|
|
3099
|
-
show({ icon: /* @__PURE__ */ (0,
|
|
3129
|
+
show({ icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(CheckRoundIcon, { color: "#2FCC00", size: 24 }), text, timeout });
|
|
3100
3130
|
}, [show]);
|
|
3101
3131
|
const error = (0, import_react12.useCallback)((text, timeout) => {
|
|
3102
|
-
show({ icon: /* @__PURE__ */ (0,
|
|
3132
|
+
show({ icon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorRoundIcon, { size: 24 }), text, timeout });
|
|
3103
3133
|
}, [show]);
|
|
3104
3134
|
const ToastComponent = (0, import_react_dom2.createPortal)(
|
|
3105
|
-
/* @__PURE__ */ (0,
|
|
3135
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "matchid-toast-box", style: {
|
|
3106
3136
|
zIndex
|
|
3107
|
-
}, children: toasts.reverse().map(({ id, icon, text }) => /* @__PURE__ */ (0,
|
|
3137
|
+
}, children: toasts.reverse().map(({ id, icon, text }) => /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
3108
3138
|
"div",
|
|
3109
3139
|
{
|
|
3110
3140
|
className: "matchid-toast",
|
|
3111
3141
|
children: [
|
|
3112
|
-
icon && /* @__PURE__ */ (0,
|
|
3113
|
-
/* @__PURE__ */ (0,
|
|
3142
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: icon }),
|
|
3143
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: text })
|
|
3114
3144
|
]
|
|
3115
3145
|
},
|
|
3116
3146
|
id
|
|
3117
3147
|
)) }),
|
|
3118
3148
|
document.body
|
|
3119
3149
|
);
|
|
3120
|
-
return /* @__PURE__ */ (0,
|
|
3150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(ToastContext.Provider, { value: { show, success, error }, children: [
|
|
3121
3151
|
children,
|
|
3122
3152
|
ToastComponent
|
|
3123
3153
|
] });
|
|
@@ -3262,7 +3292,7 @@ function useWalletAssetListQuery({
|
|
|
3262
3292
|
var import_react13 = require("react");
|
|
3263
3293
|
var import_viem5 = require("viem");
|
|
3264
3294
|
var import_react_intl = require("react-intl");
|
|
3265
|
-
var
|
|
3295
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3266
3296
|
function useMatchChain() {
|
|
3267
3297
|
const chainListQuery = useChainListQuery();
|
|
3268
3298
|
const modal = useModal();
|
|
@@ -3293,28 +3323,28 @@ function useMatchChain() {
|
|
|
3293
3323
|
const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
|
|
3294
3324
|
const [selectedChainId, setSelectedChainId] = (0, import_react13.useState)(storeChainId2);
|
|
3295
3325
|
const isDownMd = useDownMd();
|
|
3296
|
-
return /* @__PURE__ */ (0,
|
|
3297
|
-
/* @__PURE__ */ (0,
|
|
3298
|
-
return /* @__PURE__ */ (0,
|
|
3326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: `matchid-change-network-box`, children: [
|
|
3327
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
|
|
3328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
3299
3329
|
"div",
|
|
3300
3330
|
{
|
|
3301
3331
|
onClick: () => setSelectedChainId(item.id),
|
|
3302
3332
|
className: `matchid-change-network-item ${selectedChainId == item.id ? "matchid-change-network-selected" : ""}`,
|
|
3303
3333
|
children: [
|
|
3304
|
-
/* @__PURE__ */ (0,
|
|
3305
|
-
/* @__PURE__ */ (0,
|
|
3306
|
-
/* @__PURE__ */ (0,
|
|
3334
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
|
|
3335
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
|
|
3336
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
|
|
3307
3337
|
] }),
|
|
3308
|
-
/* @__PURE__ */ (0,
|
|
3338
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
|
|
3309
3339
|
]
|
|
3310
3340
|
},
|
|
3311
3341
|
index
|
|
3312
3342
|
);
|
|
3313
3343
|
}) }),
|
|
3314
|
-
/* @__PURE__ */ (0,
|
|
3344
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
|
|
3315
3345
|
setChainId2(selectedChainId || 0);
|
|
3316
3346
|
close();
|
|
3317
|
-
}, block: true, children: /* @__PURE__ */ (0,
|
|
3347
|
+
}, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_intl.FormattedMessage, { id: "confirm" }) })
|
|
3318
3348
|
] });
|
|
3319
3349
|
}
|
|
3320
3350
|
const showChangeNetwork = () => {
|
|
@@ -3354,6 +3384,7 @@ var components_exports = {};
|
|
|
3354
3384
|
__export(components_exports, {
|
|
3355
3385
|
BTCModal: () => BTCModal,
|
|
3356
3386
|
Button: () => Button,
|
|
3387
|
+
EVMModal: () => EVMModal,
|
|
3357
3388
|
EmailModal: () => EmailModal,
|
|
3358
3389
|
Field: () => Field,
|
|
3359
3390
|
Input: () => Input,
|
|
@@ -3382,7 +3413,7 @@ var import_react16 = require("react");
|
|
|
3382
3413
|
// src/components/EmailModal/StepEmail.tsx
|
|
3383
3414
|
var import_react14 = require("react");
|
|
3384
3415
|
var import_react_intl2 = require("react-intl");
|
|
3385
|
-
var
|
|
3416
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3386
3417
|
function StepEmail(props) {
|
|
3387
3418
|
const intl = (0, import_react_intl2.useIntl)();
|
|
3388
3419
|
const [emailVal, setEmailVal] = (0, import_react14.useState)("");
|
|
@@ -3397,10 +3428,10 @@ function StepEmail(props) {
|
|
|
3397
3428
|
const onContinue = async () => {
|
|
3398
3429
|
props.onContinue(emailVal);
|
|
3399
3430
|
};
|
|
3400
|
-
return /* @__PURE__ */ (0,
|
|
3401
|
-
/* @__PURE__ */ (0,
|
|
3431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "matchid-email-email-box", children: [
|
|
3432
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Field, { label: intl.formatMessage({
|
|
3402
3433
|
id: "emailAddress"
|
|
3403
|
-
}), children: /* @__PURE__ */ (0,
|
|
3434
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3404
3435
|
Input,
|
|
3405
3436
|
{
|
|
3406
3437
|
placeholder: intl.formatMessage({
|
|
@@ -3410,9 +3441,9 @@ function StepEmail(props) {
|
|
|
3410
3441
|
value: emailVal
|
|
3411
3442
|
}
|
|
3412
3443
|
) }),
|
|
3413
|
-
/* @__PURE__ */ (0,
|
|
3444
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Button, { disabled: !canContinue, style: {
|
|
3414
3445
|
marginTop: "64px"
|
|
3415
|
-
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
3446
|
+
}, onClick: onContinue, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react_intl2.FormattedMessage, { id: "continue" }) })
|
|
3416
3447
|
] });
|
|
3417
3448
|
}
|
|
3418
3449
|
|
|
@@ -3426,7 +3457,7 @@ var NATIVE_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
|
3426
3457
|
|
|
3427
3458
|
// src/components/EmailModal/StepVerify.tsx
|
|
3428
3459
|
var import_react_intl3 = require("react-intl");
|
|
3429
|
-
var
|
|
3460
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3430
3461
|
function StepVerify(props) {
|
|
3431
3462
|
const intl = (0, import_react_intl3.useIntl)();
|
|
3432
3463
|
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
@@ -3503,17 +3534,17 @@ function StepVerify(props) {
|
|
|
3503
3534
|
setSubmitting(false);
|
|
3504
3535
|
}
|
|
3505
3536
|
};
|
|
3506
|
-
return /* @__PURE__ */ (0,
|
|
3507
|
-
/* @__PURE__ */ (0,
|
|
3508
|
-
/* @__PURE__ */ (0,
|
|
3509
|
-
/* @__PURE__ */ (0,
|
|
3510
|
-
/* @__PURE__ */ (0,
|
|
3511
|
-
/* @__PURE__ */ (0,
|
|
3537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "matchid-email-verify-box", children: [
|
|
3538
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "matchid-email-verify-header", children: [
|
|
3539
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
|
|
3540
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "matchid-email-verify-header-content", children: [
|
|
3541
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "matchid-email-verify-header-value", children: props.email }),
|
|
3542
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react_intl3.FormattedMessage, { id: "sendEmailTips" }) })
|
|
3512
3543
|
] })
|
|
3513
3544
|
] }),
|
|
3514
|
-
/* @__PURE__ */ (0,
|
|
3545
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Field, { label: intl.formatMessage({
|
|
3515
3546
|
id: "verificationCode"
|
|
3516
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
3547
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3517
3548
|
Input,
|
|
3518
3549
|
{
|
|
3519
3550
|
placeholder: intl.formatMessage({
|
|
@@ -3523,7 +3554,7 @@ function StepVerify(props) {
|
|
|
3523
3554
|
maxLength: codeLength,
|
|
3524
3555
|
onChange: (e) => setCode(e.target.value),
|
|
3525
3556
|
value: code,
|
|
3526
|
-
after: /* @__PURE__ */ (0,
|
|
3557
|
+
after: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3527
3558
|
Button,
|
|
3528
3559
|
{
|
|
3529
3560
|
highlight: true,
|
|
@@ -3542,13 +3573,13 @@ function StepVerify(props) {
|
|
|
3542
3573
|
)
|
|
3543
3574
|
}
|
|
3544
3575
|
) }),
|
|
3545
|
-
/* @__PURE__ */ (0,
|
|
3576
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Button, { disabled: !canContinue, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react_intl3.FormattedMessage, { id: "continue" }) })
|
|
3546
3577
|
] });
|
|
3547
3578
|
}
|
|
3548
3579
|
|
|
3549
3580
|
// src/components/EmailModal/index.tsx
|
|
3550
3581
|
var import_react_intl4 = require("react-intl");
|
|
3551
|
-
var
|
|
3582
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3552
3583
|
function EmailModal({
|
|
3553
3584
|
isOpen = false,
|
|
3554
3585
|
width = 480,
|
|
@@ -3565,7 +3596,7 @@ function EmailModal({
|
|
|
3565
3596
|
setEmailVal("");
|
|
3566
3597
|
}
|
|
3567
3598
|
}, [isOpen]);
|
|
3568
|
-
return /* @__PURE__ */ (0,
|
|
3599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3569
3600
|
ModalWithHeader,
|
|
3570
3601
|
{
|
|
3571
3602
|
isOpen,
|
|
@@ -3575,10 +3606,10 @@ function EmailModal({
|
|
|
3575
3606
|
id: "email"
|
|
3576
3607
|
}),
|
|
3577
3608
|
onBack: step == "verify" ? () => setStep("input") : onBack,
|
|
3578
|
-
children: step === "input" ? /* @__PURE__ */ (0,
|
|
3609
|
+
children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
|
|
3579
3610
|
setEmailVal(email);
|
|
3580
3611
|
setStep("verify");
|
|
3581
|
-
} }) : /* @__PURE__ */ (0,
|
|
3612
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(StepVerify, { email: emailVal, onSuccess: onLogin })
|
|
3582
3613
|
}
|
|
3583
3614
|
);
|
|
3584
3615
|
}
|
|
@@ -3608,7 +3639,7 @@ function useAppConfig() {
|
|
|
3608
3639
|
}
|
|
3609
3640
|
|
|
3610
3641
|
// src/components/LoginBox/index.tsx
|
|
3611
|
-
var
|
|
3642
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3612
3643
|
var RecommendItem = ({
|
|
3613
3644
|
icon,
|
|
3614
3645
|
name,
|
|
@@ -3617,20 +3648,20 @@ var RecommendItem = ({
|
|
|
3617
3648
|
children,
|
|
3618
3649
|
footer
|
|
3619
3650
|
}) => {
|
|
3620
|
-
return /* @__PURE__ */ (0,
|
|
3621
|
-
/* @__PURE__ */ (0,
|
|
3622
|
-
/* @__PURE__ */ (0,
|
|
3623
|
-
/* @__PURE__ */ (0,
|
|
3624
|
-
/* @__PURE__ */ (0,
|
|
3651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "matchid-login-recommend-method", children: [
|
|
3652
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "matchid-login-recommend-method-item", onClick, children: [
|
|
3653
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "matchid-login-recommend-method-content", children: [
|
|
3654
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "matchid-login-recommend-method-icon", children: icon }),
|
|
3655
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "matchid-login-recommend-method-name", children: name })
|
|
3625
3656
|
] }),
|
|
3626
|
-
footer ? footer : children ? /* @__PURE__ */ (0,
|
|
3657
|
+
footer ? footer : children ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3627
3658
|
ArrowDownIcon,
|
|
3628
3659
|
{
|
|
3629
3660
|
className: `matchid-login-recommend-method-arrow ${showChildren ? "matchid-login-recommend-method-arrow-active" : ""}`,
|
|
3630
3661
|
size: 20,
|
|
3631
3662
|
color: "var(--matchid-arrow-color)"
|
|
3632
3663
|
}
|
|
3633
|
-
) : /* @__PURE__ */ (0,
|
|
3664
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3634
3665
|
ArrowRightIcon,
|
|
3635
3666
|
{
|
|
3636
3667
|
className: "matchid-login-recommend-method-arrow",
|
|
@@ -3639,7 +3670,7 @@ var RecommendItem = ({
|
|
|
3639
3670
|
}
|
|
3640
3671
|
)
|
|
3641
3672
|
] }),
|
|
3642
|
-
children && /* @__PURE__ */ (0,
|
|
3673
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3643
3674
|
"div",
|
|
3644
3675
|
{
|
|
3645
3676
|
className: `matchid-login-recommend-method-popover ${showChildren ? "matchid-login-recommend-method-popover-active" : ""}`,
|
|
@@ -3704,75 +3735,75 @@ function LoginBox({
|
|
|
3704
3735
|
const isDownMd = useDownMd();
|
|
3705
3736
|
const methodMap = {
|
|
3706
3737
|
wallet: {
|
|
3707
|
-
icon: /* @__PURE__ */ (0,
|
|
3738
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(WalletIcon, { size: isDownMd ? 36 : 40 }),
|
|
3708
3739
|
name: intl.formatMessage({ id: "wallet" }),
|
|
3709
3740
|
onClick: () => setShowWallet(!showWallet),
|
|
3710
3741
|
type: "wallet"
|
|
3711
3742
|
},
|
|
3712
3743
|
email: {
|
|
3713
|
-
icon: /* @__PURE__ */ (0,
|
|
3744
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
|
|
3714
3745
|
name: intl.formatMessage({ id: "email" }),
|
|
3715
3746
|
onClick: () => {
|
|
3716
3747
|
setEmailOpen(true);
|
|
3717
3748
|
}
|
|
3718
3749
|
},
|
|
3719
3750
|
google: {
|
|
3720
|
-
icon: /* @__PURE__ */ (0,
|
|
3751
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(GoogleIcon, { size: isDownMd ? 36 : 40 }),
|
|
3721
3752
|
name: "Google",
|
|
3722
3753
|
onClick: () => login("google")
|
|
3723
3754
|
},
|
|
3724
3755
|
twitter: {
|
|
3725
|
-
icon: /* @__PURE__ */ (0,
|
|
3756
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(XIcon, { size: isDownMd ? 36 : 40 }),
|
|
3726
3757
|
name: "X",
|
|
3727
3758
|
onClick: () => login("twitter")
|
|
3728
3759
|
},
|
|
3729
3760
|
telegram: {
|
|
3730
|
-
icon: /* @__PURE__ */ (0,
|
|
3761
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TelegramIcon, { size: isDownMd ? 36 : 40 }),
|
|
3731
3762
|
name: "Telegram",
|
|
3732
3763
|
onClick: () => login("telegram")
|
|
3733
3764
|
},
|
|
3734
3765
|
github: {
|
|
3735
|
-
icon: /* @__PURE__ */ (0,
|
|
3766
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(GithubIcon, { size: isDownMd ? 36 : 40 }),
|
|
3736
3767
|
name: "Github",
|
|
3737
3768
|
onClick: () => login("github")
|
|
3738
3769
|
},
|
|
3739
3770
|
discord: {
|
|
3740
|
-
icon: /* @__PURE__ */ (0,
|
|
3771
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(DiscordIcon, { size: isDownMd ? 36 : 40 }),
|
|
3741
3772
|
name: "Discord",
|
|
3742
3773
|
onClick: () => login("discord")
|
|
3743
3774
|
},
|
|
3744
3775
|
linkedin: {
|
|
3745
|
-
icon: /* @__PURE__ */ (0,
|
|
3776
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
|
|
3746
3777
|
name: "LinkedIn",
|
|
3747
3778
|
onClick: () => login("linkedin")
|
|
3748
3779
|
},
|
|
3749
3780
|
facebook: {
|
|
3750
|
-
icon: /* @__PURE__ */ (0,
|
|
3781
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(FacebookIcon, { size: isDownMd ? 36 : 40 }),
|
|
3751
3782
|
name: "Facebook",
|
|
3752
3783
|
onClick: () => login("facebook")
|
|
3753
3784
|
},
|
|
3754
3785
|
youtube: {
|
|
3755
|
-
icon: /* @__PURE__ */ (0,
|
|
3786
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
|
|
3756
3787
|
name: "Youtube",
|
|
3757
3788
|
onClick: () => login("youtube")
|
|
3758
3789
|
}
|
|
3759
3790
|
};
|
|
3760
3791
|
const { walletMap } = useWalletConfig();
|
|
3761
|
-
return /* @__PURE__ */ (0,
|
|
3762
|
-
(!inModal || !emailOpen) && /* @__PURE__ */ (0,
|
|
3763
|
-
/* @__PURE__ */ (0,
|
|
3764
|
-
return /* @__PURE__ */ (0,
|
|
3792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
|
|
3793
|
+
(!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "matchid-login-box", children: [
|
|
3794
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
|
|
3795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3765
3796
|
RecommendItem,
|
|
3766
3797
|
{
|
|
3767
3798
|
icon: methodMap[m]?.icon,
|
|
3768
3799
|
name: methodMap[m]?.name,
|
|
3769
3800
|
onClick: methodMap[m]?.onClick,
|
|
3770
3801
|
showChildren: m == "wallet" && showWallet,
|
|
3771
|
-
children: m == "wallet" && /* @__PURE__ */ (0,
|
|
3772
|
-
/* @__PURE__ */ (0,
|
|
3773
|
-
/* @__PURE__ */ (0,
|
|
3802
|
+
children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
|
|
3803
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
|
|
3804
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
|
|
3774
3805
|
const m2 = walletMap[n];
|
|
3775
|
-
return /* @__PURE__ */ (0,
|
|
3806
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
3776
3807
|
"div",
|
|
3777
3808
|
{
|
|
3778
3809
|
className: "matchid-login-recommend-wallet-item",
|
|
@@ -3780,16 +3811,16 @@ function LoginBox({
|
|
|
3780
3811
|
login(m2.method);
|
|
3781
3812
|
},
|
|
3782
3813
|
children: [
|
|
3783
|
-
/* @__PURE__ */ (0,
|
|
3784
|
-
/* @__PURE__ */ (0,
|
|
3785
|
-
/* @__PURE__ */ (0,
|
|
3814
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
|
|
3815
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
|
|
3816
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3786
3817
|
"div",
|
|
3787
3818
|
{
|
|
3788
3819
|
className: "matchid-login-recommend-wallet-item-hover-icon",
|
|
3789
3820
|
children: m2.activeIcon
|
|
3790
3821
|
}
|
|
3791
3822
|
),
|
|
3792
|
-
/* @__PURE__ */ (0,
|
|
3823
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3793
3824
|
"span",
|
|
3794
3825
|
{
|
|
3795
3826
|
className: "matchid-login-recommend-wallet-item-name",
|
|
@@ -3797,7 +3828,7 @@ function LoginBox({
|
|
|
3797
3828
|
}
|
|
3798
3829
|
)
|
|
3799
3830
|
] }),
|
|
3800
|
-
/* @__PURE__ */ (0,
|
|
3831
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3801
3832
|
ArrowRightIcon,
|
|
3802
3833
|
{
|
|
3803
3834
|
className: "matchid-login-recommend-wallet-item-arrow",
|
|
@@ -3815,10 +3846,10 @@ function LoginBox({
|
|
|
3815
3846
|
m
|
|
3816
3847
|
);
|
|
3817
3848
|
}) }),
|
|
3818
|
-
methodConfig.methods.length > 0 && /* @__PURE__ */ (0,
|
|
3819
|
-
/* @__PURE__ */ (0,
|
|
3820
|
-
/* @__PURE__ */ (0,
|
|
3821
|
-
return /* @__PURE__ */ (0,
|
|
3849
|
+
methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "matchid-login-other", children: [
|
|
3850
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react_intl5.FormattedMessage, { id: "otherLoginMethods" }) }),
|
|
3851
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
3852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3822
3853
|
"div",
|
|
3823
3854
|
{
|
|
3824
3855
|
className: "matchid-login-method-item",
|
|
@@ -3831,7 +3862,7 @@ function LoginBox({
|
|
|
3831
3862
|
}) })
|
|
3832
3863
|
] })
|
|
3833
3864
|
] }),
|
|
3834
|
-
/* @__PURE__ */ (0,
|
|
3865
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3835
3866
|
EmailModal,
|
|
3836
3867
|
{
|
|
3837
3868
|
isOpen: emailOpen,
|
|
@@ -3851,40 +3882,40 @@ var import_react19 = require("react");
|
|
|
3851
3882
|
|
|
3852
3883
|
// src/components/LoginPanel/index.tsx
|
|
3853
3884
|
var import_react_intl6 = require("react-intl");
|
|
3854
|
-
var
|
|
3885
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3855
3886
|
function LoginPanel({
|
|
3856
3887
|
header,
|
|
3857
3888
|
onClose,
|
|
3858
3889
|
...props
|
|
3859
3890
|
}) {
|
|
3860
3891
|
const isDownMd = useDownMd();
|
|
3861
|
-
return /* @__PURE__ */ (0,
|
|
3862
|
-
header ? header : /* @__PURE__ */ (0,
|
|
3863
|
-
/* @__PURE__ */ (0,
|
|
3864
|
-
/* @__PURE__ */ (0,
|
|
3865
|
-
/* @__PURE__ */ (0,
|
|
3892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "matchid-login-panel", children: [
|
|
3893
|
+
header ? header : /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "matchid-login-panel-header", children: [
|
|
3894
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "matchid-login-panel-header-content", children: [
|
|
3895
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react_intl6.FormattedMessage, { id: "loginTitle" }) }),
|
|
3896
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react_intl6.FormattedMessage, { id: "loginTips" }) })
|
|
3866
3897
|
] }),
|
|
3867
|
-
onClose && /* @__PURE__ */ (0,
|
|
3898
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
|
|
3868
3899
|
] }),
|
|
3869
|
-
/* @__PURE__ */ (0,
|
|
3870
|
-
/* @__PURE__ */ (0,
|
|
3900
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "matchid-login-panel-divide" }),
|
|
3901
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(LoginBox, { ...props }) })
|
|
3871
3902
|
] });
|
|
3872
3903
|
}
|
|
3873
3904
|
|
|
3874
3905
|
// src/components/LoginModal/index.tsx
|
|
3875
|
-
var
|
|
3906
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3876
3907
|
function LoginModal({
|
|
3877
3908
|
isOpen = false,
|
|
3878
3909
|
width = 480,
|
|
3879
3910
|
...props
|
|
3880
3911
|
}) {
|
|
3881
3912
|
const { isLogin } = useUserInfo();
|
|
3882
|
-
return /* @__PURE__ */ (0,
|
|
3913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3883
3914
|
Modal,
|
|
3884
3915
|
{
|
|
3885
3916
|
isOpen: isOpen && !isLogin,
|
|
3886
3917
|
width,
|
|
3887
|
-
children: /* @__PURE__ */ (0,
|
|
3918
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(LoginPanel, { ...props, inModal: true })
|
|
3888
3919
|
}
|
|
3889
3920
|
);
|
|
3890
3921
|
}
|
|
@@ -3893,10 +3924,10 @@ function LoginModal({
|
|
|
3893
3924
|
var import_react18 = require("react");
|
|
3894
3925
|
|
|
3895
3926
|
// src/assets/icon/ProfileIcon.tsx
|
|
3896
|
-
var
|
|
3927
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3897
3928
|
function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
3898
|
-
return /* @__PURE__ */ (0,
|
|
3899
|
-
/* @__PURE__ */ (0,
|
|
3929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
3930
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3900
3931
|
"path",
|
|
3901
3932
|
{
|
|
3902
3933
|
fillRule: "evenodd",
|
|
@@ -3905,7 +3936,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
3905
3936
|
fill: color
|
|
3906
3937
|
}
|
|
3907
3938
|
),
|
|
3908
|
-
/* @__PURE__ */ (0,
|
|
3939
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3909
3940
|
"path",
|
|
3910
3941
|
{
|
|
3911
3942
|
fillRule: "evenodd",
|
|
@@ -3919,7 +3950,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
3919
3950
|
|
|
3920
3951
|
// src/components/UserPopover/index.tsx
|
|
3921
3952
|
var import_react_intl7 = require("react-intl");
|
|
3922
|
-
var
|
|
3953
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
3923
3954
|
function UserContent() {
|
|
3924
3955
|
const { logout, address, username } = useUserInfo();
|
|
3925
3956
|
const [logouting, setLogouting] = (0, import_react18.useState)(false);
|
|
@@ -3940,34 +3971,34 @@ function UserContent() {
|
|
|
3940
3971
|
rightIcon,
|
|
3941
3972
|
onClick
|
|
3942
3973
|
}) => {
|
|
3943
|
-
return /* @__PURE__ */ (0,
|
|
3944
|
-
/* @__PURE__ */ (0,
|
|
3974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "matchid-user-popover-item", onClick, children: [
|
|
3975
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: `matchid-user-popover-item-content`, children: [
|
|
3945
3976
|
icon,
|
|
3946
|
-
/* @__PURE__ */ (0,
|
|
3977
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "matchid-user-popover-item-text", children })
|
|
3947
3978
|
] }),
|
|
3948
3979
|
rightIcon
|
|
3949
3980
|
] });
|
|
3950
3981
|
};
|
|
3951
3982
|
const UserDivider = () => {
|
|
3952
|
-
return /* @__PURE__ */ (0,
|
|
3983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: `matchid-user-popover-divider` });
|
|
3953
3984
|
};
|
|
3954
3985
|
const [usernameOpen, setUsernameOpen] = (0, import_react18.useState)(false);
|
|
3955
3986
|
const [copied, setCopied] = useCopyClipboard();
|
|
3956
3987
|
const intl = (0, import_react_intl7.useIntl)();
|
|
3957
|
-
return /* @__PURE__ */ (0,
|
|
3958
|
-
/* @__PURE__ */ (0,
|
|
3959
|
-
/* @__PURE__ */ (0,
|
|
3988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "matchid-user-popover-content", children: [
|
|
3989
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "matchid-user-popover-list", children: [
|
|
3990
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(UserItem, { onClick: () => {
|
|
3960
3991
|
setCopied(address);
|
|
3961
|
-
}, icon: copied ? /* @__PURE__ */ (0,
|
|
3962
|
-
/* @__PURE__ */ (0,
|
|
3963
|
-
/* @__PURE__ */ (0,
|
|
3992
|
+
}, icon: copied ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(CheckIcon, { size: 20, color: "#0ecb81" }) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(CopyIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(CheckIcon, { size: 20, color: "var(--icon-color)" }), children: truncateAddress(address) }),
|
|
3993
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(UserDivider, {}),
|
|
3994
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(UserItem, { onClick: () => {
|
|
3964
3995
|
setUsernameOpen(true);
|
|
3965
|
-
}, icon: /* @__PURE__ */ (0,
|
|
3996
|
+
}, icon: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ProfileIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ArrowRightIcon, { size: 20, color: "var(--icon-color)" }), children: username || intl.formatMessage({
|
|
3966
3997
|
id: "setUsername"
|
|
3967
3998
|
}) })
|
|
3968
3999
|
] }),
|
|
3969
|
-
/* @__PURE__ */ (0,
|
|
3970
|
-
/* @__PURE__ */ (0,
|
|
4000
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react_intl7.FormattedMessage, { id: "disconnect" }) }),
|
|
4001
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(UsernameModal, { isOpen: usernameOpen, onClose: () => {
|
|
3971
4002
|
setUsernameOpen(false);
|
|
3972
4003
|
}, onSuccess: () => {
|
|
3973
4004
|
setUsernameOpen(false);
|
|
@@ -3978,12 +4009,12 @@ function UserPopover({
|
|
|
3978
4009
|
children,
|
|
3979
4010
|
...props
|
|
3980
4011
|
}) {
|
|
3981
|
-
return /* @__PURE__ */ (0,
|
|
4012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Popover, { ...props, content: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(UserContent, {}), children });
|
|
3982
4013
|
}
|
|
3983
4014
|
|
|
3984
4015
|
// src/components/LoginButton/index.tsx
|
|
3985
4016
|
var import_react_intl8 = require("react-intl");
|
|
3986
|
-
var
|
|
4017
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
3987
4018
|
function LoginButton({
|
|
3988
4019
|
loginRender,
|
|
3989
4020
|
methods,
|
|
@@ -3999,8 +4030,8 @@ function LoginButton({
|
|
|
3999
4030
|
const { isLogin, username } = useUserInfo();
|
|
4000
4031
|
const [loginOpen, setLoginOpen] = (0, import_react19.useState)(false);
|
|
4001
4032
|
if (!isLogin) {
|
|
4002
|
-
return /* @__PURE__ */ (0,
|
|
4003
|
-
/* @__PURE__ */ (0,
|
|
4033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
|
|
4034
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4004
4035
|
LoginModal,
|
|
4005
4036
|
{
|
|
4006
4037
|
methods,
|
|
@@ -4010,15 +4041,15 @@ function LoginButton({
|
|
|
4010
4041
|
onClose: () => setLoginOpen(false)
|
|
4011
4042
|
}
|
|
4012
4043
|
),
|
|
4013
|
-
/* @__PURE__ */ (0,
|
|
4014
|
-
/* @__PURE__ */ (0,
|
|
4015
|
-
/* @__PURE__ */ (0,
|
|
4044
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
|
|
4045
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(UnLoginIcon_default, {}),
|
|
4046
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react_intl8.FormattedMessage, { id: "login" }) })
|
|
4016
4047
|
] })
|
|
4017
4048
|
] });
|
|
4018
4049
|
}
|
|
4019
|
-
return loginRender ? /* @__PURE__ */ (0,
|
|
4020
|
-
/* @__PURE__ */ (0,
|
|
4021
|
-
/* @__PURE__ */ (0,
|
|
4050
|
+
return loginRender ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_jsx_runtime76.Fragment, { children: loginRender }) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(UserPopover, { position: popoverPosition, type: popoverType, gap: popoverGap, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(Button, { onClick: onLoginClick, className: "matchid-login-btn", ...props, children: [
|
|
4051
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(LoginIcon_default, {}),
|
|
4052
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { children: username ? truncateAddress(username) : "MatchID " + intl.formatMessage({
|
|
4022
4053
|
id: "user"
|
|
4023
4054
|
}) })
|
|
4024
4055
|
] }) });
|
|
@@ -4027,15 +4058,15 @@ function LoginButton({
|
|
|
4027
4058
|
// src/components/UsernameModal/index.tsx
|
|
4028
4059
|
var import_react20 = require("react");
|
|
4029
4060
|
var import_react_intl9 = require("react-intl");
|
|
4030
|
-
var
|
|
4061
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4031
4062
|
var ValidItem = ({
|
|
4032
4063
|
success = false,
|
|
4033
4064
|
text
|
|
4034
4065
|
}) => {
|
|
4035
4066
|
const isDownMd = useDownMd();
|
|
4036
|
-
return /* @__PURE__ */ (0,
|
|
4037
|
-
success ? /* @__PURE__ */ (0,
|
|
4038
|
-
/* @__PURE__ */ (0,
|
|
4067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
|
|
4068
|
+
success ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
|
|
4069
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { children: text })
|
|
4039
4070
|
] });
|
|
4040
4071
|
};
|
|
4041
4072
|
function UsernameModal({
|
|
@@ -4083,12 +4114,12 @@ function UsernameModal({
|
|
|
4083
4114
|
}
|
|
4084
4115
|
};
|
|
4085
4116
|
const intl = (0, import_react_intl9.useIntl)();
|
|
4086
|
-
return /* @__PURE__ */ (0,
|
|
4117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
|
|
4087
4118
|
id: username ? "editUsernameTitle" : "setUsernameTitle"
|
|
4088
|
-
}), children: /* @__PURE__ */ (0,
|
|
4089
|
-
/* @__PURE__ */ (0,
|
|
4119
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "matchid-username-box", children: [
|
|
4120
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Field, { label: intl.formatMessage({
|
|
4090
4121
|
id: "username"
|
|
4091
|
-
}), error, children: /* @__PURE__ */ (0,
|
|
4122
|
+
}), error, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4092
4123
|
Input,
|
|
4093
4124
|
{
|
|
4094
4125
|
placeholder: intl.formatMessage({
|
|
@@ -4101,8 +4132,8 @@ function UsernameModal({
|
|
|
4101
4132
|
value: val
|
|
4102
4133
|
}
|
|
4103
4134
|
) }),
|
|
4104
|
-
/* @__PURE__ */ (0,
|
|
4105
|
-
/* @__PURE__ */ (0,
|
|
4135
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "matchid-valid", children: [
|
|
4136
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4106
4137
|
ValidItem,
|
|
4107
4138
|
{
|
|
4108
4139
|
success: isValid,
|
|
@@ -4111,21 +4142,21 @@ function UsernameModal({
|
|
|
4111
4142
|
})
|
|
4112
4143
|
}
|
|
4113
4144
|
),
|
|
4114
|
-
/* @__PURE__ */ (0,
|
|
4145
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ValidItem, { success: isLength, text: intl.formatMessage({
|
|
4115
4146
|
id: "usernameLengthError"
|
|
4116
4147
|
}) })
|
|
4117
4148
|
] }),
|
|
4118
|
-
/* @__PURE__ */ (0,
|
|
4149
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Button, { disabled: !isSafe, loading: isSubmitting, style: {
|
|
4119
4150
|
marginTop: isDownMd ? "36px" : "64px"
|
|
4120
|
-
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0,
|
|
4121
|
-
/* @__PURE__ */ (0,
|
|
4151
|
+
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_intl9.FormattedMessage, { id: "confirm" }) }),
|
|
4152
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Button, { style: {
|
|
4122
4153
|
marginTop: isDownMd ? "12px" : "24px"
|
|
4123
|
-
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0,
|
|
4154
|
+
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_intl9.FormattedMessage, { id: "cancel" }) })
|
|
4124
4155
|
] }) });
|
|
4125
4156
|
}
|
|
4126
4157
|
|
|
4127
|
-
// src/components/
|
|
4128
|
-
var import_react23 =
|
|
4158
|
+
// src/components/EVMModal/index.tsx
|
|
4159
|
+
var import_react23 = require("react");
|
|
4129
4160
|
var import_react_intl10 = require("react-intl");
|
|
4130
4161
|
|
|
4131
4162
|
// src/components/WalletModalContent/index.tsx
|
|
@@ -4139,7 +4170,7 @@ var walletConnectImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEA
|
|
|
4139
4170
|
var walletSigningImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAABAsUlEQVR4Xu19CXQUx7X2vCUveS/vJdgx+yaJHQwI8G4wzWIbG2LLNrbxPgnY7CC0SyNpJBAIECAZAbLB8gAyKGGxiFnkGJwmz47xsU0mvyEWoGW0D0jgSeK88L84/7l/f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8/H/zll1+qvz9/Xj3/1VfqVwYWFRWhu0e9cOGCto20sLBQo3gz8P4ust/Bk3kwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDN/x/wHjsXZ4EUApzgAAAABJRU5ErkJggg==";
|
|
4140
4171
|
|
|
4141
4172
|
// src/components/WalletModalContent/index.tsx
|
|
4142
|
-
var
|
|
4173
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
4143
4174
|
function WalletModalContent({
|
|
4144
4175
|
status,
|
|
4145
4176
|
error,
|
|
@@ -4209,12 +4240,93 @@ function WalletModalContent({
|
|
|
4209
4240
|
statusImage: walletConnectImage
|
|
4210
4241
|
};
|
|
4211
4242
|
}, [visible, connected, status, error, address]);
|
|
4212
|
-
return /* @__PURE__ */ (0,
|
|
4213
|
-
/* @__PURE__ */ (0,
|
|
4214
|
-
/* @__PURE__ */ (0,
|
|
4215
|
-
/* @__PURE__ */ (0,
|
|
4243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
4244
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
4245
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("img", { src: pageData.statusImage }),
|
|
4246
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: pageData.isError ? "matchid-error" : "", children: pageData.text })
|
|
4247
|
+
] }),
|
|
4248
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4249
|
+
Button,
|
|
4250
|
+
{
|
|
4251
|
+
block: true,
|
|
4252
|
+
size: "lg",
|
|
4253
|
+
onClick: pageData.btnClick,
|
|
4254
|
+
loading: pageData.btnLoading,
|
|
4255
|
+
disabled: pageData.btnDisabled,
|
|
4256
|
+
children: pageData.btnText
|
|
4257
|
+
}
|
|
4258
|
+
)
|
|
4259
|
+
] }) });
|
|
4260
|
+
}
|
|
4261
|
+
function WalletModalContentV2(props) {
|
|
4262
|
+
const [submitting, setSubmitting] = (0, import_react21.useState)(false);
|
|
4263
|
+
const pageData = (0, import_react21.useMemo)(() => {
|
|
4264
|
+
const { status } = props;
|
|
4265
|
+
if (status == "success") {
|
|
4266
|
+
return {
|
|
4267
|
+
btnText: "Disconnect Wallet",
|
|
4268
|
+
btnClick: async () => {
|
|
4269
|
+
setSubmitting(true);
|
|
4270
|
+
await props.onDisconnect?.();
|
|
4271
|
+
setSubmitting(false);
|
|
4272
|
+
},
|
|
4273
|
+
text: "Wallet connection successful!",
|
|
4274
|
+
statusImage: walletConnectedImage,
|
|
4275
|
+
btnLoading: submitting
|
|
4276
|
+
};
|
|
4277
|
+
}
|
|
4278
|
+
if (status == "error") {
|
|
4279
|
+
return {
|
|
4280
|
+
text: props.error || "Unknown Error",
|
|
4281
|
+
btnText: "Reconnect Wallet",
|
|
4282
|
+
btnClick: async () => {
|
|
4283
|
+
setSubmitting(true);
|
|
4284
|
+
await props.onError?.();
|
|
4285
|
+
setSubmitting(false);
|
|
4286
|
+
},
|
|
4287
|
+
statusImage: walletErrorImage,
|
|
4288
|
+
isError: true,
|
|
4289
|
+
btnLoading: submitting
|
|
4290
|
+
};
|
|
4291
|
+
}
|
|
4292
|
+
if (status == "nonce") {
|
|
4293
|
+
return {
|
|
4294
|
+
btnLoading: true,
|
|
4295
|
+
text: "Connecting",
|
|
4296
|
+
statusImage: walletConnectingImage
|
|
4297
|
+
};
|
|
4298
|
+
}
|
|
4299
|
+
if (status == "signer") {
|
|
4300
|
+
return {
|
|
4301
|
+
btnLoading: true,
|
|
4302
|
+
text: "Signing",
|
|
4303
|
+
statusImage: walletSigningImage
|
|
4304
|
+
};
|
|
4305
|
+
}
|
|
4306
|
+
if (status == "connecting") {
|
|
4307
|
+
return {
|
|
4308
|
+
btnLoading: true,
|
|
4309
|
+
text: "Connecting",
|
|
4310
|
+
statusImage: walletConnectingImage
|
|
4311
|
+
};
|
|
4312
|
+
}
|
|
4313
|
+
return {
|
|
4314
|
+
btnText: "Connect Wallet",
|
|
4315
|
+
btnClick: async () => {
|
|
4316
|
+
setSubmitting(true);
|
|
4317
|
+
await props.onConnect?.();
|
|
4318
|
+
setSubmitting(false);
|
|
4319
|
+
},
|
|
4320
|
+
text: "Please Connect your wallet",
|
|
4321
|
+
statusImage: walletConnectImage
|
|
4322
|
+
};
|
|
4323
|
+
}, [props, submitting]);
|
|
4324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: `matchid-wallet-box`, children: [
|
|
4325
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: `matchid-wallet-content`, children: [
|
|
4326
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("img", { src: pageData.statusImage }),
|
|
4327
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: props.status == "error" ? "matchid-error" : "", children: pageData.text })
|
|
4216
4328
|
] }),
|
|
4217
|
-
/* @__PURE__ */ (0,
|
|
4329
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4218
4330
|
Button,
|
|
4219
4331
|
{
|
|
4220
4332
|
block: true,
|
|
@@ -4228,60 +4340,580 @@ function WalletModalContent({
|
|
|
4228
4340
|
] }) });
|
|
4229
4341
|
}
|
|
4230
4342
|
|
|
4231
|
-
// src/
|
|
4232
|
-
var
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
params: window.tronLink.tronlinkParams
|
|
4248
|
-
}
|
|
4249
|
-
);
|
|
4343
|
+
// src/components/EVMModal/index.tsx
|
|
4344
|
+
var import_chains = require("wagmi/chains");
|
|
4345
|
+
var import_rainbowkit = require("@rainbow-me/rainbowkit");
|
|
4346
|
+
var import_wagmi2 = require("wagmi");
|
|
4347
|
+
var import_wallets = require("@rainbow-me/rainbowkit/wallets");
|
|
4348
|
+
|
|
4349
|
+
// src/config/chains/MatchMain.ts
|
|
4350
|
+
var import_viem6 = require("viem");
|
|
4351
|
+
var matchMain = /* @__PURE__ */ (0, import_viem6.defineChain)({
|
|
4352
|
+
//定义match链
|
|
4353
|
+
id: 698,
|
|
4354
|
+
name: "Matchain",
|
|
4355
|
+
nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
|
|
4356
|
+
rpcUrls: {
|
|
4357
|
+
default: {
|
|
4358
|
+
http: ["https://rpc.matchain.io"]
|
|
4250
4359
|
}
|
|
4251
|
-
|
|
4252
|
-
|
|
4360
|
+
},
|
|
4361
|
+
blockExplorers: {
|
|
4362
|
+
default: {
|
|
4363
|
+
name: "Matchscan",
|
|
4364
|
+
url: "https://matchscan.io/",
|
|
4365
|
+
apiUrl: "https://matchscan.io/api"
|
|
4366
|
+
}
|
|
4367
|
+
},
|
|
4368
|
+
iconUrl: "https://matchscan.io/static/identicon_logos/blockies.png",
|
|
4369
|
+
contracts: {
|
|
4370
|
+
multicall3: {
|
|
4371
|
+
address: "0xca11bde05977b3631167028862be2a173976ca11"
|
|
4253
4372
|
}
|
|
4254
|
-
return window.tronWeb.defaultAddress.base58;
|
|
4255
4373
|
}
|
|
4256
|
-
|
|
4257
|
-
|
|
4374
|
+
// testnet: true,
|
|
4375
|
+
});
|
|
4376
|
+
|
|
4377
|
+
// src/config/chains/MatchTest.ts
|
|
4378
|
+
var import_viem7 = require("viem");
|
|
4379
|
+
var matchTest = /* @__PURE__ */ (0, import_viem7.defineChain)({
|
|
4380
|
+
//定义matchTest链
|
|
4381
|
+
id: 699,
|
|
4382
|
+
name: "MatchTest",
|
|
4383
|
+
nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
|
|
4384
|
+
rpcUrls: {
|
|
4385
|
+
default: {
|
|
4386
|
+
http: ["https://testnet-rpc.matchain.io"]
|
|
4387
|
+
}
|
|
4388
|
+
},
|
|
4389
|
+
blockExplorers: {
|
|
4390
|
+
default: {
|
|
4391
|
+
name: "Matchscan",
|
|
4392
|
+
url: "https://testnet.matchscan.io/",
|
|
4393
|
+
apiUrl: "https://testnet.matchscan.io/api"
|
|
4394
|
+
}
|
|
4395
|
+
},
|
|
4396
|
+
iconUrl: "https://testnet.matchscan.io/static/identicon_logos/blockies.png",
|
|
4397
|
+
contracts: {
|
|
4398
|
+
multicall3: {
|
|
4399
|
+
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
4400
|
+
blockCreated: 751532
|
|
4401
|
+
},
|
|
4402
|
+
ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
|
|
4403
|
+
ensUniversalResolver: {
|
|
4404
|
+
address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",
|
|
4405
|
+
blockCreated: 5317080
|
|
4406
|
+
}
|
|
4258
4407
|
}
|
|
4259
|
-
|
|
4408
|
+
// testnet: true,
|
|
4409
|
+
});
|
|
4260
4410
|
|
|
4261
|
-
// src/hooks/
|
|
4411
|
+
// src/hooks/useWalletBox.ts
|
|
4262
4412
|
var import_react22 = require("react");
|
|
4413
|
+
function useWalletBox({
|
|
4414
|
+
onInit
|
|
4415
|
+
}) {
|
|
4416
|
+
const [status, setStateStatus] = (0, import_react22.useState)("start");
|
|
4417
|
+
const [error, setError] = (0, import_react22.useState)("");
|
|
4418
|
+
const statusRef = (0, import_react22.useRef)(status);
|
|
4419
|
+
const [nonce, setNonce] = (0, import_react22.useState)();
|
|
4420
|
+
const setStatus = (status2) => {
|
|
4421
|
+
statusRef.current = status2;
|
|
4422
|
+
setStateStatus(status2);
|
|
4423
|
+
};
|
|
4424
|
+
const init = () => {
|
|
4425
|
+
setError("");
|
|
4426
|
+
setNonce(null);
|
|
4427
|
+
};
|
|
4428
|
+
(0, import_react22.useEffect)(() => {
|
|
4429
|
+
init();
|
|
4430
|
+
onInit({
|
|
4431
|
+
setStatus
|
|
4432
|
+
});
|
|
4433
|
+
return () => {
|
|
4434
|
+
setStatus("start");
|
|
4435
|
+
setNonce(null);
|
|
4436
|
+
setError("");
|
|
4437
|
+
};
|
|
4438
|
+
}, []);
|
|
4439
|
+
return {
|
|
4440
|
+
status,
|
|
4441
|
+
statusRef,
|
|
4442
|
+
setStatus,
|
|
4443
|
+
error,
|
|
4444
|
+
setError,
|
|
4445
|
+
nonce,
|
|
4446
|
+
setNonce,
|
|
4447
|
+
init
|
|
4448
|
+
};
|
|
4449
|
+
}
|
|
4263
4450
|
|
|
4264
|
-
// src/
|
|
4265
|
-
var
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4451
|
+
// src/hooks/useEthersSigner.ts
|
|
4452
|
+
var React5 = __toESM(require("react"));
|
|
4453
|
+
var import_wagmi = require("wagmi");
|
|
4454
|
+
var import_ethers = require("ethers");
|
|
4455
|
+
|
|
4456
|
+
// node_modules/@wagmi/core/dist/esm/version.js
|
|
4457
|
+
var version = "2.16.3";
|
|
4458
|
+
|
|
4459
|
+
// node_modules/@wagmi/core/dist/esm/utils/getVersion.js
|
|
4460
|
+
var getVersion2 = () => `@wagmi/core@${version}`;
|
|
4461
|
+
|
|
4462
|
+
// node_modules/@wagmi/core/dist/esm/errors/base.js
|
|
4463
|
+
var __classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
4464
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4465
|
+
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");
|
|
4466
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
4467
|
+
};
|
|
4468
|
+
var _BaseError_instances;
|
|
4469
|
+
var _BaseError_walk;
|
|
4470
|
+
var BaseError = class _BaseError extends Error {
|
|
4471
|
+
get docsBaseUrl() {
|
|
4472
|
+
return "https://wagmi.sh/core";
|
|
4270
4473
|
}
|
|
4271
|
-
|
|
4272
|
-
return
|
|
4474
|
+
get version() {
|
|
4475
|
+
return getVersion2();
|
|
4273
4476
|
}
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4477
|
+
constructor(shortMessage, options = {}) {
|
|
4478
|
+
super();
|
|
4479
|
+
_BaseError_instances.add(this);
|
|
4480
|
+
Object.defineProperty(this, "details", {
|
|
4481
|
+
enumerable: true,
|
|
4482
|
+
configurable: true,
|
|
4483
|
+
writable: true,
|
|
4484
|
+
value: void 0
|
|
4485
|
+
});
|
|
4486
|
+
Object.defineProperty(this, "docsPath", {
|
|
4487
|
+
enumerable: true,
|
|
4488
|
+
configurable: true,
|
|
4489
|
+
writable: true,
|
|
4490
|
+
value: void 0
|
|
4491
|
+
});
|
|
4492
|
+
Object.defineProperty(this, "metaMessages", {
|
|
4493
|
+
enumerable: true,
|
|
4494
|
+
configurable: true,
|
|
4495
|
+
writable: true,
|
|
4496
|
+
value: void 0
|
|
4497
|
+
});
|
|
4498
|
+
Object.defineProperty(this, "shortMessage", {
|
|
4499
|
+
enumerable: true,
|
|
4500
|
+
configurable: true,
|
|
4501
|
+
writable: true,
|
|
4502
|
+
value: void 0
|
|
4503
|
+
});
|
|
4504
|
+
Object.defineProperty(this, "name", {
|
|
4505
|
+
enumerable: true,
|
|
4506
|
+
configurable: true,
|
|
4507
|
+
writable: true,
|
|
4508
|
+
value: "WagmiCoreError"
|
|
4509
|
+
});
|
|
4510
|
+
const details = options.cause instanceof _BaseError ? options.cause.details : options.cause?.message ? options.cause.message : options.details;
|
|
4511
|
+
const docsPath = options.cause instanceof _BaseError ? options.cause.docsPath || options.docsPath : options.docsPath;
|
|
4512
|
+
this.message = [
|
|
4513
|
+
shortMessage || "An error occurred.",
|
|
4514
|
+
"",
|
|
4515
|
+
...options.metaMessages ? [...options.metaMessages, ""] : [],
|
|
4516
|
+
...docsPath ? [
|
|
4517
|
+
`Docs: ${this.docsBaseUrl}${docsPath}.html${options.docsSlug ? `#${options.docsSlug}` : ""}`
|
|
4518
|
+
] : [],
|
|
4519
|
+
...details ? [`Details: ${details}`] : [],
|
|
4520
|
+
`Version: ${this.version}`
|
|
4521
|
+
].join("\n");
|
|
4522
|
+
if (options.cause)
|
|
4523
|
+
this.cause = options.cause;
|
|
4524
|
+
this.details = details;
|
|
4525
|
+
this.docsPath = docsPath;
|
|
4526
|
+
this.metaMessages = options.metaMessages;
|
|
4527
|
+
this.shortMessage = shortMessage;
|
|
4278
4528
|
}
|
|
4279
|
-
|
|
4280
|
-
return
|
|
4529
|
+
walk(fn) {
|
|
4530
|
+
return __classPrivateFieldGet(this, _BaseError_instances, "m", _BaseError_walk).call(this, this, fn);
|
|
4281
4531
|
}
|
|
4282
4532
|
};
|
|
4533
|
+
_BaseError_instances = /* @__PURE__ */ new WeakSet(), _BaseError_walk = function _BaseError_walk2(err, fn) {
|
|
4534
|
+
if (fn?.(err))
|
|
4535
|
+
return err;
|
|
4536
|
+
if (err.cause)
|
|
4537
|
+
return __classPrivateFieldGet(this, _BaseError_instances, "m", _BaseError_walk2).call(this, err.cause, fn);
|
|
4538
|
+
return err;
|
|
4539
|
+
};
|
|
4283
4540
|
|
|
4284
|
-
//
|
|
4541
|
+
// node_modules/@wagmi/core/dist/esm/errors/config.js
|
|
4542
|
+
var ConnectorNotConnectedError = class extends BaseError {
|
|
4543
|
+
constructor() {
|
|
4544
|
+
super("Connector not connected.");
|
|
4545
|
+
Object.defineProperty(this, "name", {
|
|
4546
|
+
enumerable: true,
|
|
4547
|
+
configurable: true,
|
|
4548
|
+
writable: true,
|
|
4549
|
+
value: "ConnectorNotConnectedError"
|
|
4550
|
+
});
|
|
4551
|
+
}
|
|
4552
|
+
};
|
|
4553
|
+
var ConnectorAccountNotFoundError = class extends BaseError {
|
|
4554
|
+
constructor({ address, connector }) {
|
|
4555
|
+
super(`Account "${address}" not found for connector "${connector.name}".`);
|
|
4556
|
+
Object.defineProperty(this, "name", {
|
|
4557
|
+
enumerable: true,
|
|
4558
|
+
configurable: true,
|
|
4559
|
+
writable: true,
|
|
4560
|
+
value: "ConnectorAccountNotFoundError"
|
|
4561
|
+
});
|
|
4562
|
+
}
|
|
4563
|
+
};
|
|
4564
|
+
var ConnectorChainMismatchError = class extends BaseError {
|
|
4565
|
+
constructor({ connectionChainId, connectorChainId }) {
|
|
4566
|
+
super(`The current chain of the connector (id: ${connectorChainId}) does not match the connection's chain (id: ${connectionChainId}).`, {
|
|
4567
|
+
metaMessages: [
|
|
4568
|
+
`Current Chain ID: ${connectorChainId}`,
|
|
4569
|
+
`Expected Chain ID: ${connectionChainId}`
|
|
4570
|
+
]
|
|
4571
|
+
});
|
|
4572
|
+
Object.defineProperty(this, "name", {
|
|
4573
|
+
enumerable: true,
|
|
4574
|
+
configurable: true,
|
|
4575
|
+
writable: true,
|
|
4576
|
+
value: "ConnectorChainMismatchError"
|
|
4577
|
+
});
|
|
4578
|
+
}
|
|
4579
|
+
};
|
|
4580
|
+
var ConnectorUnavailableReconnectingError = class extends BaseError {
|
|
4581
|
+
constructor({ connector }) {
|
|
4582
|
+
super(`Connector "${connector.name}" unavailable while reconnecting.`, {
|
|
4583
|
+
details: [
|
|
4584
|
+
"During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.",
|
|
4585
|
+
"All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.",
|
|
4586
|
+
"This error commonly occurs for connectors that asynchronously inject after reconnection has already started."
|
|
4587
|
+
].join(" ")
|
|
4588
|
+
});
|
|
4589
|
+
Object.defineProperty(this, "name", {
|
|
4590
|
+
enumerable: true,
|
|
4591
|
+
configurable: true,
|
|
4592
|
+
writable: true,
|
|
4593
|
+
value: "ConnectorUnavailableReconnectingError"
|
|
4594
|
+
});
|
|
4595
|
+
}
|
|
4596
|
+
};
|
|
4597
|
+
|
|
4598
|
+
// node_modules/@wagmi/core/dist/esm/actions/getConnectorClient.js
|
|
4599
|
+
var import_viem8 = require("viem");
|
|
4600
|
+
var import_utils7 = require("viem/utils");
|
|
4601
|
+
async function getConnectorClient(config, parameters = {}) {
|
|
4602
|
+
let connection;
|
|
4603
|
+
if (parameters.connector) {
|
|
4604
|
+
const { connector: connector2 } = parameters;
|
|
4605
|
+
if (config.state.status === "reconnecting" && !connector2.getAccounts && !connector2.getChainId)
|
|
4606
|
+
throw new ConnectorUnavailableReconnectingError({ connector: connector2 });
|
|
4607
|
+
const [accounts, chainId2] = await Promise.all([
|
|
4608
|
+
connector2.getAccounts(),
|
|
4609
|
+
connector2.getChainId()
|
|
4610
|
+
]);
|
|
4611
|
+
connection = {
|
|
4612
|
+
accounts,
|
|
4613
|
+
chainId: chainId2,
|
|
4614
|
+
connector: connector2
|
|
4615
|
+
};
|
|
4616
|
+
} else
|
|
4617
|
+
connection = config.state.connections.get(config.state.current);
|
|
4618
|
+
if (!connection)
|
|
4619
|
+
throw new ConnectorNotConnectedError();
|
|
4620
|
+
const chainId = parameters.chainId ?? connection.chainId;
|
|
4621
|
+
const connectorChainId = await connection.connector.getChainId();
|
|
4622
|
+
if (connectorChainId !== connection.chainId)
|
|
4623
|
+
throw new ConnectorChainMismatchError({
|
|
4624
|
+
connectionChainId: connection.chainId,
|
|
4625
|
+
connectorChainId
|
|
4626
|
+
});
|
|
4627
|
+
const connector = connection.connector;
|
|
4628
|
+
if (connector.getClient)
|
|
4629
|
+
return connector.getClient({ chainId });
|
|
4630
|
+
const account = (0, import_utils7.parseAccount)(parameters.account ?? connection.accounts[0]);
|
|
4631
|
+
account.address = (0, import_utils7.getAddress)(account.address);
|
|
4632
|
+
if (parameters.account && !connection.accounts.some((x) => x.toLowerCase() === account.address.toLowerCase()))
|
|
4633
|
+
throw new ConnectorAccountNotFoundError({
|
|
4634
|
+
address: account.address,
|
|
4635
|
+
connector
|
|
4636
|
+
});
|
|
4637
|
+
const chain = config.chains.find((chain2) => chain2.id === chainId);
|
|
4638
|
+
const provider = await connection.connector.getProvider({ chainId });
|
|
4639
|
+
return (0, import_viem8.createClient)({
|
|
4640
|
+
account,
|
|
4641
|
+
chain,
|
|
4642
|
+
name: "Connector Client",
|
|
4643
|
+
transport: (opts) => (0, import_viem8.custom)(provider)({ ...opts, retryCount: 0 })
|
|
4644
|
+
});
|
|
4645
|
+
}
|
|
4646
|
+
|
|
4647
|
+
// node_modules/@wagmi/core/dist/esm/exports/index.js
|
|
4648
|
+
var import_viem9 = require("viem");
|
|
4649
|
+
|
|
4650
|
+
// src/hooks/useEthersSigner.ts
|
|
4651
|
+
function clientToSigner(client) {
|
|
4652
|
+
const { account, chain, transport } = client;
|
|
4653
|
+
const network = {
|
|
4654
|
+
chainId: chain.id,
|
|
4655
|
+
name: chain.name,
|
|
4656
|
+
ensAddress: chain.contracts?.ensRegistry?.address
|
|
4657
|
+
};
|
|
4658
|
+
const provider = new import_ethers.providers.Web3Provider(transport, network);
|
|
4659
|
+
const signer = provider.getSigner(account.address);
|
|
4660
|
+
return signer;
|
|
4661
|
+
}
|
|
4662
|
+
async function getEthersSigner(config, { chainId } = {}) {
|
|
4663
|
+
const client = await getConnectorClient(config, { chainId });
|
|
4664
|
+
return clientToSigner(client);
|
|
4665
|
+
}
|
|
4666
|
+
|
|
4667
|
+
// src/components/EVMModal/index.tsx
|
|
4668
|
+
var import_siwe = require("siwe");
|
|
4669
|
+
var import_styles = require("@rainbow-me/rainbowkit/styles.css");
|
|
4670
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
4671
|
+
function WalletContent({
|
|
4672
|
+
onSuccess,
|
|
4673
|
+
type
|
|
4674
|
+
}) {
|
|
4675
|
+
const config = (0, import_wagmi2.useConfig)();
|
|
4676
|
+
const { openConnectModal, connectModalOpen } = (0, import_rainbowkit.useConnectModal)();
|
|
4677
|
+
const { address, connector, isConnected } = (0, import_wagmi2.useAccount)();
|
|
4678
|
+
const { disconnectAsync } = (0, import_wagmi2.useDisconnect)({ config });
|
|
4679
|
+
const chainId = (0, import_wagmi2.useChainId)();
|
|
4680
|
+
const { events, login } = useMatch();
|
|
4681
|
+
const { status, setStatus, error, setError, statusRef, nonce, setNonce, init } = useWalletBox({
|
|
4682
|
+
onInit: async ({ setStatus: setStatus2 }) => {
|
|
4683
|
+
setStatus2("start");
|
|
4684
|
+
}
|
|
4685
|
+
});
|
|
4686
|
+
(0, import_react23.useEffect)(() => {
|
|
4687
|
+
console.log(`status=${status}`, `connectModalOpen=${connectModalOpen}`, `address=${address}`, `isConnected=${isConnected}`);
|
|
4688
|
+
}, [status, connectModalOpen, isConnected, address]);
|
|
4689
|
+
(0, import_react23.useEffect)(() => {
|
|
4690
|
+
if (connectModalOpen) {
|
|
4691
|
+
setStatus("connecting");
|
|
4692
|
+
return;
|
|
4693
|
+
}
|
|
4694
|
+
if (!connectModalOpen && address) {
|
|
4695
|
+
toLoginInWallet(address);
|
|
4696
|
+
return;
|
|
4697
|
+
}
|
|
4698
|
+
if (!connectModalOpen && !address) {
|
|
4699
|
+
setStatus("start");
|
|
4700
|
+
}
|
|
4701
|
+
}, [connectModalOpen, address]);
|
|
4702
|
+
(0, import_react23.useEffect)(() => {
|
|
4703
|
+
if (openConnectModal && !address) {
|
|
4704
|
+
openConnectModal && openConnectModal();
|
|
4705
|
+
}
|
|
4706
|
+
}, [openConnectModal]);
|
|
4707
|
+
const toLoginInWallet = async (address2) => {
|
|
4708
|
+
if (statusRef.current != "start" && statusRef.current != "connecting") return;
|
|
4709
|
+
try {
|
|
4710
|
+
if (!address2) {
|
|
4711
|
+
throw new Error("Wallet address is empty");
|
|
4712
|
+
}
|
|
4713
|
+
setStatus("nonce");
|
|
4714
|
+
const res = type == "bind" ? await getWalletInitApi({
|
|
4715
|
+
address: address2,
|
|
4716
|
+
type: "EVM"
|
|
4717
|
+
}) : await getWalletNonceApi({ address: address2, type: "EVM" });
|
|
4718
|
+
if (!isSuccess(res)) {
|
|
4719
|
+
throw new Error(res.message);
|
|
4720
|
+
}
|
|
4721
|
+
setNonce(res.data.nonce);
|
|
4722
|
+
} catch (error2) {
|
|
4723
|
+
console.error("toLoginInWallet", error2);
|
|
4724
|
+
setStatus("error");
|
|
4725
|
+
setError(error2.message);
|
|
4726
|
+
}
|
|
4727
|
+
};
|
|
4728
|
+
const signature = (0, import_react23.useCallback)(async () => {
|
|
4729
|
+
if (!nonce || status != "nonce") {
|
|
4730
|
+
return;
|
|
4731
|
+
}
|
|
4732
|
+
try {
|
|
4733
|
+
const signer = await getEthersSigner(config);
|
|
4734
|
+
if (!signer) return;
|
|
4735
|
+
matchlog_default.log("signature", nonce, status);
|
|
4736
|
+
if (!address) {
|
|
4737
|
+
throw new Error("Wallet address is empty");
|
|
4738
|
+
}
|
|
4739
|
+
setStatus("signer");
|
|
4740
|
+
const params = {
|
|
4741
|
+
domain: window.location.host,
|
|
4742
|
+
address,
|
|
4743
|
+
statement: "By signing, you are proving you own this wallet and logging in. This does not initiate a transaction or cost any fees.",
|
|
4744
|
+
uri: window.location.origin,
|
|
4745
|
+
nonce,
|
|
4746
|
+
version: "1",
|
|
4747
|
+
chainId
|
|
4748
|
+
};
|
|
4749
|
+
const message = new import_siwe.SiweMessage({ ...params });
|
|
4750
|
+
const signature2 = await signer.signMessage(message.prepareMessage());
|
|
4751
|
+
const obj = {
|
|
4752
|
+
type: "EVM",
|
|
4753
|
+
address,
|
|
4754
|
+
signature: signature2,
|
|
4755
|
+
message: `${message.prepareMessage()}`,
|
|
4756
|
+
connector_type: connector?.type || "",
|
|
4757
|
+
wallet_client_type: connector?.name || ""
|
|
4758
|
+
};
|
|
4759
|
+
const res = type == "bind" ? await toBindWalletApi(obj) : await loginByWalletApi(obj);
|
|
4760
|
+
if (!isSuccess(res)) {
|
|
4761
|
+
throw new Error(res.message);
|
|
4762
|
+
}
|
|
4763
|
+
matchlog_default.log(res);
|
|
4764
|
+
setStatus("success");
|
|
4765
|
+
if (type == "bind") {
|
|
4766
|
+
events.onBind && events.onBind({
|
|
4767
|
+
type: "evm"
|
|
4768
|
+
});
|
|
4769
|
+
eventManager_default.emit("onBind", {
|
|
4770
|
+
type: "evm"
|
|
4771
|
+
});
|
|
4772
|
+
} else {
|
|
4773
|
+
await login({
|
|
4774
|
+
token: `${res.data.token_type} ${res.data.access_token}`
|
|
4775
|
+
});
|
|
4776
|
+
}
|
|
4777
|
+
onSuccess && onSuccess();
|
|
4778
|
+
} catch (error2) {
|
|
4779
|
+
console.error("signature", error2);
|
|
4780
|
+
setStatus("error");
|
|
4781
|
+
setError(error2.message);
|
|
4782
|
+
}
|
|
4783
|
+
}, [nonce, status, address]);
|
|
4784
|
+
(0, import_react23.useEffect)(() => {
|
|
4785
|
+
if (signature) {
|
|
4786
|
+
signature();
|
|
4787
|
+
}
|
|
4788
|
+
}, [signature]);
|
|
4789
|
+
const onError = async () => {
|
|
4790
|
+
if (isConnected) {
|
|
4791
|
+
try {
|
|
4792
|
+
await disconnectAsync();
|
|
4793
|
+
} catch (error2) {
|
|
4794
|
+
console.error("disconnectAsync", error2);
|
|
4795
|
+
}
|
|
4796
|
+
}
|
|
4797
|
+
setError("");
|
|
4798
|
+
setNonce(void 0);
|
|
4799
|
+
setStatus("start");
|
|
4800
|
+
openConnectModal?.();
|
|
4801
|
+
};
|
|
4802
|
+
const onConnect = async () => {
|
|
4803
|
+
console.log("onConnect");
|
|
4804
|
+
setError("");
|
|
4805
|
+
setNonce(void 0);
|
|
4806
|
+
openConnectModal?.();
|
|
4807
|
+
};
|
|
4808
|
+
const onDisconnect = async () => {
|
|
4809
|
+
await disconnectAsync();
|
|
4810
|
+
setError("");
|
|
4811
|
+
setNonce(void 0);
|
|
4812
|
+
setStatus("start");
|
|
4813
|
+
};
|
|
4814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4815
|
+
WalletModalContentV2,
|
|
4816
|
+
{
|
|
4817
|
+
status,
|
|
4818
|
+
onSuccess: async () => onSuccess?.(),
|
|
4819
|
+
error,
|
|
4820
|
+
onError,
|
|
4821
|
+
onConnect,
|
|
4822
|
+
onDisconnect
|
|
4823
|
+
}
|
|
4824
|
+
);
|
|
4825
|
+
}
|
|
4826
|
+
var wagmiConfig = (0, import_rainbowkit.getDefaultConfig)({
|
|
4827
|
+
appName: "MatchID",
|
|
4828
|
+
projectId: "9ac6ea7e07860f04616fb311b447dee9",
|
|
4829
|
+
wallets: [
|
|
4830
|
+
{
|
|
4831
|
+
groupName: "Recommended",
|
|
4832
|
+
wallets: [
|
|
4833
|
+
import_wallets.metaMaskWallet,
|
|
4834
|
+
import_wallets.walletConnectWallet,
|
|
4835
|
+
import_wallets.okxWallet,
|
|
4836
|
+
import_wallets.bitgetWallet,
|
|
4837
|
+
import_wallets.injectedWallet
|
|
4838
|
+
]
|
|
4839
|
+
}
|
|
4840
|
+
],
|
|
4841
|
+
chains: [import_chains.mainnet, import_chains.polygon, import_chains.optimism, import_chains.arbitrum, import_chains.base, matchMain, matchTest, import_chains.bsc]
|
|
4842
|
+
});
|
|
4843
|
+
function EVMConnectModal({
|
|
4844
|
+
type = "login",
|
|
4845
|
+
onSuccess,
|
|
4846
|
+
...props
|
|
4847
|
+
}) {
|
|
4848
|
+
const intl = (0, import_react_intl10.useIntl)();
|
|
4849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4850
|
+
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4851
|
+
}, {
|
|
4852
|
+
name: "EVM"
|
|
4853
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_wagmi2.WagmiProvider, { config: wagmiConfig, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_rainbowkit.RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(WalletContent, { onSuccess, type }) }) }) });
|
|
4854
|
+
}
|
|
4855
|
+
function EVMModal(props) {
|
|
4856
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(EVMConnectModal, { ...props });
|
|
4857
|
+
}
|
|
4858
|
+
|
|
4859
|
+
// src/components/TRONModal/index.tsx
|
|
4860
|
+
var import_react25 = __toESM(require("react"));
|
|
4861
|
+
var import_react_intl11 = require("react-intl");
|
|
4862
|
+
|
|
4863
|
+
// src/lib/tron/TronLinkAdapter.ts
|
|
4864
|
+
var TronLinkAdapter = class {
|
|
4865
|
+
constructor() {
|
|
4866
|
+
this.name = "TronLink Wallet";
|
|
4867
|
+
this.website = "https://www.tronlink.org/";
|
|
4868
|
+
this.walletKey = "tronlink";
|
|
4869
|
+
}
|
|
4870
|
+
async isInstalled() {
|
|
4871
|
+
return typeof window.tronWeb !== "undefined" && typeof window.tronLink !== "undefined";
|
|
4872
|
+
}
|
|
4873
|
+
async connect() {
|
|
4874
|
+
if (!await this.isInstalled()) throw new Error("TronLink Wallet is not installed");
|
|
4875
|
+
if (!window.tronWeb.defaultAddress.base58) {
|
|
4876
|
+
await window.tronWeb.request(
|
|
4877
|
+
{
|
|
4878
|
+
method: "tron_requestAccounts",
|
|
4879
|
+
params: window.tronLink.tronlinkParams
|
|
4880
|
+
}
|
|
4881
|
+
);
|
|
4882
|
+
}
|
|
4883
|
+
if (!window.tronWeb.defaultAddress.base58) {
|
|
4884
|
+
throw new Error("Your should unlink your wallet and try again");
|
|
4885
|
+
}
|
|
4886
|
+
return window.tronWeb.defaultAddress.base58;
|
|
4887
|
+
}
|
|
4888
|
+
async signMessage(message) {
|
|
4889
|
+
return await window.tronWeb.trx.signMessageV2(message);
|
|
4890
|
+
}
|
|
4891
|
+
};
|
|
4892
|
+
|
|
4893
|
+
// src/hooks/useTRONWallet.ts
|
|
4894
|
+
var import_react24 = require("react");
|
|
4895
|
+
|
|
4896
|
+
// src/lib/tron/BitgetAdapter.ts
|
|
4897
|
+
var BitgetAdapter = class {
|
|
4898
|
+
constructor() {
|
|
4899
|
+
this.name = "Bitget Wallet";
|
|
4900
|
+
this.website = "https://web3.bitget.com/zh-CN/wallet-download";
|
|
4901
|
+
this.walletKey = "bitget";
|
|
4902
|
+
}
|
|
4903
|
+
async isInstalled() {
|
|
4904
|
+
return typeof window.bitkeep !== "undefined" && typeof window.bitkeep.tronWeb !== "undefined" && typeof window.bitkeep.tronLink !== "undefined";
|
|
4905
|
+
}
|
|
4906
|
+
async connect() {
|
|
4907
|
+
if (!await this.isInstalled()) throw new Error("Bitkeep Wallet is not installed");
|
|
4908
|
+
await window.bitkeep.tronLink.request({ method: "tron_requestAccounts" });
|
|
4909
|
+
return window.bitkeep.tronWeb.defaultAddress.base58;
|
|
4910
|
+
}
|
|
4911
|
+
async signMessage(message) {
|
|
4912
|
+
return await window.bitkeep.tronWeb.trx.signMessageV2(message);
|
|
4913
|
+
}
|
|
4914
|
+
};
|
|
4915
|
+
|
|
4916
|
+
// src/lib/tron/OKXAdapter.ts
|
|
4285
4917
|
var OKXAdapter = class {
|
|
4286
4918
|
constructor() {
|
|
4287
4919
|
this.name = "OKX Wallet";
|
|
@@ -4304,9 +4936,9 @@ var OKXAdapter = class {
|
|
|
4304
4936
|
// src/hooks/useTRONWallet.ts
|
|
4305
4937
|
var useTRONWallet = () => {
|
|
4306
4938
|
const wallets = [new TronLinkAdapter(), new BitgetAdapter(), new OKXAdapter()];
|
|
4307
|
-
const [installedWallets, setInstalledWallets] = (0,
|
|
4308
|
-
const [address, setAddress] = (0,
|
|
4309
|
-
(0,
|
|
4939
|
+
const [installedWallets, setInstalledWallets] = (0, import_react24.useState)([]);
|
|
4940
|
+
const [address, setAddress] = (0, import_react24.useState)(null);
|
|
4941
|
+
(0, import_react24.useEffect)(() => {
|
|
4310
4942
|
const getInstalled = async () => {
|
|
4311
4943
|
const installed = await Promise.all(wallets.map((wallet2) => wallet2.isInstalled().then((isInstalled) => ({
|
|
4312
4944
|
wallet: wallet2,
|
|
@@ -4316,11 +4948,11 @@ var useTRONWallet = () => {
|
|
|
4316
4948
|
};
|
|
4317
4949
|
getInstalled();
|
|
4318
4950
|
}, []);
|
|
4319
|
-
const [wallet, chooseWallet] = (0,
|
|
4951
|
+
const [wallet, chooseWallet] = (0, import_react24.useState)(null);
|
|
4320
4952
|
const onConnect = async () => {
|
|
4321
4953
|
setAddress(await wallet.connect());
|
|
4322
4954
|
};
|
|
4323
|
-
(0,
|
|
4955
|
+
(0, import_react24.useEffect)(() => {
|
|
4324
4956
|
if (!wallet) {
|
|
4325
4957
|
setAddress(null);
|
|
4326
4958
|
}
|
|
@@ -4336,25 +4968,25 @@ var useTRONWallet = () => {
|
|
|
4336
4968
|
};
|
|
4337
4969
|
|
|
4338
4970
|
// src/components/TRONModal/index.tsx
|
|
4339
|
-
var
|
|
4971
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
4340
4972
|
function TRONConnectModal({
|
|
4341
4973
|
type = "login",
|
|
4342
4974
|
onSuccess,
|
|
4343
4975
|
...props
|
|
4344
4976
|
}) {
|
|
4345
4977
|
const isDownMd = useDownMd();
|
|
4346
|
-
const intl = (0,
|
|
4978
|
+
const intl = (0, import_react_intl11.useIntl)();
|
|
4347
4979
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
|
|
4348
4980
|
const iconMaps = {
|
|
4349
|
-
tronlink: /* @__PURE__ */ (0,
|
|
4350
|
-
bitget: /* @__PURE__ */ (0,
|
|
4351
|
-
okx: /* @__PURE__ */ (0,
|
|
4981
|
+
tronlink: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
|
|
4982
|
+
bitget: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(BitgetIcon, { size: isDownMd ? 36 : 40 }),
|
|
4983
|
+
okx: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(OKXIcon, { size: isDownMd ? 36 : 40 })
|
|
4352
4984
|
};
|
|
4353
4985
|
const { events, login } = useMatch();
|
|
4354
|
-
const [status, setStatus] = (0,
|
|
4355
|
-
const statusRef =
|
|
4356
|
-
const [error, setError] = (0,
|
|
4357
|
-
const connected = (0,
|
|
4986
|
+
const [status, setStatus] = (0, import_react25.useState)("");
|
|
4987
|
+
const statusRef = import_react25.default.useRef(status);
|
|
4988
|
+
const [error, setError] = (0, import_react25.useState)("");
|
|
4989
|
+
const connected = (0, import_react25.useMemo)(() => {
|
|
4358
4990
|
return !!address;
|
|
4359
4991
|
}, [address]);
|
|
4360
4992
|
const disconnect = async () => {
|
|
@@ -4422,7 +5054,7 @@ function TRONConnectModal({
|
|
|
4422
5054
|
statusRef.current = "";
|
|
4423
5055
|
}
|
|
4424
5056
|
};
|
|
4425
|
-
(0,
|
|
5057
|
+
(0, import_react25.useEffect)(() => {
|
|
4426
5058
|
if (wallet) {
|
|
4427
5059
|
console.log("onConnect");
|
|
4428
5060
|
onConnect();
|
|
@@ -4430,21 +5062,21 @@ function TRONConnectModal({
|
|
|
4430
5062
|
setStatus("");
|
|
4431
5063
|
}
|
|
4432
5064
|
}, [wallet]);
|
|
4433
|
-
(0,
|
|
5065
|
+
(0, import_react25.useEffect)(() => {
|
|
4434
5066
|
if (address) {
|
|
4435
5067
|
toLoginInWallet();
|
|
4436
5068
|
}
|
|
4437
5069
|
}, [address]);
|
|
4438
|
-
(0,
|
|
5070
|
+
(0, import_react25.useEffect)(() => {
|
|
4439
5071
|
if (!props.isOpen) {
|
|
4440
5072
|
disconnect();
|
|
4441
5073
|
}
|
|
4442
5074
|
}, [props.isOpen]);
|
|
4443
|
-
return /* @__PURE__ */ (0,
|
|
5075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4444
5076
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4445
5077
|
}, {
|
|
4446
5078
|
name: "TRON"
|
|
4447
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5079
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4448
5080
|
WalletModalContent,
|
|
4449
5081
|
{
|
|
4450
5082
|
error,
|
|
@@ -4457,9 +5089,9 @@ function TRONConnectModal({
|
|
|
4457
5089
|
setVisible: () => {
|
|
4458
5090
|
}
|
|
4459
5091
|
}
|
|
4460
|
-
) : /* @__PURE__ */ (0,
|
|
5092
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
4461
5093
|
installedWallets.map((wallet2) => {
|
|
4462
|
-
return /* @__PURE__ */ (0,
|
|
5094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4463
5095
|
RecommendItem,
|
|
4464
5096
|
{
|
|
4465
5097
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -4472,14 +5104,14 @@ function TRONConnectModal({
|
|
|
4472
5104
|
);
|
|
4473
5105
|
}),
|
|
4474
5106
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
4475
|
-
return /* @__PURE__ */ (0,
|
|
5107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4476
5108
|
RecommendItem,
|
|
4477
5109
|
{
|
|
4478
5110
|
icon: iconMaps[wallet2.walletKey],
|
|
4479
5111
|
name: wallet2.name,
|
|
4480
5112
|
onClick: () => {
|
|
4481
5113
|
},
|
|
4482
|
-
footer: /* @__PURE__ */ (0,
|
|
5114
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Button, { size: "sm", onClick: () => {
|
|
4483
5115
|
window.open(wallet2.website);
|
|
4484
5116
|
}, children: "Install" })
|
|
4485
5117
|
},
|
|
@@ -4489,28 +5121,28 @@ function TRONConnectModal({
|
|
|
4489
5121
|
] }) }) });
|
|
4490
5122
|
}
|
|
4491
5123
|
function TRONModal(props) {
|
|
4492
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5124
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TRONConnectModal, { ...props, type: props.type });
|
|
4493
5125
|
}
|
|
4494
5126
|
|
|
4495
5127
|
// src/components/TONModal/index.tsx
|
|
4496
|
-
var
|
|
4497
|
-
var
|
|
5128
|
+
var import_react26 = __toESM(require("react"));
|
|
5129
|
+
var import_react_intl12 = require("react-intl");
|
|
4498
5130
|
var import_ui_react = require("@tonconnect/ui-react");
|
|
4499
|
-
var
|
|
4500
|
-
function
|
|
5131
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
5132
|
+
function WalletContent2({
|
|
4501
5133
|
onSuccess,
|
|
4502
5134
|
type
|
|
4503
5135
|
}) {
|
|
4504
5136
|
const { events, login } = useMatch();
|
|
4505
|
-
const [connected, setConnected] = (0,
|
|
5137
|
+
const [connected, setConnected] = (0, import_react26.useState)(false);
|
|
4506
5138
|
const wallet = (0, import_ui_react.useTonWallet)();
|
|
4507
5139
|
const userFriendlyAddress = (0, import_ui_react.useTonAddress)();
|
|
4508
5140
|
const [tonConnectUI] = (0, import_ui_react.useTonConnectUI)();
|
|
4509
5141
|
const { state, open, close } = (0, import_ui_react.useTonConnectModal)();
|
|
4510
|
-
const [status, setStatus] = (0,
|
|
4511
|
-
const statusRef =
|
|
4512
|
-
const [error, setError] = (0,
|
|
4513
|
-
(0,
|
|
5142
|
+
const [status, setStatus] = (0, import_react26.useState)("");
|
|
5143
|
+
const statusRef = import_react26.default.useRef(status);
|
|
5144
|
+
const [error, setError] = (0, import_react26.useState)("");
|
|
5145
|
+
(0, import_react26.useEffect)(() => {
|
|
4514
5146
|
const init = async () => {
|
|
4515
5147
|
if (tonConnectUI.connected) {
|
|
4516
5148
|
await tonConnectUI.disconnect();
|
|
@@ -4583,7 +5215,7 @@ function WalletContent({
|
|
|
4583
5215
|
}
|
|
4584
5216
|
});
|
|
4585
5217
|
}, []);
|
|
4586
|
-
(0,
|
|
5218
|
+
(0, import_react26.useEffect)(() => {
|
|
4587
5219
|
if (wallet) {
|
|
4588
5220
|
setConnected(true);
|
|
4589
5221
|
console.log("Wallet connected:", wallet);
|
|
@@ -4594,7 +5226,7 @@ function WalletContent({
|
|
|
4594
5226
|
setStatus("");
|
|
4595
5227
|
}
|
|
4596
5228
|
}, [wallet]);
|
|
4597
|
-
(0,
|
|
5229
|
+
(0, import_react26.useEffect)(() => {
|
|
4598
5230
|
console.log({
|
|
4599
5231
|
state,
|
|
4600
5232
|
wallet
|
|
@@ -4623,7 +5255,7 @@ function WalletContent({
|
|
|
4623
5255
|
}
|
|
4624
5256
|
}
|
|
4625
5257
|
}, [state]);
|
|
4626
|
-
return /* @__PURE__ */ (0,
|
|
5258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
4627
5259
|
WalletModalContent,
|
|
4628
5260
|
{
|
|
4629
5261
|
connected,
|
|
@@ -4654,28 +5286,28 @@ function TONConnectModal({
|
|
|
4654
5286
|
onSuccess,
|
|
4655
5287
|
...props
|
|
4656
5288
|
}) {
|
|
4657
|
-
const intl = (0,
|
|
5289
|
+
const intl = (0, import_react_intl12.useIntl)();
|
|
4658
5290
|
const { endpoints, appid } = useLocalStore_default();
|
|
4659
5291
|
const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
|
|
4660
|
-
return /* @__PURE__ */ (0,
|
|
5292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4661
5293
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4662
5294
|
}, {
|
|
4663
5295
|
name: "TON"
|
|
4664
|
-
}), children: /* @__PURE__ */ (0,
|
|
5296
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
4665
5297
|
import_ui_react.TonConnectUIProvider,
|
|
4666
5298
|
{
|
|
4667
5299
|
manifestUrl,
|
|
4668
|
-
children: /* @__PURE__ */ (0,
|
|
5300
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(WalletContent2, { onSuccess, type })
|
|
4669
5301
|
}
|
|
4670
5302
|
) });
|
|
4671
5303
|
}
|
|
4672
5304
|
function TONModal(props) {
|
|
4673
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5305
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(TONConnectModal, { ...props });
|
|
4674
5306
|
}
|
|
4675
5307
|
|
|
4676
5308
|
// src/components/BTCModal/index.tsx
|
|
4677
|
-
var
|
|
4678
|
-
var
|
|
5309
|
+
var import_react28 = __toESM(require("react"));
|
|
5310
|
+
var import_react_intl13 = require("react-intl");
|
|
4679
5311
|
|
|
4680
5312
|
// src/lib/btc/UnisatAdapter.ts
|
|
4681
5313
|
var UnisatAdapter = class {
|
|
@@ -4815,7 +5447,7 @@ var LeatherAdapter = class {
|
|
|
4815
5447
|
return response.result.addresses[0].address;
|
|
4816
5448
|
}
|
|
4817
5449
|
async signMessage(message) {
|
|
4818
|
-
if (!await this.isInstalled()) throw new Error("
|
|
5450
|
+
if (!await this.isInstalled()) throw new Error("Leather Wallet is not installed");
|
|
4819
5451
|
const response = await window.LeatherProvider?.request("signMessage", { message });
|
|
4820
5452
|
matchlog_default.log("response", response);
|
|
4821
5453
|
return response.result.signature;
|
|
@@ -4823,12 +5455,47 @@ var LeatherAdapter = class {
|
|
|
4823
5455
|
};
|
|
4824
5456
|
|
|
4825
5457
|
// src/hooks/useBTCWallet.ts
|
|
4826
|
-
var
|
|
5458
|
+
var import_react27 = require("react");
|
|
5459
|
+
|
|
5460
|
+
// src/lib/btc/PhantomAdapter.ts
|
|
5461
|
+
var PhantomAdapter = class {
|
|
5462
|
+
constructor() {
|
|
5463
|
+
this.name = "Phantom Wallet";
|
|
5464
|
+
this.website = "https://www.phantom.com/";
|
|
5465
|
+
this.walletKey = "phantom";
|
|
5466
|
+
}
|
|
5467
|
+
async isInstalled() {
|
|
5468
|
+
return typeof window.phantom !== "undefined" && typeof window.phantom.bitcoin !== "undefined";
|
|
5469
|
+
}
|
|
5470
|
+
async connect() {
|
|
5471
|
+
if (!await this.isInstalled()) throw new Error("Phantom Wallet is not installed");
|
|
5472
|
+
const response = await window.phantom.bitcoin.requestAccounts();
|
|
5473
|
+
const ordinalAddress = response.find((n) => n.purpose == "ordinals");
|
|
5474
|
+
matchlog_default.log("Addresses:", ordinalAddress);
|
|
5475
|
+
if (!ordinalAddress) {
|
|
5476
|
+
throw new Error("No addresses found in Phantom Wallet");
|
|
5477
|
+
}
|
|
5478
|
+
return ordinalAddress.address;
|
|
5479
|
+
}
|
|
5480
|
+
async signMessage(message) {
|
|
5481
|
+
if (!await this.isInstalled()) throw new Error("Phantom Wallet is not installed");
|
|
5482
|
+
const address = await this.connect();
|
|
5483
|
+
try {
|
|
5484
|
+
const { signature } = await window.phantom.bitcoin.signMessage(address, new TextEncoder().encode(message));
|
|
5485
|
+
return bytesToBase64(signature);
|
|
5486
|
+
} catch (error) {
|
|
5487
|
+
console.error(error);
|
|
5488
|
+
throw error;
|
|
5489
|
+
}
|
|
5490
|
+
}
|
|
5491
|
+
};
|
|
5492
|
+
|
|
5493
|
+
// src/hooks/useBTCWallet.ts
|
|
4827
5494
|
var useBTCWallet = () => {
|
|
4828
|
-
const wallets = [new UnisatAdapter(), new XverseAdapter(), new LeatherAdapter()];
|
|
4829
|
-
const [installedWallets, setInstalledWallets] = (0,
|
|
4830
|
-
const [address, setAddress] = (0,
|
|
4831
|
-
(0,
|
|
5495
|
+
const wallets = [new UnisatAdapter(), new XverseAdapter(), new LeatherAdapter(), new PhantomAdapter()];
|
|
5496
|
+
const [installedWallets, setInstalledWallets] = (0, import_react27.useState)([]);
|
|
5497
|
+
const [address, setAddress] = (0, import_react27.useState)(null);
|
|
5498
|
+
(0, import_react27.useEffect)(() => {
|
|
4832
5499
|
const getInstalled = async () => {
|
|
4833
5500
|
const installed = await Promise.all(wallets.map((wallet2) => wallet2.isInstalled().then((isInstalled) => ({
|
|
4834
5501
|
wallet: wallet2,
|
|
@@ -4838,11 +5505,11 @@ var useBTCWallet = () => {
|
|
|
4838
5505
|
};
|
|
4839
5506
|
getInstalled();
|
|
4840
5507
|
}, []);
|
|
4841
|
-
const [wallet, chooseWallet] = (0,
|
|
5508
|
+
const [wallet, chooseWallet] = (0, import_react27.useState)(null);
|
|
4842
5509
|
const onConnect = async () => {
|
|
4843
5510
|
setAddress(await wallet.connect());
|
|
4844
5511
|
};
|
|
4845
|
-
(0,
|
|
5512
|
+
(0, import_react27.useEffect)(() => {
|
|
4846
5513
|
if (!wallet) {
|
|
4847
5514
|
setAddress(null);
|
|
4848
5515
|
}
|
|
@@ -4858,25 +5525,26 @@ var useBTCWallet = () => {
|
|
|
4858
5525
|
};
|
|
4859
5526
|
|
|
4860
5527
|
// src/components/BTCModal/index.tsx
|
|
4861
|
-
var
|
|
5528
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
4862
5529
|
function BTCConnectModal({
|
|
4863
5530
|
type = "login",
|
|
4864
5531
|
onSuccess,
|
|
4865
5532
|
...props
|
|
4866
5533
|
}) {
|
|
4867
5534
|
const isDownMd = useDownMd();
|
|
4868
|
-
const intl = (0,
|
|
5535
|
+
const intl = (0, import_react_intl13.useIntl)();
|
|
4869
5536
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
|
|
4870
5537
|
const iconMaps = {
|
|
4871
|
-
leather: /* @__PURE__ */ (0,
|
|
4872
|
-
unisat: /* @__PURE__ */ (0,
|
|
4873
|
-
xverse: /* @__PURE__ */ (0,
|
|
5538
|
+
leather: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(LeatherIcon, { size: isDownMd ? 36 : 40 }),
|
|
5539
|
+
unisat: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(UnisatIcon, { size: isDownMd ? 36 : 40 }),
|
|
5540
|
+
xverse: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(XverseIcon, { size: isDownMd ? 36 : 40 }),
|
|
5541
|
+
phantom: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(PhantomIcon, { size: isDownMd ? 36 : 40 })
|
|
4874
5542
|
};
|
|
4875
5543
|
const { events, login } = useMatch();
|
|
4876
|
-
const [status, setStatus] = (0,
|
|
4877
|
-
const statusRef =
|
|
4878
|
-
const [error, setError] = (0,
|
|
4879
|
-
const connected = (0,
|
|
5544
|
+
const [status, setStatus] = (0, import_react28.useState)("");
|
|
5545
|
+
const statusRef = import_react28.default.useRef(status);
|
|
5546
|
+
const [error, setError] = (0, import_react28.useState)("");
|
|
5547
|
+
const connected = (0, import_react28.useMemo)(() => {
|
|
4880
5548
|
return !!address;
|
|
4881
5549
|
}, [address]);
|
|
4882
5550
|
const disconnect = async () => {
|
|
@@ -4940,7 +5608,7 @@ function BTCConnectModal({
|
|
|
4940
5608
|
statusRef.current = "";
|
|
4941
5609
|
}
|
|
4942
5610
|
};
|
|
4943
|
-
(0,
|
|
5611
|
+
(0, import_react28.useEffect)(() => {
|
|
4944
5612
|
if (wallet) {
|
|
4945
5613
|
console.log("onConnect");
|
|
4946
5614
|
try {
|
|
@@ -4953,12 +5621,12 @@ function BTCConnectModal({
|
|
|
4953
5621
|
setStatus("");
|
|
4954
5622
|
}
|
|
4955
5623
|
}, [wallet]);
|
|
4956
|
-
(0,
|
|
5624
|
+
(0, import_react28.useEffect)(() => {
|
|
4957
5625
|
if (address) {
|
|
4958
5626
|
toLoginInWallet();
|
|
4959
5627
|
}
|
|
4960
5628
|
}, [address]);
|
|
4961
|
-
(0,
|
|
5629
|
+
(0, import_react28.useEffect)(() => {
|
|
4962
5630
|
if (!props.isOpen) {
|
|
4963
5631
|
disconnect();
|
|
4964
5632
|
}
|
|
@@ -4970,11 +5638,11 @@ function BTCConnectModal({
|
|
|
4970
5638
|
statusRef.current = "";
|
|
4971
5639
|
setError("");
|
|
4972
5640
|
};
|
|
4973
|
-
return /* @__PURE__ */ (0,
|
|
5641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4974
5642
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4975
5643
|
}, {
|
|
4976
5644
|
name: "BTC"
|
|
4977
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0,
|
|
5645
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4978
5646
|
WalletModalContent,
|
|
4979
5647
|
{
|
|
4980
5648
|
error,
|
|
@@ -4987,9 +5655,9 @@ function BTCConnectModal({
|
|
|
4987
5655
|
setVisible: () => {
|
|
4988
5656
|
}
|
|
4989
5657
|
}
|
|
4990
|
-
) : /* @__PURE__ */ (0,
|
|
5658
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "matchid-login-recommend-list", children: [
|
|
4991
5659
|
installedWallets.map((wallet2) => {
|
|
4992
|
-
return /* @__PURE__ */ (0,
|
|
5660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4993
5661
|
RecommendItem,
|
|
4994
5662
|
{
|
|
4995
5663
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -5002,14 +5670,14 @@ function BTCConnectModal({
|
|
|
5002
5670
|
);
|
|
5003
5671
|
}),
|
|
5004
5672
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
5005
|
-
return /* @__PURE__ */ (0,
|
|
5673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
5006
5674
|
RecommendItem,
|
|
5007
5675
|
{
|
|
5008
5676
|
icon: iconMaps[wallet2.walletKey],
|
|
5009
5677
|
name: wallet2.name,
|
|
5010
5678
|
onClick: () => {
|
|
5011
5679
|
},
|
|
5012
|
-
footer: /* @__PURE__ */ (0,
|
|
5680
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Button, { size: "sm", onClick: () => {
|
|
5013
5681
|
window.open(wallet2.website);
|
|
5014
5682
|
}, children: "Install" })
|
|
5015
5683
|
},
|
|
@@ -5019,23 +5687,23 @@ function BTCConnectModal({
|
|
|
5019
5687
|
] }) }) });
|
|
5020
5688
|
}
|
|
5021
5689
|
function BTCModal(props) {
|
|
5022
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5690
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(BTCConnectModal, { ...props });
|
|
5023
5691
|
}
|
|
5024
5692
|
|
|
5025
5693
|
// src/components/WalletModal/index.tsx
|
|
5026
|
-
var
|
|
5027
|
-
var
|
|
5028
|
-
var
|
|
5694
|
+
var import_react29 = require("react");
|
|
5695
|
+
var import_react_intl14 = require("react-intl");
|
|
5696
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
5029
5697
|
function WalletConnectModal({
|
|
5030
5698
|
type,
|
|
5031
5699
|
methods: _methods,
|
|
5032
5700
|
...props
|
|
5033
5701
|
}) {
|
|
5034
|
-
const intl = (0,
|
|
5702
|
+
const intl = (0, import_react_intl14.useIntl)();
|
|
5035
5703
|
const { walletMap } = useWalletConfig();
|
|
5036
5704
|
const { bind, login } = useUserInfo();
|
|
5037
5705
|
const config = useAppConfig();
|
|
5038
|
-
const methods = (0,
|
|
5706
|
+
const methods = (0, import_react29.useMemo)(() => {
|
|
5039
5707
|
if (_methods) return _methods;
|
|
5040
5708
|
if (!config.platform) {
|
|
5041
5709
|
return [];
|
|
@@ -5043,13 +5711,13 @@ function WalletConnectModal({
|
|
|
5043
5711
|
const platform = config.platform.map((p) => p.toLowerCase());
|
|
5044
5712
|
return WALLET_METHODS.filter((m) => platform.includes(m));
|
|
5045
5713
|
}, [config.platform, _methods]);
|
|
5046
|
-
return /* @__PURE__ */ (0,
|
|
5714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
5047
5715
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
5048
5716
|
}, {
|
|
5049
5717
|
name: ""
|
|
5050
|
-
}), children: /* @__PURE__ */ (0,
|
|
5718
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "matchid-login-box", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "matchid-login-recommend-list", children: methods.map((method, index) => {
|
|
5051
5719
|
const m = walletMap[method];
|
|
5052
|
-
return /* @__PURE__ */ (0,
|
|
5720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
5053
5721
|
RecommendItem,
|
|
5054
5722
|
{
|
|
5055
5723
|
icon: m?.icon,
|
|
@@ -5063,21 +5731,21 @@ function WalletConnectModal({
|
|
|
5063
5731
|
}) }) }) });
|
|
5064
5732
|
}
|
|
5065
5733
|
function WalletModal(props) {
|
|
5066
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
5734
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(WalletConnectModal, { ...props });
|
|
5067
5735
|
}
|
|
5068
5736
|
|
|
5069
5737
|
// src/components/AlphaAvatar/index.tsx
|
|
5070
|
-
var
|
|
5071
|
-
var
|
|
5738
|
+
var import_react30 = require("react");
|
|
5739
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
5072
5740
|
function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
5073
|
-
const [avatar, setAvatar] = (0,
|
|
5074
|
-
(0,
|
|
5741
|
+
const [avatar, setAvatar] = (0, import_react30.useState)(void 0);
|
|
5742
|
+
(0, import_react30.useEffect)(() => {
|
|
5075
5743
|
if (name) {
|
|
5076
5744
|
const char = name[0].toUpperCase();
|
|
5077
5745
|
setAvatar(char);
|
|
5078
5746
|
}
|
|
5079
5747
|
}, [name]);
|
|
5080
|
-
return /* @__PURE__ */ (0,
|
|
5748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
5081
5749
|
width: size,
|
|
5082
5750
|
height: size,
|
|
5083
5751
|
fontSize: Math.ceil(size / 2)
|
|
@@ -5085,7 +5753,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
5085
5753
|
}
|
|
5086
5754
|
|
|
5087
5755
|
// src/components/WalletAsset/index.tsx
|
|
5088
|
-
var
|
|
5756
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
5089
5757
|
function WalletAsset({
|
|
5090
5758
|
onAssetClick,
|
|
5091
5759
|
matchWalletAssetsOptions
|
|
@@ -5095,7 +5763,7 @@ function WalletAsset({
|
|
|
5095
5763
|
list: walletAssets.mergedAssets
|
|
5096
5764
|
});
|
|
5097
5765
|
const { list } = useMatchChain();
|
|
5098
|
-
return /* @__PURE__ */ (0,
|
|
5766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5099
5767
|
const clickFunc = onAssetClick && onAssetClick(n);
|
|
5100
5768
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5101
5769
|
const getFooterColor = () => {
|
|
@@ -5110,11 +5778,11 @@ function WalletAsset({
|
|
|
5110
5778
|
}
|
|
5111
5779
|
return "";
|
|
5112
5780
|
};
|
|
5113
|
-
return /* @__PURE__ */ (0,
|
|
5781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-wallet-asset-item`, onClick: clickFunc, style: {
|
|
5114
5782
|
cursor: clickFunc ? "pointer" : "default"
|
|
5115
5783
|
}, children: [
|
|
5116
|
-
/* @__PURE__ */ (0,
|
|
5117
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
5784
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
|
|
5785
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-wallet-asset-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5118
5786
|
AlphaAvatar2,
|
|
5119
5787
|
{
|
|
5120
5788
|
className: `matchid-wallet-asset-icon`,
|
|
@@ -5122,12 +5790,12 @@ function WalletAsset({
|
|
|
5122
5790
|
name: n.symbol || n.name || ""
|
|
5123
5791
|
}
|
|
5124
5792
|
),
|
|
5125
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
5793
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
|
|
5126
5794
|
] }),
|
|
5127
|
-
/* @__PURE__ */ (0,
|
|
5128
|
-
/* @__PURE__ */ (0,
|
|
5129
|
-
"price" in n && /* @__PURE__ */ (0,
|
|
5130
|
-
/* @__PURE__ */ (0,
|
|
5795
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-wallet-asset-info`, children: [
|
|
5796
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
|
|
5797
|
+
"price" in n && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-wallet-asset-content`, children: [
|
|
5798
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5131
5799
|
NumberFormatter,
|
|
5132
5800
|
{
|
|
5133
5801
|
value: n.price,
|
|
@@ -5135,7 +5803,7 @@ function WalletAsset({
|
|
|
5135
5803
|
tFixNum: 2
|
|
5136
5804
|
}
|
|
5137
5805
|
) }),
|
|
5138
|
-
/* @__PURE__ */ (0,
|
|
5806
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5139
5807
|
NumberFormatter,
|
|
5140
5808
|
{
|
|
5141
5809
|
value: n.value,
|
|
@@ -5144,15 +5812,15 @@ function WalletAsset({
|
|
|
5144
5812
|
}
|
|
5145
5813
|
) })
|
|
5146
5814
|
] }),
|
|
5147
|
-
/* @__PURE__ */ (0,
|
|
5148
|
-
/* @__PURE__ */ (0,
|
|
5815
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-wallet-asset-footer`, children: [
|
|
5816
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5149
5817
|
NumberFormatter,
|
|
5150
5818
|
{
|
|
5151
5819
|
value: n.balance,
|
|
5152
5820
|
tFixNum: 3
|
|
5153
5821
|
}
|
|
5154
5822
|
) }),
|
|
5155
|
-
"price_change_24h" in n && /* @__PURE__ */ (0,
|
|
5823
|
+
"price_change_24h" in n && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: `matchid-wallet-asset-change ${getFooterColor()}`, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5156
5824
|
NumberFormatter,
|
|
5157
5825
|
{
|
|
5158
5826
|
prefix: `${(n?.price_change_24h || 0) < 0 ? "-" : "+"} `,
|
|
@@ -5168,10 +5836,10 @@ function WalletAsset({
|
|
|
5168
5836
|
}
|
|
5169
5837
|
|
|
5170
5838
|
// src/components/TokenSend/index.tsx
|
|
5171
|
-
var
|
|
5172
|
-
var
|
|
5173
|
-
var
|
|
5174
|
-
var
|
|
5839
|
+
var import_react31 = require("react");
|
|
5840
|
+
var import_viem10 = require("viem");
|
|
5841
|
+
var import_react_intl15 = require("react-intl");
|
|
5842
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
5175
5843
|
function Input2({
|
|
5176
5844
|
onChange,
|
|
5177
5845
|
placeholder,
|
|
@@ -5181,8 +5849,8 @@ function Input2({
|
|
|
5181
5849
|
error,
|
|
5182
5850
|
size = "df"
|
|
5183
5851
|
}) {
|
|
5184
|
-
return /* @__PURE__ */ (0,
|
|
5185
|
-
/* @__PURE__ */ (0,
|
|
5852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
|
|
5853
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5186
5854
|
"input",
|
|
5187
5855
|
{
|
|
5188
5856
|
placeholder,
|
|
@@ -5193,7 +5861,7 @@ function Input2({
|
|
|
5193
5861
|
className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
|
|
5194
5862
|
}
|
|
5195
5863
|
),
|
|
5196
|
-
error && /* @__PURE__ */ (0,
|
|
5864
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "matchid-token-input-error-text", children: error })
|
|
5197
5865
|
] });
|
|
5198
5866
|
}
|
|
5199
5867
|
function TokenSend({
|
|
@@ -5203,36 +5871,36 @@ function TokenSend({
|
|
|
5203
5871
|
onBack
|
|
5204
5872
|
}) {
|
|
5205
5873
|
const { list: chainList } = useMatchChain();
|
|
5206
|
-
const intl = (0,
|
|
5874
|
+
const intl = (0, import_react_intl15.useIntl)();
|
|
5207
5875
|
const { createWalletClient: createWalletClient2 } = useWallet();
|
|
5208
5876
|
const isNative = token.address.toLowerCase() == NATIVE_TOKEN_ADDRESS;
|
|
5209
|
-
const chain = (0,
|
|
5877
|
+
const chain = (0, import_react31.useMemo)(() => {
|
|
5210
5878
|
return chainList?.find((m) => m.id.toString() === token.chain_id);
|
|
5211
5879
|
}, [chainList, token.chain_id]);
|
|
5212
|
-
const walletClient = (0,
|
|
5880
|
+
const walletClient = (0, import_react31.useMemo)(() => {
|
|
5213
5881
|
return createWalletClient2({
|
|
5214
5882
|
// @ts-ignore
|
|
5215
|
-
chain: (0,
|
|
5216
|
-
transport: (0,
|
|
5883
|
+
chain: (0, import_viem10.defineChain)(chain),
|
|
5884
|
+
transport: (0, import_viem10.http)()
|
|
5217
5885
|
});
|
|
5218
5886
|
}, [chain]);
|
|
5219
|
-
const [amount, setAmount] = (0,
|
|
5220
|
-
const [address, setAddress] = (0,
|
|
5221
|
-
const [loading, setLoading] = (0,
|
|
5222
|
-
const [sending, setSending] = (0,
|
|
5223
|
-
const [txError, setTxError] = (0,
|
|
5224
|
-
const transaction = (0,
|
|
5887
|
+
const [amount, setAmount] = (0, import_react31.useState)("");
|
|
5888
|
+
const [address, setAddress] = (0, import_react31.useState)("");
|
|
5889
|
+
const [loading, setLoading] = (0, import_react31.useState)(false);
|
|
5890
|
+
const [sending, setSending] = (0, import_react31.useState)(false);
|
|
5891
|
+
const [txError, setTxError] = (0, import_react31.useState)("");
|
|
5892
|
+
const transaction = (0, import_react31.useMemo)(() => {
|
|
5225
5893
|
const reg = /^0x[a-fA-F0-9]{40}$/;
|
|
5226
5894
|
if (!amount || !address || !reg.test(address)) {
|
|
5227
5895
|
return;
|
|
5228
5896
|
}
|
|
5229
|
-
const viemChain = (0,
|
|
5897
|
+
const viemChain = (0, import_viem10.defineChain)(chain);
|
|
5230
5898
|
const to = isNative ? address : token.address;
|
|
5231
|
-
const value = isNative ? (0,
|
|
5232
|
-
const data = isNative ? "0x" : (0,
|
|
5233
|
-
abi:
|
|
5899
|
+
const value = isNative ? (0, import_viem10.parseUnits)(amount, parseInt(token?.decimals || "18")) : BigInt(0);
|
|
5900
|
+
const data = isNative ? "0x" : (0, import_viem10.encodeFunctionData)({
|
|
5901
|
+
abi: import_viem10.erc20Abi,
|
|
5234
5902
|
functionName: "transfer",
|
|
5235
|
-
args: [address, (0,
|
|
5903
|
+
args: [address, (0, import_viem10.parseUnits)(amount, parseInt(token?.decimals || "18"))]
|
|
5236
5904
|
});
|
|
5237
5905
|
return {
|
|
5238
5906
|
to,
|
|
@@ -5252,7 +5920,7 @@ function TokenSend({
|
|
|
5252
5920
|
setLoading(false);
|
|
5253
5921
|
}
|
|
5254
5922
|
};
|
|
5255
|
-
const error = (0,
|
|
5923
|
+
const error = (0, import_react31.useMemo)(() => {
|
|
5256
5924
|
setTxError("");
|
|
5257
5925
|
let amountError = "";
|
|
5258
5926
|
let addressError = "";
|
|
@@ -5295,7 +5963,7 @@ function TokenSend({
|
|
|
5295
5963
|
setAmount(value);
|
|
5296
5964
|
}
|
|
5297
5965
|
};
|
|
5298
|
-
const canSend = (0,
|
|
5966
|
+
const canSend = (0, import_react31.useMemo)(() => {
|
|
5299
5967
|
return !error.amount && !error.address && amount && address;
|
|
5300
5968
|
}, [error]);
|
|
5301
5969
|
const onNext = async () => {
|
|
@@ -5305,7 +5973,7 @@ function TokenSend({
|
|
|
5305
5973
|
}
|
|
5306
5974
|
onClose();
|
|
5307
5975
|
};
|
|
5308
|
-
(0,
|
|
5976
|
+
(0, import_react31.useEffect)(() => {
|
|
5309
5977
|
const receiveMessage = (event) => {
|
|
5310
5978
|
if (event.data) {
|
|
5311
5979
|
if (event.data.source == "match-wallet") {
|
|
@@ -5321,24 +5989,24 @@ function TokenSend({
|
|
|
5321
5989
|
window.removeEventListener("message", receiveMessage);
|
|
5322
5990
|
};
|
|
5323
5991
|
}, []);
|
|
5324
|
-
return /* @__PURE__ */ (0,
|
|
5325
|
-
/* @__PURE__ */ (0,
|
|
5326
|
-
/* @__PURE__ */ (0,
|
|
5327
|
-
/* @__PURE__ */ (0,
|
|
5328
|
-
/* @__PURE__ */ (0,
|
|
5329
|
-
/* @__PURE__ */ (0,
|
|
5330
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
5992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl15.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: `matchid-token-send-box`, children: [
|
|
5993
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
5994
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: `matchid-token-amount-content`, children: [
|
|
5995
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: `matchid-token-amount-header`, children: [
|
|
5996
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl15.FormattedMessage, { id: "amount" }) }),
|
|
5997
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
|
|
5998
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5331
5999
|
"img",
|
|
5332
6000
|
{
|
|
5333
6001
|
src: token?.icon,
|
|
5334
6002
|
alt: token?.symbol,
|
|
5335
6003
|
className: `matchid-token-amount-chain-icon`
|
|
5336
6004
|
}
|
|
5337
|
-
) : /* @__PURE__ */ (0,
|
|
5338
|
-
/* @__PURE__ */ (0,
|
|
6005
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
|
|
6006
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: token?.symbol })
|
|
5339
6007
|
] })
|
|
5340
6008
|
] }),
|
|
5341
|
-
/* @__PURE__ */ (0,
|
|
6009
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5342
6010
|
Input2,
|
|
5343
6011
|
{
|
|
5344
6012
|
type: "text",
|
|
@@ -5351,18 +6019,18 @@ function TokenSend({
|
|
|
5351
6019
|
error: error.amount || txError
|
|
5352
6020
|
}
|
|
5353
6021
|
),
|
|
5354
|
-
/* @__PURE__ */ (0,
|
|
5355
|
-
/* @__PURE__ */ (0,
|
|
5356
|
-
/* @__PURE__ */ (0,
|
|
6022
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
|
|
6023
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: `matchid-token-amount-title`, children: [
|
|
6024
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl15.FormattedMessage, { id: "balance" }),
|
|
5357
6025
|
":"
|
|
5358
6026
|
] }),
|
|
5359
|
-
/* @__PURE__ */ (0,
|
|
6027
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
|
|
5360
6028
|
] }),
|
|
5361
|
-
/* @__PURE__ */ (0,
|
|
6029
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
5362
6030
|
] }),
|
|
5363
|
-
/* @__PURE__ */ (0,
|
|
5364
|
-
/* @__PURE__ */ (0,
|
|
5365
|
-
/* @__PURE__ */ (0,
|
|
6031
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: `matchid-token-address-content`, children: [
|
|
6032
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl15.FormattedMessage, { id: "receiveTitle" }) }) }),
|
|
6033
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5366
6034
|
Input2,
|
|
5367
6035
|
{
|
|
5368
6036
|
type: "text",
|
|
@@ -5378,7 +6046,7 @@ function TokenSend({
|
|
|
5378
6046
|
)
|
|
5379
6047
|
] })
|
|
5380
6048
|
] }),
|
|
5381
|
-
/* @__PURE__ */ (0,
|
|
6049
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5382
6050
|
Button,
|
|
5383
6051
|
{
|
|
5384
6052
|
size: "lg",
|
|
@@ -5387,15 +6055,15 @@ function TokenSend({
|
|
|
5387
6055
|
disabled: !canSend || !!txError,
|
|
5388
6056
|
onClick: onNext,
|
|
5389
6057
|
loading: loading || sending,
|
|
5390
|
-
children: /* @__PURE__ */ (0,
|
|
6058
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_intl15.FormattedMessage, { id: "next" })
|
|
5391
6059
|
}
|
|
5392
6060
|
)
|
|
5393
6061
|
] }) });
|
|
5394
6062
|
}
|
|
5395
6063
|
|
|
5396
6064
|
// src/components/TokenDetail/index.tsx
|
|
5397
|
-
var
|
|
5398
|
-
var
|
|
6065
|
+
var import_react_intl16 = require("react-intl");
|
|
6066
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
5399
6067
|
function TokenDetail({
|
|
5400
6068
|
onClose,
|
|
5401
6069
|
token
|
|
@@ -5405,41 +6073,41 @@ function TokenDetail({
|
|
|
5405
6073
|
const chain = chainList?.find((m) => m.id.toString() === token.chain_id);
|
|
5406
6074
|
const onSend = () => {
|
|
5407
6075
|
modal.show((props) => {
|
|
5408
|
-
return /* @__PURE__ */ (0,
|
|
6076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TokenSend, { onClose: () => {
|
|
5409
6077
|
props.close();
|
|
5410
6078
|
onClose();
|
|
5411
6079
|
}, onBack: props.close, zIndex: props.zIndex, token });
|
|
5412
6080
|
});
|
|
5413
6081
|
};
|
|
5414
|
-
const intl = (0,
|
|
5415
|
-
return /* @__PURE__ */ (0,
|
|
6082
|
+
const intl = (0, import_react_intl16.useIntl)();
|
|
6083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ModalDrawer, { isOpen: true, title: intl.formatMessage({
|
|
5416
6084
|
id: "tokenDetails"
|
|
5417
|
-
}), onClose, children: /* @__PURE__ */ (0,
|
|
5418
|
-
/* @__PURE__ */ (0,
|
|
5419
|
-
/* @__PURE__ */ (0,
|
|
5420
|
-
/* @__PURE__ */ (0,
|
|
5421
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
5422
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6085
|
+
}), onClose, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-token-detail`, children: [
|
|
6086
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-token-main`, children: [
|
|
6087
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-token-info`, children: [
|
|
6088
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-token-logo`, children: [
|
|
6089
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("img", { src: token.icon, alt: token.symbol, className: `matchid-token-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(AlphaAvatar, { className: `matchid-token-icon`, size: 48, name: token.symbol || token.name || "" }),
|
|
6090
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-token-chain` })
|
|
5423
6091
|
] }),
|
|
5424
|
-
/* @__PURE__ */ (0,
|
|
5425
|
-
/* @__PURE__ */ (0,
|
|
6092
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-token-name`, children: [
|
|
6093
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10 }),
|
|
5426
6094
|
" ",
|
|
5427
6095
|
token.symbol
|
|
5428
6096
|
] })
|
|
5429
6097
|
] }),
|
|
5430
|
-
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0,
|
|
5431
|
-
/* @__PURE__ */ (0,
|
|
5432
|
-
/* @__PURE__ */ (0,
|
|
6098
|
+
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-token-contract`, children: [
|
|
6099
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-token-contract-title", children: "Contract address" }),
|
|
6100
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-token-contract-address", children: token.address })
|
|
5433
6101
|
] })
|
|
5434
6102
|
] }),
|
|
5435
|
-
/* @__PURE__ */ (0,
|
|
6103
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react_intl16.FormattedMessage, { id: "send" }) })
|
|
5436
6104
|
] }) });
|
|
5437
6105
|
}
|
|
5438
6106
|
|
|
5439
6107
|
// src/components/TokenSendList/index.tsx
|
|
5440
|
-
var
|
|
5441
|
-
var
|
|
5442
|
-
var
|
|
6108
|
+
var import_react32 = require("react");
|
|
6109
|
+
var import_react_intl17 = require("react-intl");
|
|
6110
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
5443
6111
|
function TokenSendList({ close }) {
|
|
5444
6112
|
const isDownMd = useDownMd();
|
|
5445
6113
|
const walletAssets = useMatchWalletAssets();
|
|
@@ -5447,20 +6115,20 @@ function TokenSendList({ close }) {
|
|
|
5447
6115
|
list: walletAssets.mergedAssets
|
|
5448
6116
|
});
|
|
5449
6117
|
const { list } = useMatchChain();
|
|
5450
|
-
const [checked, setChecked] = (0,
|
|
6118
|
+
const [checked, setChecked] = (0, import_react32.useState)();
|
|
5451
6119
|
const modal = useModal();
|
|
5452
6120
|
const onNext = () => {
|
|
5453
6121
|
checked && modal.show((props) => {
|
|
5454
|
-
return /* @__PURE__ */ (0,
|
|
6122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(TokenSend, { onClose: () => {
|
|
5455
6123
|
props.close();
|
|
5456
6124
|
close();
|
|
5457
6125
|
}, onBack: props.close, zIndex: props.zIndex, token: checked });
|
|
5458
6126
|
});
|
|
5459
6127
|
};
|
|
5460
|
-
return /* @__PURE__ */ (0,
|
|
5461
|
-
/* @__PURE__ */ (0,
|
|
6128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-token-send-list-box", children: [
|
|
6129
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
5462
6130
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
5463
|
-
return /* @__PURE__ */ (0,
|
|
6131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
5464
6132
|
"div",
|
|
5465
6133
|
{
|
|
5466
6134
|
className: `matchid-token-send-item ${checked?.address == n.address ? "matchid-token-send-chekced" : ""}`,
|
|
@@ -5468,10 +6136,10 @@ function TokenSendList({ close }) {
|
|
|
5468
6136
|
setChecked(n);
|
|
5469
6137
|
},
|
|
5470
6138
|
children: [
|
|
5471
|
-
/* @__PURE__ */ (0,
|
|
5472
|
-
/* @__PURE__ */ (0,
|
|
5473
|
-
/* @__PURE__ */ (0,
|
|
5474
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
6139
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
|
|
6140
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
6141
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "matchid-token-send-logo", children: [
|
|
6142
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
5475
6143
|
AlphaAvatar2,
|
|
5476
6144
|
{
|
|
5477
6145
|
className: `matchid-token-send-icon`,
|
|
@@ -5479,7 +6147,7 @@ function TokenSendList({ close }) {
|
|
|
5479
6147
|
name: n.symbol || n.name || ""
|
|
5480
6148
|
}
|
|
5481
6149
|
),
|
|
5482
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
6150
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
5483
6151
|
"img",
|
|
5484
6152
|
{
|
|
5485
6153
|
src: chain.iconUrl,
|
|
@@ -5488,9 +6156,9 @@ function TokenSendList({ close }) {
|
|
|
5488
6156
|
}
|
|
5489
6157
|
)
|
|
5490
6158
|
] }),
|
|
5491
|
-
/* @__PURE__ */ (0,
|
|
5492
|
-
/* @__PURE__ */ (0,
|
|
5493
|
-
/* @__PURE__ */ (0,
|
|
6159
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: `matchid-token-send-info`, children: [
|
|
6160
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
|
|
6161
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
|
|
5494
6162
|
] })
|
|
5495
6163
|
] })
|
|
5496
6164
|
]
|
|
@@ -5498,15 +6166,15 @@ function TokenSendList({ close }) {
|
|
|
5498
6166
|
index
|
|
5499
6167
|
);
|
|
5500
6168
|
}) }),
|
|
5501
|
-
/* @__PURE__ */ (0,
|
|
6169
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react_intl17.FormattedMessage, { id: "next" }) })
|
|
5502
6170
|
] });
|
|
5503
6171
|
}
|
|
5504
6172
|
|
|
5505
6173
|
// src/components/TransactionList/index.tsx
|
|
5506
6174
|
var import_react_infinite_scroll_component = __toESM(require("react-infinite-scroll-component"));
|
|
5507
|
-
var
|
|
5508
|
-
var
|
|
5509
|
-
var
|
|
6175
|
+
var import_react33 = require("react");
|
|
6176
|
+
var import_viem11 = require("viem");
|
|
6177
|
+
var import_viem12 = require("viem");
|
|
5510
6178
|
|
|
5511
6179
|
// src/store/useContractStore.ts
|
|
5512
6180
|
var import_zustand5 = require("zustand");
|
|
@@ -5565,15 +6233,15 @@ var useContractStore = (0, import_zustand5.create)((0, import_middleware3.devtoo
|
|
|
5565
6233
|
var useContractStore_default = useContractStore;
|
|
5566
6234
|
|
|
5567
6235
|
// src/components/TransactionList/index.tsx
|
|
5568
|
-
var
|
|
5569
|
-
var
|
|
6236
|
+
var import_react_intl18 = require("react-intl");
|
|
6237
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
5570
6238
|
var Item = ({ data }) => {
|
|
5571
6239
|
const { address } = useWallet();
|
|
5572
6240
|
const isOut = data.from.toLowerCase() == address.toLowerCase();
|
|
5573
6241
|
const { chain, chainId, explorerLink, formatUnits: chainFormatUnits } = useMatchChain();
|
|
5574
6242
|
const { contracts } = useContractStore_default();
|
|
5575
|
-
const [shouldRefetch, setShouldRefetch] = (0,
|
|
5576
|
-
const transferType = (0,
|
|
6243
|
+
const [shouldRefetch, setShouldRefetch] = (0, import_react33.useState)(true);
|
|
6244
|
+
const transferType = (0, import_react33.useMemo)(() => {
|
|
5577
6245
|
const methodId = data.input.substring(2, 10);
|
|
5578
6246
|
if (methodId == "095ea7b3") {
|
|
5579
6247
|
return "erc20_approve";
|
|
@@ -5583,38 +6251,38 @@ var Item = ({ data }) => {
|
|
|
5583
6251
|
}
|
|
5584
6252
|
return "unknown";
|
|
5585
6253
|
}, [data.input]);
|
|
5586
|
-
const to = (0,
|
|
6254
|
+
const to = (0, import_react33.useMemo)(() => {
|
|
5587
6255
|
if (!isOut) {
|
|
5588
6256
|
return data.from;
|
|
5589
6257
|
}
|
|
5590
6258
|
if (transferType == "erc20_transfer") {
|
|
5591
|
-
const decodeData = (0,
|
|
5592
|
-
abi:
|
|
6259
|
+
const decodeData = (0, import_viem11.decodeFunctionData)({
|
|
6260
|
+
abi: import_viem12.erc20Abi,
|
|
5593
6261
|
data: data.input
|
|
5594
6262
|
});
|
|
5595
6263
|
return decodeData.args[0];
|
|
5596
6264
|
}
|
|
5597
6265
|
return data.to;
|
|
5598
6266
|
}, [data.input, transferType, data.to, isOut]);
|
|
5599
|
-
const amount = (0,
|
|
6267
|
+
const amount = (0, import_react33.useMemo)(() => {
|
|
5600
6268
|
if (transferType == "erc20_transfer") {
|
|
5601
|
-
const decodeData = (0,
|
|
5602
|
-
abi:
|
|
6269
|
+
const decodeData = (0, import_viem11.decodeFunctionData)({
|
|
6270
|
+
abi: import_viem12.erc20Abi,
|
|
5603
6271
|
data: data.input
|
|
5604
6272
|
});
|
|
5605
6273
|
const value = decodeData.args[1];
|
|
5606
|
-
return (0,
|
|
6274
|
+
return (0, import_viem11.formatUnits)(value, contracts[`${chainId}-${data.to.toLowerCase()}`]?.decimals || 18);
|
|
5607
6275
|
}
|
|
5608
6276
|
return chainFormatUnits(BigInt(data.value));
|
|
5609
6277
|
}, [data.input, transferType, data.value, contracts, chainId, data.to]);
|
|
5610
6278
|
const hashQuery = useHash({
|
|
5611
6279
|
hash: data.hash,
|
|
5612
6280
|
//@ts-ignore
|
|
5613
|
-
chain: (0,
|
|
6281
|
+
chain: (0, import_viem11.defineChain)(chain),
|
|
5614
6282
|
refetchInterval: shouldRefetch ? 3e3 : false,
|
|
5615
6283
|
enabled: shouldRefetch && data.source == "local"
|
|
5616
6284
|
});
|
|
5617
|
-
const status = (0,
|
|
6285
|
+
const status = (0, import_react33.useMemo)(() => {
|
|
5618
6286
|
if (data.source == "matchain") {
|
|
5619
6287
|
switch (data.extra.status) {
|
|
5620
6288
|
case "ok":
|
|
@@ -5641,30 +6309,30 @@ var Item = ({ data }) => {
|
|
|
5641
6309
|
}
|
|
5642
6310
|
return "loading";
|
|
5643
6311
|
}, [data.extra?.status, data.source, hashQuery.data]);
|
|
5644
|
-
(0,
|
|
6312
|
+
(0, import_react33.useEffect)(() => {
|
|
5645
6313
|
if (data.hash) {
|
|
5646
6314
|
setShouldRefetch(status == "loading");
|
|
5647
6315
|
}
|
|
5648
6316
|
}, [status, data.hash]);
|
|
5649
|
-
const symbol = (0,
|
|
6317
|
+
const symbol = (0, import_react33.useMemo)(() => {
|
|
5650
6318
|
if (transferType == "erc20_transfer") {
|
|
5651
6319
|
const contract = contracts[`${chainId}-${data.to.toLowerCase()}`];
|
|
5652
6320
|
return contract?.symbol || contract?.name || "unknown";
|
|
5653
6321
|
}
|
|
5654
6322
|
return chain?.nativeCurrency.symbol || chain?.nativeCurrency.name;
|
|
5655
6323
|
}, [transferType, chain, contracts, chainId, data.to]);
|
|
5656
|
-
return /* @__PURE__ */ (0,
|
|
6324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
5657
6325
|
"a",
|
|
5658
6326
|
{
|
|
5659
6327
|
href: explorerLink(`tx/${data.hash}`),
|
|
5660
6328
|
target: "_blank",
|
|
5661
6329
|
className: `matchid-transaction-item`,
|
|
5662
6330
|
children: [
|
|
5663
|
-
/* @__PURE__ */ (0,
|
|
5664
|
-
/* @__PURE__ */ (0,
|
|
5665
|
-
/* @__PURE__ */ (0,
|
|
5666
|
-
/* @__PURE__ */ (0,
|
|
5667
|
-
/* @__PURE__ */ (0,
|
|
6331
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `matchid-transacton-item-container`, children: [
|
|
6332
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
|
|
6333
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `matchid-transaction-item-details`, children: [
|
|
6334
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
|
|
6335
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
5668
6336
|
"div",
|
|
5669
6337
|
{
|
|
5670
6338
|
className: `matchid-transaction-item-timestamp`,
|
|
@@ -5673,11 +6341,11 @@ var Item = ({ data }) => {
|
|
|
5673
6341
|
)
|
|
5674
6342
|
] })
|
|
5675
6343
|
] }),
|
|
5676
|
-
/* @__PURE__ */ (0,
|
|
5677
|
-
/* @__PURE__ */ (0,
|
|
5678
|
-
status == "loading" && /* @__PURE__ */ (0,
|
|
5679
|
-
status == "success" && /* @__PURE__ */ (0,
|
|
5680
|
-
status == "error" && /* @__PURE__ */ (0,
|
|
6344
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
|
|
6345
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(NumberFormatter, { value: amount, tFixNum: 6, prefix: isOut ? "-" : "+", suffix: " " + symbol }),
|
|
6346
|
+
status == "loading" && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(LoadingIcon_default, { color: "#000000", size: 16, rotate: true }),
|
|
6347
|
+
status == "success" && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(CheckRoundIcon, { size: 16 }),
|
|
6348
|
+
status == "error" && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(InfoRoundIcon, { size: 16 })
|
|
5681
6349
|
] })
|
|
5682
6350
|
]
|
|
5683
6351
|
}
|
|
@@ -5687,38 +6355,38 @@ function TransactionList({
|
|
|
5687
6355
|
scrollableTarget
|
|
5688
6356
|
}) {
|
|
5689
6357
|
const { fetchMoreData, hasMore, items } = useMatchWalletRecords();
|
|
5690
|
-
return /* @__PURE__ */ (0,
|
|
6358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
5691
6359
|
import_react_infinite_scroll_component.default,
|
|
5692
6360
|
{
|
|
5693
6361
|
scrollableTarget,
|
|
5694
6362
|
dataLength: items.length,
|
|
5695
6363
|
next: fetchMoreData,
|
|
5696
6364
|
hasMore,
|
|
5697
|
-
loader: /* @__PURE__ */ (0,
|
|
5698
|
-
/* @__PURE__ */ (0,
|
|
6365
|
+
loader: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "matchid-list-nomore", children: [
|
|
6366
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
|
|
5699
6367
|
"Loading..."
|
|
5700
6368
|
] }),
|
|
5701
|
-
endMessage: items.length > 0 ? /* @__PURE__ */ (0,
|
|
5702
|
-
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0,
|
|
6369
|
+
endMessage: items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react_intl18.FormattedMessage, { id: "noMoreRecords" }) }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react_intl18.FormattedMessage, { id: "noRecords" }) }),
|
|
6370
|
+
children: items.length == 0 && !hasMore ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "mt-[150px]" }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Item, { data: item }, index)) })
|
|
5703
6371
|
}
|
|
5704
6372
|
);
|
|
5705
6373
|
}
|
|
5706
6374
|
|
|
5707
6375
|
// src/hooks/useMatchWallet.tsx
|
|
5708
6376
|
var import_react_qrcode = require("react-qrcode");
|
|
5709
|
-
var
|
|
6377
|
+
var import_react35 = require("react");
|
|
5710
6378
|
var import_react_query6 = require("@tanstack/react-query");
|
|
5711
|
-
var
|
|
5712
|
-
var
|
|
6379
|
+
var import_viem15 = require("viem");
|
|
6380
|
+
var import_react_intl20 = require("react-intl");
|
|
5713
6381
|
|
|
5714
6382
|
// src/components/ImportToken/index.tsx
|
|
5715
|
-
var
|
|
5716
|
-
var
|
|
6383
|
+
var import_react34 = require("react");
|
|
6384
|
+
var import_react_intl19 = require("react-intl");
|
|
5717
6385
|
var import_react_query5 = require("@tanstack/react-query");
|
|
5718
|
-
var
|
|
6386
|
+
var import_viem14 = require("viem");
|
|
5719
6387
|
|
|
5720
6388
|
// src/hooks/useIsContract.ts
|
|
5721
|
-
var
|
|
6389
|
+
var import_viem13 = require("viem");
|
|
5722
6390
|
var import_react_query4 = require("@tanstack/react-query");
|
|
5723
6391
|
function useIsContract({
|
|
5724
6392
|
address,
|
|
@@ -5730,9 +6398,9 @@ function useIsContract({
|
|
|
5730
6398
|
queryFn: async () => {
|
|
5731
6399
|
if (!chain) return false;
|
|
5732
6400
|
if (!address) return false;
|
|
5733
|
-
const publicClient = (0,
|
|
6401
|
+
const publicClient = (0, import_viem13.createPublicClient)({
|
|
5734
6402
|
chain,
|
|
5735
|
-
transport: (0,
|
|
6403
|
+
transport: (0, import_viem13.http)()
|
|
5736
6404
|
});
|
|
5737
6405
|
const res = await publicClient.getCode({ address });
|
|
5738
6406
|
return res !== null && res !== void 0;
|
|
@@ -5742,27 +6410,27 @@ function useIsContract({
|
|
|
5742
6410
|
}
|
|
5743
6411
|
|
|
5744
6412
|
// src/components/ImportToken/index.tsx
|
|
5745
|
-
var
|
|
6413
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
5746
6414
|
function ImportToken({ close }) {
|
|
5747
|
-
const [status, setStatus] = (0,
|
|
6415
|
+
const [status, setStatus] = (0, import_react34.useState)("");
|
|
5748
6416
|
const { token } = useUserInfo();
|
|
5749
|
-
const [address, setAddress] = (0,
|
|
5750
|
-
const [symbol, setSymbol] = (0,
|
|
5751
|
-
const [decimals, setDecimals] = (0,
|
|
5752
|
-
const [error, setError] = (0,
|
|
6417
|
+
const [address, setAddress] = (0, import_react34.useState)("");
|
|
6418
|
+
const [symbol, setSymbol] = (0, import_react34.useState)("");
|
|
6419
|
+
const [decimals, setDecimals] = (0, import_react34.useState)("");
|
|
6420
|
+
const [error, setError] = (0, import_react34.useState)({});
|
|
5753
6421
|
const { publicClient, chainId, chain } = useMatchChain();
|
|
5754
6422
|
const getContractInfo = async () => {
|
|
5755
6423
|
if (!publicClient) return;
|
|
5756
6424
|
const calls = [
|
|
5757
6425
|
{
|
|
5758
6426
|
address,
|
|
5759
|
-
abi:
|
|
6427
|
+
abi: import_viem14.erc20Abi,
|
|
5760
6428
|
functionName: "symbol",
|
|
5761
6429
|
args: []
|
|
5762
6430
|
},
|
|
5763
6431
|
{
|
|
5764
6432
|
address,
|
|
5765
|
-
abi:
|
|
6433
|
+
abi: import_viem14.erc20Abi,
|
|
5766
6434
|
functionName: "decimals",
|
|
5767
6435
|
args: []
|
|
5768
6436
|
}
|
|
@@ -5782,8 +6450,8 @@ function ImportToken({ close }) {
|
|
|
5782
6450
|
});
|
|
5783
6451
|
}
|
|
5784
6452
|
};
|
|
5785
|
-
const intl = (0,
|
|
5786
|
-
(0,
|
|
6453
|
+
const intl = (0, import_react_intl19.useIntl)();
|
|
6454
|
+
(0, import_react34.useEffect)(() => {
|
|
5787
6455
|
if (address.length === 42) {
|
|
5788
6456
|
const reg = /^0x[0-9a-fA-F]{40}$/;
|
|
5789
6457
|
if (!reg.test(address)) {
|
|
@@ -5802,7 +6470,7 @@ function ImportToken({ close }) {
|
|
|
5802
6470
|
}
|
|
5803
6471
|
}
|
|
5804
6472
|
}, [address, publicClient]);
|
|
5805
|
-
const [loading, setLoading] = (0,
|
|
6473
|
+
const [loading, setLoading] = (0, import_react34.useState)(false);
|
|
5806
6474
|
const toast = useToast();
|
|
5807
6475
|
const queryClient2 = (0, import_react_query5.useQueryClient)();
|
|
5808
6476
|
const onImport = async () => {
|
|
@@ -5830,7 +6498,7 @@ function ImportToken({ close }) {
|
|
|
5830
6498
|
setLoading(false);
|
|
5831
6499
|
}
|
|
5832
6500
|
};
|
|
5833
|
-
const canImport = (0,
|
|
6501
|
+
const canImport = (0, import_react34.useMemo)(() => {
|
|
5834
6502
|
if (!address) {
|
|
5835
6503
|
return false;
|
|
5836
6504
|
}
|
|
@@ -5848,24 +6516,24 @@ function ImportToken({ close }) {
|
|
|
5848
6516
|
}, [error, address, symbol, decimals]);
|
|
5849
6517
|
const isContractQuery = useIsContract({
|
|
5850
6518
|
//@ts-ignore
|
|
5851
|
-
chain: (0,
|
|
6519
|
+
chain: (0, import_viem14.defineChain)(chain),
|
|
5852
6520
|
address,
|
|
5853
6521
|
enabled: canImport
|
|
5854
6522
|
});
|
|
5855
6523
|
if (status == "success" || status == "fail") {
|
|
5856
|
-
return /* @__PURE__ */ (0,
|
|
5857
|
-
/* @__PURE__ */ (0,
|
|
5858
|
-
/* @__PURE__ */ (0,
|
|
5859
|
-
/* @__PURE__ */ (0,
|
|
6524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `matchid-import-token-result matchid-flex`, children: [
|
|
6525
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `matchid-import-token-result-box matchid-flex`, children: [
|
|
6526
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("img", { src: status == "success" ? success_default : fail_default, alt: status == "success" ? "success" : "fail", className: `matchid-import-token-result-img` }),
|
|
6527
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: `matchid-import-token-result-text matchid-import-token-result-text-${status}`, children: status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react_intl19.FormattedMessage, { id: "importSuccess" }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react_intl19.FormattedMessage, { id: "importFail" }) })
|
|
5860
6528
|
] }),
|
|
5861
|
-
status == "success" ? /* @__PURE__ */ (0,
|
|
6529
|
+
status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Button, { size: "lg", onClick: close, block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react_intl19.FormattedMessage, { id: "close" }) }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Button, { size: "lg", onClick: () => setStatus(""), block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react_intl19.FormattedMessage, { id: "back" }) })
|
|
5862
6530
|
] });
|
|
5863
6531
|
}
|
|
5864
|
-
return /* @__PURE__ */ (0,
|
|
5865
|
-
/* @__PURE__ */ (0,
|
|
5866
|
-
/* @__PURE__ */ (0,
|
|
6532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: `matchid-import-token`, children: [
|
|
6533
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "matchid-import-token-form", children: [
|
|
6534
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Field, { label: intl.formatMessage({
|
|
5867
6535
|
id: "tokenSmartContract"
|
|
5868
|
-
}), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0,
|
|
6536
|
+
}), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
5869
6537
|
Input,
|
|
5870
6538
|
{
|
|
5871
6539
|
placeholder: intl.formatMessage({
|
|
@@ -5876,9 +6544,9 @@ function ImportToken({ close }) {
|
|
|
5876
6544
|
maxLength: 42
|
|
5877
6545
|
}
|
|
5878
6546
|
) }),
|
|
5879
|
-
/* @__PURE__ */ (0,
|
|
6547
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Field, { label: intl.formatMessage({
|
|
5880
6548
|
id: "tokenSymbol"
|
|
5881
|
-
}), error: error.symbol, children: /* @__PURE__ */ (0,
|
|
6549
|
+
}), error: error.symbol, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
5882
6550
|
Input,
|
|
5883
6551
|
{
|
|
5884
6552
|
placeholder: intl.formatMessage({
|
|
@@ -5889,9 +6557,9 @@ function ImportToken({ close }) {
|
|
|
5889
6557
|
maxLength: 16
|
|
5890
6558
|
}
|
|
5891
6559
|
) }),
|
|
5892
|
-
/* @__PURE__ */ (0,
|
|
6560
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Field, { label: intl.formatMessage({
|
|
5893
6561
|
id: "tokenDecimals"
|
|
5894
|
-
}), error: error.decimals, children: /* @__PURE__ */ (0,
|
|
6562
|
+
}), error: error.decimals, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
5895
6563
|
Input,
|
|
5896
6564
|
{
|
|
5897
6565
|
placeholder: intl.formatMessage({
|
|
@@ -5903,7 +6571,7 @@ function ImportToken({ close }) {
|
|
|
5903
6571
|
}
|
|
5904
6572
|
) })
|
|
5905
6573
|
] }),
|
|
5906
|
-
/* @__PURE__ */ (0,
|
|
6574
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
5907
6575
|
Button,
|
|
5908
6576
|
{
|
|
5909
6577
|
size: "lg",
|
|
@@ -5912,20 +6580,20 @@ function ImportToken({ close }) {
|
|
|
5912
6580
|
loading: loading || isContractQuery.isLoading,
|
|
5913
6581
|
disabled: !canImport || !isContractQuery.data,
|
|
5914
6582
|
highlight: true,
|
|
5915
|
-
children: /* @__PURE__ */ (0,
|
|
6583
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react_intl19.FormattedMessage, { id: "import" })
|
|
5916
6584
|
}
|
|
5917
6585
|
)
|
|
5918
6586
|
] });
|
|
5919
6587
|
}
|
|
5920
6588
|
|
|
5921
6589
|
// src/hooks/useMatchWallet.tsx
|
|
5922
|
-
var
|
|
6590
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
5923
6591
|
var ReceiveModal = () => {
|
|
5924
6592
|
const chain = useMatchChain();
|
|
5925
6593
|
const { address } = useWallet();
|
|
5926
6594
|
const [copied, setCopied] = useCopyClipboard();
|
|
5927
6595
|
const toast = useToast();
|
|
5928
|
-
const intl = (0,
|
|
6596
|
+
const intl = (0, import_react_intl20.useIntl)();
|
|
5929
6597
|
const onCopy = () => {
|
|
5930
6598
|
setCopied(address);
|
|
5931
6599
|
toast.success(intl.formatMessage({
|
|
@@ -5933,10 +6601,10 @@ var ReceiveModal = () => {
|
|
|
5933
6601
|
}));
|
|
5934
6602
|
};
|
|
5935
6603
|
const chainLink = chain.explorerLink("address/" + address);
|
|
5936
|
-
return /* @__PURE__ */ (0,
|
|
5937
|
-
/* @__PURE__ */ (0,
|
|
5938
|
-
/* @__PURE__ */ (0,
|
|
5939
|
-
/* @__PURE__ */ (0,
|
|
6604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-receive-modal`, children: [
|
|
6605
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-receive-container", children: [
|
|
6606
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl20.FormattedMessage, { id: "receiveQrcode" }) }),
|
|
6607
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-qr-container`, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
5940
6608
|
import_react_qrcode.QRCode,
|
|
5941
6609
|
{
|
|
5942
6610
|
margin: "0",
|
|
@@ -5944,7 +6612,7 @@ var ReceiveModal = () => {
|
|
|
5944
6612
|
value: address
|
|
5945
6613
|
}
|
|
5946
6614
|
) }),
|
|
5947
|
-
/* @__PURE__ */ (0,
|
|
6615
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
5948
6616
|
"a",
|
|
5949
6617
|
{
|
|
5950
6618
|
href: chainLink,
|
|
@@ -5954,8 +6622,8 @@ var ReceiveModal = () => {
|
|
|
5954
6622
|
}
|
|
5955
6623
|
)
|
|
5956
6624
|
] }),
|
|
5957
|
-
/* @__PURE__ */ (0,
|
|
5958
|
-
|
|
6625
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Button, { size: "lg", onClick: onCopy, block: true, highlight: true, disabled: copied, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6626
|
+
import_react_intl20.FormattedMessage,
|
|
5959
6627
|
{
|
|
5960
6628
|
id: "copyAddress"
|
|
5961
6629
|
}
|
|
@@ -5964,7 +6632,7 @@ var ReceiveModal = () => {
|
|
|
5964
6632
|
};
|
|
5965
6633
|
function useMatchWallet() {
|
|
5966
6634
|
const modal = useModal();
|
|
5967
|
-
const intl = (0,
|
|
6635
|
+
const intl = (0, import_react_intl20.useIntl)();
|
|
5968
6636
|
const showReceiveModal = () => {
|
|
5969
6637
|
modal.open({
|
|
5970
6638
|
title: intl.formatMessage({
|
|
@@ -5996,12 +6664,12 @@ function useMatchWallet() {
|
|
|
5996
6664
|
};
|
|
5997
6665
|
}
|
|
5998
6666
|
function useMatchWalletRecords() {
|
|
5999
|
-
const [hasMore, setHasMore] = (0,
|
|
6000
|
-
const [items, setItems] = (0,
|
|
6667
|
+
const [hasMore, setHasMore] = (0, import_react35.useState)(true);
|
|
6668
|
+
const [items, setItems] = (0, import_react35.useState)([]);
|
|
6001
6669
|
const { chainId, publicClient } = useMatchChain();
|
|
6002
6670
|
const { address } = useWallet();
|
|
6003
|
-
const hasMoreRef = (0,
|
|
6004
|
-
const nextPageParamsRef = (0,
|
|
6671
|
+
const hasMoreRef = (0, import_react35.useRef)(hasMore);
|
|
6672
|
+
const nextPageParamsRef = (0, import_react35.useRef)(void 0);
|
|
6005
6673
|
const { contracts, setContracts } = useContractStore_default();
|
|
6006
6674
|
const fetchMoreData = async () => {
|
|
6007
6675
|
const chainIdStr = chainId ? chainId.toString() : "";
|
|
@@ -6028,7 +6696,7 @@ function useMatchWalletRecords() {
|
|
|
6028
6696
|
hasMoreRef.current = true;
|
|
6029
6697
|
fetchMoreData();
|
|
6030
6698
|
};
|
|
6031
|
-
(0,
|
|
6699
|
+
(0, import_react35.useEffect)(() => {
|
|
6032
6700
|
if (chainId && address) {
|
|
6033
6701
|
onInit();
|
|
6034
6702
|
}
|
|
@@ -6052,13 +6720,13 @@ function useMatchWalletRecords() {
|
|
|
6052
6720
|
for (const contract of contractUnique) {
|
|
6053
6721
|
calls.push({
|
|
6054
6722
|
address: contract,
|
|
6055
|
-
abi:
|
|
6723
|
+
abi: import_viem15.erc20Abi,
|
|
6056
6724
|
functionName: "symbol",
|
|
6057
6725
|
args: []
|
|
6058
6726
|
});
|
|
6059
6727
|
calls.push({
|
|
6060
6728
|
address: contract,
|
|
6061
|
-
abi:
|
|
6729
|
+
abi: import_viem15.erc20Abi,
|
|
6062
6730
|
functionName: "decimals",
|
|
6063
6731
|
args: []
|
|
6064
6732
|
});
|
|
@@ -6084,7 +6752,7 @@ function useMatchWalletRecords() {
|
|
|
6084
6752
|
setContracts(contractMap);
|
|
6085
6753
|
}
|
|
6086
6754
|
};
|
|
6087
|
-
const list = (0,
|
|
6755
|
+
const list = (0, import_react35.useMemo)(() => {
|
|
6088
6756
|
const localTransactions = transactions[`${chainId}-${address}`] || [];
|
|
6089
6757
|
const removeList = localTransactions.filter((n) => items.findIndex((m) => m.hash == n.hash) >= 0);
|
|
6090
6758
|
removeList.forEach((item) => {
|
|
@@ -6126,7 +6794,7 @@ function useMatchWalletAssets({
|
|
|
6126
6794
|
chainId: chainId || 0,
|
|
6127
6795
|
...assetListOptions
|
|
6128
6796
|
});
|
|
6129
|
-
const mergedAssets = (0,
|
|
6797
|
+
const mergedAssets = (0, import_react35.useMemo)(() => {
|
|
6130
6798
|
if (!assetListQuery.data && !importTokenQuery.data) return [];
|
|
6131
6799
|
const assetList = (assetListQuery.data || []).map((asset) => ({
|
|
6132
6800
|
...asset,
|
|
@@ -6213,14 +6881,14 @@ function useMatchWalletAssetList({
|
|
|
6213
6881
|
retry: 3
|
|
6214
6882
|
// Retry up to 3 times if failed
|
|
6215
6883
|
});
|
|
6216
|
-
const erc20Tokens = (0,
|
|
6884
|
+
const erc20Tokens = (0, import_react35.useMemo)(() => list.filter((asset) => asset.address !== NATIVE_TOKEN_ADDRESS), [list]);
|
|
6217
6885
|
const erc20BalanceQuery = (0, import_react_query6.useQuery)({
|
|
6218
6886
|
queryKey: ["erc20Balances", erc20Tokens.map((token) => token.address)],
|
|
6219
6887
|
queryFn: async () => {
|
|
6220
6888
|
if (!erc20Tokens.length || !publicClient) return [];
|
|
6221
6889
|
const calls = erc20Tokens.map((token) => ({
|
|
6222
6890
|
address: token.address,
|
|
6223
|
-
abi:
|
|
6891
|
+
abi: import_viem15.erc20Abi,
|
|
6224
6892
|
functionName: "balanceOf",
|
|
6225
6893
|
args: [address]
|
|
6226
6894
|
}));
|
|
@@ -6241,7 +6909,7 @@ function useMatchWalletAssetList({
|
|
|
6241
6909
|
// Refresh every 15 seconds
|
|
6242
6910
|
retry: 3
|
|
6243
6911
|
});
|
|
6244
|
-
const enrichedAssets = (0,
|
|
6912
|
+
const enrichedAssets = (0, import_react35.useMemo)(() => {
|
|
6245
6913
|
if (!list) return [];
|
|
6246
6914
|
const erc20Balances = erc20BalanceQuery.data || [];
|
|
6247
6915
|
return list.map((asset) => {
|
|
@@ -6251,11 +6919,11 @@ function useMatchWalletAssetList({
|
|
|
6251
6919
|
const assetAddress = asset.address.toLowerCase();
|
|
6252
6920
|
if (assetAddress === NATIVE_TOKEN_ADDRESS) {
|
|
6253
6921
|
balanceValue = nativeBalanceQuery.data?.toString() || "0";
|
|
6254
|
-
balance = nativeBalanceQuery.data ? Number((0,
|
|
6922
|
+
balance = nativeBalanceQuery.data ? Number((0, import_viem15.formatUnits)(nativeBalanceQuery.data, decimals)) : 0;
|
|
6255
6923
|
} else {
|
|
6256
6924
|
const index = erc20Tokens.findIndex((t) => t.address.toLowerCase() === assetAddress);
|
|
6257
6925
|
if (index !== -1 && erc20Balances[index] && erc20Balances[index].status === "success") {
|
|
6258
|
-
balance = Number((0,
|
|
6926
|
+
balance = Number((0, import_viem15.formatUnits)(erc20Balances[index].result, decimals));
|
|
6259
6927
|
balanceValue = erc20Balances[index].result?.toString() || "0";
|
|
6260
6928
|
}
|
|
6261
6929
|
}
|
|
@@ -6263,7 +6931,7 @@ function useMatchWalletAssetList({
|
|
|
6263
6931
|
return { ...asset, balance, value, balanceValue };
|
|
6264
6932
|
});
|
|
6265
6933
|
}, [list, nativeBalanceQuery.data, erc20BalanceQuery.data]);
|
|
6266
|
-
(0,
|
|
6934
|
+
(0, import_react35.useEffect)(() => {
|
|
6267
6935
|
const list2 = enrichedAssets.sort((a, b) => {
|
|
6268
6936
|
if (a.address === NATIVE_TOKEN_ADDRESS) return -1;
|
|
6269
6937
|
if (b.address === NATIVE_TOKEN_ADDRESS) return 1;
|
|
@@ -6288,14 +6956,14 @@ function useMatchWalletAssetList({
|
|
|
6288
6956
|
}
|
|
6289
6957
|
|
|
6290
6958
|
// src/hooks/useReceipt.tsx
|
|
6291
|
-
var
|
|
6959
|
+
var import_react36 = require("react");
|
|
6292
6960
|
var import_react_query7 = require("@tanstack/react-query");
|
|
6293
|
-
var
|
|
6961
|
+
var import_viem16 = require("viem");
|
|
6294
6962
|
var CACHE_TTL = 86400 * 30 * 1e3;
|
|
6295
6963
|
var MAX_CACHE_SIZE = 500;
|
|
6296
6964
|
var STORAGE_KEY = "match_receipt_logs";
|
|
6297
6965
|
function useReceiptCache() {
|
|
6298
|
-
const [cache, setCache] = (0,
|
|
6966
|
+
const [cache, setCache] = (0, import_react36.useState)(/* @__PURE__ */ new Map());
|
|
6299
6967
|
const isLocalStorageAvailable = (() => {
|
|
6300
6968
|
try {
|
|
6301
6969
|
const testKey = "__test__";
|
|
@@ -6306,7 +6974,7 @@ function useReceiptCache() {
|
|
|
6306
6974
|
return false;
|
|
6307
6975
|
}
|
|
6308
6976
|
})();
|
|
6309
|
-
(0,
|
|
6977
|
+
(0, import_react36.useEffect)(() => {
|
|
6310
6978
|
if (isLocalStorageAvailable) {
|
|
6311
6979
|
try {
|
|
6312
6980
|
const storedData = localStorage.getItem(STORAGE_KEY);
|
|
@@ -6325,7 +6993,7 @@ function useReceiptCache() {
|
|
|
6325
6993
|
}
|
|
6326
6994
|
}
|
|
6327
6995
|
}, []);
|
|
6328
|
-
const updateLocalStorage = (0,
|
|
6996
|
+
const updateLocalStorage = (0, import_react36.useCallback)((updatedCache) => {
|
|
6329
6997
|
if (isLocalStorageAvailable) {
|
|
6330
6998
|
try {
|
|
6331
6999
|
const storedData = localStorage.getItem(STORAGE_KEY);
|
|
@@ -6342,7 +7010,7 @@ function useReceiptCache() {
|
|
|
6342
7010
|
}
|
|
6343
7011
|
}
|
|
6344
7012
|
}, []);
|
|
6345
|
-
const set = (0,
|
|
7013
|
+
const set = (0, import_react36.useCallback)((key, value) => {
|
|
6346
7014
|
const now = Date.now();
|
|
6347
7015
|
const newCache = new Map(cache);
|
|
6348
7016
|
newCache.forEach((entry, k) => {
|
|
@@ -6360,7 +7028,7 @@ function useReceiptCache() {
|
|
|
6360
7028
|
setCache(newCache);
|
|
6361
7029
|
updateLocalStorage(newCache);
|
|
6362
7030
|
}, [cache, updateLocalStorage]);
|
|
6363
|
-
const get = (0,
|
|
7031
|
+
const get = (0, import_react36.useCallback)((key) => {
|
|
6364
7032
|
const entry = cache.get(key);
|
|
6365
7033
|
if (entry) {
|
|
6366
7034
|
if (Date.now() - entry.timestamp > CACHE_TTL) {
|
|
@@ -6374,7 +7042,7 @@ function useReceiptCache() {
|
|
|
6374
7042
|
}
|
|
6375
7043
|
return void 0;
|
|
6376
7044
|
}, [cache, updateLocalStorage]);
|
|
6377
|
-
const del = (0,
|
|
7045
|
+
const del = (0, import_react36.useCallback)((key) => {
|
|
6378
7046
|
if (cache.has(key)) {
|
|
6379
7047
|
const newCache = new Map(cache);
|
|
6380
7048
|
newCache.delete(key);
|
|
@@ -6382,7 +7050,7 @@ function useReceiptCache() {
|
|
|
6382
7050
|
updateLocalStorage(newCache);
|
|
6383
7051
|
}
|
|
6384
7052
|
}, [cache, updateLocalStorage]);
|
|
6385
|
-
const clear = (0,
|
|
7053
|
+
const clear = (0, import_react36.useCallback)(() => {
|
|
6386
7054
|
setCache(/* @__PURE__ */ new Map());
|
|
6387
7055
|
if (isLocalStorageAvailable) {
|
|
6388
7056
|
localStorage.removeItem(STORAGE_KEY);
|
|
@@ -6397,7 +7065,7 @@ function useReceipt2({
|
|
|
6397
7065
|
const { list } = useMatchChain();
|
|
6398
7066
|
const cache = useReceiptCache();
|
|
6399
7067
|
const chain = list?.find((item) => item.id === chainId);
|
|
6400
|
-
const [shouldRefetch, setShouldRefetch] = (0,
|
|
7068
|
+
const [shouldRefetch, setShouldRefetch] = (0, import_react36.useState)(true);
|
|
6401
7069
|
const query = (0, import_react_query7.useQuery)({
|
|
6402
7070
|
queryKey: ["match-tx-receipt", hash, chain],
|
|
6403
7071
|
queryFn: async () => {
|
|
@@ -6407,9 +7075,9 @@ function useReceipt2({
|
|
|
6407
7075
|
return cache.get(cacheKey);
|
|
6408
7076
|
}
|
|
6409
7077
|
try {
|
|
6410
|
-
const publicClient = (0,
|
|
6411
|
-
chain: (0,
|
|
6412
|
-
transport: (0,
|
|
7078
|
+
const publicClient = (0, import_viem16.createPublicClient)({
|
|
7079
|
+
chain: (0, import_viem16.defineChain)(chain),
|
|
7080
|
+
transport: (0, import_viem16.http)()
|
|
6413
7081
|
});
|
|
6414
7082
|
const receipt = await publicClient.getTransactionReceipt({ hash });
|
|
6415
7083
|
if (!receipt) {
|
|
@@ -6423,7 +7091,7 @@ function useReceipt2({
|
|
|
6423
7091
|
},
|
|
6424
7092
|
refetchInterval: shouldRefetch ? 1e4 : false
|
|
6425
7093
|
});
|
|
6426
|
-
(0,
|
|
7094
|
+
(0, import_react36.useEffect)(() => {
|
|
6427
7095
|
if (query.data) {
|
|
6428
7096
|
setShouldRefetch(false);
|
|
6429
7097
|
}
|
|
@@ -6432,14 +7100,14 @@ function useReceipt2({
|
|
|
6432
7100
|
}
|
|
6433
7101
|
|
|
6434
7102
|
// src/hooks/useTransaction.tsx
|
|
6435
|
-
var
|
|
7103
|
+
var import_react37 = require("react");
|
|
6436
7104
|
var import_react_query8 = require("@tanstack/react-query");
|
|
6437
|
-
var
|
|
7105
|
+
var import_viem17 = require("viem");
|
|
6438
7106
|
var CACHE_TTL2 = 86400 * 30 * 1e3;
|
|
6439
7107
|
var MAX_CACHE_SIZE2 = 500;
|
|
6440
7108
|
var STORAGE_KEY2 = "match_transaction_logs";
|
|
6441
7109
|
function useTransactionCache() {
|
|
6442
|
-
const [cache, setCache] = (0,
|
|
7110
|
+
const [cache, setCache] = (0, import_react37.useState)(/* @__PURE__ */ new Map());
|
|
6443
7111
|
const isLocalStorageAvailable = (() => {
|
|
6444
7112
|
try {
|
|
6445
7113
|
const testKey = "__test__";
|
|
@@ -6450,7 +7118,7 @@ function useTransactionCache() {
|
|
|
6450
7118
|
return false;
|
|
6451
7119
|
}
|
|
6452
7120
|
})();
|
|
6453
|
-
(0,
|
|
7121
|
+
(0, import_react37.useEffect)(() => {
|
|
6454
7122
|
if (isLocalStorageAvailable) {
|
|
6455
7123
|
try {
|
|
6456
7124
|
const storedData = localStorage.getItem(STORAGE_KEY2);
|
|
@@ -6469,7 +7137,7 @@ function useTransactionCache() {
|
|
|
6469
7137
|
}
|
|
6470
7138
|
}
|
|
6471
7139
|
}, []);
|
|
6472
|
-
const updateLocalStorage = (0,
|
|
7140
|
+
const updateLocalStorage = (0, import_react37.useCallback)((updatedCache) => {
|
|
6473
7141
|
if (isLocalStorageAvailable) {
|
|
6474
7142
|
try {
|
|
6475
7143
|
const storedData = localStorage.getItem(STORAGE_KEY2);
|
|
@@ -6486,7 +7154,7 @@ function useTransactionCache() {
|
|
|
6486
7154
|
}
|
|
6487
7155
|
}
|
|
6488
7156
|
}, []);
|
|
6489
|
-
const set = (0,
|
|
7157
|
+
const set = (0, import_react37.useCallback)((key, value) => {
|
|
6490
7158
|
const now = Date.now();
|
|
6491
7159
|
const newCache = new Map(cache);
|
|
6492
7160
|
newCache.forEach((entry, k) => {
|
|
@@ -6504,7 +7172,7 @@ function useTransactionCache() {
|
|
|
6504
7172
|
setCache(newCache);
|
|
6505
7173
|
updateLocalStorage(newCache);
|
|
6506
7174
|
}, [cache, updateLocalStorage]);
|
|
6507
|
-
const get = (0,
|
|
7175
|
+
const get = (0, import_react37.useCallback)((key) => {
|
|
6508
7176
|
const entry = cache.get(key);
|
|
6509
7177
|
if (entry) {
|
|
6510
7178
|
if (Date.now() - entry.timestamp > CACHE_TTL2) {
|
|
@@ -6518,7 +7186,7 @@ function useTransactionCache() {
|
|
|
6518
7186
|
}
|
|
6519
7187
|
return void 0;
|
|
6520
7188
|
}, [cache, updateLocalStorage]);
|
|
6521
|
-
const del = (0,
|
|
7189
|
+
const del = (0, import_react37.useCallback)((key) => {
|
|
6522
7190
|
if (cache.has(key)) {
|
|
6523
7191
|
const newCache = new Map(cache);
|
|
6524
7192
|
newCache.delete(key);
|
|
@@ -6526,7 +7194,7 @@ function useTransactionCache() {
|
|
|
6526
7194
|
updateLocalStorage(newCache);
|
|
6527
7195
|
}
|
|
6528
7196
|
}, [cache, updateLocalStorage]);
|
|
6529
|
-
const clear = (0,
|
|
7197
|
+
const clear = (0, import_react37.useCallback)(() => {
|
|
6530
7198
|
setCache(/* @__PURE__ */ new Map());
|
|
6531
7199
|
if (isLocalStorageAvailable) {
|
|
6532
7200
|
localStorage.removeItem(STORAGE_KEY2);
|
|
@@ -6541,7 +7209,7 @@ function useTransaction({
|
|
|
6541
7209
|
const { list } = useMatchChain();
|
|
6542
7210
|
const cache = useTransactionCache();
|
|
6543
7211
|
const chain = list?.find((item) => item.id === chainId);
|
|
6544
|
-
const [shouldRefetch, setShouldRefetch] = (0,
|
|
7212
|
+
const [shouldRefetch, setShouldRefetch] = (0, import_react37.useState)(true);
|
|
6545
7213
|
const query = (0, import_react_query8.useQuery)({
|
|
6546
7214
|
queryKey: ["match-tx-transaction", hash, chain],
|
|
6547
7215
|
queryFn: async () => {
|
|
@@ -6551,9 +7219,9 @@ function useTransaction({
|
|
|
6551
7219
|
return cache.get(cacheKey);
|
|
6552
7220
|
}
|
|
6553
7221
|
try {
|
|
6554
|
-
const publicClient = (0,
|
|
6555
|
-
chain: (0,
|
|
6556
|
-
transport: (0,
|
|
7222
|
+
const publicClient = (0, import_viem17.createPublicClient)({
|
|
7223
|
+
chain: (0, import_viem17.defineChain)(chain),
|
|
7224
|
+
transport: (0, import_viem17.http)()
|
|
6557
7225
|
});
|
|
6558
7226
|
const transaction = await publicClient.getTransaction({ hash });
|
|
6559
7227
|
if (!transaction) {
|
|
@@ -6567,7 +7235,7 @@ function useTransaction({
|
|
|
6567
7235
|
},
|
|
6568
7236
|
refetchInterval: shouldRefetch ? 1e4 : false
|
|
6569
7237
|
});
|
|
6570
|
-
(0,
|
|
7238
|
+
(0, import_react37.useEffect)(() => {
|
|
6571
7239
|
if (query.data) {
|
|
6572
7240
|
setShouldRefetch(false);
|
|
6573
7241
|
}
|
|
@@ -6576,27 +7244,27 @@ function useTransaction({
|
|
|
6576
7244
|
}
|
|
6577
7245
|
|
|
6578
7246
|
// src/components/CEXBindModal/index.tsx
|
|
6579
|
-
var
|
|
6580
|
-
var
|
|
6581
|
-
var
|
|
7247
|
+
var import_react38 = require("react");
|
|
7248
|
+
var import_react_intl21 = require("react-intl");
|
|
7249
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
6582
7250
|
function CEXBindModal({
|
|
6583
7251
|
onClose,
|
|
6584
7252
|
type,
|
|
6585
7253
|
isOpen = false,
|
|
6586
7254
|
...props
|
|
6587
7255
|
}) {
|
|
6588
|
-
const intl = (0,
|
|
7256
|
+
const intl = (0, import_react_intl21.useIntl)();
|
|
6589
7257
|
const { events } = useMatch();
|
|
6590
|
-
const [APIPassphrase, setAPIPassphrase] = (0,
|
|
7258
|
+
const [APIPassphrase, setAPIPassphrase] = (0, import_react38.useState)("");
|
|
6591
7259
|
const { refreshOverview } = useUserInfo();
|
|
6592
|
-
const [loading, setLoading] = (0,
|
|
6593
|
-
const [key, setKey] = (0,
|
|
6594
|
-
const [secret, setSecret] = (0,
|
|
6595
|
-
const [error, setError] = (0,
|
|
6596
|
-
const needPassphrase = (0,
|
|
7260
|
+
const [loading, setLoading] = (0, import_react38.useState)(false);
|
|
7261
|
+
const [key, setKey] = (0, import_react38.useState)("");
|
|
7262
|
+
const [secret, setSecret] = (0, import_react38.useState)("");
|
|
7263
|
+
const [error, setError] = (0, import_react38.useState)("");
|
|
7264
|
+
const needPassphrase = (0, import_react38.useMemo)(() => {
|
|
6597
7265
|
return ["bitget", "okx"].includes(type.toLowerCase());
|
|
6598
7266
|
}, [type]);
|
|
6599
|
-
(0,
|
|
7267
|
+
(0, import_react38.useEffect)(() => {
|
|
6600
7268
|
if (isOpen) {
|
|
6601
7269
|
setSecret("");
|
|
6602
7270
|
setKey("");
|
|
@@ -6633,20 +7301,20 @@ function CEXBindModal({
|
|
|
6633
7301
|
setLoading(false);
|
|
6634
7302
|
}
|
|
6635
7303
|
};
|
|
6636
|
-
return /* @__PURE__ */ (0,
|
|
7304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ModalWithHeader, { showClose: true, isOpen, onClose, title: intl.formatMessage({
|
|
6637
7305
|
id: "CEXBindTitle"
|
|
6638
7306
|
}, {
|
|
6639
7307
|
type
|
|
6640
|
-
}), ...props, children: /* @__PURE__ */ (0,
|
|
6641
|
-
/* @__PURE__ */ (0,
|
|
6642
|
-
/* @__PURE__ */ (0,
|
|
6643
|
-
/* @__PURE__ */ (0,
|
|
6644
|
-
/* @__PURE__ */ (0,
|
|
6645
|
-
/* @__PURE__ */ (0,
|
|
7308
|
+
}), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "matchid-cex-modal", children: [
|
|
7309
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { children: [
|
|
7310
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl21.FormattedMessage, { id: "CEXBindAttention" }) }),
|
|
7311
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl21.FormattedMessage, { id: "CEXBindTips1" }) }),
|
|
7312
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl21.FormattedMessage, { id: "CEXBindTips2" }) }),
|
|
7313
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl21.FormattedMessage, { id: "CEXBindTips3" }) })
|
|
6646
7314
|
] }),
|
|
6647
|
-
/* @__PURE__ */ (0,
|
|
7315
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Field, { label: intl.formatMessage({
|
|
6648
7316
|
id: "CEXBindApiKey"
|
|
6649
|
-
}), children: /* @__PURE__ */ (0,
|
|
7317
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
6650
7318
|
Input,
|
|
6651
7319
|
{
|
|
6652
7320
|
value: key,
|
|
@@ -6654,9 +7322,9 @@ function CEXBindModal({
|
|
|
6654
7322
|
placeholder: "**** **** ****"
|
|
6655
7323
|
}
|
|
6656
7324
|
) }),
|
|
6657
|
-
/* @__PURE__ */ (0,
|
|
7325
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Field, { label: intl.formatMessage({
|
|
6658
7326
|
id: "CEXBindApiSecretKey"
|
|
6659
|
-
}), error: !needPassphrase && error, children: /* @__PURE__ */ (0,
|
|
7327
|
+
}), error: !needPassphrase && error, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
6660
7328
|
Input,
|
|
6661
7329
|
{
|
|
6662
7330
|
value: secret,
|
|
@@ -6664,9 +7332,9 @@ function CEXBindModal({
|
|
|
6664
7332
|
placeholder: "**** **** ****"
|
|
6665
7333
|
}
|
|
6666
7334
|
) }),
|
|
6667
|
-
needPassphrase && /* @__PURE__ */ (0,
|
|
7335
|
+
needPassphrase && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Field, { error, label: intl.formatMessage({
|
|
6668
7336
|
id: "CEXBindApiPassphrase"
|
|
6669
|
-
}), children: /* @__PURE__ */ (0,
|
|
7337
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
6670
7338
|
Input,
|
|
6671
7339
|
{
|
|
6672
7340
|
value: APIPassphrase,
|
|
@@ -6674,7 +7342,7 @@ function CEXBindModal({
|
|
|
6674
7342
|
placeholder: "**** **** ****"
|
|
6675
7343
|
}
|
|
6676
7344
|
) }),
|
|
6677
|
-
/* @__PURE__ */ (0,
|
|
7345
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
6678
7346
|
Button,
|
|
6679
7347
|
{
|
|
6680
7348
|
onClick: SubmitApi,
|
|
@@ -6682,7 +7350,7 @@ function CEXBindModal({
|
|
|
6682
7350
|
block: true,
|
|
6683
7351
|
loading,
|
|
6684
7352
|
disabled: !key || !secret,
|
|
6685
|
-
children: /* @__PURE__ */ (0,
|
|
7353
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl21.FormattedMessage, { id: "continue" })
|
|
6686
7354
|
}
|
|
6687
7355
|
)
|
|
6688
7356
|
] }) });
|
|
@@ -6690,9 +7358,10 @@ function CEXBindModal({
|
|
|
6690
7358
|
|
|
6691
7359
|
// src/context/BusinessProvider.tsx
|
|
6692
7360
|
var import_react_query9 = require("@tanstack/react-query");
|
|
6693
|
-
var
|
|
7361
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
6694
7362
|
function BusinessProvider({ children }) {
|
|
6695
7363
|
const { overview, token } = useUserInfo();
|
|
7364
|
+
const { type: EVMType, isOpen: EVMIsOpen, close: EVMClose } = useEVMModalStore();
|
|
6696
7365
|
const { type: TONType, isOpen: TONIsOpen, close: TONClose } = useTONModalStore();
|
|
6697
7366
|
const { type: TRONType, isOpen: TRONIsOpen, close: TRONClose } = useTRONModalStore();
|
|
6698
7367
|
const { type: BTCType, isOpen: BTCIsOpen, close: BTCClose } = useBTCModalStore();
|
|
@@ -6723,8 +7392,18 @@ function BusinessProvider({ children }) {
|
|
|
6723
7392
|
enabled: !!tgAppAuthCode,
|
|
6724
7393
|
refetchInterval: 1e3 * 5
|
|
6725
7394
|
});
|
|
6726
|
-
return /* @__PURE__ */ (0,
|
|
6727
|
-
/* @__PURE__ */ (0,
|
|
7395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
7396
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
7397
|
+
EVMModal,
|
|
7398
|
+
{
|
|
7399
|
+
isOpen: EVMIsOpen && (EVMType == "login" && !overview && !token || EVMType == "bind" && !!token && !!overview),
|
|
7400
|
+
onClose: EVMClose,
|
|
7401
|
+
type: EVMType,
|
|
7402
|
+
onSuccess: EVMClose,
|
|
7403
|
+
zIndex: 199
|
|
7404
|
+
}
|
|
7405
|
+
),
|
|
7406
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
6728
7407
|
TRONModal,
|
|
6729
7408
|
{
|
|
6730
7409
|
isOpen: TRONIsOpen && (TRONType == "login" && !overview && !token || TRONType == "bind" && !!token && !!overview),
|
|
@@ -6734,7 +7413,7 @@ function BusinessProvider({ children }) {
|
|
|
6734
7413
|
zIndex: 199
|
|
6735
7414
|
}
|
|
6736
7415
|
),
|
|
6737
|
-
/* @__PURE__ */ (0,
|
|
7416
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
6738
7417
|
TONModal,
|
|
6739
7418
|
{
|
|
6740
7419
|
isOpen: TONIsOpen && (TONType == "login" && !overview && !token || TONType == "bind" && !!token && !!overview),
|
|
@@ -6744,7 +7423,7 @@ function BusinessProvider({ children }) {
|
|
|
6744
7423
|
zIndex: 199
|
|
6745
7424
|
}
|
|
6746
7425
|
),
|
|
6747
|
-
/* @__PURE__ */ (0,
|
|
7426
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
6748
7427
|
BTCModal,
|
|
6749
7428
|
{
|
|
6750
7429
|
isOpen: BTCIsOpen && (BTCType == "login" && !overview && !token || BTCType == "bind" && !!token && !!overview),
|
|
@@ -6754,7 +7433,7 @@ function BusinessProvider({ children }) {
|
|
|
6754
7433
|
zIndex: 199
|
|
6755
7434
|
}
|
|
6756
7435
|
),
|
|
6757
|
-
/* @__PURE__ */ (0,
|
|
7436
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
6758
7437
|
CEXBindModal,
|
|
6759
7438
|
{
|
|
6760
7439
|
isOpen: CEXIsOpen && (!!token && !!overview),
|
|
@@ -6763,7 +7442,7 @@ function BusinessProvider({ children }) {
|
|
|
6763
7442
|
zIndex: 199
|
|
6764
7443
|
}
|
|
6765
7444
|
),
|
|
6766
|
-
/* @__PURE__ */ (0,
|
|
7445
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
6767
7446
|
WalletModal,
|
|
6768
7447
|
{
|
|
6769
7448
|
isOpen: WalletModalStore.isOpen && (WalletModalStore.type == "login" && !overview && !token || WalletModalStore.type == "bind" && !!token && !!overview),
|
|
@@ -6778,14 +7457,14 @@ function BusinessProvider({ children }) {
|
|
|
6778
7457
|
}
|
|
6779
7458
|
|
|
6780
7459
|
// src/context/index.tsx
|
|
6781
|
-
var
|
|
7460
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
6782
7461
|
var Providers = ({ children }) => {
|
|
6783
|
-
return /* @__PURE__ */ (0,
|
|
7462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ModalProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(BusinessProvider, { children }) }) });
|
|
6784
7463
|
};
|
|
6785
7464
|
var context_default = Providers;
|
|
6786
7465
|
|
|
6787
7466
|
// src/hooks/useWalletInit.ts
|
|
6788
|
-
var
|
|
7467
|
+
var import_react39 = require("react");
|
|
6789
7468
|
|
|
6790
7469
|
// src/utils/wallet.ts
|
|
6791
7470
|
var sendMessage = ({ method, data, resolve, reject, timeout }) => {
|
|
@@ -6818,11 +7497,11 @@ function useWalletInit({
|
|
|
6818
7497
|
}) {
|
|
6819
7498
|
const { endpoints, token, setWallet, appid, refreshOverview } = useLocalStore_default();
|
|
6820
7499
|
const { setWalletReady, walletReady } = useStore_default();
|
|
6821
|
-
const iframeReadyRef = (0,
|
|
6822
|
-
(0,
|
|
7500
|
+
const iframeReadyRef = (0, import_react39.useRef)(walletReady);
|
|
7501
|
+
(0, import_react39.useEffect)(() => {
|
|
6823
7502
|
setWallet(config);
|
|
6824
7503
|
}, [config]);
|
|
6825
|
-
(0,
|
|
7504
|
+
(0, import_react39.useEffect)(() => {
|
|
6826
7505
|
matchlog_default.log("sdk.mpc.status", walletReady, iframeReadyRef.current);
|
|
6827
7506
|
iframeReadyRef.current = walletReady;
|
|
6828
7507
|
if (iframeReadyRef.current) {
|
|
@@ -6839,7 +7518,7 @@ function useWalletInit({
|
|
|
6839
7518
|
onReady();
|
|
6840
7519
|
}
|
|
6841
7520
|
}, [walletReady]);
|
|
6842
|
-
(0,
|
|
7521
|
+
(0, import_react39.useEffect)(() => {
|
|
6843
7522
|
if (!endpoints.auth || !appid || !token || !config) {
|
|
6844
7523
|
const existingIframe = getWalletIframe();
|
|
6845
7524
|
if (existingIframe) {
|
|
@@ -6939,7 +7618,7 @@ function useWalletInit({
|
|
|
6939
7618
|
}
|
|
6940
7619
|
}
|
|
6941
7620
|
}, [endpoints.auth, appid, token, config]);
|
|
6942
|
-
(0,
|
|
7621
|
+
(0, import_react39.useEffect)(() => {
|
|
6943
7622
|
const messageHandle = async (e) => {
|
|
6944
7623
|
if (e.origin !== endpoints.auth.substring(0, endpoints.auth.length - 1)) {
|
|
6945
7624
|
return;
|
|
@@ -7020,7 +7699,7 @@ function useWalletInit({
|
|
|
7020
7699
|
}
|
|
7021
7700
|
|
|
7022
7701
|
// src/hooks/useInit.tsx
|
|
7023
|
-
var
|
|
7702
|
+
var import_react40 = require("react");
|
|
7024
7703
|
function useInit({
|
|
7025
7704
|
theme,
|
|
7026
7705
|
appid,
|
|
@@ -7040,24 +7719,24 @@ function useInit({
|
|
|
7040
7719
|
locale: realLocale
|
|
7041
7720
|
} = useLocalStore_default();
|
|
7042
7721
|
const walletModalStore = useWalletModalStore();
|
|
7043
|
-
const overviewLoadingRef = (0,
|
|
7722
|
+
const overviewLoadingRef = (0, import_react40.useRef)(false);
|
|
7044
7723
|
const searchParams = new URLSearchParams(window.location.search);
|
|
7045
7724
|
const matchToken = searchParams.get("matchToken");
|
|
7046
7725
|
const matchidt = searchParams.get("matchidt");
|
|
7047
7726
|
const realEndpoints = endpoints || env_default.endpoints;
|
|
7048
|
-
(0,
|
|
7727
|
+
(0, import_react40.useEffect)(() => {
|
|
7049
7728
|
setTheme(theme);
|
|
7050
7729
|
}, [theme]);
|
|
7051
|
-
(0,
|
|
7730
|
+
(0, import_react40.useEffect)(() => {
|
|
7052
7731
|
setAppid(appid);
|
|
7053
7732
|
}, [appid]);
|
|
7054
|
-
(0,
|
|
7733
|
+
(0, import_react40.useEffect)(() => {
|
|
7055
7734
|
setEndpoints(realEndpoints);
|
|
7056
7735
|
}, [realEndpoints]);
|
|
7057
|
-
(0,
|
|
7736
|
+
(0, import_react40.useEffect)(() => {
|
|
7058
7737
|
setLocale(locale || "en");
|
|
7059
7738
|
}, [locale]);
|
|
7060
|
-
(0,
|
|
7739
|
+
(0, import_react40.useEffect)(() => {
|
|
7061
7740
|
if (matchToken) {
|
|
7062
7741
|
const tokenData = JSON.parse(atob(matchToken));
|
|
7063
7742
|
if (tokenData && tokenData.mid && tokenData.token) {
|
|
@@ -7068,7 +7747,7 @@ function useInit({
|
|
|
7068
7747
|
}
|
|
7069
7748
|
}
|
|
7070
7749
|
}, [matchToken]);
|
|
7071
|
-
(0,
|
|
7750
|
+
(0, import_react40.useEffect)(() => {
|
|
7072
7751
|
if (matchidt) {
|
|
7073
7752
|
const tokenData = decodeURIComponent(matchidt);
|
|
7074
7753
|
const data = JSON.parse(decodeBase64(tokenData));
|
|
@@ -7098,7 +7777,7 @@ function useInit({
|
|
|
7098
7777
|
}
|
|
7099
7778
|
}
|
|
7100
7779
|
}, [matchidt]);
|
|
7101
|
-
(0,
|
|
7780
|
+
(0, import_react40.useEffect)(() => {
|
|
7102
7781
|
const onLoginMessage = (event) => {
|
|
7103
7782
|
const res = event.data;
|
|
7104
7783
|
if (res.event === "login" && res.data && (res.data.token || res.data.token_type && res.data.access_token)) {
|
|
@@ -7135,7 +7814,7 @@ function useInit({
|
|
|
7135
7814
|
overviewLoadingRef.current = false;
|
|
7136
7815
|
}
|
|
7137
7816
|
};
|
|
7138
|
-
(0,
|
|
7817
|
+
(0, import_react40.useEffect)(() => {
|
|
7139
7818
|
if (token) {
|
|
7140
7819
|
loadOverview();
|
|
7141
7820
|
}
|
|
@@ -7166,7 +7845,7 @@ function useInit({
|
|
|
7166
7845
|
|
|
7167
7846
|
// src/MatchContext.tsx
|
|
7168
7847
|
var import_react_query10 = require("@tanstack/react-query");
|
|
7169
|
-
var
|
|
7848
|
+
var import_react_intl22 = require("react-intl");
|
|
7170
7849
|
|
|
7171
7850
|
// src/i18n/en.json
|
|
7172
7851
|
var en_default = {
|
|
@@ -7226,7 +7905,7 @@ var en_default = {
|
|
|
7226
7905
|
amountPlaceholder: "Enter the Amount.",
|
|
7227
7906
|
balance: "Balance",
|
|
7228
7907
|
receiveTitle: "Received wallet address",
|
|
7229
|
-
receivePlaceholder: "Enter the
|
|
7908
|
+
receivePlaceholder: "Enter the Receiving wallet address.",
|
|
7230
7909
|
next: "Next",
|
|
7231
7910
|
copied: "Copied",
|
|
7232
7911
|
receiveQrcode: "Receive by scanning the QR code",
|
|
@@ -7911,9 +8590,9 @@ var messages = {
|
|
|
7911
8590
|
};
|
|
7912
8591
|
|
|
7913
8592
|
// src/MatchContext.tsx
|
|
7914
|
-
var
|
|
8593
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
7915
8594
|
var queryClient = new import_react_query10.QueryClient();
|
|
7916
|
-
var MatchContext = (0,
|
|
8595
|
+
var MatchContext = (0, import_react41.createContext)(void 0);
|
|
7917
8596
|
var MatchProvider = ({
|
|
7918
8597
|
children,
|
|
7919
8598
|
appid,
|
|
@@ -7933,7 +8612,7 @@ var MatchProvider = ({
|
|
|
7933
8612
|
useWalletInit({
|
|
7934
8613
|
config: wallet
|
|
7935
8614
|
});
|
|
7936
|
-
return /* @__PURE__ */ (0,
|
|
8615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl22.IntlProvider, { locale: realLocale, messages: messages[realLocale], children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_query10.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
7937
8616
|
MatchContext.Provider,
|
|
7938
8617
|
{
|
|
7939
8618
|
value: {
|
|
@@ -7944,12 +8623,12 @@ var MatchProvider = ({
|
|
|
7944
8623
|
theme,
|
|
7945
8624
|
locale: realLocale
|
|
7946
8625
|
},
|
|
7947
|
-
children: /* @__PURE__ */ (0,
|
|
8626
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(context_default, { children })
|
|
7948
8627
|
}
|
|
7949
8628
|
) }) });
|
|
7950
8629
|
};
|
|
7951
8630
|
var useMatch = () => {
|
|
7952
|
-
const context = (0,
|
|
8631
|
+
const context = (0, import_react41.useContext)(MatchContext);
|
|
7953
8632
|
if (context === void 0) {
|
|
7954
8633
|
throw new Error("useMatch must be used within a MatchProvider");
|
|
7955
8634
|
}
|
|
@@ -8035,68 +8714,6 @@ __export(chains_exports, {
|
|
|
8035
8714
|
MatchTest: () => matchTest
|
|
8036
8715
|
});
|
|
8037
8716
|
|
|
8038
|
-
// src/config/chains/MatchMain.ts
|
|
8039
|
-
var import_viem14 = require("viem");
|
|
8040
|
-
var matchMain = /* @__PURE__ */ (0, import_viem14.defineChain)({
|
|
8041
|
-
//定义match链
|
|
8042
|
-
id: 698,
|
|
8043
|
-
name: "Matchain",
|
|
8044
|
-
nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
|
|
8045
|
-
rpcUrls: {
|
|
8046
|
-
default: {
|
|
8047
|
-
http: ["https://rpc.matchain.io"]
|
|
8048
|
-
}
|
|
8049
|
-
},
|
|
8050
|
-
blockExplorers: {
|
|
8051
|
-
default: {
|
|
8052
|
-
name: "Matchscan",
|
|
8053
|
-
url: "https://matchscan.io/",
|
|
8054
|
-
apiUrl: "https://matchscan.io/api"
|
|
8055
|
-
}
|
|
8056
|
-
},
|
|
8057
|
-
iconUrl: "https://matchscan.io/static/identicon_logos/blockies.png",
|
|
8058
|
-
contracts: {
|
|
8059
|
-
multicall3: {
|
|
8060
|
-
address: "0xca11bde05977b3631167028862be2a173976ca11"
|
|
8061
|
-
}
|
|
8062
|
-
}
|
|
8063
|
-
// testnet: true,
|
|
8064
|
-
});
|
|
8065
|
-
|
|
8066
|
-
// src/config/chains/MatchTest.ts
|
|
8067
|
-
var import_viem15 = require("viem");
|
|
8068
|
-
var matchTest = /* @__PURE__ */ (0, import_viem15.defineChain)({
|
|
8069
|
-
//定义matchTest链
|
|
8070
|
-
id: 699,
|
|
8071
|
-
name: "MatchTest",
|
|
8072
|
-
nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
|
|
8073
|
-
rpcUrls: {
|
|
8074
|
-
default: {
|
|
8075
|
-
http: ["https://testnet-rpc.matchain.io"]
|
|
8076
|
-
}
|
|
8077
|
-
},
|
|
8078
|
-
blockExplorers: {
|
|
8079
|
-
default: {
|
|
8080
|
-
name: "Matchscan",
|
|
8081
|
-
url: "https://testnet.matchscan.io/",
|
|
8082
|
-
apiUrl: "https://testnet.matchscan.io/api"
|
|
8083
|
-
}
|
|
8084
|
-
},
|
|
8085
|
-
iconUrl: "https://testnet.matchscan.io/static/identicon_logos/blockies.png",
|
|
8086
|
-
contracts: {
|
|
8087
|
-
multicall3: {
|
|
8088
|
-
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
8089
|
-
blockCreated: 751532
|
|
8090
|
-
},
|
|
8091
|
-
ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
|
|
8092
|
-
ensUniversalResolver: {
|
|
8093
|
-
address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",
|
|
8094
|
-
blockCreated: 5317080
|
|
8095
|
-
}
|
|
8096
|
-
}
|
|
8097
|
-
// testnet: true,
|
|
8098
|
-
});
|
|
8099
|
-
|
|
8100
8717
|
// src/types/index.ts
|
|
8101
8718
|
var types_exports = {};
|
|
8102
8719
|
__export(types_exports, {
|