@matchain/matchid-sdk-react 0.1.55-alpha.14 → 0.1.55-alpha.15

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.
Files changed (45) hide show
  1. package/dist/api.js +20 -20
  2. package/dist/api.js.map +1 -1
  3. package/dist/api.mjs +5 -5
  4. package/dist/assets/lottie.mjs +2 -2
  5. package/dist/chains.mjs +2 -2
  6. package/dist/{chunk-X4IQIC5B.mjs → chunk-66QEWNJJ.mjs} +2 -2
  7. package/dist/{chunk-VIJ3M2NZ.mjs → chunk-BWGTZNIT.mjs} +160 -153
  8. package/dist/chunk-BWGTZNIT.mjs.map +1 -0
  9. package/dist/{chunk-MY4NT7YU.mjs → chunk-KZRLSMA4.mjs} +2 -2
  10. package/dist/{chunk-SZI6ASMZ.mjs → chunk-RFAPTFVE.mjs} +2 -2
  11. package/dist/{chunk-327CPPF5.mjs → chunk-ULDTUWGQ.mjs} +3 -3
  12. package/dist/chunk-VO2OJADI.mjs +37 -0
  13. package/dist/{chunk-MGWV4BUU.mjs → chunk-ZC36JTEM.mjs} +2 -2
  14. package/dist/components.js +17181 -321
  15. package/dist/components.js.map +1 -1
  16. package/dist/components.mjs +4 -4
  17. package/dist/hooks.js +17082 -222
  18. package/dist/hooks.js.map +1 -1
  19. package/dist/hooks.mjs +4 -4
  20. package/dist/icon.mjs +2 -2
  21. package/dist/{index-B4lczvhL.d.mts → index-Dx4OFZhG.d.mts} +3 -4
  22. package/dist/{index-UJfUO0uH.d.ts → index-hiCo96Vc.d.ts} +3 -4
  23. package/dist/index.d.mts +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.es-FMP4VX4N.mjs +16847 -0
  26. package/dist/index.es-FMP4VX4N.mjs.map +1 -0
  27. package/dist/index.js +17196 -336
  28. package/dist/index.js.map +1 -1
  29. package/dist/index.mjs +7 -7
  30. package/dist/types.mjs +2 -2
  31. package/dist/ui.d.mts +1 -1
  32. package/dist/ui.d.ts +1 -1
  33. package/dist/ui.js +16929 -69
  34. package/dist/ui.js.map +1 -1
  35. package/dist/ui.mjs +6 -6
  36. package/dist/utils.mjs +1 -1
  37. package/package.json +1 -1
  38. package/dist/chunk-BJPOCE4O.mjs +0 -11
  39. package/dist/chunk-VIJ3M2NZ.mjs.map +0 -1
  40. /package/dist/{chunk-X4IQIC5B.mjs.map → chunk-66QEWNJJ.mjs.map} +0 -0
  41. /package/dist/{chunk-MY4NT7YU.mjs.map → chunk-KZRLSMA4.mjs.map} +0 -0
  42. /package/dist/{chunk-SZI6ASMZ.mjs.map → chunk-RFAPTFVE.mjs.map} +0 -0
  43. /package/dist/{chunk-327CPPF5.mjs.map → chunk-ULDTUWGQ.mjs.map} +0 -0
  44. /package/dist/{chunk-BJPOCE4O.mjs.map → chunk-VO2OJADI.mjs.map} +0 -0
  45. /package/dist/{chunk-MGWV4BUU.mjs.map → chunk-ZC36JTEM.mjs.map} +0 -0
@@ -64,7 +64,7 @@ import {
64
64
  XIcon,
65
65
  XverseIcon,
66
66
  YoutubeIcon
67
- } from "./chunk-SZI6ASMZ.mjs";
67
+ } from "./chunk-RFAPTFVE.mjs";
68
68
  import {
69
69
  confirm_default,
70
70
  connecting_default,
@@ -73,10 +73,10 @@ import {
73
73
  signing_default,
74
74
  success_default,
75
75
  wallet_default
76
- } from "./chunk-MGWV4BUU.mjs";
76
+ } from "./chunk-ZC36JTEM.mjs";
77
77
  import {
78
78
  __export
79
- } from "./chunk-BJPOCE4O.mjs";
79
+ } from "./chunk-VO2OJADI.mjs";
80
80
 
81
81
  // src/components/index.tsx
82
82
  var components_exports = {};
@@ -107,7 +107,7 @@ __export(components_exports, {
107
107
  });
108
108
 
109
109
  // src/components/EmailModal/index.tsx
110
- import { useEffect as useEffect19, useState as useState19 } from "react";
110
+ import { useEffect as useEffect20, useState as useState20 } from "react";
111
111
 
112
112
  // src/ui/Modal/index.tsx
113
113
  import { useEffect as useEffect3, useState as useState2 } from "react";
@@ -943,11 +943,11 @@ var useStore_default = useStore;
943
943
  // src/hooks/useWallet.tsx
944
944
  import { toAccount } from "viem/accounts";
945
945
  import { createWalletClient } from "viem";
946
- import { useEffect as useEffect7, useMemo as useMemo3 } from "react";
946
+ import { useEffect as useEffect8, useMemo as useMemo3 } from "react";
947
947
  import { encodeDeployData } from "viem";
948
948
 
949
949
  // src/context/ModalContext.tsx
950
- import React3, { useState as useState7, useCallback, createContext, useContext } from "react";
950
+ import React3, { useState as useState8, useCallback, createContext, useContext } from "react";
951
951
  import { createPortal } from "react-dom";
952
952
 
953
953
  // src/ui/index.ts
