@matchain/matchid-sdk-react 0.1.48-alpha.25 → 0.1.48-alpha.27

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.
@@ -12,7 +12,7 @@ import {
12
12
  useTransaction,
13
13
  useUserInfo,
14
14
  useWallet
15
- } from "../chunk-UR57LTMH.mjs";
15
+ } from "../chunk-IKLQAPKE.mjs";
16
16
  import "../chunk-UA6XHZHX.mjs";
17
17
  import {
18
18
  useLayout_exports
package/dist/index.js CHANGED
@@ -5711,7 +5711,7 @@ var Item = ({ data }) => {
5711
5711
  const { address } = useWallet();
5712
5712
  const isOut = data.from.toLowerCase() == address.toLowerCase();
5713
5713
  const { chain, chainId, explorerLink, formatUnits: chainFormatUnits } = useMatchChain();
5714
- const { getContract } = useContractStore_default();
5714
+ const { contracts } = useContractStore_default();
5715
5715
  const [shouldRefetch, setShouldRefetch] = (0, import_react32.useState)(true);
5716
5716
  const transferType = (0, import_react32.useMemo)(() => {
5717
5717
  const methodId = data.input.substring(2, 10);
@@ -5740,10 +5740,10 @@ var Item = ({ data }) => {
5740
5740
  data: data.input
5741
5741
  });
5742
5742
  const value = decodeData.args[1];
5743
- return (0, import_viem7.formatUnits)(value, getContract(chainId || 0, data.to)?.decimals || 18);
5743
+ return (0, import_viem7.formatUnits)(value, contracts[`${chainId}-${data.to.toLowerCase()}`]?.decimals || 18);
5744
5744
  }
5745
5745
  return chainFormatUnits(BigInt(data.value));
5746
- }, [data.input, transferType, data.value, getContract, chainId, data.to]);
5746
+ }, [data.input, transferType, data.value, contracts, chainId, data.to]);
5747
5747
  const hashQuery = useHash({
5748
5748
  hash: data.hash,
5749
5749
  //@ts-ignore
@@ -5785,10 +5785,11 @@ var Item = ({ data }) => {
5785
5785
  }, [status, data.hash]);
5786
5786
  const symbol = (0, import_react32.useMemo)(() => {
5787
5787
  if (transferType == "erc20_transfer") {
5788
- return getContract(chainId || 0, data.to)?.symbol || getContract(chainId || 0, data.to)?.name || "unknown";
5788
+ const contract = contracts[`${chainId}-${data.to.toLowerCase()}`];
5789
+ return contract?.symbol || contract?.name || "unknown";
5789
5790
  }
5790
5791
  return chain?.nativeCurrency.symbol || chain?.nativeCurrency.name;
5791
- }, [transferType, chain, getContract, chainId, data.to]);
5792
+ }, [transferType, chain, contracts, chainId, data.to]);
5792
5793
  return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
5793
5794
  "a",
5794
5795
  {