@wagmi/core 1.0.0-next.0 → 1.0.0-next.1

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.
@@ -2309,7 +2309,10 @@ async function writeContract(config) {
2309
2309
  const res = await prepareWriteContract(args);
2310
2310
  request = res.request;
2311
2311
  }
2312
- const hash = await walletClient.writeContract({ ...request, chain: null });
2312
+ const hash = await walletClient.writeContract({
2313
+ ...request,
2314
+ chain: null
2315
+ });
2313
2316
  return { hash };
2314
2317
  }
2315
2318
 
@@ -2660,6 +2663,7 @@ async function prepareSendTransaction({
2660
2663
  // src/actions/transactions/sendTransaction.ts
2661
2664
  async function sendTransaction({
2662
2665
  chainId,
2666
+ mode,
2663
2667
  request
2664
2668
  }) {
2665
2669
  const walletClient = await getWalletClient();
@@ -2667,6 +2671,10 @@ async function sendTransaction({
2667
2671
  throw new ConnectorNotFoundError();
2668
2672
  if (chainId)
2669
2673
  assertActiveChain({ chainId, walletClient });
2674
+ if (mode !== "prepared") {
2675
+ const res = await prepareSendTransaction({ chainId, request });
2676
+ request = res.request;
2677
+ }
2670
2678
  const hash = await walletClient.sendTransaction({
2671
2679
  ...request,
2672
2680
  chain: null
package/dist/index.d.ts CHANGED
@@ -551,7 +551,7 @@ type SendTransactionResult = {
551
551
  * })
552
552
  * const result = await sendTransaction(config)
553
553
  */
554
- declare function sendTransaction({ chainId, request, }: SendTransactionArgs): Promise<SendTransactionResult>;
554
+ declare function sendTransaction({ chainId, mode, request, }: SendTransactionArgs): Promise<SendTransactionResult>;
555
555
 
556
556
  type WaitForTransactionArgs = {
557
557
  /** Chain id to use for Public Client. */
package/dist/index.js CHANGED
@@ -58,7 +58,7 @@ import {
58
58
  watchWalletClient,
59
59
  watchWebSocketPublicClient,
60
60
  writeContract
61
- } from "./chunk-BSUU37OK.js";
61
+ } from "./chunk-LF3Y5HFO.js";
62
62
  import {
63
63
  goerli,
64
64
  mainnet,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getCallParameters,
3
3
  getSendTransactionParameters
4
- } from "../chunk-BSUU37OK.js";
4
+ } from "../chunk-LF3Y5HFO.js";
5
5
  import "../chunk-BVC4KGLQ.js";
6
6
  import "../chunk-MQXBDTVK.js";
7
7
  export {
@@ -1,5 +1,5 @@
1
1
  import "../chunk-KX4UEHS5.js";
2
- import "../chunk-BSUU37OK.js";
2
+ import "../chunk-LF3Y5HFO.js";
3
3
  import {
4
4
  foundry,
5
5
  goerli,
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.0.0-next.0",
5
+ "version": "1.0.0-next.1",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/wagmi-dev/wagmi.git",
@@ -111,7 +111,7 @@
111
111
  "/dist"
112
112
  ],
113
113
  "peerDependencies": {
114
- "viem": "~0.3.12",
114
+ "viem": "~0.3.16",
115
115
  "typescript": ">=4.9.4"
116
116
  },
117
117
  "peerDependenciesMeta": {
@@ -124,10 +124,10 @@
124
124
  "eventemitter3": "^4.0.7",
125
125
  "zustand": "^4.3.1",
126
126
  "@wagmi/chains": "0.2.18",
127
- "@wagmi/connectors": "1.0.0-next.1"
127
+ "@wagmi/connectors": "1.0.0-next.2"
128
128
  },
129
129
  "devDependencies": {
130
- "viem": "~0.3.12"
130
+ "viem": "~0.3.16"
131
131
  },
132
132
  "keywords": [
133
133
  "eth",