@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
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React, { CSSProperties } from 'react';
3
- import { w as IconProps$1 } from '../../types-DzVVzMYU.mjs';
3
+ import { w as IconProps$1 } from '../../types-Dc15ure7.mjs';
4
4
  import '@tanstack/react-query/src/types';
5
5
 
6
6
  declare function BackIcon({ color, size, className, style }: {
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React, { CSSProperties } from 'react';
3
- import { w as IconProps$1 } from '../../types-DzVVzMYU.js';
3
+ import { w as IconProps$1 } from '../../types-Dc15ure7.js';
4
4
  import '@tanstack/react-query/src/types';
5
5
 
6
6
  declare function BackIcon({ color, size, className, style }: {
@@ -752,7 +752,6 @@ import { devtools as devtools2, persist as persist2 } from "zustand/middleware";
752
752
  var persistedState2 = persist2(
753
753
  (set, get) => ({
754
754
  transactions: {},
755
- getTransactions: (chainId, address) => get().transactions[`${chainId}-${address}`] || [],
756
755
  addTransaction: (data) => {
757
756
  set((state) => {
758
757
  const updatedTransactions = {
@@ -1703,9 +1702,9 @@ function useMatchWalletRecords() {
1703
1702
  onInit();
1704
1703
  }
1705
1704
  }, [chainId, address]);
1706
- const { getTransactions, removeTransaction } = useTransactionStore_default();
1705
+ const { transactions, removeTransaction } = useTransactionStore_default();
1707
1706
  const list = useMemo5(() => {
1708
- const localTransactions = getTransactions(chainId || 0, address) || [];
1707
+ const localTransactions = transactions[`${chainId}-${address}`] || [];
1709
1708
  const removeList = localTransactions.filter((n) => items.findIndex((m) => m.hash == n.hash) >= 0);
1710
1709
  removeList.forEach((item) => {
1711
1710
  removeTransaction({
@@ -1723,7 +1722,7 @@ function useMatchWalletRecords() {
1723
1722
  const atimestamp = typeof a.timestamp === "string" ? parseInt(a.timestamp) : a.timestamp;
1724
1723
  return btimestamp - atimestamp;
1725
1724
  });
1726
- }, [getTransactions, chainId, items, address]);
1725
+ }, [transactions, chainId, items, address]);
1727
1726
  return {
1728
1727
  items: list,
1729
1728
  fetchMoreData,
@@ -1831,34 +1830,13 @@ function useMatchWalletAssetList({
1831
1830
  // Retry up to 3 times if failed
1832
1831
  });
1833
1832
  const erc20Tokens = useMemo5(() => list.filter((asset) => asset.address !== NATIVE_TOKEN_ADDRESS), [list]);
1834
- const erc20Abi4 = [
1835
- {
1836
- "constant": true,
1837
- "inputs": [
1838
- {
1839
- "name": "_owner",
1840
- "type": "address"
1841
- }
1842
- ],
1843
- "name": "balanceOf",
1844
- "outputs": [
1845
- {
1846
- "name": "balance",
1847
- "type": "uint256"
1848
- }
1849
- ],
1850
- "payable": false,
1851
- "stateMutability": "view",
1852
- "type": "function"
1853
- }
1854
- ];
1855
1833
  const erc20BalanceQuery = useQuery2({
1856
1834
  queryKey: ["erc20Balances", erc20Tokens.map((token) => token.address)],
1857
1835
  queryFn: async () => {
1858
1836
  if (!erc20Tokens.length || !publicClient) return [];
1859
1837
  const calls = erc20Tokens.map((token) => ({
1860
1838
  address: token.address,
1861
- abi: erc20Abi4,
1839
+ abi: erc20Abi2,
1862
1840
  functionName: "balanceOf",
1863
1841
  args: [address]
1864
1842
  }));
@@ -1916,6 +1894,7 @@ function useMatchWalletAssetList({
1916
1894
  return {
1917
1895
  list: assets,
1918
1896
  isLoading: nativeBalanceQuery.isLoading || erc20BalanceQuery.isLoading,
1897
+ isFetched: nativeBalanceQuery.isFetched && erc20BalanceQuery.isFetched,
1919
1898
  nativeBalance: nativeBalanceQuery.data,
1920
1899
  erc20Balances: erc20BalanceQuery.data
1921
1900
  };
@@ -6389,4 +6368,4 @@ export {
6389
6368
  MatchProvider,
6390
6369
  useMatch
6391
6370
  };
6392
- //# sourceMappingURL=chunk-WPXA4QPX.mjs.map
6371
+ //# sourceMappingURL=chunk-FYW4P7HS.mjs.map