@matchain/matchid-sdk-react 0.1.55-alpha.9 → 0.1.56-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/api.d.mts +2 -2
- package/dist/api.d.ts +2 -2
- package/dist/api.js +11 -12
- package/dist/api.js.map +1 -1
- package/dist/api.mjs +2 -2
- package/dist/assets/lottie.d.mts +1 -1
- package/dist/assets/lottie.d.ts +1 -1
- package/dist/chains.d.mts +1 -1
- package/dist/chains.d.ts +1 -1
- package/dist/{chunk-2T4RY5BM.mjs → chunk-FGJ25ONR.mjs} +285 -277
- package/dist/chunk-FGJ25ONR.mjs.map +1 -0
- package/dist/{chunk-GCIXXSIH.mjs → chunk-SG45XKMV.mjs} +2 -2
- package/dist/components.d.mts +3 -3
- package/dist/components.d.ts +3 -3
- package/dist/components.js +295 -287
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +1 -1
- package/dist/hooks.d.mts +4 -2
- package/dist/hooks.d.ts +4 -2
- package/dist/hooks.js +103 -100
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/icon.d.mts +2 -2
- package/dist/icon.d.ts +2 -2
- package/dist/{index-Bx7ztInz.d.ts → index-4dZbgWG2.d.ts} +1 -1
- package/dist/{index-DXRGMAbv.d.mts → index-B50DU_xT.d.mts} +4 -4
- package/dist/{index-DXRGMAbv.d.ts → index-B50DU_xT.d.ts} +4 -4
- package/dist/{index-D6wTVWuu.d.mts → index-BKSGbw7b.d.mts} +3 -3
- package/dist/{index-DL0LMDQ0.d.mts → index-BXbfmVoU.d.mts} +2 -2
- package/dist/{index-BTO2pJRz.d.ts → index-BtjgRcNJ.d.ts} +3 -3
- package/dist/{index-DY5CjOq2.d.ts → index-C82WIWvx.d.ts} +5 -5
- package/dist/{index-DysgDUCb.d.mts → index-CDTTHSh0.d.mts} +14 -14
- package/dist/{index-DysgDUCb.d.ts → index-CDTTHSh0.d.ts} +14 -14
- package/dist/{index-BjdOd1te.d.mts → index-CHG4-0Z1.d.mts} +987 -981
- package/dist/{index-8h2kA48e.d.ts → index-CsUEaGtM.d.ts} +2 -2
- package/dist/{index-CopoHLm5.d.ts → index-CwHXzvvB.d.ts} +1 -1
- package/dist/{index-DueNjDv_.d.ts → index-D1Ep9UMx.d.ts} +987 -981
- package/dist/{index-HYPgwvkU.d.mts → index-D7E317WV.d.mts} +5 -5
- package/dist/{index-B-u8_Lcy.d.ts → index-DK7l3lsH.d.ts} +13 -11
- package/dist/{index-BW1GRpQ3.d.mts → index-FKxw4Vaa.d.mts} +1 -1
- package/dist/{index-D2hhRO2j.d.mts → index-TjbO7d74.d.mts} +1 -1
- package/dist/{index-Ba8t2zs6.d.mts → index-YPRyEYt6.d.mts} +13 -11
- package/dist/index.d.mts +20 -20
- package/dist/index.d.ts +20 -20
- package/dist/index.js +101 -93
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{types-Ch54HuTY.d.mts → types-DEsY_CPH.d.mts} +1 -1
- package/dist/{types-Ch54HuTY.d.ts → types-DEsY_CPH.d.ts} +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/ui.d.mts +3 -4
- package/dist/ui.d.ts +3 -4
- package/dist/ui.js +13 -10
- package/dist/ui.js.map +1 -1
- package/dist/ui.mjs +3 -3
- package/example/package.json +3 -0
- package/example/src/App.tsx +7 -0
- package/example/src/pages/User/index.tsx +49 -4
- package/example/src/store/useStore.ts +14 -0
- package/example/yarn.lock +15 -0
- package/package.json +2 -3
- package/dist/chunk-2T4RY5BM.mjs.map +0 -1
- /package/dist/{chunk-GCIXXSIH.mjs.map → chunk-SG45XKMV.mjs.map} +0 -0
package/dist/components.mjs
CHANGED
package/dist/hooks.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { c as useCopyClipboard, n as useLayout, f as useMatchChain, a as useMatchEvents, g as useMatchWallet, k as useMatchWalletAssetList, j as useMatchWalletAssets, h as useMatchWalletRecords, d as useModal, l as useReceipt, e as useToast, m as useTransaction, u as useUserInfo, b as useWallet } from './index-
|
|
1
|
+
export { c as useCopyClipboard, n as useLayout, f as useMatchChain, a as useMatchEvents, g as useMatchWallet, k as useMatchWalletAssetList, j as useMatchWalletAssets, h as useMatchWalletRecords, d as useModal, l as useReceipt, e as useToast, m as useTransaction, u as useUserInfo, b as useWallet } from './index-CHG4-0Z1.mjs';
|
|
2
2
|
import './request-B0CyrGFT.mjs';
|
|
3
|
-
import './types-
|
|
3
|
+
import './types-DEsY_CPH.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@tanstack/react-query/src/types';
|
|
6
6
|
import 'viem';
|
|
@@ -8,4 +8,6 @@ import 'viem/types/misc';
|
|
|
8
8
|
import 'abitype';
|
|
9
9
|
import 'react/jsx-runtime';
|
|
10
10
|
import 'viem/_types/actions/siwe/verifySiweMessage';
|
|
11
|
+
import 'viem/_types/utils/ccip';
|
|
12
|
+
import 'viem/chains';
|
|
11
13
|
import '@tanstack/react-query';
|
package/dist/hooks.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { c as useCopyClipboard, n as useLayout, f as useMatchChain, a as useMatchEvents, g as useMatchWallet, k as useMatchWalletAssetList, j as useMatchWalletAssets, h as useMatchWalletRecords, d as useModal, l as useReceipt, e as useToast, m as useTransaction, u as useUserInfo, b as useWallet } from './index-
|
|
1
|
+
export { c as useCopyClipboard, n as useLayout, f as useMatchChain, a as useMatchEvents, g as useMatchWallet, k as useMatchWalletAssetList, j as useMatchWalletAssets, h as useMatchWalletRecords, d as useModal, l as useReceipt, e as useToast, m as useTransaction, u as useUserInfo, b as useWallet } from './index-D1Ep9UMx.js';
|
|
2
2
|
import './request-B0CyrGFT.js';
|
|
3
|
-
import './types-
|
|
3
|
+
import './types-DEsY_CPH.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@tanstack/react-query/src/types';
|
|
6
6
|
import 'viem';
|
|
@@ -8,4 +8,6 @@ import 'viem/types/misc';
|
|
|
8
8
|
import 'abitype';
|
|
9
9
|
import 'react/jsx-runtime';
|
|
10
10
|
import 'viem/_types/actions/siwe/verifySiweMessage';
|
|
11
|
+
import 'viem/_types/utils/ccip';
|
|
12
|
+
import 'viem/chains';
|
|
11
13
|
import '@tanstack/react-query';
|
package/dist/hooks.js
CHANGED
|
@@ -1187,7 +1187,7 @@ function HashPanel({
|
|
|
1187
1187
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: `matchid-hashpanel-status`, style: {
|
|
1188
1188
|
color: statusValue.color
|
|
1189
1189
|
}, children: statusValue.text }),
|
|
1190
|
-
statusValue.lottie ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
1190
|
+
statusValue.lottie ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Lottie_default, { animationData: statusValue.lottie, style: {
|
|
1191
1191
|
width: "96px",
|
|
1192
1192
|
height: "96px"
|
|
1193
1193
|
} }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("img", { src: statusValue.icon, alt: statusValue.text, className: `matchid-hashpanel-img` }),
|
|
@@ -1265,14 +1265,17 @@ var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
|
1265
1265
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
1266
1266
|
|
|
1267
1267
|
// src/ui/Lottie/index.tsx
|
|
1268
|
-
var import_lottie_react =
|
|
1269
|
-
var
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
}
|
|
1268
|
+
var import_lottie_react = require("lottie-react");
|
|
1269
|
+
var LazyLottie = (props) => {
|
|
1270
|
+
const options = {
|
|
1271
|
+
animationData: props.animationData,
|
|
1272
|
+
loop: true,
|
|
1273
|
+
autoplay: true
|
|
1274
|
+
};
|
|
1275
|
+
const { View } = (0, import_lottie_react.useLottie)(options, props.style);
|
|
1276
|
+
return View;
|
|
1277
|
+
};
|
|
1278
|
+
var Lottie_default = LazyLottie;
|
|
1276
1279
|
|
|
1277
1280
|
// src/components/EVMModal/index.tsx
|
|
1278
1281
|
var import_react17 = require("react");
|
|
@@ -1310,7 +1313,7 @@ var import_react_intl10 = require("react-intl");
|
|
|
1310
1313
|
|
|
1311
1314
|
// src/components/WalletModalContent/index.tsx
|
|
1312
1315
|
var import_react15 = require("react");
|
|
1313
|
-
var
|
|
1316
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
1314
1317
|
|
|
1315
1318
|
// src/components/EVMModal/index.tsx
|
|
1316
1319
|
var import_rainbowkit = require("@rainbow-me/rainbowkit");
|
|
@@ -1327,7 +1330,7 @@ var import_ethers = require("ethers");
|
|
|
1327
1330
|
// src/components/EVMModal/index.tsx
|
|
1328
1331
|
var import_siwe = require("siwe");
|
|
1329
1332
|
var import_styles = require("@rainbow-me/rainbowkit/styles.css");
|
|
1330
|
-
var
|
|
1333
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
1331
1334
|
|
|
1332
1335
|
// src/components/TRONModal/index.tsx
|
|
1333
1336
|
var import_react19 = __toESM(require("react"));
|
|
@@ -1337,13 +1340,13 @@ var import_react_intl11 = require("react-intl");
|
|
|
1337
1340
|
var import_react18 = require("react");
|
|
1338
1341
|
|
|
1339
1342
|
// src/components/TRONModal/index.tsx
|
|
1340
|
-
var
|
|
1343
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
1341
1344
|
|
|
1342
1345
|
// src/components/TONModal/index.tsx
|
|
1343
1346
|
var import_react20 = __toESM(require("react"));
|
|
1344
1347
|
var import_react_intl12 = require("react-intl");
|
|
1345
1348
|
var import_ui_react = require("@tonconnect/ui-react");
|
|
1346
|
-
var
|
|
1349
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
1347
1350
|
|
|
1348
1351
|
// src/components/BTCModal/index.tsx
|
|
1349
1352
|
var import_react22 = __toESM(require("react"));
|
|
@@ -1356,16 +1359,16 @@ var import_sats_connect = require("sats-connect");
|
|
|
1356
1359
|
var import_react21 = require("react");
|
|
1357
1360
|
|
|
1358
1361
|
// src/components/BTCModal/index.tsx
|
|
1359
|
-
var
|
|
1362
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
1360
1363
|
|
|
1361
1364
|
// src/components/WalletModal/index.tsx
|
|
1362
1365
|
var import_react23 = require("react");
|
|
1363
1366
|
var import_react_intl14 = require("react-intl");
|
|
1364
|
-
var
|
|
1367
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
1365
1368
|
|
|
1366
1369
|
// src/components/AlphaAvatar/index.tsx
|
|
1367
1370
|
var import_react24 = require("react");
|
|
1368
|
-
var
|
|
1371
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
1369
1372
|
function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
1370
1373
|
const [avatar, setAvatar] = (0, import_react24.useState)(void 0);
|
|
1371
1374
|
(0, import_react24.useEffect)(() => {
|
|
@@ -1374,7 +1377,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
1374
1377
|
setAvatar(char);
|
|
1375
1378
|
}
|
|
1376
1379
|
}, [name]);
|
|
1377
|
-
return /* @__PURE__ */ (0,
|
|
1380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
1378
1381
|
width: size,
|
|
1379
1382
|
height: size,
|
|
1380
1383
|
fontSize: Math.ceil(size / 2)
|
|
@@ -1382,13 +1385,13 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
1382
1385
|
}
|
|
1383
1386
|
|
|
1384
1387
|
// src/components/WalletAsset/index.tsx
|
|
1385
|
-
var
|
|
1388
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
1386
1389
|
|
|
1387
1390
|
// src/components/TokenSend/index.tsx
|
|
1388
1391
|
var import_react25 = require("react");
|
|
1389
1392
|
var import_viem2 = require("viem");
|
|
1390
1393
|
var import_react_intl15 = require("react-intl");
|
|
1391
|
-
var
|
|
1394
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
1392
1395
|
function Input2({
|
|
1393
1396
|
onChange,
|
|
1394
1397
|
placeholder,
|
|
@@ -1398,8 +1401,8 @@ function Input2({
|
|
|
1398
1401
|
error,
|
|
1399
1402
|
size = "df"
|
|
1400
1403
|
}) {
|
|
1401
|
-
return /* @__PURE__ */ (0,
|
|
1402
|
-
/* @__PURE__ */ (0,
|
|
1404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
|
|
1405
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
1403
1406
|
"input",
|
|
1404
1407
|
{
|
|
1405
1408
|
placeholder,
|
|
@@ -1410,7 +1413,7 @@ function Input2({
|
|
|
1410
1413
|
className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
|
|
1411
1414
|
}
|
|
1412
1415
|
),
|
|
1413
|
-
error && /* @__PURE__ */ (0,
|
|
1416
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "matchid-token-input-error-text", children: error })
|
|
1414
1417
|
] });
|
|
1415
1418
|
}
|
|
1416
1419
|
function TokenSend({
|
|
@@ -1538,24 +1541,24 @@ function TokenSend({
|
|
|
1538
1541
|
window.removeEventListener("message", receiveMessage);
|
|
1539
1542
|
};
|
|
1540
1543
|
}, []);
|
|
1541
|
-
return /* @__PURE__ */ (0,
|
|
1542
|
-
/* @__PURE__ */ (0,
|
|
1543
|
-
/* @__PURE__ */ (0,
|
|
1544
|
-
/* @__PURE__ */ (0,
|
|
1545
|
-
/* @__PURE__ */ (0,
|
|
1546
|
-
/* @__PURE__ */ (0,
|
|
1547
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
1544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl15.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-token-send-box`, children: [
|
|
1545
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
1546
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-token-amount-content`, children: [
|
|
1547
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-token-amount-header`, children: [
|
|
1548
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl15.FormattedMessage, { id: "amount" }) }),
|
|
1549
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
|
|
1550
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
1548
1551
|
"img",
|
|
1549
1552
|
{
|
|
1550
1553
|
src: token?.icon,
|
|
1551
1554
|
alt: token?.symbol,
|
|
1552
1555
|
className: `matchid-token-amount-chain-icon`
|
|
1553
1556
|
}
|
|
1554
|
-
) : /* @__PURE__ */ (0,
|
|
1555
|
-
/* @__PURE__ */ (0,
|
|
1557
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
|
|
1558
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: token?.symbol })
|
|
1556
1559
|
] })
|
|
1557
1560
|
] }),
|
|
1558
|
-
/* @__PURE__ */ (0,
|
|
1561
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
1559
1562
|
Input2,
|
|
1560
1563
|
{
|
|
1561
1564
|
type: "text",
|
|
@@ -1568,18 +1571,18 @@ function TokenSend({
|
|
|
1568
1571
|
error: error.amount || txError
|
|
1569
1572
|
}
|
|
1570
1573
|
),
|
|
1571
|
-
/* @__PURE__ */ (0,
|
|
1572
|
-
/* @__PURE__ */ (0,
|
|
1573
|
-
/* @__PURE__ */ (0,
|
|
1574
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
|
|
1575
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-token-amount-title`, children: [
|
|
1576
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl15.FormattedMessage, { id: "balance" }),
|
|
1574
1577
|
":"
|
|
1575
1578
|
] }),
|
|
1576
|
-
/* @__PURE__ */ (0,
|
|
1579
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
|
|
1577
1580
|
] }),
|
|
1578
|
-
/* @__PURE__ */ (0,
|
|
1581
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
1579
1582
|
] }),
|
|
1580
|
-
/* @__PURE__ */ (0,
|
|
1581
|
-
/* @__PURE__ */ (0,
|
|
1582
|
-
/* @__PURE__ */ (0,
|
|
1583
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `matchid-token-address-content`, children: [
|
|
1584
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl15.FormattedMessage, { id: "receiveTitle" }) }) }),
|
|
1585
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
1583
1586
|
Input2,
|
|
1584
1587
|
{
|
|
1585
1588
|
type: "text",
|
|
@@ -1595,7 +1598,7 @@ function TokenSend({
|
|
|
1595
1598
|
)
|
|
1596
1599
|
] })
|
|
1597
1600
|
] }),
|
|
1598
|
-
/* @__PURE__ */ (0,
|
|
1601
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
1599
1602
|
Button,
|
|
1600
1603
|
{
|
|
1601
1604
|
size: "lg",
|
|
@@ -1604,7 +1607,7 @@ function TokenSend({
|
|
|
1604
1607
|
disabled: !canSend || !!txError,
|
|
1605
1608
|
onClick: onNext,
|
|
1606
1609
|
loading: loading || sending,
|
|
1607
|
-
children: /* @__PURE__ */ (0,
|
|
1610
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_intl15.FormattedMessage, { id: "next" })
|
|
1608
1611
|
}
|
|
1609
1612
|
)
|
|
1610
1613
|
] }) });
|
|
@@ -1612,12 +1615,12 @@ function TokenSend({
|
|
|
1612
1615
|
|
|
1613
1616
|
// src/components/TokenDetail/index.tsx
|
|
1614
1617
|
var import_react_intl16 = require("react-intl");
|
|
1615
|
-
var
|
|
1618
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
1616
1619
|
|
|
1617
1620
|
// src/components/TokenSendList/index.tsx
|
|
1618
1621
|
var import_react26 = require("react");
|
|
1619
1622
|
var import_react_intl17 = require("react-intl");
|
|
1620
|
-
var
|
|
1623
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
1621
1624
|
function TokenSendList({ close }) {
|
|
1622
1625
|
const isDownMd = useDownMd();
|
|
1623
1626
|
const walletAssets = useMatchWalletAssets();
|
|
@@ -1629,16 +1632,16 @@ function TokenSendList({ close }) {
|
|
|
1629
1632
|
const modal = useModal();
|
|
1630
1633
|
const onNext = () => {
|
|
1631
1634
|
checked && modal.show((props) => {
|
|
1632
|
-
return /* @__PURE__ */ (0,
|
|
1635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TokenSend, { onClose: () => {
|
|
1633
1636
|
props.close();
|
|
1634
1637
|
close();
|
|
1635
1638
|
}, onBack: props.close, zIndex: props.zIndex, token: checked });
|
|
1636
1639
|
});
|
|
1637
1640
|
};
|
|
1638
|
-
return /* @__PURE__ */ (0,
|
|
1639
|
-
/* @__PURE__ */ (0,
|
|
1641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-token-send-list-box", children: [
|
|
1642
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
1640
1643
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
1641
|
-
return /* @__PURE__ */ (0,
|
|
1644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
1642
1645
|
"div",
|
|
1643
1646
|
{
|
|
1644
1647
|
className: `matchid-token-send-item ${checked?.address == n.address ? "matchid-token-send-chekced" : ""}`,
|
|
@@ -1646,10 +1649,10 @@ function TokenSendList({ close }) {
|
|
|
1646
1649
|
setChecked(n);
|
|
1647
1650
|
},
|
|
1648
1651
|
children: [
|
|
1649
|
-
/* @__PURE__ */ (0,
|
|
1650
|
-
/* @__PURE__ */ (0,
|
|
1651
|
-
/* @__PURE__ */ (0,
|
|
1652
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
1652
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
|
|
1653
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
1654
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "matchid-token-send-logo", children: [
|
|
1655
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
1653
1656
|
AlphaAvatar2,
|
|
1654
1657
|
{
|
|
1655
1658
|
className: `matchid-token-send-icon`,
|
|
@@ -1657,7 +1660,7 @@ function TokenSendList({ close }) {
|
|
|
1657
1660
|
name: n.symbol || n.name || ""
|
|
1658
1661
|
}
|
|
1659
1662
|
),
|
|
1660
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
1663
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
1661
1664
|
"img",
|
|
1662
1665
|
{
|
|
1663
1666
|
src: chain.iconUrl,
|
|
@@ -1666,9 +1669,9 @@ function TokenSendList({ close }) {
|
|
|
1666
1669
|
}
|
|
1667
1670
|
)
|
|
1668
1671
|
] }),
|
|
1669
|
-
/* @__PURE__ */ (0,
|
|
1670
|
-
/* @__PURE__ */ (0,
|
|
1671
|
-
/* @__PURE__ */ (0,
|
|
1672
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: `matchid-token-send-info`, children: [
|
|
1673
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
|
|
1674
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
|
|
1672
1675
|
] })
|
|
1673
1676
|
] })
|
|
1674
1677
|
]
|
|
@@ -1676,7 +1679,7 @@ function TokenSendList({ close }) {
|
|
|
1676
1679
|
index
|
|
1677
1680
|
);
|
|
1678
1681
|
}) }),
|
|
1679
|
-
/* @__PURE__ */ (0,
|
|
1682
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react_intl17.FormattedMessage, { id: "next" }) })
|
|
1680
1683
|
] });
|
|
1681
1684
|
}
|
|
1682
1685
|
|
|
@@ -1744,12 +1747,12 @@ var useContractStore_default = useContractStore;
|
|
|
1744
1747
|
|
|
1745
1748
|
// src/components/TransactionList/index.tsx
|
|
1746
1749
|
var import_react_intl18 = require("react-intl");
|
|
1747
|
-
var
|
|
1750
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
1748
1751
|
|
|
1749
1752
|
// src/components/CEXBindModal/index.tsx
|
|
1750
1753
|
var import_react28 = require("react");
|
|
1751
1754
|
var import_react_intl19 = require("react-intl");
|
|
1752
|
-
var
|
|
1755
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
1753
1756
|
|
|
1754
1757
|
// src/context/BusinessProvider.tsx
|
|
1755
1758
|
var import_react_query3 = require("@tanstack/react-query");
|
|
@@ -1767,12 +1770,12 @@ var useStore = (0, import_zustand4.create)((set) => ({
|
|
|
1767
1770
|
var useStore_default = useStore;
|
|
1768
1771
|
|
|
1769
1772
|
// src/context/BusinessProvider.tsx
|
|
1770
|
-
var
|
|
1773
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
1771
1774
|
|
|
1772
1775
|
// src/context/ModalContext.tsx
|
|
1773
1776
|
var import_react29 = __toESM(require("react"));
|
|
1774
1777
|
var import_react_dom = require("react-dom");
|
|
1775
|
-
var
|
|
1778
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
1776
1779
|
var ModalContext = (0, import_react29.createContext)(null);
|
|
1777
1780
|
function useModal() {
|
|
1778
1781
|
const context = (0, import_react29.useContext)(ModalContext);
|
|
@@ -1785,7 +1788,7 @@ function useModal() {
|
|
|
1785
1788
|
// src/context/ToastContext.tsx
|
|
1786
1789
|
var import_react30 = require("react");
|
|
1787
1790
|
var import_react_dom2 = require("react-dom");
|
|
1788
|
-
var
|
|
1791
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
1789
1792
|
var ToastContext = (0, import_react30.createContext)(null);
|
|
1790
1793
|
function useToast() {
|
|
1791
1794
|
const context = (0, import_react30.useContext)(ToastContext);
|
|
@@ -1796,7 +1799,7 @@ function useToast() {
|
|
|
1796
1799
|
}
|
|
1797
1800
|
|
|
1798
1801
|
// src/context/index.tsx
|
|
1799
|
-
var
|
|
1802
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
1800
1803
|
|
|
1801
1804
|
// src/hooks/useWalletInit.ts
|
|
1802
1805
|
var import_react31 = require("react");
|
|
@@ -1876,7 +1879,7 @@ var matchTest = /* @__PURE__ */ (0, import_viem6.defineChain)({
|
|
|
1876
1879
|
|
|
1877
1880
|
// src/MatchContext.tsx
|
|
1878
1881
|
var import_wagmi3 = require("wagmi");
|
|
1879
|
-
var
|
|
1882
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
1880
1883
|
var queryClient = new import_react_query4.QueryClient();
|
|
1881
1884
|
var wagmiConfig = (0, import_rainbowkit2.getDefaultConfig)({
|
|
1882
1885
|
appName: "MatchID",
|
|
@@ -2258,7 +2261,7 @@ var useTransactionStore = (0, import_zustand5.create)((0, import_middleware3.dev
|
|
|
2258
2261
|
var useTransactionStore_default = useTransactionStore;
|
|
2259
2262
|
|
|
2260
2263
|
// src/hooks/useWallet.tsx
|
|
2261
|
-
var
|
|
2264
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
2262
2265
|
var AppClientId2 = "react-sdk-" + getVersion();
|
|
2263
2266
|
function useWallet() {
|
|
2264
2267
|
const { address, wallet: walletConfig } = useLocalStore_default();
|
|
@@ -2432,12 +2435,12 @@ function useWallet() {
|
|
|
2432
2435
|
address: evmAccount.address
|
|
2433
2436
|
});
|
|
2434
2437
|
modal.show((props) => {
|
|
2435
|
-
return /* @__PURE__ */ (0,
|
|
2438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
|
|
2436
2439
|
});
|
|
2437
2440
|
return txHash;
|
|
2438
2441
|
} catch (error) {
|
|
2439
2442
|
modal.show((props) => {
|
|
2440
|
-
return /* @__PURE__ */ (0,
|
|
2443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, error: typeof error == "string" ? error : error.details || error.message, chain: _chain });
|
|
2441
2444
|
});
|
|
2442
2445
|
throw error;
|
|
2443
2446
|
}
|
|
@@ -2571,7 +2574,7 @@ function useImportTokenListQuery({
|
|
|
2571
2574
|
var import_react38 = require("react");
|
|
2572
2575
|
var import_viem10 = require("viem");
|
|
2573
2576
|
var import_react_intl21 = require("react-intl");
|
|
2574
|
-
var
|
|
2577
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
2575
2578
|
function useMatchChain() {
|
|
2576
2579
|
const chainListQuery = useChainListQuery();
|
|
2577
2580
|
const modal = useModal();
|
|
@@ -2602,28 +2605,28 @@ function useMatchChain() {
|
|
|
2602
2605
|
const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
|
|
2603
2606
|
const [selectedChainId, setSelectedChainId] = (0, import_react38.useState)(storeChainId2);
|
|
2604
2607
|
const isDownMd = useDownMd();
|
|
2605
|
-
return /* @__PURE__ */ (0,
|
|
2606
|
-
/* @__PURE__ */ (0,
|
|
2607
|
-
return /* @__PURE__ */ (0,
|
|
2608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-change-network-box`, children: [
|
|
2609
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
|
|
2610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
2608
2611
|
"div",
|
|
2609
2612
|
{
|
|
2610
2613
|
onClick: () => setSelectedChainId(item.id),
|
|
2611
2614
|
className: `matchid-change-network-item ${selectedChainId == item.id ? "matchid-change-network-selected" : ""}`,
|
|
2612
2615
|
children: [
|
|
2613
|
-
/* @__PURE__ */ (0,
|
|
2614
|
-
/* @__PURE__ */ (0,
|
|
2615
|
-
/* @__PURE__ */ (0,
|
|
2616
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
|
|
2617
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
|
|
2618
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
|
|
2616
2619
|
] }),
|
|
2617
|
-
/* @__PURE__ */ (0,
|
|
2620
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
|
|
2618
2621
|
]
|
|
2619
2622
|
},
|
|
2620
2623
|
index
|
|
2621
2624
|
);
|
|
2622
2625
|
}) }),
|
|
2623
|
-
/* @__PURE__ */ (0,
|
|
2626
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
|
|
2624
2627
|
setChainId2(selectedChainId || 0);
|
|
2625
2628
|
close();
|
|
2626
|
-
}, block: true, children: /* @__PURE__ */ (0,
|
|
2629
|
+
}, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl21.FormattedMessage, { id: "confirm" }) })
|
|
2627
2630
|
] });
|
|
2628
2631
|
}
|
|
2629
2632
|
const showChangeNetwork = () => {
|
|
@@ -2696,7 +2699,7 @@ function useIsContract({
|
|
|
2696
2699
|
}
|
|
2697
2700
|
|
|
2698
2701
|
// src/components/ImportToken/index.tsx
|
|
2699
|
-
var
|
|
2702
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
2700
2703
|
function ImportToken({ close }) {
|
|
2701
2704
|
const [status, setStatus] = (0, import_react39.useState)("");
|
|
2702
2705
|
const { token } = useUserInfo();
|
|
@@ -2807,22 +2810,22 @@ function ImportToken({ close }) {
|
|
|
2807
2810
|
enabled: canImport
|
|
2808
2811
|
});
|
|
2809
2812
|
if (status == "success" || status == "fail") {
|
|
2810
|
-
return /* @__PURE__ */ (0,
|
|
2811
|
-
/* @__PURE__ */ (0,
|
|
2812
|
-
/* @__PURE__ */ (0,
|
|
2813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: `matchid-import-token-result matchid-flex`, children: [
|
|
2814
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: `matchid-import-token-result-box matchid-flex`, children: [
|
|
2815
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: `matchid-import-token-result-img`, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Lottie_default, { animationData: status == "success" ? success_default : fail_default, style: {
|
|
2813
2816
|
width: "96px",
|
|
2814
2817
|
height: "96px"
|
|
2815
2818
|
} }) }),
|
|
2816
|
-
/* @__PURE__ */ (0,
|
|
2819
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: `matchid-import-token-result-text matchid-import-token-result-text-${status}`, children: status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_intl22.FormattedMessage, { id: "importSuccess" }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_intl22.FormattedMessage, { id: "importFail" }) })
|
|
2817
2820
|
] }),
|
|
2818
|
-
status == "success" ? /* @__PURE__ */ (0,
|
|
2821
|
+
status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Button, { size: "lg", onClick: close, block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_intl22.FormattedMessage, { id: "close" }) }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Button, { size: "lg", onClick: () => setStatus(""), block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_intl22.FormattedMessage, { id: "back" }) })
|
|
2819
2822
|
] });
|
|
2820
2823
|
}
|
|
2821
|
-
return /* @__PURE__ */ (0,
|
|
2822
|
-
/* @__PURE__ */ (0,
|
|
2823
|
-
/* @__PURE__ */ (0,
|
|
2824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: `matchid-import-token`, children: [
|
|
2825
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "matchid-import-token-form", children: [
|
|
2826
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Field, { label: intl.formatMessage({
|
|
2824
2827
|
id: "tokenSmartContract"
|
|
2825
|
-
}), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0,
|
|
2828
|
+
}), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
2826
2829
|
Input,
|
|
2827
2830
|
{
|
|
2828
2831
|
placeholder: intl.formatMessage({
|
|
@@ -2833,9 +2836,9 @@ function ImportToken({ close }) {
|
|
|
2833
2836
|
maxLength: 42
|
|
2834
2837
|
}
|
|
2835
2838
|
) }),
|
|
2836
|
-
/* @__PURE__ */ (0,
|
|
2839
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Field, { label: intl.formatMessage({
|
|
2837
2840
|
id: "tokenSymbol"
|
|
2838
|
-
}), error: error.symbol, children: /* @__PURE__ */ (0,
|
|
2841
|
+
}), error: error.symbol, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
2839
2842
|
Input,
|
|
2840
2843
|
{
|
|
2841
2844
|
placeholder: intl.formatMessage({
|
|
@@ -2846,9 +2849,9 @@ function ImportToken({ close }) {
|
|
|
2846
2849
|
maxLength: 16
|
|
2847
2850
|
}
|
|
2848
2851
|
) }),
|
|
2849
|
-
/* @__PURE__ */ (0,
|
|
2852
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Field, { label: intl.formatMessage({
|
|
2850
2853
|
id: "tokenDecimals"
|
|
2851
|
-
}), error: error.decimals, children: /* @__PURE__ */ (0,
|
|
2854
|
+
}), error: error.decimals, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
2852
2855
|
Input,
|
|
2853
2856
|
{
|
|
2854
2857
|
placeholder: intl.formatMessage({
|
|
@@ -2860,7 +2863,7 @@ function ImportToken({ close }) {
|
|
|
2860
2863
|
}
|
|
2861
2864
|
) })
|
|
2862
2865
|
] }),
|
|
2863
|
-
/* @__PURE__ */ (0,
|
|
2866
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
2864
2867
|
Button,
|
|
2865
2868
|
{
|
|
2866
2869
|
size: "lg",
|
|
@@ -2869,14 +2872,14 @@ function ImportToken({ close }) {
|
|
|
2869
2872
|
loading: loading || isContractQuery.isLoading,
|
|
2870
2873
|
disabled: !canImport || !isContractQuery.data,
|
|
2871
2874
|
highlight: true,
|
|
2872
|
-
children: /* @__PURE__ */ (0,
|
|
2875
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_intl22.FormattedMessage, { id: "import" })
|
|
2873
2876
|
}
|
|
2874
2877
|
)
|
|
2875
2878
|
] });
|
|
2876
2879
|
}
|
|
2877
2880
|
|
|
2878
2881
|
// src/hooks/useMatchWallet.tsx
|
|
2879
|
-
var
|
|
2882
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
2880
2883
|
var ReceiveModal = () => {
|
|
2881
2884
|
const chain = useMatchChain();
|
|
2882
2885
|
const { address } = useWallet();
|
|
@@ -2890,10 +2893,10 @@ var ReceiveModal = () => {
|
|
|
2890
2893
|
}));
|
|
2891
2894
|
};
|
|
2892
2895
|
const chainLink = chain.explorerLink("address/" + address);
|
|
2893
|
-
return /* @__PURE__ */ (0,
|
|
2894
|
-
/* @__PURE__ */ (0,
|
|
2895
|
-
/* @__PURE__ */ (0,
|
|
2896
|
-
/* @__PURE__ */ (0,
|
|
2896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: `matchid-receive-modal`, children: [
|
|
2897
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "matchid-receive-container", children: [
|
|
2898
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl23.FormattedMessage, { id: "receiveQrcode" }) }),
|
|
2899
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `matchid-qr-container`, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
2897
2900
|
import_react_qrcode.QRCode,
|
|
2898
2901
|
{
|
|
2899
2902
|
margin: "0",
|
|
@@ -2901,7 +2904,7 @@ var ReceiveModal = () => {
|
|
|
2901
2904
|
value: address
|
|
2902
2905
|
}
|
|
2903
2906
|
) }),
|
|
2904
|
-
/* @__PURE__ */ (0,
|
|
2907
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
2905
2908
|
"a",
|
|
2906
2909
|
{
|
|
2907
2910
|
href: chainLink,
|
|
@@ -2911,7 +2914,7 @@ var ReceiveModal = () => {
|
|
|
2911
2914
|
}
|
|
2912
2915
|
)
|
|
2913
2916
|
] }),
|
|
2914
|
-
/* @__PURE__ */ (0,
|
|
2917
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Button, { size: "lg", onClick: onCopy, block: true, highlight: true, disabled: copied, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
2915
2918
|
import_react_intl23.FormattedMessage,
|
|
2916
2919
|
{
|
|
2917
2920
|
id: "copyAddress"
|