@matchain/matchid-sdk-react 0.1.48-alpha.22 → 0.1.48-alpha.23

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 (46) hide show
  1. package/dist/assets/icon/index.d.mts +1 -1
  2. package/dist/assets/icon/index.d.ts +1 -1
  3. package/dist/{chunk-WPXA4QPX.mjs → chunk-FYW4P7HS.mjs} +6 -27
  4. package/dist/chunk-FYW4P7HS.mjs.map +1 -0
  5. package/dist/{chunk-MUEDDGKX.mjs → chunk-SB54XHCJ.mjs} +2 -2
  6. package/dist/components/index.d.mts +3 -3
  7. package/dist/components/index.d.ts +3 -3
  8. package/dist/components/index.js +5 -26
  9. package/dist/components/index.js.map +1 -1
  10. package/dist/components/index.mjs +1 -1
  11. package/dist/hooks/api/index.d.mts +2 -2
  12. package/dist/hooks/api/index.d.ts +2 -2
  13. package/dist/hooks/api/index.js +0 -1
  14. package/dist/hooks/api/index.js.map +1 -1
  15. package/dist/hooks/api/index.mjs +2 -2
  16. package/dist/hooks/index.d.mts +2 -2
  17. package/dist/hooks/index.d.ts +2 -2
  18. package/dist/hooks/index.js +5 -26
  19. package/dist/hooks/index.js.map +1 -1
  20. package/dist/hooks/index.mjs +1 -1
  21. package/dist/{index-C9qYyRgt.d.mts → index-B4gKj0ro.d.mts} +2 -2
  22. package/dist/{index-Bpmrd7mh.d.ts → index-BFSCCmlU.d.ts} +1 -1
  23. package/dist/{index-Cy3K-Yao.d.ts → index-BHXlpUg5.d.ts} +1 -1
  24. package/dist/{index-Dhtyz0pT.d.mts → index-BObJQar4.d.mts} +2 -1
  25. package/dist/{index-BcEreCxd.d.ts → index-BOsoQSmx.d.ts} +1 -1
  26. package/dist/{index-C9F6f2iz.d.mts → index-Bk_dqXKp.d.mts} +2 -2
  27. package/dist/{index-BMsj8hJv.d.ts → index-CN2jy6bb.d.ts} +2 -2
  28. package/dist/{index-CFKZWJVt.d.ts → index-CSTyna62.d.ts} +2 -1
  29. package/dist/{index-BMfaixEx.d.mts → index-Ca30Hgn7.d.mts} +1 -1
  30. package/dist/{index-Cou96DpL.d.mts → index-CdM22eod.d.mts} +1 -1
  31. package/dist/{index-D4ju2J_e.d.mts → index-D3GBq1P1.d.mts} +1 -1
  32. package/dist/{index-Bvc8cjpN.d.ts → index-DTYp8DRd.d.ts} +2 -2
  33. package/dist/index.d.mts +7 -7
  34. package/dist/index.d.ts +7 -7
  35. package/dist/index.js +5 -26
  36. package/dist/index.js.map +1 -1
  37. package/dist/index.mjs +8 -8
  38. package/dist/types/index.d.mts +1 -1
  39. package/dist/types/index.d.ts +1 -1
  40. package/dist/{types-DzVVzMYU.d.mts → types-Dc15ure7.d.mts} +1 -1
  41. package/dist/{types-DzVVzMYU.d.ts → types-Dc15ure7.d.ts} +1 -1
  42. package/dist/ui/index.d.mts +3 -3
  43. package/dist/ui/index.d.ts +3 -3
  44. package/package.json +1 -1
  45. package/dist/chunk-WPXA4QPX.mjs.map +0 -1
  46. /package/dist/{chunk-MUEDDGKX.mjs.map → chunk-SB54XHCJ.mjs.map} +0 -0
@@ -11,7 +11,7 @@ import {
11
11
  useUserInfo,
12
12
  verifyPohApi,
13
13
  wallet_exports
14
- } from "./chunk-WPXA4QPX.mjs";
14
+ } from "./chunk-FYW4P7HS.mjs";
15
15
  import {
16
16
  __export
17
17
  } from "./chunk-J5LGTIGS.mjs";
@@ -94,4 +94,4 @@ export {
94
94
  user_exports,
95
95
  api_exports
96
96
  };
