@matchain/matchid-sdk-react 0.1.52 → 0.1.53-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-OL4R4SZU.mjs → chunk-2DVC6WCN.mjs} +105 -92
- package/dist/chunk-2DVC6WCN.mjs.map +1 -0
- package/dist/{chunk-KJQKG6RI.mjs → chunk-6QTW3KXN.mjs} +2 -2
- package/dist/components/index.js +61 -57
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/hooks/api/index.js +29 -26
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +3 -3
- package/dist/hooks/index.js +21 -17
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.css +18 -5
- package/dist/index.js +97 -84
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/example/dist/assets/TransportWebHID-BEu7tC0r.js +1 -0
- package/example/dist/assets/bignumber-iG7K-qxw.js +10 -0
- package/example/dist/assets/ccip-a6wQ1Vcb.js +1 -0
- package/example/dist/assets/draggabilly-CRYR_S0q.js +14 -0
- package/example/dist/assets/index--dp9m9Ep.js +1 -0
- package/example/dist/assets/index-BDTHolFv.js +569 -0
- package/example/dist/assets/index-BZl59qLb.js +179 -0
- package/example/dist/assets/index-BmMbYNHO.js +303 -0
- package/example/dist/assets/index-C7cxVRDF.js +1677 -0
- package/example/dist/assets/index-CJk171Yb.js +1 -0
- package/example/dist/assets/index-CQiBesAa.js +3 -0
- package/example/dist/assets/index-D62loNA9.js +3 -0
- package/example/dist/assets/index-DqyX3FG6.js +1 -0
- package/example/dist/assets/index-Gy3FXGhr.css +1 -0
- package/example/dist/assets/inherits_browser-BlmhoU4v.js +1 -0
- package/example/dist/assets/solanaEmbed.esm-Djn-u4Vn.js +38 -0
- package/example/dist/index.html +14 -0
- package/example/package.json +2 -1
- package/example/src/App.tsx +18 -5
- package/example/src/store/useLocalStore.ts +9 -0
- package/package.json +1 -1
- package/dist/chunk-OL4R4SZU.mjs.map +0 -1
- /package/dist/{chunk-KJQKG6RI.mjs.map → chunk-6QTW3KXN.mjs.map} +0 -0
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NumberFormatter,
|
|
3
|
+
encodeBase64,
|
|
4
|
+
formatAddress,
|
|
5
|
+
formatDate,
|
|
6
|
+
getAppClientId,
|
|
7
|
+
getVersion,
|
|
8
|
+
isInTgApp,
|
|
9
|
+
isValidEmail,
|
|
10
|
+
isValidUsername,
|
|
11
|
+
truncateAddress
|
|
12
|
+
} from "./chunk-HLUFAIFV.mjs";
|
|
1
13
|
import {
|
|
2
14
|
AlphaAvatar,
|
|
3
15
|
Button,
|
|
@@ -17,18 +29,6 @@ import {
|
|
|
17
29
|
useHash,
|
|
18
30
|
useLayout_exports
|
|
19
31
|
} from "./chunk-FB5MHLWX.mjs";
|
|
20
|
-
import {
|
|
21
|
-
NumberFormatter,
|
|
22
|
-
encodeBase64,
|
|
23
|
-
formatAddress,
|
|
24
|
-
formatDate,
|
|
25
|
-
getAppClientId,
|
|
26
|
-
getVersion,
|
|
27
|
-
isInTgApp,
|
|
28
|
-
isValidEmail,
|
|
29
|
-
isValidUsername,
|
|
30
|
-
truncateAddress
|
|
31
|
-
} from "./chunk-HLUFAIFV.mjs";
|
|
32
32
|
import {
|
|
33
33
|
ArrowDownIcon,
|
|
34
34
|
ArrowRightIcon,
|
|
@@ -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
|
|
@@ -3696,7 +3709,7 @@ function useUserInfo() {
|
|
|
3696
3709
|
locale,
|
|
3697
3710
|
refreshOverview
|
|
3698
3711
|
} = useLocalStore_default();
|
|
3699
|
-
const { setTgAppAuthCode } = useStore_default();
|
|
3712
|
+
const { setTgAppAuthCode, emailLoginKey, setEmailLoginKey } = useStore_default();
|
|
3700
3713
|
const { events, login } = useMatch();
|
|
3701
3714
|
const { open: SOLOpen } = useSOLModalStore();
|
|
3702
3715
|
const { open: TRONOpen } = useTRONModalStore();
|
|
@@ -3774,7 +3787,7 @@ function useUserInfo() {
|
|
|
3774
3787
|
case "evm":
|
|
3775
3788
|
return window.open(`${endpoints.auth}login/wallet?appid=${appid}&locale=${locale}`);
|
|
3776
3789
|
case "sol":
|
|
3777
|
-
return
|
|
3790
|
+
return window.open(`${endpoints.auth}login/sol?appid=${appid}&locale=${locale}`);
|
|
3778
3791
|
case "tron":
|
|
3779
3792
|
return TRONOpen("login");
|
|
3780
3793
|
case "ton":
|
|
@@ -3798,7 +3811,7 @@ function useUserInfo() {
|
|
|
3798
3811
|
const getLoginEmailCode = async (email) => {
|
|
3799
3812
|
const res = await getEmailCodeApi(email);
|
|
3800
3813
|
if (isSuccess(res)) {
|
|
3801
|
-
|
|
3814
|
+
setEmailLoginKey(res.data.key);
|
|
3802
3815
|
return res.data.key;
|
|
3803
3816
|
}
|
|
3804
3817
|
throw new Error(res.message);
|
|
@@ -3810,7 +3823,7 @@ function useUserInfo() {
|
|
|
3810
3823
|
try {
|
|
3811
3824
|
const obj = {
|
|
3812
3825
|
email,
|
|
3813
|
-
verification_key:
|
|
3826
|
+
verification_key: emailLoginKey,
|
|
3814
3827
|
verification_code: code
|
|
3815
3828
|
};
|
|
3816
3829
|
const res = await verifyEmailCodeApi(obj);
|
|
@@ -3962,10 +3975,10 @@ function useUserInfo() {
|
|
|
3962
3975
|
|
|
3963
3976
|
// src/components/EmailModal/StepVerify.tsx
|
|
3964
3977
|
import { useEffect as useEffect14, useMemo as useMemo8, useRef as useRef4, useState as useState13 } from "react";
|
|
3965
|
-
import { FormattedMessage as
|
|
3978
|
+
import { FormattedMessage as FormattedMessage6, useIntl as useIntl6 } from "react-intl";
|
|
3966
3979
|
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3967
3980
|
function StepVerify(props) {
|
|
3968
|
-
const intl =
|
|
3981
|
+
const intl = useIntl6();
|
|
3969
3982
|
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
3970
3983
|
const [error, setError] = useState13("");
|
|
3971
3984
|
const [code, setCode] = useState13("");
|
|
@@ -4045,7 +4058,7 @@ function StepVerify(props) {
|
|
|
4045
4058
|
/* @__PURE__ */ jsx13("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ jsx13(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
|
|
4046
4059
|
/* @__PURE__ */ jsxs9("div", { className: "matchid-email-verify-header-content", children: [
|
|
4047
4060
|
/* @__PURE__ */ jsx13("div", { className: "matchid-email-verify-header-value", children: props.email }),
|
|
4048
|
-
/* @__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" }) })
|
|
4049
4062
|
] })
|
|
4050
4063
|
] }),
|
|
4051
4064
|
/* @__PURE__ */ jsx13(Field, { label: intl.formatMessage({
|
|
@@ -4079,12 +4092,12 @@ function StepVerify(props) {
|
|
|
4079
4092
|
)
|
|
4080
4093
|
}
|
|
4081
4094
|
) }),
|
|
4082
|
-
/* @__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" }) })
|
|
4083
4096
|
] });
|
|
4084
4097
|
}
|
|
4085
4098
|
|
|
4086
4099
|
// src/components/EmailModal/index.tsx
|
|
4087
|
-
import { useIntl as
|
|
4100
|
+
import { useIntl as useIntl7 } from "react-intl";
|
|
4088
4101
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
4089
4102
|
function EmailModal({
|
|
4090
4103
|
isOpen = false,
|
|
@@ -4095,7 +4108,7 @@ function EmailModal({
|
|
|
4095
4108
|
}) {
|
|
4096
4109
|
const [step, setStep] = useState14("input");
|
|
4097
4110
|
const [emailVal, setEmailVal] = useState14("");
|
|
4098
|
-
const intl =
|
|
4111
|
+
const intl = useIntl7();
|
|
4099
4112
|
useEffect15(() => {
|
|
4100
4113
|
if (!isOpen) {
|
|
4101
4114
|
setStep("input");
|
|
@@ -4122,7 +4135,7 @@ function EmailModal({
|
|
|
4122
4135
|
|
|
4123
4136
|
// src/components/LoginBox/index.tsx
|
|
4124
4137
|
import { useMemo as useMemo9, useState as useState15 } from "react";
|
|
4125
|
-
import { FormattedMessage as
|
|
4138
|
+
import { FormattedMessage as FormattedMessage7, useIntl as useIntl8 } from "react-intl";
|
|
4126
4139
|
|
|
4127
4140
|
// src/hooks/useAppConfig.ts
|
|
4128
4141
|
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
@@ -4237,7 +4250,7 @@ function LoginBox({
|
|
|
4237
4250
|
const [emailOpen, setEmailOpen] = useState15(false);
|
|
4238
4251
|
const { login } = useUserInfo();
|
|
4239
4252
|
const [showWallet, setShowWallet] = useState15(false);
|
|
4240
|
-
const intl =
|
|
4253
|
+
const intl = useIntl8();
|
|
4241
4254
|
const isDownMd = useDownMd();
|
|
4242
4255
|
const methodMap = {
|
|
4243
4256
|
wallet: {
|
|
@@ -4353,7 +4366,7 @@ function LoginBox({
|
|
|
4353
4366
|
);
|
|
4354
4367
|
}) }),
|
|
4355
4368
|
methodConfig.methods.length > 0 && /* @__PURE__ */ jsxs10("div", { className: "matchid-login-other", children: [
|
|
4356
|
-
/* @__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" }) }),
|
|
4357
4370
|
/* @__PURE__ */ jsx15("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
4358
4371
|
return /* @__PURE__ */ jsx15(
|
|
4359
4372
|
"div",
|
|
@@ -4387,7 +4400,7 @@ function LoginBox({
|
|
|
4387
4400
|
import { useState as useState17 } from "react";
|
|
4388
4401
|
|
|
4389
4402
|
// src/components/LoginPanel/index.tsx
|
|
4390
|
-
import { FormattedMessage as
|
|
4403
|
+
import { FormattedMessage as FormattedMessage8 } from "react-intl";
|
|
4391
4404
|
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
4392
4405
|
function LoginPanel({
|
|
4393
4406
|
header,
|
|
@@ -4398,8 +4411,8 @@ function LoginPanel({
|
|
|
4398
4411
|
return /* @__PURE__ */ jsxs11("div", { className: "matchid-login-panel", children: [
|
|
4399
4412
|
header ? header : /* @__PURE__ */ jsxs11("div", { className: "matchid-login-panel-header", children: [
|
|
4400
4413
|
/* @__PURE__ */ jsxs11("div", { className: "matchid-login-panel-header-content", children: [
|
|
4401
|
-
/* @__PURE__ */ jsx16("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ jsx16(
|
|
4402
|
-
/* @__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" }) })
|
|
4403
4416
|
] }),
|
|
4404
4417
|
onClose && /* @__PURE__ */ jsx16("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ jsx16(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
|
|
4405
4418
|
] }),
|
|
@@ -4455,7 +4468,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
4455
4468
|
}
|
|
4456
4469
|
|
|
4457
4470
|
// src/components/UserPopover/index.tsx
|
|
4458
|
-
import { FormattedMessage as
|
|
4471
|
+
import { FormattedMessage as FormattedMessage9, useIntl as useIntl9 } from "react-intl";
|
|
4459
4472
|
import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4460
4473
|
function UserContent() {
|
|
4461
4474
|
const { logout, address, username } = useUserInfo();
|
|
@@ -4490,7 +4503,7 @@ function UserContent() {
|
|
|
4490
4503
|
};
|
|
4491
4504
|
const [usernameOpen, setUsernameOpen] = useState16(false);
|
|
4492
4505
|
const [copied, setCopied] = useCopyClipboard();
|
|
4493
|
-
const intl =
|
|
4506
|
+
const intl = useIntl9();
|
|
4494
4507
|
return /* @__PURE__ */ jsxs13("div", { className: "matchid-user-popover-content", children: [
|
|
4495
4508
|
/* @__PURE__ */ jsxs13("div", { className: "matchid-user-popover-list", children: [
|
|
4496
4509
|
/* @__PURE__ */ jsx19(UserItem, { onClick: () => {
|
|
@@ -4503,7 +4516,7 @@ function UserContent() {
|
|
|
4503
4516
|
id: "setUsername"
|
|
4504
4517
|
}) })
|
|
4505
4518
|
] }),
|
|
4506
|
-
/* @__PURE__ */ jsx19(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ jsx19(
|
|
4519
|
+
/* @__PURE__ */ jsx19(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ jsx19(FormattedMessage9, { id: "disconnect" }) }),
|
|
4507
4520
|
/* @__PURE__ */ jsx19(UsernameModal, { isOpen: usernameOpen, onClose: () => {
|
|
4508
4521
|
setUsernameOpen(false);
|
|
4509
4522
|
}, onSuccess: () => {
|
|
@@ -4519,7 +4532,7 @@ function UserPopover({
|
|
|
4519
4532
|
}
|
|
4520
4533
|
|
|
4521
4534
|
// src/components/LoginButton/index.tsx
|
|
4522
|
-
import { FormattedMessage as
|
|
4535
|
+
import { FormattedMessage as FormattedMessage10, useIntl as useIntl10 } from "react-intl";
|
|
4523
4536
|
import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4524
4537
|
function LoginButton({
|
|
4525
4538
|
loginRender,
|
|
@@ -4532,7 +4545,7 @@ function LoginButton({
|
|
|
4532
4545
|
walletMethods,
|
|
4533
4546
|
...props
|
|
4534
4547
|
}) {
|
|
4535
|
-
const intl =
|
|
4548
|
+
const intl = useIntl10();
|
|
4536
4549
|
const { isLogin, username } = useUserInfo();
|
|
4537
4550
|
const [loginOpen, setLoginOpen] = useState17(false);
|
|
4538
4551
|
if (!isLogin) {
|
|
@@ -4549,7 +4562,7 @@ function LoginButton({
|
|
|
4549
4562
|
),
|
|
4550
4563
|
/* @__PURE__ */ jsxs14(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
|
|
4551
4564
|
/* @__PURE__ */ jsx20(UnLoginIcon_default, {}),
|
|
4552
|
-
/* @__PURE__ */ jsx20("span", { children: /* @__PURE__ */ jsx20(
|
|
4565
|
+
/* @__PURE__ */ jsx20("span", { children: /* @__PURE__ */ jsx20(FormattedMessage10, { id: "login" }) })
|
|
4553
4566
|
] })
|
|
4554
4567
|
] });
|
|
4555
4568
|
}
|
|
@@ -4563,7 +4576,7 @@ function LoginButton({
|
|
|
4563
4576
|
|
|
4564
4577
|
// src/components/UsernameModal/index.tsx
|
|
4565
4578
|
import { useEffect as useEffect16, useMemo as useMemo10, useState as useState18 } from "react";
|
|
4566
|
-
import { FormattedMessage as
|
|
4579
|
+
import { FormattedMessage as FormattedMessage11, useIntl as useIntl11 } from "react-intl";
|
|
4567
4580
|
import { jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4568
4581
|
var ValidItem = ({
|
|
4569
4582
|
success = false,
|
|
@@ -4619,7 +4632,7 @@ function UsernameModal({
|
|
|
4619
4632
|
setIsSubmitting(false);
|
|
4620
4633
|
}
|
|
4621
4634
|
};
|
|
4622
|
-
const intl =
|
|
4635
|
+
const intl = useIntl11();
|
|
4623
4636
|
return /* @__PURE__ */ jsx21(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
|
|
4624
4637
|
id: username ? "editUsernameTitle" : "setUsernameTitle"
|
|
4625
4638
|
}), children: /* @__PURE__ */ jsxs15("div", { className: "matchid-username-box", children: [
|
|
@@ -4654,10 +4667,10 @@ function UsernameModal({
|
|
|
4654
4667
|
] }),
|
|
4655
4668
|
/* @__PURE__ */ jsx21(Button, { disabled: !isSafe, loading: isSubmitting, style: {
|
|
4656
4669
|
marginTop: isDownMd ? "36px" : "64px"
|
|
4657
|
-
}, 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" }) }),
|
|
4658
4671
|
/* @__PURE__ */ jsx21(Button, { style: {
|
|
4659
4672
|
marginTop: isDownMd ? "12px" : "24px"
|
|
4660
|
-
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ jsx21(
|
|
4673
|
+
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ jsx21(FormattedMessage11, { id: "cancel" }) })
|
|
4661
4674
|
] }) });
|
|
4662
4675
|
}
|
|
4663
4676
|
|
|
@@ -4713,7 +4726,7 @@ import {
|
|
|
4713
4726
|
XDEFIWalletAdapter
|
|
4714
4727
|
} from "@solana/wallet-adapter-wallets";
|
|
4715
4728
|
import "@solana/wallet-adapter-react-ui/styles.css";
|
|
4716
|
-
import { useIntl as
|
|
4729
|
+
import { useIntl as useIntl12 } from "react-intl";
|
|
4717
4730
|
|
|
4718
4731
|
// src/components/WalletModalContent/index.tsx
|
|
4719
4732
|
import { useMemo as useMemo11 } from "react";
|
|
@@ -4958,7 +4971,7 @@ function SOLConnectModal({
|
|
|
4958
4971
|
onSuccess,
|
|
4959
4972
|
...props
|
|
4960
4973
|
}) {
|
|
4961
|
-
const intl =
|
|
4974
|
+
const intl = useIntl12();
|
|
4962
4975
|
return /* @__PURE__ */ jsx23(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
4963
4976
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
4964
4977
|
}, {
|
|
@@ -4971,7 +4984,7 @@ function SOLModal(props) {
|
|
|
4971
4984
|
|
|
4972
4985
|
// src/components/TRONModal/index.tsx
|
|
4973
4986
|
import React8, { useEffect as useEffect19, useMemo as useMemo12, useState as useState21 } from "react";
|
|
4974
|
-
import { useIntl as
|
|
4987
|
+
import { useIntl as useIntl13 } from "react-intl";
|
|
4975
4988
|
|
|
4976
4989
|
// src/lib/tron/TronLinkAdapter.ts
|
|
4977
4990
|
var TronLinkAdapter = class {
|
|
@@ -5088,7 +5101,7 @@ function TRONConnectModal({
|
|
|
5088
5101
|
...props
|
|
5089
5102
|
}) {
|
|
5090
5103
|
const isDownMd = useDownMd();
|
|
5091
|
-
const intl =
|
|
5104
|
+
const intl = useIntl13();
|
|
5092
5105
|
const { wallets: wallets2, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
|
|
5093
5106
|
const iconMaps = {
|
|
5094
5107
|
tronlink: /* @__PURE__ */ jsx24(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
|
|
@@ -5239,7 +5252,7 @@ function TRONModal(props) {
|
|
|
5239
5252
|
|
|
5240
5253
|
// src/components/TONModal/index.tsx
|
|
5241
5254
|
import React9, { useEffect as useEffect20, useState as useState22 } from "react";
|
|
5242
|
-
import { useIntl as
|
|
5255
|
+
import { useIntl as useIntl14 } from "react-intl";
|
|
5243
5256
|
import {
|
|
5244
5257
|
TonConnectUIProvider,
|
|
5245
5258
|
useTonAddress,
|
|
@@ -5405,7 +5418,7 @@ function TONConnectModal({
|
|
|
5405
5418
|
onSuccess,
|
|
5406
5419
|
...props
|
|
5407
5420
|
}) {
|
|
5408
|
-
const intl =
|
|
5421
|
+
const intl = useIntl14();
|
|
5409
5422
|
const { endpoints, appid } = useLocalStore_default();
|
|
5410
5423
|
const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
|
|
5411
5424
|
return /* @__PURE__ */ jsx25(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
@@ -5426,7 +5439,7 @@ function TONModal(props) {
|
|
|
5426
5439
|
|
|
5427
5440
|
// src/components/BTCModal/index.tsx
|
|
5428
5441
|
import React10, { useEffect as useEffect22, useMemo as useMemo13, useState as useState24 } from "react";
|
|
5429
|
-
import { useIntl as
|
|
5442
|
+
import { useIntl as useIntl15 } from "react-intl";
|
|
5430
5443
|
|
|
5431
5444
|
// src/lib/btc/UnisatAdapter.ts
|
|
5432
5445
|
var UnisatAdapter = class {
|
|
@@ -5622,7 +5635,7 @@ function BTCConnectModal({
|
|
|
5622
5635
|
...props
|
|
5623
5636
|
}) {
|
|
5624
5637
|
const isDownMd = useDownMd();
|
|
5625
|
-
const intl =
|
|
5638
|
+
const intl = useIntl15();
|
|
5626
5639
|
const { wallets: wallets2, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
|
|
5627
5640
|
const iconMaps = {
|
|
5628
5641
|
leather: /* @__PURE__ */ jsx26(LeatherIcon, { size: isDownMd ? 36 : 40 }),
|
|
@@ -5781,14 +5794,14 @@ function BTCModal(props) {
|
|
|
5781
5794
|
|
|
5782
5795
|
// src/components/WalletModal/index.tsx
|
|
5783
5796
|
import { useMemo as useMemo14 } from "react";
|
|
5784
|
-
import { useIntl as
|
|
5797
|
+
import { useIntl as useIntl16 } from "react-intl";
|
|
5785
5798
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
5786
5799
|
function WalletConnectModal({
|
|
5787
5800
|
type,
|
|
5788
5801
|
methods: _methods,
|
|
5789
5802
|
...props
|
|
5790
5803
|
}) {
|
|
5791
|
-
const intl =
|
|
5804
|
+
const intl = useIntl16();
|
|
5792
5805
|
const { walletMap } = useWalletConfig();
|
|
5793
5806
|
const { bind, login } = useUserInfo();
|
|
5794
5807
|
const config = useAppConfig();
|
|
@@ -5927,7 +5940,7 @@ function WalletAsset({
|
|
|
5927
5940
|
// src/components/TokenSend/index.tsx
|
|
5928
5941
|
import { useEffect as useEffect24, useMemo as useMemo15, useState as useState26 } from "react";
|
|
5929
5942
|
import { defineChain as defineChain4, encodeFunctionData as encodeFunctionData2, erc20Abi as erc20Abi3, http as http6, parseUnits as parseUnits2 } from "viem";
|
|
5930
|
-
import { FormattedMessage as
|
|
5943
|
+
import { FormattedMessage as FormattedMessage12, useIntl as useIntl17 } from "react-intl";
|
|
5931
5944
|
import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5932
5945
|
function Input2({
|
|
5933
5946
|
onChange,
|
|
@@ -5960,7 +5973,7 @@ function TokenSend({
|
|
|
5960
5973
|
onBack
|
|
5961
5974
|
}) {
|
|
5962
5975
|
const { list: chainList } = useMatchChain();
|
|
5963
|
-
const intl =
|
|
5976
|
+
const intl = useIntl17();
|
|
5964
5977
|
const { createWalletClient: createWalletClient2 } = useWallet();
|
|
5965
5978
|
const isNative = token.address.toLowerCase() == NATIVE_TOKEN_ADDRESS;
|
|
5966
5979
|
const chain = useMemo15(() => {
|
|
@@ -6078,11 +6091,11 @@ function TokenSend({
|
|
|
6078
6091
|
window.removeEventListener("message", receiveMessage);
|
|
6079
6092
|
};
|
|
6080
6093
|
}, []);
|
|
6081
|
-
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: [
|
|
6082
6095
|
/* @__PURE__ */ jsxs20("div", { className: "matchid-token-send-content", children: [
|
|
6083
6096
|
/* @__PURE__ */ jsxs20("div", { className: `matchid-token-amount-content`, children: [
|
|
6084
6097
|
/* @__PURE__ */ jsxs20("div", { className: `matchid-token-amount-header`, children: [
|
|
6085
|
-
/* @__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" }) }),
|
|
6086
6099
|
/* @__PURE__ */ jsxs20("div", { className: `matchid-token-amount-chain`, children: [
|
|
6087
6100
|
token.icon ? /* @__PURE__ */ jsx30(
|
|
6088
6101
|
"img",
|
|
@@ -6110,7 +6123,7 @@ function TokenSend({
|
|
|
6110
6123
|
),
|
|
6111
6124
|
/* @__PURE__ */ jsxs20("div", { className: `matchid-token-amount-footer`, children: [
|
|
6112
6125
|
/* @__PURE__ */ jsxs20("div", { className: `matchid-token-amount-title`, children: [
|
|
6113
|
-
/* @__PURE__ */ jsx30(
|
|
6126
|
+
/* @__PURE__ */ jsx30(FormattedMessage12, { id: "balance" }),
|
|
6114
6127
|
":"
|
|
6115
6128
|
] }),
|
|
6116
6129
|
/* @__PURE__ */ jsx30("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ jsx30(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
|
|
@@ -6118,7 +6131,7 @@ function TokenSend({
|
|
|
6118
6131
|
/* @__PURE__ */ jsx30(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
6119
6132
|
] }),
|
|
6120
6133
|
/* @__PURE__ */ jsxs20("div", { className: `matchid-token-address-content`, children: [
|
|
6121
|
-
/* @__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" }) }) }),
|
|
6122
6135
|
/* @__PURE__ */ jsx30(
|
|
6123
6136
|
Input2,
|
|
6124
6137
|
{
|
|
@@ -6144,14 +6157,14 @@ function TokenSend({
|
|
|
6144
6157
|
disabled: !canSend || !!txError,
|
|
6145
6158
|
onClick: onNext,
|
|
6146
6159
|
loading: loading || sending,
|
|
6147
|
-
children: /* @__PURE__ */ jsx30(
|
|
6160
|
+
children: /* @__PURE__ */ jsx30(FormattedMessage12, { id: "next" })
|
|
6148
6161
|
}
|
|
6149
6162
|
)
|
|
6150
6163
|
] }) });
|
|
6151
6164
|
}
|
|
6152
6165
|
|
|
6153
6166
|
// src/components/TokenDetail/index.tsx
|
|
6154
|
-
import { FormattedMessage as
|
|
6167
|
+
import { FormattedMessage as FormattedMessage13, useIntl as useIntl18 } from "react-intl";
|
|
6155
6168
|
import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
6156
6169
|
function TokenDetail({
|
|
6157
6170
|
onClose,
|
|
@@ -6168,7 +6181,7 @@ function TokenDetail({
|
|
|
6168
6181
|
}, onBack: props.close, zIndex: props.zIndex, token });
|
|
6169
6182
|
});
|
|
6170
6183
|
};
|
|
6171
|
-
const intl =
|
|
6184
|
+
const intl = useIntl18();
|
|
6172
6185
|
return /* @__PURE__ */ jsx31(ModalDrawer, { isOpen: true, title: intl.formatMessage({
|
|
6173
6186
|
id: "tokenDetails"
|
|
6174
6187
|
}), onClose, children: /* @__PURE__ */ jsxs21("div", { className: `matchid-token-detail`, children: [
|
|
@@ -6189,13 +6202,13 @@ function TokenDetail({
|
|
|
6189
6202
|
/* @__PURE__ */ jsx31("div", { className: "matchid-token-contract-address", children: token.address })
|
|
6190
6203
|
] })
|
|
6191
6204
|
] }),
|
|
6192
|
-
/* @__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" }) })
|
|
6193
6206
|
] }) });
|
|
6194
6207
|
}
|
|
6195
6208
|
|
|
6196
6209
|
// src/components/TokenSendList/index.tsx
|
|
6197
6210
|
import { useState as useState27 } from "react";
|
|
6198
|
-
import { FormattedMessage as
|
|
6211
|
+
import { FormattedMessage as FormattedMessage14 } from "react-intl";
|
|
6199
6212
|
import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6200
6213
|
function TokenSendList({ close }) {
|
|
6201
6214
|
const isDownMd = useDownMd();
|
|
@@ -6255,7 +6268,7 @@ function TokenSendList({ close }) {
|
|
|
6255
6268
|
index
|
|
6256
6269
|
);
|
|
6257
6270
|
}) }),
|
|
6258
|
-
/* @__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" }) })
|
|
6259
6272
|
] });
|
|
6260
6273
|
}
|
|
6261
6274
|
|
|
@@ -6264,7 +6277,7 @@ import InfiniteScroll from "react-infinite-scroll-component";
|
|
|
6264
6277
|
import { useEffect as useEffect25, useMemo as useMemo16, useState as useState28 } from "react";
|
|
6265
6278
|
import { decodeFunctionData, defineChain as defineChain5, formatUnits as formatUnits3 } from "viem";
|
|
6266
6279
|
import { erc20Abi as erc20Abi4 } from "viem";
|
|
6267
|
-
import { FormattedMessage as
|
|
6280
|
+
import { FormattedMessage as FormattedMessage15 } from "react-intl";
|
|
6268
6281
|
import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6269
6282
|
var Item = ({ data }) => {
|
|
6270
6283
|
const { address } = useWallet();
|
|
@@ -6397,7 +6410,7 @@ function TransactionList({
|
|
|
6397
6410
|
/* @__PURE__ */ jsx33(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
|
|
6398
6411
|
"Loading..."
|
|
6399
6412
|
] }),
|
|
6400
|
-
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" }) }),
|
|
6401
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)) })
|
|
6402
6415
|
}
|
|
6403
6416
|
);
|
|
@@ -6451,4 +6464,4 @@ export {
|
|
|
6451
6464
|
MatchProvider,
|
|
6452
6465
|
useMatch
|
|
6453
6466
|
};
|
|
6454
|
-
//# sourceMappingURL=chunk-
|
|
6467
|
+
//# sourceMappingURL=chunk-2DVC6WCN.mjs.map
|