@matchain/matchid-sdk-react 0.1.56-alpha.4 → 0.1.56-alpha.6
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 +51 -48
- package/dist/api.js.map +1 -1
- package/dist/api.mjs +3 -3
- package/dist/{chunk-OSY7MTZY.mjs → chunk-GD7URBBZ.mjs} +21 -1
- package/dist/chunk-GD7URBBZ.mjs.map +1 -0
- package/dist/{chunk-2HVTQUPR.mjs → chunk-KFB23MLQ.mjs} +120 -90
- package/dist/chunk-KFB23MLQ.mjs.map +1 -0
- package/dist/{chunk-NGNJ44SH.mjs → chunk-NYE6DBEZ.mjs} +2 -2
- package/dist/components.d.mts +3 -3
- package/dist/components.d.ts +3 -3
- package/dist/components.js +408 -361
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +2 -2
- package/dist/hooks.d.mts +2 -2
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +226 -179
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.mjs +2 -2
- package/dist/icon.d.mts +2 -2
- package/dist/icon.d.ts +2 -2
- package/dist/icon.js +20 -0
- package/dist/icon.js.map +1 -1
- package/dist/icon.mjs +3 -1
- package/dist/{index-CsUEaGtM.d.ts → index-BcuSCgol.d.ts} +2 -2
- package/dist/{index-CPTgrfjn.d.mts → index-BlMLqmS2.d.mts} +1 -1
- package/dist/{index-B7ZEyP1j.d.ts → index-C1Nyy5zx.d.ts} +1 -1
- package/dist/{index-FKxw4Vaa.d.mts → index-CBcBTQyU.d.mts} +1 -1
- package/dist/{index-BXbfmVoU.d.mts → index-CD0dACxf.d.mts} +2 -2
- package/dist/{index-TjbO7d74.d.mts → index-CER00guz.d.mts} +1 -1
- package/dist/{index-BtjgRcNJ.d.ts → index-CjekOYJl.d.mts} +2 -2
- package/dist/{index-AtpUyTIk.d.ts → index-DN-jrh8-.d.ts} +6 -3
- package/dist/{index-BKSGbw7b.d.mts → index-DdN22cwf.d.ts} +2 -2
- package/dist/{index-nwqg5fYH.d.ts → index-DkIIQLbh.d.ts} +2 -2
- package/dist/{index-4dZbgWG2.d.ts → index-DlaCsN95.d.ts} +1 -1
- package/dist/{index-zmJl2a0q.d.mts → index-lh6qBAf_.d.mts} +2 -2
- package/dist/{index-CwHXzvvB.d.ts → index-o0WW1c5O.d.ts} +1 -1
- package/dist/{index-CRLiCVf9.d.mts → index-xThRnNN3.d.mts} +6 -3
- package/dist/index.css +35 -1
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +458 -410
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{types-DEsY_CPH.d.mts → types-CheN9vHJ.d.mts} +4 -0
- package/dist/{types-DEsY_CPH.d.ts → types-CheN9vHJ.d.ts} +4 -0
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/ui.d.mts +3 -3
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +154 -107
- package/dist/ui.js.map +1 -1
- package/dist/ui.mjs +2 -2
- package/example/src/pages/UI/components/Input.tsx +12 -0
- package/example/src/pages/UI/index.tsx +2 -0
- package/package.json +1 -1
- package/dist/chunk-2HVTQUPR.mjs.map +0 -1
- package/dist/chunk-OSY7MTZY.mjs.map +0 -1
- /package/dist/{chunk-NGNJ44SH.mjs.map → chunk-NYE6DBEZ.mjs.map} +0 -0
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
GoogleIcon,
|
|
44
44
|
InfoLineIcon,
|
|
45
45
|
InfoRoundIcon,
|
|
46
|
+
InputLengthIcon,
|
|
46
47
|
LeatherIcon,
|
|
47
48
|
LinkedinIcon,
|
|
48
49
|
LoadingIcon_default,
|
|
@@ -65,7 +66,7 @@ import {
|
|
|
65
66
|
XIcon,
|
|
66
67
|
XverseIcon,
|
|
67
68
|
YoutubeIcon
|
|
68
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-GD7URBBZ.mjs";
|
|
69
70
|
import {
|
|
70
71
|
confirm_default,
|
|
71
72
|
connecting_default,
|
|
@@ -109,7 +110,7 @@ __export(components_exports, {
|
|
|
109
110
|
});
|
|
110
111
|
|
|
111
112
|
// src/components/EmailModal/index.tsx
|
|
112
|
-
import { useEffect as
|
|
113
|
+
import { useEffect as useEffect21, useState as useState19 } from "react";
|
|
113
114
|
|
|
114
115
|
// src/ui/Modal/index.tsx
|
|
115
116
|
import { useEffect as useEffect3, useState as useState2 } from "react";
|
|
@@ -242,7 +243,7 @@ function ConfirmModal({
|
|
|
242
243
|
}
|
|
243
244
|
|
|
244
245
|
// src/components/EmailModal/StepEmail.tsx
|
|
245
|
-
import { useEffect as
|
|
246
|
+
import { useEffect as useEffect5, useMemo, useState as useState4 } from "react";
|
|
246
247
|
|
|
247
248
|
// src/ui/Button/index.tsx
|
|
248
249
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
@@ -282,24 +283,45 @@ function Button({
|
|
|
282
283
|
}
|
|
283
284
|
|
|
284
285
|
// src/ui/Input/index.tsx
|
|
285
|
-
import { useState as useState3 } from "react";
|
|
286
|
+
import { useEffect as useEffect4, useRef, useState as useState3 } from "react";
|
|
286
287
|
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
287
288
|
function Input({
|
|
288
289
|
onChange,
|
|
289
290
|
type,
|
|
290
291
|
after,
|
|
292
|
+
showLength = false,
|
|
293
|
+
showClear = true,
|
|
291
294
|
className = "",
|
|
295
|
+
rows = 1,
|
|
296
|
+
maxRows = 4,
|
|
297
|
+
children,
|
|
292
298
|
...props
|
|
293
299
|
}) {
|
|
294
300
|
const [inputType, setInputType] = useState3(type);
|
|
295
301
|
const isDownMd = useDownMd();
|
|
302
|
+
const textareaRef = useRef(null);
|
|
303
|
+
useEffect4(() => {
|
|
304
|
+
const textarea = textareaRef.current;
|
|
305
|
+
if (textarea) {
|
|
306
|
+
textarea.style.height = "auto";
|
|
307
|
+
const lineHeight = 24;
|
|
308
|
+
const maxHeight = lineHeight * 4;
|
|
309
|
+
textarea.style.height = Math.min(textarea.scrollHeight, maxHeight) + "px";
|
|
310
|
+
}
|
|
311
|
+
}, [props.value]);
|
|
296
312
|
return /* @__PURE__ */ jsxs2(
|
|
297
313
|
"div",
|
|
298
314
|
{
|
|
299
|
-
className: `matchid-input-box ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
315
|
+
className: `matchid-input-box matchid-input-${type} ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
316
|
+
style: {
|
|
317
|
+
// @ts-ignore
|
|
318
|
+
"--max-rows": maxRows
|
|
319
|
+
},
|
|
300
320
|
children: [
|
|
301
|
-
/* @__PURE__ */ jsx4("
|
|
302
|
-
|
|
321
|
+
children ?? (type == "textarea" ? /* @__PURE__ */ jsx4("textarea", { rows: 1, onChange, ...props, className: "matchid-input-field", ref: textareaRef, style: {
|
|
322
|
+
maxHeight: maxRows * 24 + "px"
|
|
323
|
+
} }) : /* @__PURE__ */ jsx4("input", { type: inputType, onChange, ...props, className: "matchid-input-field" })),
|
|
324
|
+
type != "textarea" && showClear && props.value && props.value.length > 0 && /* @__PURE__ */ jsx4("div", { className: "matchid-input-delete-icon", onClick: (e) => {
|
|
303
325
|
if (onChange) {
|
|
304
326
|
onChange({ target: { value: "" } });
|
|
305
327
|
}
|
|
@@ -314,6 +336,14 @@ function Input({
|
|
|
314
336
|
type === "password" && /* @__PURE__ */ jsx4("div", { className: "matchid-input-eye-icon", onClick: () => {
|
|
315
337
|
setInputType(inputType === "password" ? "text" : "password");
|
|
316
338
|
}, children: inputType === "password" ? /* @__PURE__ */ jsx4(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ jsx4(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
|
|
339
|
+
showLength && props.maxLength && /* @__PURE__ */ jsxs2("div", { className: `matchid-input-length`, children: [
|
|
340
|
+
/* @__PURE__ */ jsxs2("span", { children: [
|
|
341
|
+
props.value?.length || 0,
|
|
342
|
+
"/",
|
|
343
|
+
props.maxLength
|
|
344
|
+
] }),
|
|
345
|
+
/* @__PURE__ */ jsx4(InputLengthIcon, { color: "var(--icon-color)" })
|
|
346
|
+
] }),
|
|
317
347
|
after
|
|
318
348
|
]
|
|
319
349
|
}
|
|
@@ -345,7 +375,7 @@ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
|
345
375
|
function StepEmail(props) {
|
|
346
376
|
const intl = useIntl2();
|
|
347
377
|
const [emailVal, setEmailVal] = useState4("");
|
|
348
|
-
|
|
378
|
+
useEffect5(() => {
|
|
349
379
|
if (props.email) {
|
|
350
380
|
setEmailVal(props.email);
|
|
351
381
|
}
|
|
@@ -878,7 +908,7 @@ __export(hooks_exports, {
|
|
|
878
908
|
});
|
|
879
909
|
|
|
880
910
|
// src/hooks/useMatchEvents.ts
|
|
881
|
-
import { useEffect as
|
|
911
|
+
import { useEffect as useEffect6 } from "react";
|
|
882
912
|
|
|
883
913
|
// src/hooks/eventManager.ts
|
|
884
914
|
var EventManager = class {
|
|
@@ -910,7 +940,7 @@ var eventManager_default = eventManager;
|
|
|
910
940
|
|
|
911
941
|
// src/hooks/useMatchEvents.ts
|
|
912
942
|
function useMatchEvents(handlers) {
|
|
913
|
-
|
|
943
|
+
useEffect6(() => {
|
|
914
944
|
Object.entries(handlers).forEach(([event, handler2]) => {
|
|
915
945
|
if (handler2) {
|
|
916
946
|
eventManager_default.on(event, handler2);
|
|
@@ -946,11 +976,11 @@ var useStore_default = useStore;
|
|
|
946
976
|
// src/hooks/useWallet.tsx
|
|
947
977
|
import { toAccount } from "viem/accounts";
|
|
948
978
|
import { createWalletClient } from "viem";
|
|
949
|
-
import { useEffect as
|
|
979
|
+
import { useEffect as useEffect9, useMemo as useMemo3 } from "react";
|
|
950
980
|
import { encodeDeployData } from "viem";
|
|
951
981
|
|
|
952
982
|
// src/context/ModalContext.tsx
|
|
953
|
-
import { useState as useState7, useCallback, createContext, useContext, useRef } from "react";
|
|
983
|
+
import { useState as useState7, useCallback, createContext, useContext, useRef as useRef2 } from "react";
|
|
954
984
|
import { createPortal } from "react-dom";
|
|
955
985
|
|
|
956
986
|
// src/ui/index.ts
|
|
@@ -1003,7 +1033,7 @@ function Drawer({
|
|
|
1003
1033
|
}
|
|
1004
1034
|
|
|
1005
1035
|
// src/ui/HashPanel/index.tsx
|
|
1006
|
-
import { useEffect as
|
|
1036
|
+
import { useEffect as useEffect7, useState as useState5 } from "react";
|
|
1007
1037
|
|
|
1008
1038
|
// src/ui/ModalDrawer/index.tsx
|
|
1009
1039
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
@@ -1094,7 +1124,7 @@ function HashPanel({
|
|
|
1094
1124
|
};
|
|
1095
1125
|
const statusValue = error ? statusMaps.fail : statusMaps[status];
|
|
1096
1126
|
const [shouldRefetch, setShouldRefetch] = useState5(true);
|
|
1097
|
-
|
|
1127
|
+
useEffect7(() => {
|
|
1098
1128
|
if (hash) {
|
|
1099
1129
|
setShouldRefetch(true);
|
|
1100
1130
|
setStatus("pending");
|
|
@@ -1107,7 +1137,7 @@ function HashPanel({
|
|
|
1107
1137
|
chain,
|
|
1108
1138
|
refetchInterval: shouldRefetch ? 3e3 : false
|
|
1109
1139
|
});
|
|
1110
|
-
|
|
1140
|
+
useEffect7(() => {
|
|
1111
1141
|
if (hashQuery.data == 1 || hashQuery.data == -1) {
|
|
1112
1142
|
setShouldRefetch(false);
|
|
1113
1143
|
}
|
|
@@ -1328,7 +1358,7 @@ function ModalProvider({ children }) {
|
|
|
1328
1358
|
modals: [],
|
|
1329
1359
|
highestZIndex: 100
|
|
1330
1360
|
});
|
|
1331
|
-
const highestIndexRef =
|
|
1361
|
+
const highestIndexRef = useRef2(100);
|
|
1332
1362
|
const getNextIndex = useCallback(() => {
|
|
1333
1363
|
highestIndexRef.current += 1;
|
|
1334
1364
|
return highestIndexRef.current;
|
|
@@ -1511,7 +1541,7 @@ function useWallet() {
|
|
|
1511
1541
|
return void 0;
|
|
1512
1542
|
}
|
|
1513
1543
|
}, [address]);
|
|
1514
|
-
|
|
1544
|
+
useEffect9(() => {
|
|
1515
1545
|
matchlog_default.log("qwe-evmAccount", evmAccount);
|
|
1516
1546
|
}, [evmAccount]);
|
|
1517
1547
|
const realCreateWalletClient = (parameters) => {
|
|
@@ -1654,14 +1684,14 @@ function useWallet() {
|
|
|
1654
1684
|
|
|
1655
1685
|
// src/hooks/useCopyClipboard.ts
|
|
1656
1686
|
import copy from "copy-to-clipboard";
|
|
1657
|
-
import { useCallback as useCallback2, useEffect as
|
|
1687
|
+
import { useCallback as useCallback2, useEffect as useEffect10, useState as useState9 } from "react";
|
|
1658
1688
|
function useCopyClipboard(timeout = 500) {
|
|
1659
1689
|
const [isCopied, setIsCopied] = useState9(false);
|
|
1660
1690
|
const staticCopy = useCallback2((text) => {
|
|
1661
1691
|
const didCopy = copy(text);
|
|
1662
1692
|
setIsCopied(didCopy);
|
|
1663
1693
|
}, []);
|
|
1664
|
-
|
|
1694
|
+
useEffect10(() => {
|
|
1665
1695
|
if (isCopied) {
|
|
1666
1696
|
const hide = setTimeout(() => {
|
|
1667
1697
|
setIsCopied(false);
|
|
@@ -1946,7 +1976,7 @@ function useMatchChain() {
|
|
|
1946
1976
|
|
|
1947
1977
|
// src/hooks/useMatchWallet.tsx
|
|
1948
1978
|
import { QRCode } from "react-qrcode";
|
|
1949
|
-
import { useEffect as
|
|
1979
|
+
import { useEffect as useEffect13, useMemo as useMemo6, useRef as useRef3, useState as useState13 } from "react";
|
|
1950
1980
|
import { useQuery as useQuery4 } from "@tanstack/react-query";
|
|
1951
1981
|
|
|
1952
1982
|
// src/config/index.tsx
|
|
@@ -2017,7 +2047,7 @@ var useContractStore_default = useContractStore;
|
|
|
2017
2047
|
import { FormattedMessage as FormattedMessage4, useIntl as useIntl5 } from "react-intl";
|
|
2018
2048
|
|
|
2019
2049
|
// src/components/ImportToken/index.tsx
|
|
2020
|
-
import { useEffect as
|
|
2050
|
+
import { useEffect as useEffect12, useMemo as useMemo5, useState as useState12 } from "react";
|
|
2021
2051
|
import { FormattedMessage as FormattedMessage3, useIntl as useIntl4 } from "react-intl";
|
|
2022
2052
|
import { useQueryClient } from "@tanstack/react-query";
|
|
2023
2053
|
import { defineChain, erc20Abi } from "viem";
|
|
@@ -2088,7 +2118,7 @@ function ImportToken({ close }) {
|
|
|
2088
2118
|
}
|
|
2089
2119
|
};
|
|
2090
2120
|
const intl = useIntl4();
|
|
2091
|
-
|
|
2121
|
+
useEffect12(() => {
|
|
2092
2122
|
if (address.length === 42) {
|
|
2093
2123
|
const reg = /^0x[0-9a-fA-F]{40}$/;
|
|
2094
2124
|
if (!reg.test(address)) {
|
|
@@ -2308,8 +2338,8 @@ function useMatchWalletRecords() {
|
|
|
2308
2338
|
const [items, setItems] = useState13([]);
|
|
2309
2339
|
const { chainId, publicClient } = useMatchChain();
|
|
2310
2340
|
const { address } = useWallet();
|
|
2311
|
-
const hasMoreRef =
|
|
2312
|
-
const nextPageParamsRef =
|
|
2341
|
+
const hasMoreRef = useRef3(hasMore);
|
|
2342
|
+
const nextPageParamsRef = useRef3(void 0);
|
|
2313
2343
|
const { contracts, setContracts } = useContractStore_default();
|
|
2314
2344
|
const fetchMoreData = async () => {
|
|
2315
2345
|
const chainIdStr = chainId ? chainId.toString() : "";
|
|
@@ -2336,7 +2366,7 @@ function useMatchWalletRecords() {
|
|
|
2336
2366
|
hasMoreRef.current = true;
|
|
2337
2367
|
fetchMoreData();
|
|
2338
2368
|
};
|
|
2339
|
-
|
|
2369
|
+
useEffect13(() => {
|
|
2340
2370
|
if (chainId && address) {
|
|
2341
2371
|
onInit();
|
|
2342
2372
|
}
|
|
@@ -2571,7 +2601,7 @@ function useMatchWalletAssetList({
|
|
|
2571
2601
|
return { ...asset, balance, value, balanceValue };
|
|
2572
2602
|
});
|
|
2573
2603
|
}, [list, nativeBalanceQuery.data, erc20BalanceQuery.data]);
|
|
2574
|
-
|
|
2604
|
+
useEffect13(() => {
|
|
2575
2605
|
const list2 = enrichedAssets.sort((a, b) => {
|
|
2576
2606
|
if (a.address === NATIVE_TOKEN_ADDRESS) return -1;
|
|
2577
2607
|
if (b.address === NATIVE_TOKEN_ADDRESS) return 1;
|
|
@@ -2596,7 +2626,7 @@ function useMatchWalletAssetList({
|
|
|
2596
2626
|
}
|
|
2597
2627
|
|
|
2598
2628
|
// src/hooks/useReceipt.tsx
|
|
2599
|
-
import { useState as useState14, useCallback as useCallback4, useEffect as
|
|
2629
|
+
import { useState as useState14, useCallback as useCallback4, useEffect as useEffect14 } from "react";
|
|
2600
2630
|
import { useQuery as useQuery5 } from "@tanstack/react-query";
|
|
2601
2631
|
import { createPublicClient as createPublicClient5, defineChain as defineChain2, http as http5 } from "viem";
|
|
2602
2632
|
var CACHE_TTL = 86400 * 30 * 1e3;
|
|
@@ -2614,7 +2644,7 @@ function useReceiptCache() {
|
|
|
2614
2644
|
return false;
|
|
2615
2645
|
}
|
|
2616
2646
|
})();
|
|
2617
|
-
|
|
2647
|
+
useEffect14(() => {
|
|
2618
2648
|
if (isLocalStorageAvailable) {
|
|
2619
2649
|
try {
|
|
2620
2650
|
const storedData = localStorage.getItem(STORAGE_KEY);
|
|
@@ -2731,7 +2761,7 @@ function useReceipt({
|
|
|
2731
2761
|
},
|
|
2732
2762
|
refetchInterval: shouldRefetch ? 1e4 : false
|
|
2733
2763
|
});
|
|
2734
|
-
|
|
2764
|
+
useEffect14(() => {
|
|
2735
2765
|
if (query.data) {
|
|
2736
2766
|
setShouldRefetch(false);
|
|
2737
2767
|
}
|
|
@@ -2740,7 +2770,7 @@ function useReceipt({
|
|
|
2740
2770
|
}
|
|
2741
2771
|
|
|
2742
2772
|
// src/hooks/useTransaction.tsx
|
|
2743
|
-
import { useState as useState15, useCallback as useCallback5, useEffect as
|
|
2773
|
+
import { useState as useState15, useCallback as useCallback5, useEffect as useEffect15 } from "react";
|
|
2744
2774
|
import { useQuery as useQuery6 } from "@tanstack/react-query";
|
|
2745
2775
|
import { createPublicClient as createPublicClient6, defineChain as defineChain3, http as http6 } from "viem";
|
|
2746
2776
|
var CACHE_TTL2 = 86400 * 30 * 1e3;
|
|
@@ -2758,7 +2788,7 @@ function useTransactionCache() {
|
|
|
2758
2788
|
return false;
|
|
2759
2789
|
}
|
|
2760
2790
|
})();
|
|
2761
|
-
|
|
2791
|
+
useEffect15(() => {
|
|
2762
2792
|
if (isLocalStorageAvailable) {
|
|
2763
2793
|
try {
|
|
2764
2794
|
const storedData = localStorage.getItem(STORAGE_KEY2);
|
|
@@ -2875,7 +2905,7 @@ function useTransaction({
|
|
|
2875
2905
|
},
|
|
2876
2906
|
refetchInterval: shouldRefetch ? 1e4 : false
|
|
2877
2907
|
});
|
|
2878
|
-
|
|
2908
|
+
useEffect15(() => {
|
|
2879
2909
|
if (query.data) {
|
|
2880
2910
|
setShouldRefetch(false);
|
|
2881
2911
|
}
|
|
@@ -2969,7 +2999,7 @@ var useWalletModalStore = create5((set) => ({
|
|
|
2969
2999
|
}));
|
|
2970
3000
|
|
|
2971
3001
|
// src/components/CEXBindModal/index.tsx
|
|
2972
|
-
import { useEffect as
|
|
3002
|
+
import { useEffect as useEffect16, useMemo as useMemo7, useState as useState16 } from "react";
|
|
2973
3003
|
import { FormattedMessage as FormattedMessage5, useIntl as useIntl6 } from "react-intl";
|
|
2974
3004
|
import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2975
3005
|
function CEXBindModal({
|
|
@@ -2989,7 +3019,7 @@ function CEXBindModal({
|
|
|
2989
3019
|
const needPassphrase = useMemo7(() => {
|
|
2990
3020
|
return ["bitget", "okx"].includes(type.toLowerCase());
|
|
2991
3021
|
}, [type]);
|
|
2992
|
-
|
|
3022
|
+
useEffect16(() => {
|
|
2993
3023
|
if (isOpen) {
|
|
2994
3024
|
setSecret("");
|
|
2995
3025
|
setKey("");
|
|
@@ -3189,7 +3219,7 @@ var Providers = ({ children }) => {
|
|
|
3189
3219
|
var context_default = Providers;
|
|
3190
3220
|
|
|
3191
3221
|
// src/hooks/useWalletInit.ts
|
|
3192
|
-
import { useEffect as
|
|
3222
|
+
import { useEffect as useEffect17, useRef as useRef4 } from "react";
|
|
3193
3223
|
|
|
3194
3224
|
// src/utils/wallet.ts
|
|
3195
3225
|
var sendMessage = ({ method, data, resolve, reject, timeout }) => {
|
|
@@ -3222,11 +3252,11 @@ function useWalletInit({
|
|
|
3222
3252
|
}) {
|
|
3223
3253
|
const { endpoints, token, setWallet, appid, refreshOverview } = useLocalStore_default();
|
|
3224
3254
|
const { setWalletReady, walletReady } = useStore_default();
|
|
3225
|
-
const iframeReadyRef =
|
|
3226
|
-
|
|
3255
|
+
const iframeReadyRef = useRef4(walletReady);
|
|
3256
|
+
useEffect17(() => {
|
|
3227
3257
|
setWallet(config);
|
|
3228
3258
|
}, [config]);
|
|
3229
|
-
|
|
3259
|
+
useEffect17(() => {
|
|
3230
3260
|
matchlog_default.log("sdk.mpc.status", walletReady, iframeReadyRef.current);
|
|
3231
3261
|
iframeReadyRef.current = walletReady;
|
|
3232
3262
|
if (iframeReadyRef.current) {
|
|
@@ -3243,7 +3273,7 @@ function useWalletInit({
|
|
|
3243
3273
|
onReady();
|
|
3244
3274
|
}
|
|
3245
3275
|
}, [walletReady]);
|
|
3246
|
-
|
|
3276
|
+
useEffect17(() => {
|
|
3247
3277
|
if (!endpoints.auth || !appid || !token || !config) {
|
|
3248
3278
|
const existingIframe = getWalletIframe();
|
|
3249
3279
|
if (existingIframe) {
|
|
@@ -3343,7 +3373,7 @@ function useWalletInit({
|
|
|
3343
3373
|
}
|
|
3344
3374
|
}
|
|
3345
3375
|
}, [endpoints.auth, appid, token, config]);
|
|
3346
|
-
|
|
3376
|
+
useEffect17(() => {
|
|
3347
3377
|
const messageHandle = async (e) => {
|
|
3348
3378
|
if (e.origin !== endpoints.auth.substring(0, endpoints.auth.length - 1)) {
|
|
3349
3379
|
return;
|
|
@@ -3424,7 +3454,7 @@ function useWalletInit({
|
|
|
3424
3454
|
}
|
|
3425
3455
|
|
|
3426
3456
|
// src/hooks/useInit.tsx
|
|
3427
|
-
import { useEffect as
|
|
3457
|
+
import { useEffect as useEffect18, useRef as useRef5 } from "react";
|
|
3428
3458
|
function useInit({
|
|
3429
3459
|
theme,
|
|
3430
3460
|
appid,
|
|
@@ -3444,24 +3474,24 @@ function useInit({
|
|
|
3444
3474
|
locale: realLocale
|
|
3445
3475
|
} = useLocalStore_default();
|
|
3446
3476
|
const walletModalStore = useWalletModalStore();
|
|
3447
|
-
const overviewLoadingRef =
|
|
3477
|
+
const overviewLoadingRef = useRef5(false);
|
|
3448
3478
|
const searchParams = new URLSearchParams(window.location.search);
|
|
3449
3479
|
const matchToken = searchParams.get("matchToken");
|
|
3450
3480
|
const matchidt = searchParams.get("matchidt");
|
|
3451
3481
|
const realEndpoints = endpoints || env_default.endpoints;
|
|
3452
|
-
|
|
3482
|
+
useEffect18(() => {
|
|
3453
3483
|
setTheme(theme);
|
|
3454
3484
|
}, [theme]);
|
|
3455
|
-
|
|
3485
|
+
useEffect18(() => {
|
|
3456
3486
|
setAppid(appid);
|
|
3457
3487
|
}, [appid]);
|
|
3458
|
-
|
|
3488
|
+
useEffect18(() => {
|
|
3459
3489
|
setEndpoints(realEndpoints);
|
|
3460
3490
|
}, [realEndpoints]);
|
|
3461
|
-
|
|
3491
|
+
useEffect18(() => {
|
|
3462
3492
|
setLocale(locale || "en");
|
|
3463
3493
|
}, [locale]);
|
|
3464
|
-
|
|
3494
|
+
useEffect18(() => {
|
|
3465
3495
|
if (matchToken) {
|
|
3466
3496
|
const tokenData = JSON.parse(atob(matchToken));
|
|
3467
3497
|
if (tokenData && tokenData.mid && tokenData.token) {
|
|
@@ -3472,7 +3502,7 @@ function useInit({
|
|
|
3472
3502
|
}
|
|
3473
3503
|
}
|
|
3474
3504
|
}, [matchToken]);
|
|
3475
|
-
|
|
3505
|
+
useEffect18(() => {
|
|
3476
3506
|
if (matchidt) {
|
|
3477
3507
|
const tokenData = decodeURIComponent(matchidt);
|
|
3478
3508
|
const data = JSON.parse(decodeBase64(tokenData));
|
|
@@ -3502,7 +3532,7 @@ function useInit({
|
|
|
3502
3532
|
}
|
|
3503
3533
|
}
|
|
3504
3534
|
}, [matchidt]);
|
|
3505
|
-
|
|
3535
|
+
useEffect18(() => {
|
|
3506
3536
|
const onLoginMessage = (event) => {
|
|
3507
3537
|
const res = event.data;
|
|
3508
3538
|
if (res.event === "login" && res.data && (res.data.token || res.data.token_type && res.data.access_token)) {
|
|
@@ -3539,7 +3569,7 @@ function useInit({
|
|
|
3539
3569
|
overviewLoadingRef.current = false;
|
|
3540
3570
|
}
|
|
3541
3571
|
};
|
|
3542
|
-
|
|
3572
|
+
useEffect18(() => {
|
|
3543
3573
|
if (token) {
|
|
3544
3574
|
loadOverview();
|
|
3545
3575
|
}
|
|
@@ -4748,7 +4778,7 @@ function useUserInfo() {
|
|
|
4748
4778
|
}
|
|
4749
4779
|
|
|
4750
4780
|
// src/components/EmailModal/StepVerify.tsx
|
|
4751
|
-
import { useEffect as
|
|
4781
|
+
import { useEffect as useEffect20, useMemo as useMemo9, useRef as useRef6, useState as useState18 } from "react";
|
|
4752
4782
|
import { FormattedMessage as FormattedMessage6, useIntl as useIntl7 } from "react-intl";
|
|
4753
4783
|
import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4754
4784
|
function StepVerify(props) {
|
|
@@ -4758,13 +4788,13 @@ function StepVerify(props) {
|
|
|
4758
4788
|
const [code, setCode] = useState18("");
|
|
4759
4789
|
const [sending, setSending] = useState18(false);
|
|
4760
4790
|
const [submitting, setSubmitting] = useState18(false);
|
|
4761
|
-
const sendTimeRef =
|
|
4791
|
+
const sendTimeRef = useRef6(0);
|
|
4762
4792
|
const [sendBtnText, setSendBtnText] = useState18(intl.formatMessage({
|
|
4763
4793
|
id: "send"
|
|
4764
4794
|
}));
|
|
4765
4795
|
const intervalTime = EMAIL_INTERVAL;
|
|
4766
4796
|
const codeLength = EMAIL_CODE_LENGTH;
|
|
4767
|
-
const intervalRef =
|
|
4797
|
+
const intervalRef = useRef6(null);
|
|
4768
4798
|
const isDownMd = useDownMd();
|
|
4769
4799
|
const onSend = async () => {
|
|
4770
4800
|
if (sendTimeRef.current > 0) {
|
|
@@ -4795,7 +4825,7 @@ function StepVerify(props) {
|
|
|
4795
4825
|
setSending(false);
|
|
4796
4826
|
}
|
|
4797
4827
|
};
|
|
4798
|
-
|
|
4828
|
+
useEffect20(() => {
|
|
4799
4829
|
onSend();
|
|
4800
4830
|
return () => {
|
|
4801
4831
|
if (intervalRef.current) {
|
|
@@ -4883,7 +4913,7 @@ function EmailModal({
|
|
|
4883
4913
|
const [step, setStep] = useState19("input");
|
|
4884
4914
|
const [emailVal, setEmailVal] = useState19("");
|
|
4885
4915
|
const intl = useIntl8();
|
|
4886
|
-
|
|
4916
|
+
useEffect21(() => {
|
|
4887
4917
|
if (!isOpen) {
|
|
4888
4918
|
setStep("input");
|
|
4889
4919
|
setEmailVal("");
|
|
@@ -5349,7 +5379,7 @@ function LoginButton({
|
|
|
5349
5379
|
}
|
|
5350
5380
|
|
|
5351
5381
|
// src/components/UsernameModal/index.tsx
|
|
5352
|
-
import { useEffect as
|
|
5382
|
+
import { useEffect as useEffect22, useMemo as useMemo11, useState as useState23 } from "react";
|
|
5353
5383
|
import { FormattedMessage as FormattedMessage11, useIntl as useIntl12 } from "react-intl";
|
|
5354
5384
|
import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5355
5385
|
var ValidItem = ({
|
|
@@ -5373,7 +5403,7 @@ function UsernameModal({
|
|
|
5373
5403
|
const [val, setVal] = useState23(username);
|
|
5374
5404
|
const [error, setError] = useState23("");
|
|
5375
5405
|
const isDownMd = useDownMd();
|
|
5376
|
-
|
|
5406
|
+
useEffect22(() => {
|
|
5377
5407
|
if (isOpen) {
|
|
5378
5408
|
setVal(username);
|
|
5379
5409
|
setError("");
|
|
@@ -5449,7 +5479,7 @@ function UsernameModal({
|
|
|
5449
5479
|
}
|
|
5450
5480
|
|
|
5451
5481
|
// src/components/EVMModal/index.tsx
|
|
5452
|
-
import { useCallback as useCallback6, useEffect as
|
|
5482
|
+
import { useCallback as useCallback6, useEffect as useEffect24, useState as useState26 } from "react";
|
|
5453
5483
|
import { useIntl as useIntl13 } from "react-intl";
|
|
5454
5484
|
|
|
5455
5485
|
// src/components/WalletModalContent/index.tsx
|
|
@@ -5644,13 +5674,13 @@ import { RainbowKitProvider as RainbowKitProvider2, useConnectModal } from "@rai
|
|
|
5644
5674
|
import { useAccount, useChainId, useConfig, useDisconnect } from "wagmi";
|
|
5645
5675
|
|
|
5646
5676
|
// src/hooks/useWalletBox.ts
|
|
5647
|
-
import { useEffect as
|
|
5677
|
+
import { useEffect as useEffect23, useRef as useRef7, useState as useState25 } from "react";
|
|
5648
5678
|
function useWalletBox({
|
|
5649
5679
|
onInit
|
|
5650
5680
|
}) {
|
|
5651
5681
|
const [status, setStateStatus] = useState25("start");
|
|
5652
5682
|
const [error, setError] = useState25("");
|
|
5653
|
-
const statusRef =
|
|
5683
|
+
const statusRef = useRef7(status);
|
|
5654
5684
|
const [nonce, setNonce] = useState25();
|
|
5655
5685
|
const setStatus = (status2) => {
|
|
5656
5686
|
statusRef.current = status2;
|
|
@@ -5660,7 +5690,7 @@ function useWalletBox({
|
|
|
5660
5690
|
setError("");
|
|
5661
5691
|
setNonce(null);
|
|
5662
5692
|
};
|
|
5663
|
-
|
|
5693
|
+
useEffect23(() => {
|
|
5664
5694
|
init();
|
|
5665
5695
|
onInit({
|
|
5666
5696
|
setStatus
|
|
@@ -5924,10 +5954,10 @@ function WalletContent({
|
|
|
5924
5954
|
setStatus2("start");
|
|
5925
5955
|
}
|
|
5926
5956
|
});
|
|
5927
|
-
|
|
5957
|
+
useEffect24(() => {
|
|
5928
5958
|
matchlog_default.log(`status=${status}`, `connectModalOpen=${connectModalOpen}`, `address=${address}`, `isConnected=${isConnected}`);
|
|
5929
5959
|
}, [status, connectModalOpen, isConnected, address]);
|
|
5930
|
-
|
|
5960
|
+
useEffect24(() => {
|
|
5931
5961
|
if (connectModalOpen) {
|
|
5932
5962
|
setStatus("connecting");
|
|
5933
5963
|
return;
|
|
@@ -5940,7 +5970,7 @@ function WalletContent({
|
|
|
5940
5970
|
setStatus("start");
|
|
5941
5971
|
}
|
|
5942
5972
|
}, [connectModalOpen, address]);
|
|
5943
|
-
|
|
5973
|
+
useEffect24(() => {
|
|
5944
5974
|
if (openConnectModal && !isConnected && !inited) {
|
|
5945
5975
|
openConnectModal && openConnectModal();
|
|
5946
5976
|
setInited(true);
|
|
@@ -6023,7 +6053,7 @@ function WalletContent({
|
|
|
6023
6053
|
setError(error2.reason || error2.message);
|
|
6024
6054
|
}
|
|
6025
6055
|
}, [nonce, status, address]);
|
|
6026
|
-
|
|
6056
|
+
useEffect24(() => {
|
|
6027
6057
|
if (signature) {
|
|
6028
6058
|
signature();
|
|
6029
6059
|
}
|
|
@@ -6094,7 +6124,7 @@ function EVMModal(props) {
|
|
|
6094
6124
|
}
|
|
6095
6125
|
|
|
6096
6126
|
// src/components/TRONModal/index.tsx
|
|
6097
|
-
import React11, { useEffect as
|
|
6127
|
+
import React11, { useEffect as useEffect26, useMemo as useMemo14, useState as useState28 } from "react";
|
|
6098
6128
|
import { useIntl as useIntl14 } from "react-intl";
|
|
6099
6129
|
|
|
6100
6130
|
// src/lib/tron/TronLinkAdapter.ts
|
|
@@ -6128,7 +6158,7 @@ var TronLinkAdapter = class {
|
|
|
6128
6158
|
};
|
|
6129
6159
|
|
|
6130
6160
|
// src/hooks/useTRONWallet.ts
|
|
6131
|
-
import { useEffect as
|
|
6161
|
+
import { useEffect as useEffect25, useState as useState27 } from "react";
|
|
6132
6162
|
|
|
6133
6163
|
// src/lib/tron/BitgetAdapter.ts
|
|
6134
6164
|
var BitgetAdapter = class {
|
|
@@ -6175,7 +6205,7 @@ var useTRONWallet = () => {
|
|
|
6175
6205
|
const wallets = [new TronLinkAdapter(), new BitgetAdapter(), new OKXAdapter()];
|
|
6176
6206
|
const [installedWallets, setInstalledWallets] = useState27([]);
|
|
6177
6207
|
const [address, setAddress] = useState27(null);
|
|
6178
|
-
|
|
6208
|
+
useEffect25(() => {
|
|
6179
6209
|
const getInstalled = async () => {
|
|
6180
6210
|
const installed = await Promise.all(wallets.map((wallet2) => wallet2.isInstalled().then((isInstalled) => ({
|
|
6181
6211
|
wallet: wallet2,
|
|
@@ -6189,7 +6219,7 @@ var useTRONWallet = () => {
|
|
|
6189
6219
|
const onConnect = async () => {
|
|
6190
6220
|
setAddress(await wallet.connect());
|
|
6191
6221
|
};
|
|
6192
|
-
|
|
6222
|
+
useEffect25(() => {
|
|
6193
6223
|
if (!wallet) {
|
|
6194
6224
|
setAddress(null);
|
|
6195
6225
|
}
|
|
@@ -6291,7 +6321,7 @@ function TRONConnectModal({
|
|
|
6291
6321
|
statusRef.current = "";
|
|
6292
6322
|
}
|
|
6293
6323
|
};
|
|
6294
|
-
|
|
6324
|
+
useEffect26(() => {
|
|
6295
6325
|
if (wallet) {
|
|
6296
6326
|
console.log("onConnect");
|
|
6297
6327
|
onConnect();
|
|
@@ -6299,12 +6329,12 @@ function TRONConnectModal({
|
|
|
6299
6329
|
setStatus("");
|
|
6300
6330
|
}
|
|
6301
6331
|
}, [wallet]);
|
|
6302
|
-
|
|
6332
|
+
useEffect26(() => {
|
|
6303
6333
|
if (address) {
|
|
6304
6334
|
toLoginInWallet();
|
|
6305
6335
|
}
|
|
6306
6336
|
}, [address]);
|
|
6307
|
-
|
|
6337
|
+
useEffect26(() => {
|
|
6308
6338
|
if (!props.isOpen) {
|
|
6309
6339
|
disconnect();
|
|
6310
6340
|
}
|
|
@@ -6362,7 +6392,7 @@ function TRONModal(props) {
|
|
|
6362
6392
|
}
|
|
6363
6393
|
|
|
6364
6394
|
// src/components/TONModal/index.tsx
|
|
6365
|
-
import React12, { useEffect as
|
|
6395
|
+
import React12, { useEffect as useEffect27, useState as useState29 } from "react";
|
|
6366
6396
|
import { useIntl as useIntl15 } from "react-intl";
|
|
6367
6397
|
import {
|
|
6368
6398
|
TonConnectUIProvider,
|
|
@@ -6385,7 +6415,7 @@ function WalletContent2({
|
|
|
6385
6415
|
const [status, setStatus] = useState29("");
|
|
6386
6416
|
const statusRef = React12.useRef(status);
|
|
6387
6417
|
const [error, setError] = useState29("");
|
|
6388
|
-
|
|
6418
|
+
useEffect27(() => {
|
|
6389
6419
|
const init = async () => {
|
|
6390
6420
|
if (tonConnectUI.connected) {
|
|
6391
6421
|
await tonConnectUI.disconnect();
|
|
@@ -6458,7 +6488,7 @@ function WalletContent2({
|
|
|
6458
6488
|
}
|
|
6459
6489
|
});
|
|
6460
6490
|
}, []);
|
|
6461
|
-
|
|
6491
|
+
useEffect27(() => {
|
|
6462
6492
|
if (wallet) {
|
|
6463
6493
|
setConnected(true);
|
|
6464
6494
|
console.log("Wallet connected:", wallet);
|
|
@@ -6469,7 +6499,7 @@ function WalletContent2({
|
|
|
6469
6499
|
setStatus("");
|
|
6470
6500
|
}
|
|
6471
6501
|
}, [wallet]);
|
|
6472
|
-
|
|
6502
|
+
useEffect27(() => {
|
|
6473
6503
|
console.log({
|
|
6474
6504
|
state,
|
|
6475
6505
|
wallet
|
|
@@ -6549,7 +6579,7 @@ function TONModal(props) {
|
|
|
6549
6579
|
}
|
|
6550
6580
|
|
|
6551
6581
|
// src/components/BTCModal/index.tsx
|
|
6552
|
-
import React13, { useEffect as
|
|
6582
|
+
import React13, { useEffect as useEffect29, useMemo as useMemo15, useState as useState31 } from "react";
|
|
6553
6583
|
import { useIntl as useIntl16 } from "react-intl";
|
|
6554
6584
|
|
|
6555
6585
|
// src/lib/btc/UnisatAdapter.ts
|
|
@@ -6704,7 +6734,7 @@ var LeatherAdapter = class {
|
|
|
6704
6734
|
};
|
|
6705
6735
|
|
|
6706
6736
|
// src/hooks/useBTCWallet.ts
|
|
6707
|
-
import { useEffect as
|
|
6737
|
+
import { useEffect as useEffect28, useState as useState30 } from "react";
|
|
6708
6738
|
|
|
6709
6739
|
// src/lib/btc/PhantomAdapter.ts
|
|
6710
6740
|
var PhantomAdapter = class {
|
|
@@ -6744,7 +6774,7 @@ var useBTCWallet = () => {
|
|
|
6744
6774
|
const wallets = [new UnisatAdapter(), new XverseAdapter(), new LeatherAdapter(), new PhantomAdapter()];
|
|
6745
6775
|
const [installedWallets, setInstalledWallets] = useState30([]);
|
|
6746
6776
|
const [address, setAddress] = useState30(null);
|
|
6747
|
-
|
|
6777
|
+
useEffect28(() => {
|
|
6748
6778
|
const getInstalled = async () => {
|
|
6749
6779
|
const installed = await Promise.all(wallets.map((wallet2) => wallet2.isInstalled().then((isInstalled) => ({
|
|
6750
6780
|
wallet: wallet2,
|
|
@@ -6758,7 +6788,7 @@ var useBTCWallet = () => {
|
|
|
6758
6788
|
const onConnect = async () => {
|
|
6759
6789
|
setAddress(await wallet.connect());
|
|
6760
6790
|
};
|
|
6761
|
-
|
|
6791
|
+
useEffect28(() => {
|
|
6762
6792
|
if (!wallet) {
|
|
6763
6793
|
setAddress(null);
|
|
6764
6794
|
}
|
|
@@ -6857,7 +6887,7 @@ function BTCConnectModal({
|
|
|
6857
6887
|
statusRef.current = "";
|
|
6858
6888
|
}
|
|
6859
6889
|
};
|
|
6860
|
-
|
|
6890
|
+
useEffect29(() => {
|
|
6861
6891
|
if (wallet) {
|
|
6862
6892
|
console.log("onConnect");
|
|
6863
6893
|
try {
|
|
@@ -6870,12 +6900,12 @@ function BTCConnectModal({
|
|
|
6870
6900
|
setStatus("");
|
|
6871
6901
|
}
|
|
6872
6902
|
}, [wallet]);
|
|
6873
|
-
|
|
6903
|
+
useEffect29(() => {
|
|
6874
6904
|
if (address) {
|
|
6875
6905
|
toLoginInWallet();
|
|
6876
6906
|
}
|
|
6877
6907
|
}, [address]);
|
|
6878
|
-
|
|
6908
|
+
useEffect29(() => {
|
|
6879
6909
|
if (!props.isOpen) {
|
|
6880
6910
|
disconnect();
|
|
6881
6911
|
}
|
|
@@ -6984,11 +7014,11 @@ function WalletModal(props) {
|
|
|
6984
7014
|
}
|
|
6985
7015
|
|
|
6986
7016
|
// src/components/AlphaAvatar/index.tsx
|
|
6987
|
-
import { useEffect as
|
|
7017
|
+
import { useEffect as useEffect30, useState as useState32 } from "react";
|
|
6988
7018
|
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
6989
7019
|
function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
6990
7020
|
const [avatar, setAvatar] = useState32(void 0);
|
|
6991
|
-
|
|
7021
|
+
useEffect30(() => {
|
|
6992
7022
|
if (name) {
|
|
6993
7023
|
const char = name[0].toUpperCase();
|
|
6994
7024
|
setAvatar(char);
|
|
@@ -7085,7 +7115,7 @@ function WalletAsset({
|
|
|
7085
7115
|
}
|
|
7086
7116
|
|
|
7087
7117
|
// src/components/TokenSend/index.tsx
|
|
7088
|
-
import { useEffect as
|
|
7118
|
+
import { useEffect as useEffect31, useMemo as useMemo17, useState as useState33 } from "react";
|
|
7089
7119
|
import { defineChain as defineChain4, encodeFunctionData as encodeFunctionData2, erc20Abi as erc20Abi3, http as http8, parseUnits as parseUnits2 } from "viem";
|
|
7090
7120
|
import { FormattedMessage as FormattedMessage12, useIntl as useIntl18 } from "react-intl";
|
|
7091
7121
|
import { jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
@@ -7222,7 +7252,7 @@ function TokenSend({
|
|
|
7222
7252
|
}
|
|
7223
7253
|
onClose();
|
|
7224
7254
|
};
|
|
7225
|
-
|
|
7255
|
+
useEffect31(() => {
|
|
7226
7256
|
const receiveMessage = (event) => {
|
|
7227
7257
|
if (event.data) {
|
|
7228
7258
|
if (event.data.source == "match-wallet") {
|
|
@@ -7421,7 +7451,7 @@ function TokenSendList({ close }) {
|
|
|
7421
7451
|
|
|
7422
7452
|
// src/components/TransactionList/index.tsx
|
|
7423
7453
|
import InfiniteScroll from "react-infinite-scroll-component";
|
|
7424
|
-
import { useEffect as
|
|
7454
|
+
import { useEffect as useEffect32, useMemo as useMemo18, useState as useState35 } from "react";
|
|
7425
7455
|
import { decodeFunctionData, defineChain as defineChain5, formatUnits as formatUnits3 } from "viem";
|
|
7426
7456
|
import { erc20Abi as erc20Abi4 } from "viem";
|
|
7427
7457
|
import { FormattedMessage as FormattedMessage15 } from "react-intl";
|
|
@@ -7500,7 +7530,7 @@ var Item = ({ data }) => {
|
|
|
7500
7530
|
}
|
|
7501
7531
|
return "loading";
|
|
7502
7532
|
}, [data.extra?.status, data.source, hashQuery.data]);
|
|
7503
|
-
|
|
7533
|
+
useEffect32(() => {
|
|
7504
7534
|
if (data.hash) {
|
|
7505
7535
|
setShouldRefetch(status == "loading");
|
|
7506
7536
|
}
|
|
@@ -7633,4 +7663,4 @@ export {
|
|
|
7633
7663
|
MatchProvider,
|
|
7634
7664
|
useMatch
|
|
7635
7665
|
};
|
|
7636
|
-
//# sourceMappingURL=chunk-
|
|
7666
|
+
//# sourceMappingURL=chunk-KFB23MLQ.mjs.map
|