@wagmi/core 1.4.2 → 1.4.3

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.
@@ -2356,7 +2356,7 @@ async function writeContract(config2) {
2356
2356
  }
2357
2357
  const hash = await walletClient.writeContract({
2358
2358
  ...request,
2359
- chain: null
2359
+ chain: config2.chainId ? { id: config2.chainId } : null
2360
2360
  });
2361
2361
  return { hash };
2362
2362
  }
@@ -2577,11 +2577,11 @@ function watchNetwork(callback, { selector = (x) => x } = {}) {
2577
2577
 
2578
2578
  // src/actions/ens/fetchEnsAddress.ts
2579
2579
  import { getAddress } from "viem";
2580
- import { normalize } from "viem/ens";
2581
2580
  async function fetchEnsAddress({
2582
2581
  chainId,
2583
2582
  name
2584
2583
  }) {
2584
+ const { normalize } = await import("viem/ens");
2585
2585
  const publicClient = getPublicClient({ chainId });
2586
2586
  const address = await publicClient.getEnsAddress({
2587
2587
  name: normalize(name)
@@ -2596,13 +2596,13 @@ async function fetchEnsAddress({
2596
2596
  }
2597
2597
 
2598
2598
  // src/actions/ens/fetchEnsAvatar.ts
2599
- import { normalize as normalize2 } from "viem/ens";
2600
2599
  async function fetchEnsAvatar({
2601
2600
  name,
2602
2601
  chainId
2603
2602
  }) {
2603
+ const { normalize } = await import("viem/ens");
2604
2604
  const publicClient = getPublicClient({ chainId });
2605
- const avatar = await publicClient.getEnsAvatar({ name: normalize2(name) });
2605
+ const avatar = await publicClient.getEnsAvatar({ name: normalize(name) });
2606
2606
  return avatar;
2607
2607
  }
2608
2608
 
@@ -2619,13 +2619,13 @@ async function fetchEnsName({
2619
2619
  }
2620
2620
 
2621
2621
  // src/actions/ens/fetchEnsResolver.ts
2622
- import { normalize as normalize3 } from "viem/ens";
2623
2622
  async function fetchEnsResolver({
2624
2623
  chainId,
2625
2624
  name
2626
2625
  }) {
2626
+ const { normalize } = await import("viem/ens");
2627
2627
  const publicClient = getPublicClient({ chainId });
2628
- const resolver = await publicClient.getEnsResolver({ name: normalize3(name) });
2628
+ const resolver = await publicClient.getEnsResolver({ name: normalize(name) });
2629
2629
  return resolver;
2630
2630
  }
2631
2631
 
@@ -2786,7 +2786,10 @@ async function sendTransaction({
2786
2786
  value
2787
2787
  });
2788
2788
  }
2789
- const hash = await walletClient.sendTransaction({ ...args, chain: null });
2789
+ const hash = await walletClient.sendTransaction({
2790
+ ...args,
2791
+ chain: chainId ? { id: chainId } : null
2792
+ });
2790
2793
  return { hash };
2791
2794
  }
2792
2795
 
package/dist/index.js CHANGED
@@ -61,7 +61,7 @@ import {
61
61
  watchWalletClient,
62
62
  watchWebSocketPublicClient,
63
63
  writeContract
64
- } from "./chunk-LAFZBYO7.js";
64
+ } from "./chunk-YAPWLAI7.js";
65
65
  import {
66
66
  Connector
67
67
  } from "./chunk-BVC4KGLQ.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getCallParameters,
3
3
  getSendTransactionParameters
4
- } from "../chunk-LAFZBYO7.js";
4
+ } from "../chunk-YAPWLAI7.js";
5
5
  import "../chunk-BVC4KGLQ.js";
6
6
  import "../chunk-MQXBDTVK.js";
7
7
  export {
@@ -1,5 +1,5 @@
1
1
  import "../chunk-4E64EZ7V.js";
2
- import "../chunk-LAFZBYO7.js";
2
+ import "../chunk-YAPWLAI7.js";
3
3
  import "../chunk-BVC4KGLQ.js";
4
4
  import "../chunk-EQOEZP46.js";
5
5
  import "../chunk-KFW652VN.js";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@wagmi/core",
3
3
  "description": "Vanilla JS library for Ethereum",
4
4
  "license": "MIT",
5
- "version": "1.4.2",
5
+ "version": "1.4.3",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/wagmi-dev/wagmi.git",