@matchain/matchid-sdk-react 0.1.51 → 0.1.53-alpha.0
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 +1 -1
- package/dist/assets/icon/index.d.ts +1 -1
- package/dist/{chunk-VIJ4FUT3.mjs → chunk-LRJDS2OK.mjs} +93 -91
- package/dist/chunk-LRJDS2OK.mjs.map +1 -0
- package/dist/{chunk-UXFJALFG.mjs → chunk-YQHI5BIZ.mjs} +2 -2
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +60 -56
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +1 -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 +28 -25
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +2 -2
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +20 -16
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/{index-XzSw1Bym.d.mts → index-0EM3dXJ4.d.mts} +2 -2
- package/dist/{index-k2Uf0F94.d.ts → index-BNNgBoTN.d.ts} +1 -1
- package/dist/{index-BUj9mOrS.d.ts → index-BlYHNOxm.d.ts} +1 -1
- package/dist/{index-DvM6x6e6.d.ts → index-BoIDCH41.d.ts} +1 -1
- package/dist/{index-B-QfwtE5.d.mts → index-Bsfb3Ysq.d.mts} +1 -1
- package/dist/{index-Bmir-Wor.d.mts → index-C29kl7io.d.mts} +1 -1
- package/dist/{index-X_fw5wX_.d.ts → index-C7InzeOC.d.ts} +1 -1
- package/dist/{index-B_o9HBS1.d.mts → index-CGx_yc95.d.mts} +1 -1
- package/dist/{index-DMUZQqNB.d.ts → index-CO1j3Cxc.d.ts} +2 -2
- package/dist/{index-BDoEk1EK.d.ts → index-Ce5JlNJv.d.ts} +2 -2
- package/dist/{index-D5OzNRfu.d.mts → index-CqO8nMTh.d.mts} +2 -2
- package/dist/{index-CDqIk5k2.d.mts → index-CteYYAoN.d.mts} +1 -1
- package/dist/index.css +1 -0
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +96 -94
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/{types-Dd_ExpLx.d.mts → types-Cv5UhCIP.d.mts} +1 -1
- package/dist/{types-Dd_ExpLx.d.ts → types-Cv5UhCIP.d.ts} +1 -1
- package/dist/ui/index.d.mts +3 -3
- package/dist/ui/index.d.ts +3 -3
- package/example/dist/assets/TransportWebHID-BwG9Tbw2.js +1 -0
- package/example/dist/assets/bignumber-FiRdtNkj.js +10 -0
- package/example/dist/assets/ccip-CJyR03AW.js +1 -0
- package/example/dist/assets/draggabilly-1Sl0icBA.js +14 -0
- package/example/dist/assets/index-BAfSBdWW.js +1 -0
- package/example/dist/assets/index-CYk2C9XJ.js +1 -0
- package/example/dist/assets/index-CcgesoWE.js +179 -0
- package/example/dist/assets/index-D5RU9xxK.js +3 -0
- package/example/dist/assets/index-D8N4Z5B5.js +1677 -0
- package/example/dist/assets/index-DATAk5xI.js +569 -0
- package/example/dist/assets/index-DN1wW-Mo.js +3 -0
- package/example/dist/assets/index-DxxLiL3_.js +303 -0
- package/example/dist/assets/index-Gy3FXGhr.css +1 -0
- package/example/dist/assets/index-RIWy1Hg7.js +1 -0
- package/example/dist/assets/inherits_browser-BlmhoU4v.js +1 -0
- package/example/dist/assets/solanaEmbed.esm-CNS-QKE2.js +38 -0
- package/example/dist/index.html +14 -0
- package/package.json +1 -1
- package/dist/chunk-VIJ4FUT3.mjs.map +0 -1
- /package/dist/{chunk-UXFJALFG.mjs.map → chunk-YQHI5BIZ.mjs.map} +0 -0
|
@@ -603,7 +603,7 @@ var useLocalStore_default = useLocalStore;
|
|
|
603
603
|
import { useMemo as useMemo7 } from "react";
|
|
604
604
|
|
|
605
605
|
// src/MatchContext.tsx
|
|
606
|
-
import { createContext as createContext3, useContext as useContext3
|
|
606
|
+
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
607
607
|
|
|
608
608
|
// src/hooks/index.tsx
|
|
609
609
|
var hooks_exports = {};
|
|
@@ -684,7 +684,9 @@ var useStore = create2((set) => ({
|
|
|
684
684
|
walletReady: false,
|
|
685
685
|
setWalletReady: (inited) => set({ walletReady: inited }),
|
|
686
686
|
tgAppAuthCode: "",
|
|
687
|
-
setTgAppAuthCode: (code) => set({ tgAppAuthCode: code })
|
|
687
|
+
setTgAppAuthCode: (code) => set({ tgAppAuthCode: code }),
|
|
688
|
+
emailLoginKey: "",
|
|
689
|
+
setEmailLoginKey: (key) => set({ emailLoginKey: key })
|
|
688
690
|
}));
|
|
689
691
|
var useStore_default = useStore;
|
|
690
692
|
|
|
@@ -1221,10 +1223,12 @@ function useWalletAssetListQuery({
|
|
|
1221
1223
|
// src/hooks/useMatchChain.tsx
|
|
1222
1224
|
import { useMemo as useMemo3, useState as useState6 } from "react";
|
|
1223
1225
|
import { createPublicClient as createPublicClient2, formatUnits, http as http2, parseUnits } from "viem";
|
|
1226
|
+
import { FormattedMessage as FormattedMessage2, useIntl as useIntl2 } from "react-intl";
|
|
1224
1227
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1225
1228
|
function useMatchChain() {
|
|
1226
1229
|
const chainListQuery = useChainListQuery();
|
|
1227
1230
|
const modal = useModal();
|
|
1231
|
+
const intl = useIntl2();
|
|
1228
1232
|
const { chainId: storeChainId, setChainId } = useLocalStore_default();
|
|
1229
1233
|
const chainId = useMemo3(() => {
|
|
1230
1234
|
if (!chainListQuery.data || !chainListQuery.data.length) {
|
|
@@ -1272,12 +1276,12 @@ function useMatchChain() {
|
|
|
1272
1276
|
/* @__PURE__ */ jsx5(Button, { size: "lg", highlight: true, onClick: () => {
|
|
1273
1277
|
setChainId2(selectedChainId || 0);
|
|
1274
1278
|
close();
|
|
1275
|
-
}, block: true, children: "
|
|
1279
|
+
}, block: true, children: /* @__PURE__ */ jsx5(FormattedMessage2, { id: "confirm" }) })
|
|
1276
1280
|
] });
|
|
1277
1281
|
}
|
|
1278
1282
|
const showChangeNetwork = () => {
|
|
1279
1283
|
modal.open({
|
|
1280
|
-
title: "
|
|
1284
|
+
title: intl.formatMessage({ id: "changeNetwork" }),
|
|
1281
1285
|
content: ChangeNetwork
|
|
1282
1286
|
});
|
|
1283
1287
|
};
|
|
@@ -1377,11 +1381,11 @@ var useContractStore = create4(devtools3(persistedState3));
|
|
|
1377
1381
|
var useContractStore_default = useContractStore;
|
|
1378
1382
|
|
|
1379
1383
|
// src/hooks/useMatchWallet.tsx
|
|
1380
|
-
import { FormattedMessage as
|
|
1384
|
+
import { FormattedMessage as FormattedMessage4, useIntl as useIntl4 } from "react-intl";
|
|
1381
1385
|
|
|
1382
1386
|
// src/components/ImportToken/index.tsx
|
|
1383
1387
|
import { useEffect as useEffect6, useMemo as useMemo4, useState as useState7 } from "react";
|
|
1384
|
-
import { FormattedMessage as
|
|
1388
|
+
import { FormattedMessage as FormattedMessage3, useIntl as useIntl3 } from "react-intl";
|
|
1385
1389
|
import { useQueryClient } from "@tanstack/react-query";
|
|
1386
1390
|
import { defineChain, erc20Abi } from "viem";
|
|
1387
1391
|
|
|
@@ -1450,7 +1454,7 @@ function ImportToken({ close }) {
|
|
|
1450
1454
|
});
|
|
1451
1455
|
}
|
|
1452
1456
|
};
|
|
1453
|
-
const intl =
|
|
1457
|
+
const intl = useIntl3();
|
|
1454
1458
|
useEffect6(() => {
|
|
1455
1459
|
if (address.length === 42) {
|
|
1456
1460
|
const reg = /^0x[0-9a-fA-F]{40}$/;
|
|
@@ -1524,9 +1528,9 @@ function ImportToken({ close }) {
|
|
|
1524
1528
|
return /* @__PURE__ */ jsxs5("div", { className: `matchid-import-token-result matchid-flex`, children: [
|
|
1525
1529
|
/* @__PURE__ */ jsxs5("div", { className: `matchid-import-token-result-box matchid-flex`, children: [
|
|
1526
1530
|
/* @__PURE__ */ jsx6("img", { src: status == "success" ? success_default : fail_default, alt: status == "success" ? "success" : "fail", className: `matchid-import-token-result-img` }),
|
|
1527
|
-
/* @__PURE__ */ jsx6("div", { className: `matchid-import-token-result-text matchid-import-token-result-text-${status}`, children: status == "success" ? /* @__PURE__ */ jsx6(
|
|
1531
|
+
/* @__PURE__ */ jsx6("div", { className: `matchid-import-token-result-text matchid-import-token-result-text-${status}`, children: status == "success" ? /* @__PURE__ */ jsx6(FormattedMessage3, { id: "importSuccess" }) : /* @__PURE__ */ jsx6(FormattedMessage3, { id: "importFail" }) })
|
|
1528
1532
|
] }),
|
|
1529
|
-
status == "success" ? /* @__PURE__ */ jsx6(Button, { size: "lg", onClick: close, block: true, highlight: true, children: /* @__PURE__ */ jsx6(
|
|
1533
|
+
status == "success" ? /* @__PURE__ */ jsx6(Button, { size: "lg", onClick: close, block: true, highlight: true, children: /* @__PURE__ */ jsx6(FormattedMessage3, { id: "close" }) }) : /* @__PURE__ */ jsx6(Button, { size: "lg", onClick: () => setStatus(""), block: true, highlight: true, children: /* @__PURE__ */ jsx6(FormattedMessage3, { id: "back" }) })
|
|
1530
1534
|
] });
|
|
1531
1535
|
}
|
|
1532
1536
|
return /* @__PURE__ */ jsxs5("div", { className: `matchid-import-token`, children: [
|
|
@@ -1580,7 +1584,7 @@ function ImportToken({ close }) {
|
|
|
1580
1584
|
loading: loading || isContractQuery.isLoading,
|
|
1581
1585
|
disabled: !canImport || !isContractQuery.data,
|
|
1582
1586
|
highlight: true,
|
|
1583
|
-
children: /* @__PURE__ */ jsx6(
|
|
1587
|
+
children: /* @__PURE__ */ jsx6(FormattedMessage3, { id: "import" })
|
|
1584
1588
|
}
|
|
1585
1589
|
)
|
|
1586
1590
|
] });
|
|
@@ -1593,7 +1597,7 @@ var ReceiveModal = () => {
|
|
|
1593
1597
|
const { address } = useWallet();
|
|
1594
1598
|
const [copied, setCopied] = useCopyClipboard();
|
|
1595
1599
|
const toast = useToast();
|
|
1596
|
-
const intl =
|
|
1600
|
+
const intl = useIntl4();
|
|
1597
1601
|
const onCopy = () => {
|
|
1598
1602
|
setCopied(address);
|
|
1599
1603
|
toast.success(intl.formatMessage({
|
|
@@ -1603,7 +1607,7 @@ var ReceiveModal = () => {
|
|
|
1603
1607
|
const chainLink = chain.explorerLink("address/" + address);
|
|
1604
1608
|
return /* @__PURE__ */ jsxs6("div", { className: `matchid-receive-modal`, children: [
|
|
1605
1609
|
/* @__PURE__ */ jsxs6("div", { className: "matchid-receive-container", children: [
|
|
1606
|
-
/* @__PURE__ */ jsx7("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ jsx7(
|
|
1610
|
+
/* @__PURE__ */ jsx7("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ jsx7(FormattedMessage4, { id: "receiveQrcode" }) }),
|
|
1607
1611
|
/* @__PURE__ */ jsx7("div", { className: `matchid-qr-container`, children: /* @__PURE__ */ jsx7(
|
|
1608
1612
|
QRCode,
|
|
1609
1613
|
{
|
|
@@ -1623,7 +1627,7 @@ var ReceiveModal = () => {
|
|
|
1623
1627
|
)
|
|
1624
1628
|
] }),
|
|
1625
1629
|
/* @__PURE__ */ jsx7(Button, { size: "lg", onClick: onCopy, block: true, highlight: true, disabled: copied, children: /* @__PURE__ */ jsx7(
|
|
1626
|
-
|
|
1630
|
+
FormattedMessage4,
|
|
1627
1631
|
{
|
|
1628
1632
|
id: "copyAddress"
|
|
1629
1633
|
}
|
|
@@ -1632,7 +1636,7 @@ var ReceiveModal = () => {
|
|
|
1632
1636
|
};
|
|
1633
1637
|
function useMatchWallet() {
|
|
1634
1638
|
const modal = useModal();
|
|
1635
|
-
const intl =
|
|
1639
|
+
const intl = useIntl4();
|
|
1636
1640
|
const showReceiveModal = () => {
|
|
1637
1641
|
modal.open({
|
|
1638
1642
|
title: intl.formatMessage({
|
|
@@ -2330,7 +2334,7 @@ var useWalletModalStore = create5((set) => ({
|
|
|
2330
2334
|
|
|
2331
2335
|
// src/components/CEXBindModal/index.tsx
|
|
2332
2336
|
import { useEffect as useEffect10, useMemo as useMemo6, useState as useState11 } from "react";
|
|
2333
|
-
import { FormattedMessage as
|
|
2337
|
+
import { FormattedMessage as FormattedMessage5, useIntl as useIntl5 } from "react-intl";
|
|
2334
2338
|
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2335
2339
|
function CEXBindModal({
|
|
2336
2340
|
onClose,
|
|
@@ -2338,7 +2342,7 @@ function CEXBindModal({
|
|
|
2338
2342
|
isOpen = false,
|
|
2339
2343
|
...props
|
|
2340
2344
|
}) {
|
|
2341
|
-
const intl =
|
|
2345
|
+
const intl = useIntl5();
|
|
2342
2346
|
const { events } = useMatch();
|
|
2343
2347
|
const [APIPassphrase, setAPIPassphrase] = useState11("");
|
|
2344
2348
|
const { refreshOverview } = useUserInfo();
|
|
@@ -2392,10 +2396,10 @@ function CEXBindModal({
|
|
|
2392
2396
|
type
|
|
2393
2397
|
}), ...props, children: /* @__PURE__ */ jsxs7("div", { className: "matchid-cex-modal", children: [
|
|
2394
2398
|
/* @__PURE__ */ jsxs7("div", { children: [
|
|
2395
|
-
/* @__PURE__ */ jsx9("p", { children: /* @__PURE__ */ jsx9(
|
|
2396
|
-
/* @__PURE__ */ jsx9("p", { children: /* @__PURE__ */ jsx9(
|
|
2397
|
-
/* @__PURE__ */ jsx9("p", { children: /* @__PURE__ */ jsx9(
|
|
2398
|
-
/* @__PURE__ */ jsx9("p", { children: /* @__PURE__ */ jsx9(
|
|
2399
|
+
/* @__PURE__ */ jsx9("p", { children: /* @__PURE__ */ jsx9(FormattedMessage5, { id: "CEXBindAttention" }) }),
|
|
2400
|
+
/* @__PURE__ */ jsx9("p", { children: /* @__PURE__ */ jsx9(FormattedMessage5, { id: "CEXBindTips1" }) }),
|
|
2401
|
+
/* @__PURE__ */ jsx9("p", { children: /* @__PURE__ */ jsx9(FormattedMessage5, { id: "CEXBindTips2" }) }),
|
|
2402
|
+
/* @__PURE__ */ jsx9("p", { children: /* @__PURE__ */ jsx9(FormattedMessage5, { id: "CEXBindTips3" }) })
|
|
2399
2403
|
] }),
|
|
2400
2404
|
/* @__PURE__ */ jsx9(Field, { label: intl.formatMessage({
|
|
2401
2405
|
id: "CEXBindApiKey"
|
|
@@ -2435,7 +2439,7 @@ function CEXBindModal({
|
|
|
2435
2439
|
block: true,
|
|
2436
2440
|
loading,
|
|
2437
2441
|
disabled: !key || !secret,
|
|
2438
|
-
children: /* @__PURE__ */ jsx9(
|
|
2442
|
+
children: /* @__PURE__ */ jsx9(FormattedMessage5, { id: "continue" })
|
|
2439
2443
|
}
|
|
2440
2444
|
)
|
|
2441
2445
|
] }) });
|
|
@@ -2979,7 +2983,8 @@ var en_default = {
|
|
|
2979
2983
|
close: "Close",
|
|
2980
2984
|
back: "Back",
|
|
2981
2985
|
importSuccess: "Import Token Successfully",
|
|
2982
|
-
importFail: "Failed to import Token"
|
|
2986
|
+
importFail: "Failed to import Token",
|
|
2987
|
+
changeNetwork: "Change Network"
|
|
2983
2988
|
};
|
|
2984
2989
|
|
|
2985
2990
|
// src/i18n/zh.json
|
|
@@ -3059,7 +3064,8 @@ var zh_default = {
|
|
|
3059
3064
|
close: "\u5173\u95ED",
|
|
3060
3065
|
back: "\u8FD4\u56DE",
|
|
3061
3066
|
importSuccess: "\u6210\u529F\u5BFC\u5165\u4EE3\u5E01",
|
|
3062
|
-
importFail: "\u5BFC\u5165\u4EE3\u5E01\u5931\u8D25"
|
|
3067
|
+
importFail: "\u5BFC\u5165\u4EE3\u5E01\u5931\u8D25",
|
|
3068
|
+
changeNetwork: "\u5207\u6362\u7F51\u7EDC"
|
|
3063
3069
|
};
|
|
3064
3070
|
|
|
3065
3071
|
// src/i18n/tw.json
|
|
@@ -3139,7 +3145,8 @@ var tw_default = {
|
|
|
3139
3145
|
close: "\u95DC\u9589",
|
|
3140
3146
|
back: "\u8FD4\u56DE",
|
|
3141
3147
|
importSuccess: "\u6210\u529F\u532F\u5165\u4EE3\u5E63",
|
|
3142
|
-
importFail: "\u532F\u5165\u4EE3\u5E63\u5931\u6557"
|
|
3148
|
+
importFail: "\u532F\u5165\u4EE3\u5E63\u5931\u6557",
|
|
3149
|
+
changeNetwork: "\u5207\u63DB\u7DB2\u7D61"
|
|
3143
3150
|
};
|
|
3144
3151
|
|
|
3145
3152
|
// src/i18n/fr.json
|
|
@@ -3219,7 +3226,8 @@ var fr_default = {
|
|
|
3219
3226
|
close: "Fermer",
|
|
3220
3227
|
back: "Retour",
|
|
3221
3228
|
importSuccess: "Importation du jeton r\xE9ussie",
|
|
3222
|
-
importFail: "\xC9chec de l'importation du jeton"
|
|
3229
|
+
importFail: "\xC9chec de l'importation du jeton",
|
|
3230
|
+
changeNetwork: "Changer de r\xE9seau"
|
|
3223
3231
|
};
|
|
3224
3232
|
|
|
3225
3233
|
// src/i18n/ja.json
|
|
@@ -3299,7 +3307,8 @@ var ja_default = {
|
|
|
3299
3307
|
close: "\u9589\u3058\u308B",
|
|
3300
3308
|
back: "\u623B\u308B",
|
|
3301
3309
|
importSuccess: "\u30C8\u30FC\u30AF\u30F3\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u6210\u529F\u3057\u307E\u3057\u305F",
|
|
3302
|
-
importFail: "\u30C8\u30FC\u30AF\u30F3\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F"
|
|
3310
|
+
importFail: "\u30C8\u30FC\u30AF\u30F3\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
|
|
3311
|
+
changeNetwork: "\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u3092\u5909\u66F4"
|
|
3303
3312
|
};
|
|
3304
3313
|
|
|
3305
3314
|
// src/i18n/ko.json
|
|
@@ -3379,7 +3388,8 @@ var ko_default = {
|
|
|
3379
3388
|
close: "\uB2EB\uAE30",
|
|
3380
3389
|
back: "\uB4A4\uB85C",
|
|
3381
3390
|
importSuccess: "\uD1A0\uD070\uC744 \uC131\uACF5\uC801\uC73C\uB85C \uAC00\uC838\uC654\uC2B5\uB2C8\uB2E4",
|
|
3382
|
-
importFail: "\uD1A0\uD070 \uAC00\uC838\uC624\uAE30\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4"
|
|
3391
|
+
importFail: "\uD1A0\uD070 \uAC00\uC838\uC624\uAE30\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4",
|
|
3392
|
+
changeNetwork: "\uB124\uD2B8\uC6CC\uD06C \uBCC0\uACBD"
|
|
3383
3393
|
};
|
|
3384
3394
|
|
|
3385
3395
|
// src/i18n/vi.json
|
|
@@ -3459,7 +3469,8 @@ var vi_default = {
|
|
|
3459
3469
|
close: "\u0110\xF3ng",
|
|
3460
3470
|
back: "Quay l\u1EA1i",
|
|
3461
3471
|
importSuccess: "Nh\u1EADp Token th\xE0nh c\xF4ng",
|
|
3462
|
-
importFail: "Kh\xF4ng th\u1EC3 nh\u1EADp Token"
|
|
3472
|
+
importFail: "Kh\xF4ng th\u1EC3 nh\u1EADp Token",
|
|
3473
|
+
changeNetwork: "Thay \u0111\u1ED5i m\u1EA1ng"
|
|
3463
3474
|
};
|
|
3464
3475
|
|
|
3465
3476
|
// src/i18n/es.json
|
|
@@ -3539,7 +3550,8 @@ var es_default = {
|
|
|
3539
3550
|
close: "Cerrar",
|
|
3540
3551
|
back: "Atr\xE1s",
|
|
3541
3552
|
importSuccess: "Token importado con \xE9xito",
|
|
3542
|
-
importFail: "Error al importar el token"
|
|
3553
|
+
importFail: "Error al importar el token",
|
|
3554
|
+
changeNetwork: "Cambiar red"
|
|
3543
3555
|
};
|
|
3544
3556
|
|
|
3545
3557
|
// src/i18n/pt.json
|
|
@@ -3619,7 +3631,8 @@ var pt_default = {
|
|
|
3619
3631
|
close: "Fechar",
|
|
3620
3632
|
back: "Voltar",
|
|
3621
3633
|
importSuccess: "Token importado com sucesso",
|
|
3622
|
-
importFail: "Falha ao importar o token"
|
|
3634
|
+
importFail: "Falha ao importar o token",
|
|
3635
|
+
changeNetwork: "Alterar rede"
|
|
3623
3636
|
};
|
|
3624
3637
|
|
|
3625
3638
|
// src/i18n/index.ts
|
|
@@ -3658,17 +3671,6 @@ var MatchProvider = ({
|
|
|
3658
3671
|
useWalletInit({
|
|
3659
3672
|
config: wallet
|
|
3660
3673
|
});
|
|
3661
|
-
useEffect13(() => {
|
|
3662
|
-
if (!window.Telegram) {
|
|
3663
|
-
const script = document.createElement("script");
|
|
3664
|
-
script.src = "https://telegram.org/js/telegram-web-app.js?56";
|
|
3665
|
-
script.async = true;
|
|
3666
|
-
document.body.appendChild(script);
|
|
3667
|
-
return () => {
|
|
3668
|
-
document.body.removeChild(script);
|
|
3669
|
-
};
|
|
3670
|
-
}
|
|
3671
|
-
}, []);
|
|
3672
3674
|
return /* @__PURE__ */ jsx12(IntlProvider, { locale: realLocale, messages: messages[realLocale], children: /* @__PURE__ */ jsx12(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx12(
|
|
3673
3675
|
MatchContext.Provider,
|
|
3674
3676
|
{
|
|
@@ -3707,7 +3709,7 @@ function useUserInfo() {
|
|
|
3707
3709
|
locale,
|
|
3708
3710
|
refreshOverview
|
|
3709
3711
|
} = useLocalStore_default();
|
|
3710
|
-
const { setTgAppAuthCode } = useStore_default();
|
|
3712
|
+
const { setTgAppAuthCode, emailLoginKey, setEmailLoginKey } = useStore_default();
|
|
3711
3713
|
const { events, login } = useMatch();
|
|
3712
3714
|
const { open: SOLOpen } = useSOLModalStore();
|
|
3713
3715
|
const { open: TRONOpen } = useTRONModalStore();
|
|
@@ -3809,7 +3811,7 @@ function useUserInfo() {
|
|
|
3809
3811
|
const getLoginEmailCode = async (email) => {
|
|
3810
3812
|
const res = await getEmailCodeApi(email);
|
|
3811
3813
|
if (isSuccess(res)) {
|
|
3812
|
-
|
|
3814
|
+
setEmailLoginKey(res.data.key);
|
|
3813
3815
|
return res.data.key;
|
|
3814
3816
|
}
|
|
3815
3817
|
throw new Error(res.message);
|
|
@@ -3821,7 +3823,7 @@ function useUserInfo() {
|
|
|
3821
3823
|
try {
|
|
3822
3824
|
const obj = {
|
|
3823
3825
|
email,
|
|
3824
|
-
verification_key:
|
|
3826
|
+
verification_key: emailLoginKey,
|
|
3825
3827
|
verification_code: code
|
|
3826
3828
|
};
|
|
3827
3829
|
const res = await verifyEmailCodeApi(obj);
|
|
@@ -3973,10 +3975,10 @@ function useUserInfo() {
|
|
|
3973
3975
|
|
|
3974
3976
|
// src/components/EmailModal/StepVerify.tsx
|
|
3975
3977
|
import { useEffect as useEffect14, useMemo as useMemo8, useRef as useRef4, useState as useState13 } from "react";
|
|
3976
|
-
import { FormattedMessage as
|
|
3978
|
+
import { FormattedMessage as FormattedMessage6, useIntl as useIntl6 } from "react-intl";
|
|
3977
3979
|
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3978
3980
|
function StepVerify(props) {
|
|
3979
|
-
const intl =
|
|
3981
|
+
const intl = useIntl6();
|
|
3980
3982
|
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
3981
3983
|
const [error, setError] = useState13("");
|
|
3982
3984
|
const [code, setCode] = useState13("");
|
|
@@ -4056,7 +4058,7 @@ function StepVerify(props) {
|
|
|
4056
4058
|
/* @__PURE__ */ jsx13("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ jsx13(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
|
|
4057
4059
|
/* @__PURE__ */ jsxs9("div", { className: "matchid-email-verify-header-content", children: [
|
|
4058
4060
|
/* @__PURE__ */ jsx13("div", { className: "matchid-email-verify-header-value", children: props.email }),
|
|
4059
|
-
/* @__PURE__ */ jsx13("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ jsx13(
|
|
4061
|
+
/* @__PURE__ */ jsx13("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ jsx13(FormattedMessage6, { id: "sendEmailTips" }) })
|
|
4060
4062
|
] })
|
|
4061
4063
|
] }),
|
|
4062
4064
|
/* @__PURE__ */ jsx13(Field, { label: intl.formatMessage({
|
|
@@ -4090,12 +4092,12 @@ function StepVerify(props) {
|
|
|
4090
4092
|
)
|
|
4091
4093
|
}
|
|
4092
4094
|
) }),
|
|
4093
|
-
/* @__PURE__ */ jsx13(Button, { disabled: !canContinue, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ jsx13(
|
|
4095
|
+
/* @__PURE__ */ jsx13(Button, { disabled: !canContinue, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ jsx13(FormattedMessage6, { id: "continue" }) })
|
|
4094
4096
|
] });
|
|
4095
4097
|
}
|
|
4096
4098
|
|
|
4097
4099
|
// src/components/EmailModal/index.tsx
|
|
4098
|
-
import { useIntl as
|
|
4100
|
+
import { useIntl as useIntl7 } from "react-intl";
|
|
4099
4101
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
4100
4102
|
function EmailModal({
|
|
4101
4103
|
isOpen = false,
|
|
@@ -4106,7 +4108,7 @@ function EmailModal({
|
|
|
4106
4108
|
}) {
|
|
4107
4109
|
const [step, setStep] = useState14("input");
|
|
4108
4110
|
const [emailVal, setEmailVal] = useState14("");
|
|
4109
|
-
const intl =
|
|
4111
|
+
const intl = useIntl7();
|
|
4110
4112
|
useEffect15(() => {
|
|
4111
4113
|
if (!isOpen) {
|
|
4112
4114
|
setStep("input");
|
|
@@ -4133,7 +4135,7 @@ function EmailModal({
|
|
|
4133
4135
|
|
|
4134
4136
|
// src/components/LoginBox/index.tsx
|
|
4135
4137
|
import { useMemo as useMemo9, useState as useState15 } from "react";
|
|
4136
|
-
import { FormattedMessage as
|
|
4138
|
+
import { FormattedMessage as FormattedMessage7, useIntl as useIntl8 } from "react-intl";
|
|
4137
4139
|
|
|
4138
4140
|
// src/hooks/useAppConfig.ts
|
|
4139
4141
|
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
@@ -4248,7 +4250,7 @@ function LoginBox({
|
|
|
4248
4250
|
const [emailOpen, setEmailOpen] = useState15(false);
|
|
4249
4251
|
const { login } = useUserInfo();
|
|
4250
4252
|
const [showWallet, setShowWallet] = useState15(false);
|
|
4251
|
-
const intl =
|
|
4253
|
+
const intl = useIntl8();
|
|
4252
4254
|
const isDownMd = useDownMd();
|
|
4253
4255
|
const methodMap = {
|
|
4254
4256
|
wallet: {
|
|
@@ -4364,7 +4366,7 @@ function LoginBox({
|
|
|
4364
4366
|
);
|
|
4365
4367
|
}) }),
|
|
4366
4368
|
methodConfig.methods.length > 0 && /* @__PURE__ */ jsxs10("div", { className: "matchid-login-other", children: [
|
|
4367
|
-
/* @__PURE__ */ jsx15("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ jsx15(
|
|
4369
|
+
/* @__PURE__ */ jsx15("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ jsx15(FormattedMessage7, { id: "otherLoginMethods" }) }),
|
|
4368
4370
|
/* @__PURE__ */ jsx15("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
4369
4371
|
return /* @__PURE__ */ jsx15(
|
|
4370
4372
|
"div",
|
|
@@ -4398,7 +4400,7 @@ function LoginBox({
|
|
|
4398
4400
|
import { useState as useState17 } from "react";
|
|
4399
4401
|
|
|
4400
4402
|
// src/components/LoginPanel/index.tsx
|
|
4401
|
-
import { FormattedMessage as
|
|
4403
|
+
import { FormattedMessage as FormattedMessage8 } from "react-intl";
|
|
4402
4404
|
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
4403
4405
|
function LoginPanel({
|
|
4404
4406
|
header,
|
|
@@ -4409,8 +4411,8 @@ function LoginPanel({
|
|
|
4409
4411
|
return /* @__PURE__ */ jsxs11("div", { className: "matchid-login-panel", children: [
|
|
4410
4412
|
header ? header : /* @__PURE__ */ jsxs11("div", { className: "matchid-login-panel-header", children: [
|
|
4411
4413
|
/* @__PURE__ */ jsxs11("div", { className: "matchid-login-panel-header-content", children: [
|
|
4412
|
-
/* @__PURE__ */ jsx16("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ jsx16(
|
|
4413
|
-
/* @__PURE__ */ jsx16("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ jsx16(
|
|
4414
|
+
/* @__PURE__ */ jsx16("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ jsx16(FormattedMessage8, { id: "loginTitle" }) }),
|
|
4415
|
+
/* @__PURE__ */ jsx16("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ jsx16(FormattedMessage8, { id: "loginTips" }) })
|
|
4414
4416
|
] }),
|
|
4415
4417
|
onClose && /* @__PURE__ */ jsx16("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ jsx16(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
|
|
4416
4418
|
] }),
|
|
@@ -4466,7 +4468,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
4466
4468
|
}
|
|
4467
4469
|
|
|
4468
4470
|
// src/components/UserPopover/index.tsx
|
|
4469
|
-
import { FormattedMessage as
|
|
4471
|
+
import { FormattedMessage as FormattedMessage9, useIntl as useIntl9 } from "react-intl";
|
|
4470
4472
|
import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4471
4473
|
function UserContent() {
|
|
4472
4474
|
const { logout, address, username } = useUserInfo();
|
|
@@ -4501,7 +4503,7 @@ function UserContent() {
|
|
|
4501
4503
|
};
|
|
4502
4504
|
const [usernameOpen, setUsernameOpen] = useState16(false);
|
|
4503
4505
|
const [copied, setCopied] = useCopyClipboard();
|
|
4504
|
-
const intl =
|
|
4506
|
+
const intl = useIntl9();
|
|
4505
4507
|
return /* @__PURE__ */ jsxs13("div", { className: "matchid-user-popover-content", children: [
|
|
4506
4508
|
/* @__PURE__ */ jsxs13("div", { className: "matchid-user-popover-list", children: [
|
|
4507
4509
|
/* @__PURE__ */ jsx19(UserItem, { onClick: () => {
|
|
@@ -4514,7 +4516,7 @@ function UserContent() {
|
|
|
4514
4516
|
id: "setUsername"
|
|
4515
4517
|
}) })
|
|
4516
4518
|
] }),
|
|
4517
|
-
/* @__PURE__ */ jsx19(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ jsx19(
|
|
4519
|
+
/* @__PURE__ */ jsx19(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ jsx19(FormattedMessage9, { id: "disconnect" }) }),
|
|
4518
4520
|
/* @__PURE__ */ jsx19(UsernameModal, { isOpen: usernameOpen, onClose: () => {
|
|
4519
4521
|
setUsernameOpen(false);
|
|
4520
4522
|
}, onSuccess: () => {
|
|
@@ -4530,7 +4532,7 @@ function UserPopover({
|
|
|
4530
4532
|
}
|
|
4531
4533
|
|
|
4532
4534
|
// src/components/LoginButton/index.tsx
|
|
4533
|
-
import { FormattedMessage as
|
|
4535
|
+
import { FormattedMessage as FormattedMessage10, useIntl as useIntl10 } from "react-intl";
|
|
4534
4536
|
import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4535
4537
|
function LoginButton({
|
|
4536
4538
|
loginRender,
|
|
@@ -4543,7 +4545,7 @@ function LoginButton({
|
|
|
4543
4545
|
walletMethods,
|
|
4544
4546
|
...props
|
|
4545
4547
|
}) {
|
|
4546
|
-
const intl =
|
|
4548
|
+
const intl = useIntl10();
|
|
4547
4549
|
const { isLogin, username } = useUserInfo();
|
|
4548
4550
|
const [loginOpen, setLoginOpen] = useState17(false);
|
|
4549
4551
|
if (!isLogin) {
|
|
@@ -4560,7 +4562,7 @@ function LoginButton({
|
|
|
4560
4562
|
),
|
|
4561
4563
|
/* @__PURE__ */ jsxs14(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
|
|
4562
4564
|
/* @__PURE__ */ jsx20(UnLoginIcon_default, {}),
|
|
4563
|
-
/* @__PURE__ */ jsx20("span", { children: /* @__PURE__ */ jsx20(
|
|
4565
|
+
/* @__PURE__ */ jsx20("span", { children: /* @__PURE__ */ jsx20(FormattedMessage10, { id: "login" }) })
|
|
4564
4566
|
] })
|
|
4565
4567
|
] });
|
|
4566
4568
|
}
|
|
@@ -4574,7 +4576,7 @@ function LoginButton({
|
|
|
4574
4576
|
|
|
4575
4577
|
// src/components/UsernameModal/index.tsx
|
|
4576
4578
|
import { useEffect as useEffect16, useMemo as useMemo10, useState as useState18 } from "react";
|
|
4577
|
-
import { FormattedMessage as
|
|
4579
|
+
import { FormattedMessage as FormattedMessage11, useIntl as useIntl11 } from "react-intl";
|
|
4578
4580
|
import { jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4579
4581
|
var ValidItem = ({
|
|
4580
4582
|
success = false,
|
|
@@ -4630,7 +4632,7 @@ function UsernameModal({
|
|
|
4630
4632
|
setIsSubmitting(false);
|
|
4631
4633
|
}
|
|
4632
4634
|
};
|
|
4633
|
-
const intl =
|
|
4635
|
+
const intl = useIntl11();
|
|
4634
4636
|
return /* @__PURE__ */ jsx21(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
|
|
4635
4637
|
id: username ? "editUsernameTitle" : "setUsernameTitle"
|
|
4636
4638
|
}), children: /* @__PURE__ */ jsxs15("div", { className: "matchid-username-box", children: [
|
|
@@ -4665,10 +4667,10 @@ function UsernameModal({
|
|
|
4665
4667
|
] }),
|
|
4666
4668
|
/* @__PURE__ */ jsx21(Button, { disabled: !isSafe, loading: isSubmitting, style: {
|
|
4667
4669
|
marginTop: isDownMd ? "36px" : "64px"
|
|
4668
|
-
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ jsx21(
|
|
4670
|
+
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ jsx21(FormattedMessage11, { id: "confirm" }) }),
|
|
4669
4671
|
/* @__PURE__ */ jsx21(Button, { style: {
|
|
4670
4672
|
marginTop: isDownMd ? "12px" : "24px"
|
|
4671
|
-
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ jsx21(
|
|
4673
|
+
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ jsx21(FormattedMessage11, { id: "cancel" }) })
|
|
4672
4674
|
] }) });
|
|
4673
4675
|
}
|
|
4674
4676
|
|
|
@@ -4724,7 +4726,7 @@ import {
|
|
|
4724
4726
|
XDEFIWalletAdapter
|
|
4725
4727
|
} from "@solana/wallet-adapter-wallets";
|
|
4726
4728
|
import "@solana/wallet-adapter-react-ui/styles.css";
|
|
4727
|
-
import { useIntl as
|
|
4729
|
+
import { useIntl as useIntl12 } from "react-intl";
|
|
4728
4730
|
|
|
4729
4731
|
// src/components/WalletModalContent/index.tsx
|
|
4730
4732
|
import { useMemo as useMemo11 } from "react";
|
|
@@ -4969,7 +4971,7 @@ function SOLConnectModal({
|
|
|
4969
4971
|
onSuccess,
|
|
4970
4972
|
...props
|
|
4971
4973
|
}) {
|
|
4972
|
-
const intl =
|
|
4974
|
+
const intl = useIntl12();
|
|
4973
4975
|
return /* @__PURE__ */ jsx23(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4974
4976
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4975
4977
|
}, {
|
|
@@ -4982,7 +4984,7 @@ function SOLModal(props) {
|
|
|
4982
4984
|
|
|
4983
4985
|
// src/components/TRONModal/index.tsx
|
|
4984
4986
|
import React8, { useEffect as useEffect19, useMemo as useMemo12, useState as useState21 } from "react";
|
|
4985
|
-
import { useIntl as
|
|
4987
|
+
import { useIntl as useIntl13 } from "react-intl";
|
|
4986
4988
|
|
|
4987
4989
|
// src/lib/tron/TronLinkAdapter.ts
|
|
4988
4990
|
var TronLinkAdapter = class {
|
|
@@ -5099,7 +5101,7 @@ function TRONConnectModal({
|
|
|
5099
5101
|
...props
|
|
5100
5102
|
}) {
|
|
5101
5103
|
const isDownMd = useDownMd();
|
|
5102
|
-
const intl =
|
|
5104
|
+
const intl = useIntl13();
|
|
5103
5105
|
const { wallets: wallets2, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
|
|
5104
5106
|
const iconMaps = {
|
|
5105
5107
|
tronlink: /* @__PURE__ */ jsx24(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
|
|
@@ -5250,7 +5252,7 @@ function TRONModal(props) {
|
|
|
5250
5252
|
|
|
5251
5253
|
// src/components/TONModal/index.tsx
|
|
5252
5254
|
import React9, { useEffect as useEffect20, useState as useState22 } from "react";
|
|
5253
|
-
import { useIntl as
|
|
5255
|
+
import { useIntl as useIntl14 } from "react-intl";
|
|
5254
5256
|
import {
|
|
5255
5257
|
TonConnectUIProvider,
|
|
5256
5258
|
useTonAddress,
|
|
@@ -5416,7 +5418,7 @@ function TONConnectModal({
|
|
|
5416
5418
|
onSuccess,
|
|
5417
5419
|
...props
|
|
5418
5420
|
}) {
|
|
5419
|
-
const intl =
|
|
5421
|
+
const intl = useIntl14();
|
|
5420
5422
|
const { endpoints, appid } = useLocalStore_default();
|
|
5421
5423
|
const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
|
|
5422
5424
|
return /* @__PURE__ */ jsx25(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
@@ -5437,7 +5439,7 @@ function TONModal(props) {
|
|
|
5437
5439
|
|
|
5438
5440
|
// src/components/BTCModal/index.tsx
|
|
5439
5441
|
import React10, { useEffect as useEffect22, useMemo as useMemo13, useState as useState24 } from "react";
|
|
5440
|
-
import { useIntl as
|
|
5442
|
+
import { useIntl as useIntl15 } from "react-intl";
|
|
5441
5443
|
|
|
5442
5444
|
// src/lib/btc/UnisatAdapter.ts
|
|
5443
5445
|
var UnisatAdapter = class {
|
|
@@ -5633,7 +5635,7 @@ function BTCConnectModal({
|
|
|
5633
5635
|
...props
|
|
5634
5636
|
}) {
|
|
5635
5637
|
const isDownMd = useDownMd();
|
|
5636
|
-
const intl =
|
|
5638
|
+
const intl = useIntl15();
|
|
5637
5639
|
const { wallets: wallets2, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
|
|
5638
5640
|
const iconMaps = {
|
|
5639
5641
|
leather: /* @__PURE__ */ jsx26(LeatherIcon, { size: isDownMd ? 36 : 40 }),
|
|
@@ -5792,14 +5794,14 @@ function BTCModal(props) {
|
|
|
5792
5794
|
|
|
5793
5795
|
// src/components/WalletModal/index.tsx
|
|
5794
5796
|
import { useMemo as useMemo14 } from "react";
|
|
5795
|
-
import { useIntl as
|
|
5797
|
+
import { useIntl as useIntl16 } from "react-intl";
|
|
5796
5798
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
5797
5799
|
function WalletConnectModal({
|
|
5798
5800
|
type,
|
|
5799
5801
|
methods: _methods,
|
|
5800
5802
|
...props
|
|
5801
5803
|
}) {
|
|
5802
|
-
const intl =
|
|
5804
|
+
const intl = useIntl16();
|
|
5803
5805
|
const { walletMap } = useWalletConfig();
|
|
5804
5806
|
const { bind, login } = useUserInfo();
|
|
5805
5807
|
const config = useAppConfig();
|
|
@@ -5938,7 +5940,7 @@ function WalletAsset({
|
|
|
5938
5940
|
// src/components/TokenSend/index.tsx
|
|
5939
5941
|
import { useEffect as useEffect24, useMemo as useMemo15, useState as useState26 } from "react";
|
|
5940
5942
|
import { defineChain as defineChain4, encodeFunctionData as encodeFunctionData2, erc20Abi as erc20Abi3, http as http6, parseUnits as parseUnits2 } from "viem";
|
|
5941
|
-
import { FormattedMessage as
|
|
5943
|
+
import { FormattedMessage as FormattedMessage12, useIntl as useIntl17 } from "react-intl";
|
|
5942
5944
|
import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5943
5945
|
function Input2({
|
|
5944
5946
|
onChange,
|
|
@@ -5971,7 +5973,7 @@ function TokenSend({
|
|
|
5971
5973
|
onBack
|
|
5972
5974
|
}) {
|
|
5973
5975
|
const { list: chainList } = useMatchChain();
|
|
5974
|
-
const intl =
|
|
5976
|
+
const intl = useIntl17();
|
|
5975
5977
|
const { createWalletClient: createWalletClient2 } = useWallet();
|
|
5976
5978
|
const isNative = token.address.toLowerCase() == NATIVE_TOKEN_ADDRESS;
|
|
5977
5979
|
const chain = useMemo15(() => {
|
|
@@ -6089,11 +6091,11 @@ function TokenSend({
|
|
|
6089
6091
|
window.removeEventListener("message", receiveMessage);
|
|
6090
6092
|
};
|
|
6091
6093
|
}, []);
|
|
6092
|
-
return /* @__PURE__ */ jsx30(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ jsx30(
|
|
6094
|
+
return /* @__PURE__ */ jsx30(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ jsx30(FormattedMessage12, { id: "send" }), onBack, children: /* @__PURE__ */ jsxs20("div", { className: `matchid-token-send-box`, children: [
|
|
6093
6095
|
/* @__PURE__ */ jsxs20("div", { className: "matchid-token-send-content", children: [
|
|
6094
6096
|
/* @__PURE__ */ jsxs20("div", { className: `matchid-token-amount-content`, children: [
|
|
6095
6097
|
/* @__PURE__ */ jsxs20("div", { className: `matchid-token-amount-header`, children: [
|
|
6096
|
-
/* @__PURE__ */ jsx30("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ jsx30(
|
|
6098
|
+
/* @__PURE__ */ jsx30("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ jsx30(FormattedMessage12, { id: "amount" }) }),
|
|
6097
6099
|
/* @__PURE__ */ jsxs20("div", { className: `matchid-token-amount-chain`, children: [
|
|
6098
6100
|
token.icon ? /* @__PURE__ */ jsx30(
|
|
6099
6101
|
"img",
|
|
@@ -6121,7 +6123,7 @@ function TokenSend({
|
|
|
6121
6123
|
),
|
|
6122
6124
|
/* @__PURE__ */ jsxs20("div", { className: `matchid-token-amount-footer`, children: [
|
|
6123
6125
|
/* @__PURE__ */ jsxs20("div", { className: `matchid-token-amount-title`, children: [
|
|
6124
|
-
/* @__PURE__ */ jsx30(
|
|
6126
|
+
/* @__PURE__ */ jsx30(FormattedMessage12, { id: "balance" }),
|
|
6125
6127
|
":"
|
|
6126
6128
|
] }),
|
|
6127
6129
|
/* @__PURE__ */ jsx30("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ jsx30(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
|
|
@@ -6129,7 +6131,7 @@ function TokenSend({
|
|
|
6129
6131
|
/* @__PURE__ */ jsx30(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
6130
6132
|
] }),
|
|
6131
6133
|
/* @__PURE__ */ jsxs20("div", { className: `matchid-token-address-content`, children: [
|
|
6132
|
-
/* @__PURE__ */ jsx30("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ jsx30("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ jsx30(
|
|
6134
|
+
/* @__PURE__ */ jsx30("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ jsx30("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ jsx30(FormattedMessage12, { id: "receiveTitle" }) }) }),
|
|
6133
6135
|
/* @__PURE__ */ jsx30(
|
|
6134
6136
|
Input2,
|
|
6135
6137
|
{
|
|
@@ -6155,14 +6157,14 @@ function TokenSend({
|
|
|
6155
6157
|
disabled: !canSend || !!txError,
|
|
6156
6158
|
onClick: onNext,
|
|
6157
6159
|
loading: loading || sending,
|
|
6158
|
-
children: /* @__PURE__ */ jsx30(
|
|
6160
|
+
children: /* @__PURE__ */ jsx30(FormattedMessage12, { id: "next" })
|
|
6159
6161
|
}
|
|
6160
6162
|
)
|
|
6161
6163
|
] }) });
|
|
6162
6164
|
}
|
|
6163
6165
|
|
|
6164
6166
|
// src/components/TokenDetail/index.tsx
|
|
6165
|
-
import { FormattedMessage as
|
|
6167
|
+
import { FormattedMessage as FormattedMessage13, useIntl as useIntl18 } from "react-intl";
|
|
6166
6168
|
import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
6167
6169
|
function TokenDetail({
|
|
6168
6170
|
onClose,
|
|
@@ -6179,7 +6181,7 @@ function TokenDetail({
|
|
|
6179
6181
|
}, onBack: props.close, zIndex: props.zIndex, token });
|
|
6180
6182
|
});
|
|
6181
6183
|
};
|
|
6182
|
-
const intl =
|
|
6184
|
+
const intl = useIntl18();
|
|
6183
6185
|
return /* @__PURE__ */ jsx31(ModalDrawer, { isOpen: true, title: intl.formatMessage({
|
|
6184
6186
|
id: "tokenDetails"
|
|
6185
6187
|
}), onClose, children: /* @__PURE__ */ jsxs21("div", { className: `matchid-token-detail`, children: [
|
|
@@ -6200,13 +6202,13 @@ function TokenDetail({
|
|
|
6200
6202
|
/* @__PURE__ */ jsx31("div", { className: "matchid-token-contract-address", children: token.address })
|
|
6201
6203
|
] })
|
|
6202
6204
|
] }),
|
|
6203
|
-
/* @__PURE__ */ jsx31(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ jsx31(
|
|
6205
|
+
/* @__PURE__ */ jsx31(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ jsx31(FormattedMessage13, { id: "send" }) })
|
|
6204
6206
|
] }) });
|
|
6205
6207
|
}
|
|
6206
6208
|
|
|
6207
6209
|
// src/components/TokenSendList/index.tsx
|
|
6208
6210
|
import { useState as useState27 } from "react";
|
|
6209
|
-
import { FormattedMessage as
|
|
6211
|
+
import { FormattedMessage as FormattedMessage14 } from "react-intl";
|
|
6210
6212
|
import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6211
6213
|
function TokenSendList({ close }) {
|
|
6212
6214
|
const isDownMd = useDownMd();
|
|
@@ -6266,7 +6268,7 @@ function TokenSendList({ close }) {
|
|
|
6266
6268
|
index
|
|
6267
6269
|
);
|
|
6268
6270
|
}) }),
|
|
6269
|
-
/* @__PURE__ */ jsx32(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ jsx32(
|
|
6271
|
+
/* @__PURE__ */ jsx32(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ jsx32(FormattedMessage14, { id: "next" }) })
|
|
6270
6272
|
] });
|
|
6271
6273
|
}
|
|
6272
6274
|
|
|
@@ -6275,7 +6277,7 @@ import InfiniteScroll from "react-infinite-scroll-component";
|
|
|
6275
6277
|
import { useEffect as useEffect25, useMemo as useMemo16, useState as useState28 } from "react";
|
|
6276
6278
|
import { decodeFunctionData, defineChain as defineChain5, formatUnits as formatUnits3 } from "viem";
|
|
6277
6279
|
import { erc20Abi as erc20Abi4 } from "viem";
|
|
6278
|
-
import { FormattedMessage as
|
|
6280
|
+
import { FormattedMessage as FormattedMessage15 } from "react-intl";
|
|
6279
6281
|
import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6280
6282
|
var Item = ({ data }) => {
|
|
6281
6283
|
const { address } = useWallet();
|
|
@@ -6408,7 +6410,7 @@ function TransactionList({
|
|
|
6408
6410
|
/* @__PURE__ */ jsx33(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
|
|
6409
6411
|
"Loading..."
|
|
6410
6412
|
] }),
|
|
6411
|
-
endMessage: items.length > 0 ? /* @__PURE__ */ jsx33("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ jsx33(
|
|
6413
|
+
endMessage: items.length > 0 ? /* @__PURE__ */ jsx33("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ jsx33(FormattedMessage15, { id: "noMoreRecords" }) }) : /* @__PURE__ */ jsx33("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ jsx33(FormattedMessage15, { id: "noRecords" }) }),
|
|
6412
6414
|
children: items.length == 0 && !hasMore ? /* @__PURE__ */ jsx33("div", { className: "mt-[150px]" }) : /* @__PURE__ */ jsx33("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ jsx33(Item, { data: item }, index)) })
|
|
6413
6415
|
}
|
|
6414
6416
|
);
|
|
@@ -6462,4 +6464,4 @@ export {
|
|
|
6462
6464
|
MatchProvider,
|
|
6463
6465
|
useMatch
|
|
6464
6466
|
};
|
|
6465
|
-
//# sourceMappingURL=chunk-
|
|
6467
|
+
//# sourceMappingURL=chunk-LRJDS2OK.mjs.map
|