@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.
@@ -6192,7 +6192,7 @@ var Item = ({ data }) => {
6192
6192
  const { address } = useWallet();
6193
6193
  const isOut = data.from.toLowerCase() == address.toLowerCase();
6194
6194
  const { chain, chainId, explorerLink, formatUnits: chainFormatUnits } = useMatchChain();
6195
- const { getContract } = useContractStore_default();
6195
+ const { contracts } = useContractStore_default();
6196
6196
  const [shouldRefetch, setShouldRefetch] = useState28(true);
6197
6197
  const transferType = useMemo16(() => {
6198
6198
  const methodId = data.input.substring(2, 10);
@@ -6221,10 +6221,10 @@ var Item = ({ data }) => {
6221
6221
  data: data.input
6222
6222
  });
6223
6223
  const value = decodeData.args[1];
6224
- return formatUnits3(value, getContract(chainId || 0, data.to)?.decimals || 18);
6224
+ return formatUnits3(value, contracts[`${chainId}-${data.to.toLowerCase()}`]?.decimals || 18);
6225
6225
  }
6226
6226
  return chainFormatUnits(BigInt(data.value));
6227
- }, [data.input, transferType, data.value, getContract, chainId, data.to]);
6227
+ }, [data.input, transferType, data.value, contracts, chainId, data.to]);
6228
6228
  const hashQuery = useHash({
6229
6229
  hash: data.hash,
6230
6230
  //@ts-ignore
@@ -6266,10 +6266,11 @@ var Item = ({ data }) => {
6266
6266
  }, [status, data.hash]);
6267
6267
  const symbol = useMemo16(() => {
6268
6268
  if (transferType == "erc20_transfer") {
6269
- return getContract(chainId || 0, data.to)?.symbol || getContract(chainId || 0, data.to)?.name || "unknown";
6269
+ const contract = contracts[`${chainId}-${data.to.toLowerCase()}`];
6270
+ return contract?.symbol || contract?.name || "unknown";
6270
6271
  }
6271
6272
  return chain?.nativeCurrency.symbol || chain?.nativeCurrency.name;
6272
- }, [transferType, chain, getContract, chainId, data.to]);
6273
+ }, [transferType, chain, contracts, chainId, data.to]);
6273
6274
  return /* @__PURE__ */ jsxs23(
6274
6275
  "a",
6275
6276
  {
@@ -6367,4 +6368,4 @@ export {
6367
6368
  MatchProvider,
6368
6369
  useMatch
6369
6370
  };
6370
- //# sourceMappingURL=chunk-UR57LTMH.mjs.map
6371
+ //# sourceMappingURL=chunk-IKLQAPKE.mjs.map