@@ -960,7 +960,7 @@ __export(ui_exports, {
960
960
  Field: () => Field,
961
961
  HashPanel: () => HashPanel_default,
962
962
  Input: () => Input,
963
- Lottie: () => Lottie,
963
+ Lottie: () => Lottie_default,
964
964
  Modal: () => Modal,
965
965
  ModalDrawer: () => ModalDrawer,
966
966
  ModalWithHeader: () => ModalWithHeader,
@@ -1141,7 +1141,7 @@ function HashPanel({
1141
1141
  /* @__PURE__ */ jsx9("div", { className: `matchid-hashpanel-status`, style: {
1142
1142
  color: statusValue.color
1143
1143
  }, children: statusValue.text }),
1144
- statusValue.lottie ? /* @__PURE__ */ jsx9(Lottie, { animationData: statusValue.lottie, style: {
1144
+ statusValue.lottie ? /* @__PURE__ */ jsx9(Lottie_default, { animationData: statusValue.lottie, style: {
1145
1145
  width: "96px",
1146
1146
  height: "96px"
1147
1147
  } }) : /* @__PURE__ */ jsx9("img", { src: statusValue.icon, alt: statusValue.text, className: `matchid-hashpanel-img` }),
@@ -1298,18 +1298,25 @@ function Tabs(props) {
1298
1298
  }
1299
1299
 
1300
1300
  // src/ui/Lottie/index.tsx
1301
- import * as LottieReact from "lottie-react";
1301
+ import { useEffect as useEffect7, useState as useState7 } from "react";
1302
1302
  import { jsx as jsx16 } from "react/jsx-runtime";
1303
- var FixedLottie = LottieReact.default || LottieReact;
1304
- function Lottie(props) {
1305
- return /* @__PURE__ */ jsx16(FixedLottie, { loop: true, autoplay: true, ...props });
1306
- }
1303
+ var LazyLottie = (props) => {
1304
+ const [LottieReact, setLottieReact] = useState7(null);
1305
+ useEffect7(() => {
1306
+ import("./index.es-FMP4VX4N.mjs").then((mod) => {
1307
+ setLottieReact(mod.default || mod);
1308
+ });
1309
+ }, []);
1310
+ if (!LottieReact) return /* @__PURE__ */ jsx16("div", { children: "Loading..." });
1311
+ return /* @__PURE__ */ jsx16(LottieReact, { loop: true, autoplay: true, ...props });
1312
+ };
1313
+ var Lottie_default = LazyLottie;
1307
1314
 
1308
1315
  // src/context/ModalContext.tsx
1309
1316
  import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
1310
1317
  var ModalContext = createContext(null);
1311
1318
  function ModalProvider({ children }) {
1312
- const [modalState, setModalState] = useState7({
1319
+ const [modalState, setModalState] = useState8({
1313
1320
  modals: [],
1314
1321
  highestZIndex: 100
1315
1322
  });
@@ -1494,7 +1501,7 @@ function useWallet() {
1494
1501
  return void 0;
1495
1502
  }
1496
1503
  }, [address]);
1497
- useEffect7(() => {
1504
+ useEffect8(() => {
1498
1505
  matchlog_default.log("qwe-evmAccount", evmAccount);
1499
1506
  }, [evmAccount]);
1500
1507
  const realCreateWalletClient = (parameters) => {
@@ -1637,14 +1644,14 @@ function useWallet() {
1637
1644
 
1638
1645
  // src/hooks/useCopyClipboard.ts
1639
1646
  import copy from "copy-to-clipboard";
1640
- import { useCallback as useCallback2, useEffect as useEffect8, useState as useState9 } from "react";
1647
+ import { useCallback as useCallback2, useEffect as useEffect9, useState as useState10 } from "react";
1641
1648
  function useCopyClipboard(timeout = 500) {
1642
- const [isCopied, setIsCopied] = useState9(false);
1649
+ const [isCopied, setIsCopied] = useState10(false);
1643
1650
  const staticCopy = useCallback2((text) => {
1644
1651
  const didCopy = copy(text);
1645
1652
  setIsCopied(didCopy);
1646
1653
  }, []);
1647
- useEffect8(() => {
1654
+ useEffect9(() => {
1648
1655
  if (isCopied) {
1649
1656
  const hide = setTimeout(() => {
1650
1657
  setIsCopied(false);
@@ -1659,12 +1666,12 @@ function useCopyClipboard(timeout = 500) {
1659
1666
  }
1660
1667
 
1661
1668
  // src/context/ToastContext.tsx
1662
- import { useState as useState10, useCallback as useCallback3, createContext as createContext2, useContext as useContext2 } from "react";
1669
+ import { useState as useState11, useCallback as useCallback3, createContext as createContext2, useContext as useContext2 } from "react";
1663
1670
  import { createPortal as createPortal2 } from "react-dom";
1664
1671
  import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
1665
1672
  var ToastContext = createContext2(null);
1666
1673
  function ToastProvider({ children, zIndex = 299 }) {
1667
- const [toasts, setToasts] = useState10([]);
1674
+ const [toasts, setToasts] = useState11([]);
1668
1675
  const removeToast = useCallback3((id) => {
1669
1676
  setToasts((prev) => prev.filter((toast) => toast.id !== id));
1670
1677
  }, []);
@@ -1837,7 +1844,7 @@ function useWalletAssetListQuery({
1837
1844
  }
1838
1845
 
1839
1846
  // src/hooks/useMatchChain.tsx
1840
- import { useMemo as useMemo4, useState as useState11 } from "react";
1847
+ import { useMemo as useMemo4, useState as useState12 } from "react";
1841
1848
  import { createPublicClient as createPublicClient3, formatUnits, http as http3, parseUnits } from "viem";
1842
1849
  import { FormattedMessage as FormattedMessage2, useIntl as useIntl3 } from "react-intl";
1843
1850
  import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
@@ -1869,7 +1876,7 @@ function useMatchChain() {
1869
1876
  close
1870
1877
  }) {
1871
1878
  const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
1872
- const [selectedChainId, setSelectedChainId] = useState11(storeChainId2);
1879
+ const [selectedChainId, setSelectedChainId] = useState12(storeChainId2);
1873
1880
  const isDownMd = useDownMd();
1874
1881
  return /* @__PURE__ */ jsxs10("div", { className: `matchid-change-network-box`, children: [
1875
1882
  /* @__PURE__ */ jsx20("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
@@ -1929,7 +1936,7 @@ function useMatchChain() {
1929
1936
 
1930
1937
  // src/hooks/useMatchWallet.tsx
1931
1938
  import { QRCode } from "react-qrcode";
1932
- import { useEffect as useEffect11, useMemo as useMemo6, useRef, useState as useState13 } from "react";
1939
+ import { useEffect as useEffect12, useMemo as useMemo6, useRef, useState as useState14 } from "react";
1933
1940
  import { useQuery as useQuery4 } from "@tanstack/react-query";
1934
1941
 
1935
1942
  // src/config/index.tsx
@@ -2000,7 +2007,7 @@ var useContractStore_default = useContractStore;
2000
2007
  import { FormattedMessage as FormattedMessage4, useIntl as useIntl5 } from "react-intl";
2001
2008
 
2002
2009
  // src/components/ImportToken/index.tsx
2003
- import { useEffect as useEffect10, useMemo as useMemo5, useState as useState12 } from "react";
2010
+ import { useEffect as useEffect11, useMemo as useMemo5, useState as useState13 } from "react";
2004
2011
  import { FormattedMessage as FormattedMessage3, useIntl as useIntl4 } from "react-intl";
2005
2012
  import { useQueryClient } from "@tanstack/react-query";
2006
2013
  import { defineChain, erc20Abi } from "viem";
@@ -2032,12 +2039,12 @@ function useIsContract({
2032
2039
  // src/components/ImportToken/index.tsx
2033
2040
  import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
2034
2041
  function ImportToken({ close }) {
2035
- const [status, setStatus] = useState12("");
2042
+ const [status, setStatus] = useState13("");
2036
2043
  const { token } = useUserInfo();
2037
- const [address, setAddress] = useState12("");
2038
- const [symbol, setSymbol] = useState12("");
2039
- const [decimals, setDecimals] = useState12("");
2040
- const [error, setError] = useState12({});
2044
+ const [address, setAddress] = useState13("");
2045
+ const [symbol, setSymbol] = useState13("");
2046
+ const [decimals, setDecimals] = useState13("");
2047
+ const [error, setError] = useState13({});
2041
2048
  const { publicClient, chainId, chain } = useMatchChain();
2042
2049
  const getContractInfo = async () => {
2043
2050
  if (!publicClient) return;
@@ -2071,7 +2078,7 @@ function ImportToken({ close }) {
2071
2078
  }
2072
2079
  };
2073
2080
  const intl = useIntl4();
2074
- useEffect10(() => {
2081
+ useEffect11(() => {
2075
2082
  if (address.length === 42) {
2076
2083
  const reg = /^0x[0-9a-fA-F]{40}$/;
2077
2084
  if (!reg.test(address)) {
@@ -2090,7 +2097,7 @@ function ImportToken({ close }) {
2090
2097
  }
2091
2098
  }
2092
2099
  }, [address, publicClient]);
2093
- const [loading, setLoading] = useState12(false);
2100
+ const [loading, setLoading] = useState13(false);
2094
2101
  const toast = useToast();
2095
2102
  const queryClient2 = useQueryClient();
2096
2103
  const onImport = async () => {
@@ -2143,7 +2150,7 @@ function ImportToken({ close }) {
2143
2150
  if (status == "success" || status == "fail") {
2144
2151
  return /* @__PURE__ */ jsxs11("div", { className: `matchid-import-token-result matchid-flex`, children: [
2145
2152
  /* @__PURE__ */ jsxs11("div", { className: `matchid-import-token-result-box matchid-flex`, children: [
2146
- /* @__PURE__ */ jsx21("div", { className: `matchid-import-token-result-img`, children: /* @__PURE__ */ jsx21(Lottie, { animationData: status == "success" ? success_default : fail_default, style: {
2153
+ /* @__PURE__ */ jsx21("div", { className: `matchid-import-token-result-img`, children: /* @__PURE__ */ jsx21(Lottie_default, { animationData: status == "success" ? success_default : fail_default, style: {
2147
2154
  width: "96px",
2148
2155
  height: "96px"
2149
2156
  } }) }),
@@ -2287,8 +2294,8 @@ function useMatchWallet() {
2287
2294
  };
2288
2295
  }
2289
2296
  function useMatchWalletRecords() {
2290
- const [hasMore, setHasMore] = useState13(true);
2291
- const [items, setItems] = useState13([]);
2297
+ const [hasMore, setHasMore] = useState14(true);
2298
+ const [items, setItems] = useState14([]);
2292
2299
  const { chainId, publicClient } = useMatchChain();
2293
2300
  const { address } = useWallet();
2294
2301
  const hasMoreRef = useRef(hasMore);
@@ -2319,7 +2326,7 @@ function useMatchWalletRecords() {
2319
2326
  hasMoreRef.current = true;
2320
2327
  fetchMoreData();
2321
2328
  };
2322
- useEffect11(() => {
2329
+ useEffect12(() => {
2323
2330
  if (chainId && address) {
2324
2331
  onInit();
2325
2332
  }
@@ -2554,7 +2561,7 @@ function useMatchWalletAssetList({
2554
2561
  return { ...asset, balance, value, balanceValue };
2555
2562
  });
2556
2563
  }, [list, nativeBalanceQuery.data, erc20BalanceQuery.data]);
2557
- useEffect11(() => {
2564
+ useEffect12(() => {
2558
2565
  const list2 = enrichedAssets.sort((a, b) => {
2559
2566
  if (a.address === NATIVE_TOKEN_ADDRESS) return -1;
2560
2567
  if (b.address === NATIVE_TOKEN_ADDRESS) return 1;
@@ -2579,14 +2586,14 @@ function useMatchWalletAssetList({
2579
2586
  }
2580
2587
 
2581
2588
  // src/hooks/useReceipt.tsx
2582
- import { useState as useState14, useCallback as useCallback4, useEffect as useEffect12 } from "react";
2589
+ import { useState as useState15, useCallback as useCallback4, useEffect as useEffect13 } from "react";
2583
2590
  import { useQuery as useQuery5 } from "@tanstack/react-query";
2584
2591
  import { createPublicClient as createPublicClient5, defineChain as defineChain2, http as http5 } from "viem";
2585
2592
  var CACHE_TTL = 86400 * 30 * 1e3;
2586
2593
  var MAX_CACHE_SIZE = 500;
2587
2594
  var STORAGE_KEY = "match_receipt_logs";
2588
2595
  function useReceiptCache() {
2589
- const [cache, setCache] = useState14(/* @__PURE__ */ new Map());
2596
+ const [cache, setCache] = useState15(/* @__PURE__ */ new Map());
2590
2597
  const isLocalStorageAvailable = (() => {
2591
2598
  try {
2592
2599
  const testKey = "__test__";
@@ -2597,7 +2604,7 @@ function useReceiptCache() {
2597
2604
  return false;
2598
2605
  }
2599
2606
  })();
2600
- useEffect12(() => {
2607
+ useEffect13(() => {
2601
2608
  if (isLocalStorageAvailable) {
2602
2609
  try {
2603
2610
  const storedData = localStorage.getItem(STORAGE_KEY);
@@ -2688,7 +2695,7 @@ function useReceipt({
2688
2695
  const { list } = useMatchChain();
2689
2696
  const cache = useReceiptCache();
2690
2697
  const chain = list?.find((item) => item.id === chainId);
2691
- const [shouldRefetch, setShouldRefetch] = useState14(true);
2698
+ const [shouldRefetch, setShouldRefetch] = useState15(true);
2692
2699
  const query = useQuery5({
2693
2700
  queryKey: ["match-tx-receipt", hash, chain],
2694
2701
  queryFn: async () => {
@@ -2714,7 +2721,7 @@ function useReceipt({
2714
2721
  },
2715
2722
  refetchInterval: shouldRefetch ? 1e4 : false
2716
2723
  });
2717
- useEffect12(() => {
2724
+ useEffect13(() => {
2718
2725
  if (query.data) {
2719
2726
  setShouldRefetch(false);
2720
2727
  }
@@ -2723,14 +2730,14 @@ function useReceipt({
2723
2730
  }
2724
2731
 
2725
2732
  // src/hooks/useTransaction.tsx
2726
- import { useState as useState15, useCallback as useCallback5, useEffect as useEffect13 } from "react";
2733
+ import { useState as useState16, useCallback as useCallback5, useEffect as useEffect14 } from "react";
2727
2734
  import { useQuery as useQuery6 } from "@tanstack/react-query";
2728
2735
  import { createPublicClient as createPublicClient6, defineChain as defineChain3, http as http6 } from "viem";
2729
2736
  var CACHE_TTL2 = 86400 * 30 * 1e3;
2730
2737
  var MAX_CACHE_SIZE2 = 500;
2731
2738
  var STORAGE_KEY2 = "match_transaction_logs";
2732
2739
  function useTransactionCache() {
2733
- const [cache, setCache] = useState15(/* @__PURE__ */ new Map());
2740
+ const [cache, setCache] = useState16(/* @__PURE__ */ new Map());
2734
2741
  const isLocalStorageAvailable = (() => {
2735
2742
  try {
2736
2743
  const testKey = "__test__";
@@ -2741,7 +2748,7 @@ function useTransactionCache() {
2741
2748
  return false;
2742
2749
  }
2743
2750
  })();
2744
- useEffect13(() => {
2751
+ useEffect14(() => {
2745
2752
  if (isLocalStorageAvailable) {
2746
2753
  try {
2747
2754
  const storedData = localStorage.getItem(STORAGE_KEY2);
@@ -2832,7 +2839,7 @@ function useTransaction({
2832
2839
  const { list } = useMatchChain();
2833
2840
  const cache = useTransactionCache();
2834
2841
  const chain = list?.find((item) => item.id === chainId);
2835
- const [shouldRefetch, setShouldRefetch] = useState15(true);
2842
+ const [shouldRefetch, setShouldRefetch] = useState16(true);
2836
2843
  const query = useQuery6({
2837
2844
  queryKey: ["match-tx-transaction", hash, chain],
2838
2845
  queryFn: async () => {
@@ -2858,7 +2865,7 @@ function useTransaction({
2858
2865
  },
2859
2866
  refetchInterval: shouldRefetch ? 1e4 : false
2860
2867
  });
2861
- useEffect13(() => {
2868
+ useEffect14(() => {
2862
2869
  if (query.data) {
2863
2870
  setShouldRefetch(false);
2864
2871
  }
@@ -2952,7 +2959,7 @@ var useWalletModalStore = create5((set) => ({
2952
2959
  }));
2953
2960
 
2954
2961
  // src/components/CEXBindModal/index.tsx
2955
- import { useEffect as useEffect14, useMemo as useMemo7, useState as useState16 } from "react";
2962
+ import { useEffect as useEffect15, useMemo as useMemo7, useState as useState17 } from "react";
2956
2963
  import { FormattedMessage as FormattedMessage5, useIntl as useIntl6 } from "react-intl";
2957
2964
  import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
2958
2965
  function CEXBindModal({
@@ -2963,16 +2970,16 @@ function CEXBindModal({
2963
2970
  }) {
2964
2971
  const intl = useIntl6();
2965
2972
  const { events } = useMatch();
2966
- const [APIPassphrase, setAPIPassphrase] = useState16("");
2973
+ const [APIPassphrase, setAPIPassphrase] = useState17("");
2967
2974
  const { refreshOverview } = useUserInfo();
2968
- const [loading, setLoading] = useState16(false);
2969
- const [key, setKey] = useState16("");
2970
- const [secret, setSecret] = useState16("");
2971
- const [error, setError] = useState16("");
2975
+ const [loading, setLoading] = useState17(false);
2976
+ const [key, setKey] = useState17("");
2977
+ const [secret, setSecret] = useState17("");
2978
+ const [error, setError] = useState17("");
2972
2979
  const needPassphrase = useMemo7(() => {
2973
2980
  return ["bitget", "okx"].includes(type.toLowerCase());
2974
2981
  }, [type]);
2975
- useEffect14(() => {
2982
+ useEffect15(() => {
2976
2983
  if (isOpen) {
2977
2984
  setSecret("");
2978
2985
  setKey("");
@@ -3172,7 +3179,7 @@ var Providers = ({ children }) => {
3172
3179
  var context_default = Providers;
3173
3180
 
3174
3181
  // src/hooks/useWalletInit.ts
3175
- import { useEffect as useEffect15, useRef as useRef2 } from "react";
3182
+ import { useEffect as useEffect16, useRef as useRef2 } from "react";
3176
3183
 
3177
3184
  // src/utils/wallet.ts
3178
3185
  var sendMessage = ({ method, data, resolve, reject, timeout }) => {
@@ -3206,10 +3213,10 @@ function useWalletInit({
3206
3213
  const { endpoints, token, setWallet, appid, refreshOverview } = useLocalStore_default();
3207
3214
  const { setWalletReady, walletReady } = useStore_default();
3208
3215
  const iframeReadyRef = useRef2(walletReady);
3209
- useEffect15(() => {
3216
+ useEffect16(() => {
3210
3217
  setWallet(config);
3211
3218
  }, [config]);
3212
- useEffect15(() => {
3219
+ useEffect16(() => {
3213
3220
  matchlog_default.log("sdk.mpc.status", walletReady, iframeReadyRef.current);
3214
3221
  iframeReadyRef.current = walletReady;
3215
3222
  if (iframeReadyRef.current) {
@@ -3226,7 +3233,7 @@ function useWalletInit({
3226
3233
  onReady();
3227
3234
  }
3228
3235
  }, [walletReady]);
3229
- useEffect15(() => {
3236
+ useEffect16(() => {
3230
3237
  if (!endpoints.auth || !appid || !token || !config) {
3231
3238
  const existingIframe = getWalletIframe();
3232
3239
  if (existingIframe) {
@@ -3326,7 +3333,7 @@ function useWalletInit({
3326
3333
  }
3327
3334
  }
3328
3335
  }, [endpoints.auth, appid, token, config]);
3329
- useEffect15(() => {
3336
+ useEffect16(() => {
3330
3337
  const messageHandle = async (e) => {
3331
3338
  if (e.origin !== endpoints.auth.substring(0, endpoints.auth.length - 1)) {
3332
3339
  return;
@@ -3407,7 +3414,7 @@ function useWalletInit({
3407
3414
  }
3408
3415
 
3409
3416
  // src/hooks/useInit.tsx
3410
- import { useEffect as useEffect16, useRef as useRef3 } from "react";
3417
+ import { useEffect as useEffect17, useRef as useRef3 } from "react";
3411
3418
  function useInit({
3412
3419
  theme,
3413
3420
  appid,
@@ -3432,19 +3439,19 @@ function useInit({
3432
3439
  const matchToken = searchParams.get("matchToken");
3433
3440
  const matchidt = searchParams.get("matchidt");
3434
3441
  const realEndpoints = endpoints || env_default.endpoints;
3435
- useEffect16(() => {
3442
+ useEffect17(() => {
3436
3443
  setTheme(theme);
3437
3444
  }, [theme]);
3438
- useEffect16(() => {
3445
+ useEffect17(() => {
3439
3446
  setAppid(appid);
3440
3447
  }, [appid]);
3441
- useEffect16(() => {
3448
+ useEffect17(() => {
3442
3449
  setEndpoints(realEndpoints);
3443
3450
  }, [realEndpoints]);
3444
- useEffect16(() => {
3451
+ useEffect17(() => {
3445
3452
  setLocale(locale || "en");
3446
3453
  }, [locale]);
3447
- useEffect16(() => {
3454
+ useEffect17(() => {
3448
3455
  if (matchToken) {
3449
3456
  const tokenData = JSON.parse(atob(matchToken));
3450
3457
  if (tokenData && tokenData.mid && tokenData.token) {
@@ -3455,7 +3462,7 @@ function useInit({
3455
3462
  }
3456
3463
  }
3457
3464
  }, [matchToken]);
3458
- useEffect16(() => {
3465
+ useEffect17(() => {
3459
3466
  if (matchidt) {
3460
3467
  const tokenData = decodeURIComponent(matchidt);
3461
3468
  const data = JSON.parse(decodeBase64(tokenData));
@@ -3485,7 +3492,7 @@ function useInit({
3485
3492
  }
3486
3493
  }
3487
3494
  }, [matchidt]);
3488
- useEffect16(() => {
3495
+ useEffect17(() => {
3489
3496
  const onLoginMessage = (event) => {
3490
3497
  const res = event.data;
3491
3498
  if (res.event === "login" && res.data && (res.data.token || res.data.token_type && res.data.access_token)) {
@@ -3522,7 +3529,7 @@ function useInit({
3522
3529
  overviewLoadingRef.current = false;
3523
3530
  }
3524
3531
  };
3525
- useEffect16(() => {
3532
+ useEffect17(() => {
3526
3533
  if (token) {
3527
3534
  loadOverview();
3528
3535
  }
@@ -4731,18 +4738,18 @@ function useUserInfo() {
4731
4738
  }
4732
4739
 
4733
4740
  // src/components/EmailModal/StepVerify.tsx
4734
- import { useEffect as useEffect18, useMemo as useMemo9, useRef as useRef4, useState as useState18 } from "react";
4741
+ import { useEffect as useEffect19, useMemo as useMemo9, useRef as useRef4, useState as useState19 } from "react";
4735
4742
  import { FormattedMessage as FormattedMessage6, useIntl as useIntl7 } from "react-intl";
4736
4743
  import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
4737
4744
  function StepVerify(props) {
4738
4745
  const intl = useIntl7();
4739
4746
  const { getLoginEmailCode, loginByEmail } = useUserInfo();
4740
- const [error, setError] = useState18("");
4741
- const [code, setCode] = useState18("");
4742
- const [sending, setSending] = useState18(false);
4743
- const [submitting, setSubmitting] = useState18(false);
4747
+ const [error, setError] = useState19("");
4748
+ const [code, setCode] = useState19("");
4749
+ const [sending, setSending] = useState19(false);
4750
+ const [submitting, setSubmitting] = useState19(false);
4744
4751
  const sendTimeRef = useRef4(0);
4745
- const [sendBtnText, setSendBtnText] = useState18(intl.formatMessage({
4752
+ const [sendBtnText, setSendBtnText] = useState19(intl.formatMessage({
4746
4753
  id: "send"
4747
4754
  }));
4748
4755
  const intervalTime = EMAIL_INTERVAL;
@@ -4778,7 +4785,7 @@ function StepVerify(props) {
4778
4785
  setSending(false);
4779
4786
  }
4780
4787
  };
4781
- useEffect18(() => {
4788
+ useEffect19(() => {
4782
4789
  onSend();
4783
4790
  return () => {
4784
4791
  if (intervalRef.current) {
@@ -4863,10 +4870,10 @@ function EmailModal({
4863
4870
  onBack,
4864
4871
  onLogin
4865
4872
  }) {
4866
- const [step, setStep] = useState19("input");
4867
- const [emailVal, setEmailVal] = useState19("");
4873
+ const [step, setStep] = useState20("input");
4874
+ const [emailVal, setEmailVal] = useState20("");
4868
4875
  const intl = useIntl8();
4869
- useEffect19(() => {
4876
+ useEffect20(() => {
4870
4877
  if (!isOpen) {
4871
4878
  setStep("input");
4872
4879
  setEmailVal("");
@@ -4891,7 +4898,7 @@ function EmailModal({
4891
4898
  }
4892
4899
 
4893
4900
  // src/components/LoginBox/index.tsx
4894
- import { useMemo as useMemo10, useState as useState20 } from "react";
4901
+ import { useMemo as useMemo10, useState as useState21 } from "react";
4895
4902
  import { FormattedMessage as FormattedMessage7, useIntl as useIntl9 } from "react-intl";
4896
4903
 
4897
4904
  // src/hooks/useAppConfig.ts
@@ -5004,9 +5011,9 @@ function LoginBox({
5004
5011
  walletMethods: walletMethodList
5005
5012
  };
5006
5013
  }, [config.platform, recommendMethods, methods, walletMethods]);
5007
- const [emailOpen, setEmailOpen] = useState20(false);
5014
+ const [emailOpen, setEmailOpen] = useState21(false);
5008
5015
  const { login } = useUserInfo();
5009
- const [showWallet, setShowWallet] = useState20(false);
5016
+ const [showWallet, setShowWallet] = useState21(false);
5010
5017
  const intl = useIntl9();
5011
5018
  const isDownMd = useDownMd();
5012
5019
  const methodMap = {
@@ -5154,7 +5161,7 @@ function LoginBox({
5154
5161
  }
5155
5162
 
5156
5163
  // src/components/LoginButton/index.tsx
5157
- import { useState as useState22 } from "react";
5164
+ import { useState as useState23 } from "react";
5158
5165
 
5159
5166
  // src/components/LoginPanel/index.tsx
5160
5167
  import { FormattedMessage as FormattedMessage8 } from "react-intl";
@@ -5197,7 +5204,7 @@ function LoginModal({
5197
5204
  }
5198
5205
 
5199
5206
  // src/components/UserPopover/index.tsx
5200
- import { useState as useState21 } from "react";
5207
+ import { useState as useState22 } from "react";
5201
5208
 
5202
5209
  // src/assets/icon/ProfileIcon.tsx
5203
5210
  import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
@@ -5229,7 +5236,7 @@ import { FormattedMessage as FormattedMessage9, useIntl as useIntl10 } from "rea
5229
5236
  import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
5230
5237
  function UserContent() {
5231
5238
  const { logout, address, username } = useUserInfo();
5232
- const [logouting, setLogouting] = useState21(false);
5239
+ const [logouting, setLogouting] = useState22(false);
5233
5240
  const onLogout = async () => {
5234
5241
  if (logouting) return;
5235
5242
  try {
@@ -5258,7 +5265,7 @@ function UserContent() {
5258
5265
  const UserDivider = () => {
5259
5266
  return /* @__PURE__ */ jsx34("div", { className: `matchid-user-popover-divider` });
5260
5267
  };
5261
- const [usernameOpen, setUsernameOpen] = useState21(false);
5268
+ const [usernameOpen, setUsernameOpen] = useState22(false);
5262
5269
  const [copied, setCopied] = useCopyClipboard();
5263
5270
  const intl = useIntl10();
5264
5271
  return /* @__PURE__ */ jsxs19("div", { className: "matchid-user-popover-content", children: [
@@ -5304,7 +5311,7 @@ function LoginButton({
5304
5311
  }) {
5305
5312
  const intl = useIntl11();
5306
5313
  const { isLogin, username } = useUserInfo();
5307
- const [loginOpen, setLoginOpen] = useState22(false);
5314
+ const [loginOpen, setLoginOpen] = useState23(false);
5308
5315
  if (!isLogin) {
5309
5316
  return /* @__PURE__ */ jsxs20(Fragment6, { children: [
5310
5317
  /* @__PURE__ */ jsx35(
@@ -5332,7 +5339,7 @@ function LoginButton({
5332
5339
  }
5333
5340
 
5334
5341
  // src/components/UsernameModal/index.tsx
5335
- import { useEffect as useEffect20, useMemo as useMemo11, useState as useState23 } from "react";
5342
+ import { useEffect as useEffect21, useMemo as useMemo11, useState as useState24 } from "react";
5336
5343
  import { FormattedMessage as FormattedMessage11, useIntl as useIntl12 } from "react-intl";
5337
5344
  import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
5338
5345
  var ValidItem = ({
@@ -5353,10 +5360,10 @@ function UsernameModal({
5353
5360
  }) {
5354
5361
  const { username, refreshOverview } = useUserInfo();
5355
5362
  const { isLogin } = useUserInfo();
5356
- const [val, setVal] = useState23(username);
5357
- const [error, setError] = useState23("");
5363
+ const [val, setVal] = useState24(username);
5364
+ const [error, setError] = useState24("");
5358
5365
  const isDownMd = useDownMd();
5359
- useEffect20(() => {
5366
+ useEffect21(() => {
5360
5367
  if (isOpen) {
5361
5368
  setVal(username);
5362
5369
  setError("");
@@ -5369,7 +5376,7 @@ function UsernameModal({
5369
5376
  return val.length >= 2 && val.length <= 32;
5370
5377
  }, [val]);
5371
5378
  const isSafe = isValid && isLength;
5372
- const [isSubmitting, setIsSubmitting] = useState23(false);
5379
+ const [isSubmitting, setIsSubmitting] = useState24(false);
5373
5380
  const onSubmit = async () => {
5374
5381
  if (isSubmitting) return;
5375
5382
  try {
@@ -5432,11 +5439,11 @@ function UsernameModal({
5432
5439
  }
5433
5440
 
5434
5441
  // src/components/EVMModal/index.tsx
5435
- import { useCallback as useCallback6, useEffect as useEffect22, useState as useState26 } from "react";
5442
+ import { useCallback as useCallback6, useEffect as useEffect23, useState as useState27 } from "react";
5436
5443
  import { useIntl as useIntl13 } from "react-intl";
5437
5444
 
5438
5445
  // src/components/WalletModalContent/index.tsx
5439
- import { useMemo as useMemo12, useState as useState24 } from "react";
5446
+ import { useMemo as useMemo12, useState as useState25 } from "react";
5440
5447
 
5441
5448
  // src/assets/wallet.ts
5442
5449
  var walletErrorImage = error_default;
@@ -5518,7 +5525,7 @@ function WalletModalContent({
5518
5525
  }, [visible, connected, status, error, address]);
5519
5526
  return /* @__PURE__ */ jsx37("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ jsxs22("div", { className: `matchid-wallet-box`, children: [
5520
5527
  /* @__PURE__ */ jsxs22("div", { className: `matchid-wallet-content`, children: [
5521
- /* @__PURE__ */ jsx37(Lottie, { animationData: pageData.statusImage, style: {
5528
+ /* @__PURE__ */ jsx37(Lottie_default, { animationData: pageData.statusImage, style: {
5522
5529
  width: 128,
5523
5530
  height: 128
5524
5531
  } }),
@@ -5538,7 +5545,7 @@ function WalletModalContent({
5538
5545
  ] }) });
5539
5546
  }
5540
5547
  function WalletModalContentV2(props) {
5541
- const [submitting, setSubmitting] = useState24(false);
5548
+ const [submitting, setSubmitting] = useState25(false);
5542
5549
  const pageData = useMemo12(() => {
5543
5550
  const { status } = props;
5544
5551
  if (status == "success") {
@@ -5602,7 +5609,7 @@ function WalletModalContentV2(props) {
5602
5609
  }, [props, submitting]);
5603
5610
  return /* @__PURE__ */ jsx37("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ jsxs22("div", { className: `matchid-wallet-box`, children: [
5604
5611
  /* @__PURE__ */ jsxs22("div", { className: `matchid-wallet-content`, children: [
5605
- /* @__PURE__ */ jsx37(Lottie, { animationData: pageData.statusImage, style: {
5612
+ /* @__PURE__ */ jsx37(Lottie_default, { animationData: pageData.statusImage, style: {
5606
5613
  width: 128,
5607
5614
  height: 128
5608
5615
  } }),
@@ -5627,14 +5634,14 @@ import { useConnectModal } from "@rainbow-me/rainbowkit";
5627
5634
  import { useAccount, useChainId, useConfig, useDisconnect } from "wagmi";
5628
5635
 
5629
5636
  // src/hooks/useWalletBox.ts
5630
- import { useEffect as useEffect21, useRef as useRef5, useState as useState25 } from "react";
5637
+ import { useEffect as useEffect22, useRef as useRef5, useState as useState26 } from "react";
5631
5638
  function useWalletBox({
5632
5639
  onInit
5633
5640
  }) {
5634
- const [status, setStateStatus] = useState25("start");
5635
- const [error, setError] = useState25("");
5641
+ const [status, setStateStatus] = useState26("start");
5642
+ const [error, setError] = useState26("");
5636
5643
  const statusRef = useRef5(status);
5637
- const [nonce, setNonce] = useState25();
5644
+ const [nonce, setNonce] = useState26();
5638
5645
  const setStatus = (status2) => {
5639
5646
  statusRef.current = status2;
5640
5647
  setStateStatus(status2);
@@ -5643,7 +5650,7 @@ function useWalletBox({
5643
5650
  setError("");
5644
5651
  setNonce(null);
5645
5652
  };
5646
- useEffect21(() => {
5653
+ useEffect22(() => {
5647
5654
  init();
5648
5655
  onInit({
5649
5656
  setStatus
@@ -5901,16 +5908,16 @@ function WalletContent({
5901
5908
  const { disconnectAsync } = useDisconnect({ config });
5902
5909
  const chainId = useChainId();
5903
5910
  const { events, login } = useMatch();
5904
- const [inited, setInited] = useState26(false);
5911
+ const [inited, setInited] = useState27(false);
5905
5912
  const { status, setStatus, error, setError, statusRef, nonce, setNonce, init } = useWalletBox({
5906
5913
  onInit: async ({ setStatus: setStatus2 }) => {
5907
5914
  setStatus2("start");
5908
5915
  }
5909
5916
  });
5910
- useEffect22(() => {
5917
+ useEffect23(() => {
5911
5918
  matchlog_default.log(`status=${status}`, `connectModalOpen=${connectModalOpen}`, `address=${address}`, `isConnected=${isConnected}`);
5912
5919
  }, [status, connectModalOpen, isConnected, address]);
5913
- useEffect22(() => {
5920
+ useEffect23(() => {
5914
5921
  if (connectModalOpen) {
5915
5922
  setStatus("connecting");
5916
5923
  return;
@@ -5923,7 +5930,7 @@ function WalletContent({
5923
5930
  setStatus("start");
5924
5931
  }
5925
5932
  }, [connectModalOpen, address]);
5926
- useEffect22(() => {
5933
+ useEffect23(() => {
5927
5934
  if (openConnectModal && !isConnected && !inited) {
5928
5935
  openConnectModal && openConnectModal();
5929
5936
  setInited(true);
@@ -6006,7 +6013,7 @@ function WalletContent({
6006
6013
  setError(error2.reason || error2.message);
6007
6014
  }
6008
6015
  }, [nonce, status, address]);
6009
- useEffect22(() => {
6016
+ useEffect23(() => {
6010
6017
  if (signature) {
6011
6018
  signature();
6012
6019
  }
@@ -6077,7 +6084,7 @@ function EVMModal(props) {
6077
6084
  }
6078
6085
 
6079
6086
  // src/components/TRONModal/index.tsx
6080
- import React11, { useEffect as useEffect24, useMemo as useMemo14, useState as useState28 } from "react";
6087
+ import React11, { useEffect as useEffect25, useMemo as useMemo14, useState as useState29 } from "react";
6081
6088
  import { useIntl as useIntl14 } from "react-intl";
6082
6089
 
6083
6090
  // src/lib/tron/TronLinkAdapter.ts
@@ -6111,7 +6118,7 @@ var TronLinkAdapter = class {
6111
6118
  };
6112
6119
 
6113
6120
  // src/hooks/useTRONWallet.ts
6114
- import { useEffect as useEffect23, useState as useState27 } from "react";
6121
+ import { useEffect as useEffect24, useState as useState28 } from "react";
6115
6122
 
6116
6123
  // src/lib/tron/BitgetAdapter.ts
6117
6124
  var BitgetAdapter = class {
@@ -6156,9 +6163,9 @@ var OKXAdapter = class {
6156
6163
  // src/hooks/useTRONWallet.ts
6157
6164
  var useTRONWallet = () => {
6158
6165
  const wallets = [new TronLinkAdapter(), new BitgetAdapter(), new OKXAdapter()];
6159
- const [installedWallets, setInstalledWallets] = useState27([]);
6160
- const [address, setAddress] = useState27(null);
6161
- useEffect23(() => {
6166
+ const [installedWallets, setInstalledWallets] = useState28([]);
6167
+ const [address, setAddress] = useState28(null);
6168
+ useEffect24(() => {
6162
6169
  const getInstalled = async () => {
6163
6170
  const installed = await Promise.all(wallets.map((wallet2) => wallet2.isInstalled().then((isInstalled) => ({
6164
6171
  wallet: wallet2,
@@ -6168,11 +6175,11 @@ var useTRONWallet = () => {
6168
6175
  };
6169
6176
  getInstalled();
6170
6177
  }, []);
6171
- const [wallet, chooseWallet] = useState27(null);
6178
+ const [wallet, chooseWallet] = useState28(null);
6172
6179
  const onConnect = async () => {
6173
6180
  setAddress(await wallet.connect());
6174
6181
  };
6175
- useEffect23(() => {
6182
+ useEffect24(() => {
6176
6183
  if (!wallet) {
6177
6184
  setAddress(null);
6178
6185
  }
@@ -6203,9 +6210,9 @@ function TRONConnectModal({
6203
6210
  okx: /* @__PURE__ */ jsx39(OKXIcon, { size: isDownMd ? 36 : 40 })
6204
6211
  };
6205
6212
  const { events, login } = useMatch();
6206
- const [status, setStatus] = useState28("");
6213
+ const [status, setStatus] = useState29("");
6207
6214
  const statusRef = React11.useRef(status);
6208
- const [error, setError] = useState28("");
6215
+ const [error, setError] = useState29("");
6209
6216
  const connected = useMemo14(() => {
6210
6217
  return !!address;
6211
6218
  }, [address]);
@@ -6274,7 +6281,7 @@ function TRONConnectModal({
6274
6281
  statusRef.current = "";
6275
6282
  }
6276
6283
  };
6277
- useEffect24(() => {
6284
+ useEffect25(() => {
6278
6285
  if (wallet) {
6279
6286
  console.log("onConnect");
6280
6287
  onConnect();
@@ -6282,12 +6289,12 @@ function TRONConnectModal({
6282
6289
  setStatus("");
6283
6290
  }
6284
6291
  }, [wallet]);
6285
- useEffect24(() => {
6292
+ useEffect25(() => {
6286
6293
  if (address) {
6287
6294
  toLoginInWallet();
6288
6295
  }
6289
6296
  }, [address]);
6290
- useEffect24(() => {
6297
+ useEffect25(() => {
6291
6298
  if (!props.isOpen) {
6292
6299
  disconnect();
6293
6300
  }
@@ -6345,7 +6352,7 @@ function TRONModal(props) {
6345
6352
  }
6346
6353
 
6347
6354
  // src/components/TONModal/index.tsx
6348
- import React12, { useEffect as useEffect25, useState as useState29 } from "react";
6355
+ import React12, { useEffect as useEffect26, useState as useState30 } from "react";
6349
6356
  import { useIntl as useIntl15 } from "react-intl";
6350
6357
  import {
6351
6358
  TonConnectUIProvider,
@@ -6360,15 +6367,15 @@ function WalletContent2({
6360
6367
  type
6361
6368
  }) {
6362
6369
  const { events, login } = useMatch();
6363
- const [connected, setConnected] = useState29(false);
6370
+ const [connected, setConnected] = useState30(false);
6364
6371
  const wallet = useTonWallet();
6365
6372
  const userFriendlyAddress = useTonAddress();
6366
6373
  const [tonConnectUI] = useTonConnectUI();
6367
6374
  const { state, open, close } = useTonConnectModal();
6368
- const [status, setStatus] = useState29("");
6375
+ const [status, setStatus] = useState30("");
6369
6376
  const statusRef = React12.useRef(status);
6370
- const [error, setError] = useState29("");
6371
- useEffect25(() => {
6377
+ const [error, setError] = useState30("");
6378
+ useEffect26(() => {
6372
6379
  const init = async () => {
6373
6380
  if (tonConnectUI.connected) {
6374
6381
  await tonConnectUI.disconnect();
@@ -6441,7 +6448,7 @@ function WalletContent2({
6441
6448
  }
6442
6449
  });
6443
6450
  }, []);
6444
- useEffect25(() => {
6451
+ useEffect26(() => {
6445
6452
  if (wallet) {
6446
6453
  setConnected(true);
6447
6454
  console.log("Wallet connected:", wallet);
@@ -6452,7 +6459,7 @@ function WalletContent2({
6452
6459
  setStatus("");
6453
6460
  }
6454
6461
  }, [wallet]);
6455
- useEffect25(() => {
6462
+ useEffect26(() => {
6456
6463
  console.log({
6457
6464
  state,
6458
6465
  wallet
@@ -6532,7 +6539,7 @@ function TONModal(props) {
6532
6539
  }
6533
6540
 
6534
6541
  // src/components/BTCModal/index.tsx
6535
- import React13, { useEffect as useEffect27, useMemo as useMemo15, useState as useState31 } from "react";
6542
+ import React13, { useEffect as useEffect28, useMemo as useMemo15, useState as useState32 } from "react";
6536
6543
  import { useIntl as useIntl16 } from "react-intl";
6537
6544
 
6538
6545
  // src/lib/btc/UnisatAdapter.ts
@@ -6687,7 +6694,7 @@ var LeatherAdapter = class {
6687
6694
  };
6688
6695
 
6689
6696
  // src/hooks/useBTCWallet.ts
6690
- import { useEffect as useEffect26, useState as useState30 } from "react";
6697
+ import { useEffect as useEffect27, useState as useState31 } from "react";
6691
6698
 
6692
6699
  // src/lib/btc/PhantomAdapter.ts
6693
6700
  var PhantomAdapter = class {
@@ -6725,9 +6732,9 @@ var PhantomAdapter = class {
6725
6732
  // src/hooks/useBTCWallet.ts
6726
6733
  var useBTCWallet = () => {
6727
6734
  const wallets = [new UnisatAdapter(), new XverseAdapter(), new LeatherAdapter(), new PhantomAdapter()];
6728
- const [installedWallets, setInstalledWallets] = useState30([]);
6729
- const [address, setAddress] = useState30(null);
6730
- useEffect26(() => {
6735
+ const [installedWallets, setInstalledWallets] = useState31([]);
6736
+ const [address, setAddress] = useState31(null);
6737
+ useEffect27(() => {
6731
6738
  const getInstalled = async () => {
6732
6739
  const installed = await Promise.all(wallets.map((wallet2) => wallet2.isInstalled().then((isInstalled) => ({
6733
6740
  wallet: wallet2,
@@ -6737,11 +6744,11 @@ var useBTCWallet = () => {
6737
6744
  };
6738
6745
  getInstalled();
6739
6746
  }, []);
6740
- const [wallet, chooseWallet] = useState30(null);
6747
+ const [wallet, chooseWallet] = useState31(null);
6741
6748
  const onConnect = async () => {
6742
6749
  setAddress(await wallet.connect());
6743
6750
  };
6744
- useEffect26(() => {
6751
+ useEffect27(() => {
6745
6752
  if (!wallet) {
6746
6753
  setAddress(null);
6747
6754
  }
@@ -6773,9 +6780,9 @@ function BTCConnectModal({
6773
6780
  phantom: /* @__PURE__ */ jsx41(PhantomIcon, { size: isDownMd ? 36 : 40 })
6774
6781
  };
6775
6782
  const { events, login } = useMatch();
6776
- const [status, setStatus] = useState31("");
6783
+ const [status, setStatus] = useState32("");
6777
6784
  const statusRef = React13.useRef(status);
6778
- const [error, setError] = useState31("");
6785
+ const [error, setError] = useState32("");
6779
6786
  const connected = useMemo15(() => {
6780
6787
  return !!address;
6781
6788
  }, [address]);
@@ -6840,7 +6847,7 @@ function BTCConnectModal({
6840
6847
  statusRef.current = "";
6841
6848
  }
6842
6849
  };
6843
- useEffect27(() => {
6850
+ useEffect28(() => {
6844
6851
  if (wallet) {
6845
6852
  console.log("onConnect");
6846
6853
  try {
@@ -6853,12 +6860,12 @@ function BTCConnectModal({
6853
6860
  setStatus("");
6854
6861
  }
6855
6862
  }, [wallet]);
6856
- useEffect27(() => {
6863
+ useEffect28(() => {
6857
6864
  if (address) {
6858
6865
  toLoginInWallet();
6859
6866
  }
6860
6867
  }, [address]);
6861
- useEffect27(() => {
6868
+ useEffect28(() => {
6862
6869
  if (!props.isOpen) {
6863
6870
  disconnect();
6864
6871
  }
@@ -6967,11 +6974,11 @@ function WalletModal(props) {
6967
6974
  }
6968
6975
 
6969
6976
  // src/components/AlphaAvatar/index.tsx
6970
- import { useEffect as useEffect28, useState as useState32 } from "react";
6977
+ import { useEffect as useEffect29, useState as useState33 } from "react";
6971
6978
  import { jsx as jsx43 } from "react/jsx-runtime";
6972
6979
  function AlphaAvatar2({ name, size = 40, className = "" }) {
6973
- const [avatar, setAvatar] = useState32(void 0);
6974
- useEffect28(() => {
6980
+ const [avatar, setAvatar] = useState33(void 0);
6981
+ useEffect29(() => {
6975
6982
  if (name) {
6976
6983
  const char = name[0].toUpperCase();
6977
6984
  setAvatar(char);
@@ -7068,7 +7075,7 @@ function WalletAsset({
7068
7075
  }
7069
7076
 
7070
7077
  // src/components/TokenSend/index.tsx
7071
- import { useEffect as useEffect29, useMemo as useMemo17, useState as useState33 } from "react";
7078
+ import { useEffect as useEffect30, useMemo as useMemo17, useState as useState34 } from "react";
7072
7079
  import { defineChain as defineChain4, encodeFunctionData as encodeFunctionData2, erc20Abi as erc20Abi3, http as http8, parseUnits as parseUnits2 } from "viem";
7073
7080
  import { FormattedMessage as FormattedMessage12, useIntl as useIntl18 } from "react-intl";
7074
7081
  import { jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
@@ -7116,11 +7123,11 @@ function TokenSend({
7116
7123
  transport: http8()
7117
7124
  });
7118
7125
  }, [chain]);
7119
- const [amount, setAmount] = useState33("");
7120
- const [address, setAddress] = useState33("");
7121
- const [loading, setLoading] = useState33(false);
7122
- const [sending, setSending] = useState33(false);
7123
- const [txError, setTxError] = useState33("");
7126
+ const [amount, setAmount] = useState34("");
7127
+ const [address, setAddress] = useState34("");
7128
+ const [loading, setLoading] = useState34(false);
7129
+ const [sending, setSending] = useState34(false);
7130
+ const [txError, setTxError] = useState34("");
7124
7131
  const transaction = useMemo17(() => {
7125
7132
  const reg = /^0x[a-fA-F0-9]{40}$/;
7126
7133
  if (!amount || !address || !reg.test(address)) {
@@ -7205,7 +7212,7 @@ function TokenSend({
7205
7212
  }
7206
7213
  onClose();
7207
7214
  };
7208
- useEffect29(() => {
7215
+ useEffect30(() => {
7209
7216
  const receiveMessage = (event) => {
7210
7217
  if (event.data) {
7211
7218
  if (event.data.source == "match-wallet") {
@@ -7337,7 +7344,7 @@ function TokenDetail({
7337
7344
  }
7338
7345
 
7339
7346
  // src/components/TokenSendList/index.tsx
7340
- import { useState as useState34 } from "react";
7347
+ import { useState as useState35 } from "react";
7341
7348
  import { FormattedMessage as FormattedMessage14 } from "react-intl";
7342
7349
  import { jsx as jsx47, jsxs as jsxs28 } from "react/jsx-runtime";
7343
7350
  function TokenSendList({ close }) {
@@ -7347,7 +7354,7 @@ function TokenSendList({ close }) {
7347
7354
  list: walletAssets.mergedAssets
7348
7355
  });
7349
7356
  const { list } = useMatchChain();
7350
- const [checked, setChecked] = useState34();
7357
+ const [checked, setChecked] = useState35();
7351
7358
  const modal = useModal();
7352
7359
  const onNext = () => {
7353
7360
  checked && modal.show((props) => {
@@ -7404,7 +7411,7 @@ function TokenSendList({ close }) {
7404
7411
 
7405
7412
  // src/components/TransactionList/index.tsx
7406
7413
  import InfiniteScroll from "react-infinite-scroll-component";
7407
- import { useEffect as useEffect30, useMemo as useMemo18, useState as useState35 } from "react";
7414
+ import { useEffect as useEffect31, useMemo as useMemo18, useState as useState36 } from "react";
7408
7415
  import { decodeFunctionData, defineChain as defineChain5, formatUnits as formatUnits3 } from "viem";
7409
7416
  import { erc20Abi as erc20Abi4 } from "viem";
7410
7417
  import { FormattedMessage as FormattedMessage15 } from "react-intl";
@@ -7414,7 +7421,7 @@ var Item = ({ data }) => {
7414
7421
  const isOut = data.from.toLowerCase() == address.toLowerCase();
7415
7422
  const { chain, chainId, explorerLink, formatUnits: chainFormatUnits } = useMatchChain();
7416
7423
  const { contracts } = useContractStore_default();
7417
- const [shouldRefetch, setShouldRefetch] = useState35(true);
7424
+ const [shouldRefetch, setShouldRefetch] = useState36(true);
7418
7425
  const transferType = useMemo18(() => {
7419
7426
  const methodId = data.input.substring(2, 10);
7420
7427
  if (methodId == "095ea7b3") {
@@ -7483,7 +7490,7 @@ var Item = ({ data }) => {
7483
7490
  }
7484
7491
  return "loading";
7485
7492
  }, [data.extra?.status, data.source, hashQuery.data]);
7486
- useEffect30(() => {
7493
+ useEffect31(() => {
7487
7494
  if (data.hash) {
7488
7495
  setShouldRefetch(status == "loading");
7489
7496
  }
@@ -7593,7 +7600,7 @@ export {
7593
7600
  Radio,
7594
7601
  Skeleton_default,
7595
7602
  Tabs,
7596
- Lottie,
7603
+ Lottie_default,
7597
7604
  ui_exports,
7598
7605
  ModalProvider,
7599
7606
  useModal,
@@ -7614,4 +7621,4 @@ export {
7614
7621
  MatchProvider,
7615
7622
  useMatch
7616
7623
  };
7617
- //# sourceMappingURL=chunk-VIJ3M2NZ.mjs.map
7624
+ //# sourceMappingURL=chunk-BWGTZNIT.mjs.map