97
- //# sourceMappingURL=chunk-MUEDDGKX.mjs.map
97
+ //# sourceMappingURL=chunk-SB54XHCJ.mjs.map
@@ -1,6 +1,6 @@
1
- export { B as BTCModal, E as EmailModal, L as LoginBox, a as LoginButton, c as LoginModal, b as LoginPanel, S as SOLModal, d as TONModal, T as TRONModal, f as TokenDetail, g as TokenSend, h as TokenSendList, j as TransactionList, U as UsernameModal, e as WalletAsset, W as WalletModal } from '../index-C9qYyRgt.mjs';
2
- export { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from '../index-Cou96DpL.mjs';
1
+ export { B as BTCModal, E as EmailModal, L as LoginBox, a as LoginButton, c as LoginModal, b as LoginPanel, S as SOLModal, d as TONModal, T as TRONModal, f as TokenDetail, g as TokenSend, h as TokenSendList, j as TransactionList, U as UsernameModal, e as WalletAsset, W as WalletModal } from '../index-B4gKj0ro.mjs';
2
+ export { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from '../index-CdM22eod.mjs';
3
3
  import 'react/jsx-runtime';
4
- import '../types-DzVVzMYU.mjs';
4
+ import '../types-Dc15ure7.mjs';
5
5
  import 'react';
6
6
  import '@tanstack/react-query/src/types';
@@ -1,6 +1,6 @@
1
- export { B as BTCModal, E as EmailModal, L as LoginBox, a as LoginButton, c as LoginModal, b as LoginPanel, S as SOLModal, d as TONModal, T as TRONModal, f as TokenDetail, g as TokenSend, h as TokenSendList, j as TransactionList, U as UsernameModal, e as WalletAsset, W as WalletModal } from '../index-Bvc8cjpN.js';
2
- export { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from '../index-BcEreCxd.js';
1
+ export { B as BTCModal, E as EmailModal, L as LoginBox, a as LoginButton, c as LoginModal, b as LoginPanel, S as SOLModal, d as TONModal, T as TRONModal, f as TokenDetail, g as TokenSend, h as TokenSendList, j as TransactionList, U as UsernameModal, e as WalletAsset, W as WalletModal } from '../index-DTYp8DRd.js';
2
+ export { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from '../index-BOsoQSmx.js';
3
3
  import 'react/jsx-runtime';
4
- import '../types-DzVVzMYU.js';
4
+ import '../types-Dc15ure7.js';
5
5
  import 'react';
6
6
  import '@tanstack/react-query/src/types';
@@ -2198,7 +2198,6 @@ var import_middleware2 = require("zustand/middleware");
2198
2198
  var persistedState2 = (0, import_middleware2.persist)(
2199
2199
  (set, get) => ({
2200
2200
  transactions: {},
2201
- getTransactions: (chainId, address) => get().transactions[`${chainId}-${address}`] || [],
2202
2201
  addTransaction: (data) => {
2203
2202
  set((state) => {
2204
2203
  const updatedTransactions = {
@@ -2788,9 +2787,9 @@ function useMatchWalletRecords() {
2788
2787
  onInit();
2789
2788
  }
2790
2789
  }, [chainId, address]);
2791
- const { getTransactions, removeTransaction } = useTransactionStore_default();
2790
+ const { transactions, removeTransaction } = useTransactionStore_default();
2792
2791
  const list = (0, import_react15.useMemo)(() => {
2793
- const localTransactions = getTransactions(chainId || 0, address) || [];
2792
+ const localTransactions = transactions[`${chainId}-${address}`] || [];
2794
2793
  const removeList = localTransactions.filter((n) => items.findIndex((m) => m.hash == n.hash) >= 0);
2795
2794
  removeList.forEach((item) => {
2796
2795
  removeTransaction({
@@ -2808,7 +2807,7 @@ function useMatchWalletRecords() {
2808
2807
  const atimestamp = typeof a.timestamp === "string" ? parseInt(a.timestamp) : a.timestamp;
2809
2808
  return btimestamp - atimestamp;
2810
2809
  });
2811
- }, [getTransactions, chainId, items, address]);
2810
+ }, [transactions, chainId, items, address]);
2812
2811
  return {
2813
2812
  items: list,
2814
2813
  fetchMoreData,
@@ -2916,34 +2915,13 @@ function useMatchWalletAssetList({
2916
2915
  // Retry up to 3 times if failed
2917
2916
  });
2918
2917
  const erc20Tokens = (0, import_react15.useMemo)(() => list.filter((asset) => asset.address !== NATIVE_TOKEN_ADDRESS), [list]);
2919
- const erc20Abi4 = [
2920
- {
2921
- "constant": true,
2922
- "inputs": [
2923
- {
2924
- "name": "_owner",
2925
- "type": "address"
2926
- }
2927
- ],
2928
- "name": "balanceOf",
2929
- "outputs": [
2930
- {
2931
- "name": "balance",
2932
- "type": "uint256"
2933
- }
2934
- ],
2935
- "payable": false,
2936
- "stateMutability": "view",
2937
- "type": "function"
2938
- }
2939
- ];
2940
2918
  const erc20BalanceQuery = (0, import_react_query4.useQuery)({
2941
2919
  queryKey: ["erc20Balances", erc20Tokens.map((token) => token.address)],
2942
2920
  queryFn: async () => {
2943
2921
  if (!erc20Tokens.length || !publicClient) return [];
2944
2922
  const calls = erc20Tokens.map((token) => ({
2945
2923
  address: token.address,
2946
- abi: erc20Abi4,
2924
+ abi: import_viem7.erc20Abi,
2947
2925
  functionName: "balanceOf",
2948
2926
  args: [address]
2949
2927
  }));
@@ -3001,6 +2979,7 @@ function useMatchWalletAssetList({
3001
2979
  return {
3002
2980
  list: assets,
3003
2981
  isLoading: nativeBalanceQuery.isLoading || erc20BalanceQuery.isLoading,
2982
+ isFetched: nativeBalanceQuery.isFetched && erc20BalanceQuery.isFetched,
3004
2983
  nativeBalance: nativeBalanceQuery.data,
3005
2984
  erc20Balances: erc20BalanceQuery.data
3006
2985
  };