@wagmi/core 0.8.0 → 0.8.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.
@@ -2,7 +2,7 @@ import {
2
2
  Connector,
3
3
  UserRejectedRequestError,
4
4
  normalizeChainId
5
- } from "./chunk-F4A7FMUQ.js";
5
+ } from "./chunk-TQC2HCNN.js";
6
6
  import {
7
7
  __privateAdd,
8
8
  __privateGet,
@@ -807,8 +807,8 @@ var Client = class {
807
807
  let chainId;
808
808
  if (autoConnect) {
809
809
  try {
810
- const rawState = storage.getItem(storeKey, "");
811
- const data = JSON.parse(rawState || "{}")?.state?.data;
810
+ const rawState = storage.getItem(storeKey);
811
+ const data = rawState?.state?.data;
812
812
  status = data?.account ? "reconnecting" : "connecting";
813
813
  chainId = data?.chain?.id;
814
814
  } catch (_error) {
@@ -3249,11 +3249,11 @@ async function signTypedData({
3249
3249
  const chainId = chainId_ ? normalizeChainId(chainId_) : void 0;
3250
3250
  if (chainId)
3251
3251
  assertActiveChain({ chainId, signer });
3252
- return signer._signTypedData(
3253
- domain,
3254
- types,
3255
- value
3256
- );
3252
+ const types_ = Object.entries(types).filter(([key]) => key !== "EIP712Domain").reduce((types2, [key, attributes]) => {
3253
+ types2[key] = attributes.filter((attr) => attr.type !== "EIP712Domain");
3254
+ return types2;
3255
+ }, {});
3256
+ return signer._signTypedData(domain, types_, value);
3257
3257
  }
3258
3258
 
3259
3259
  // src/actions/accounts/switchNetwork.ts
@@ -5,7 +5,7 @@ import {
5
5
  SwitchChainError,
6
6
  UserRejectedRequestError,
7
7
  normalizeChainId
8
- } from "../chunk-F4A7FMUQ.js";
8
+ } from "../chunk-TQC2HCNN.js";
9
9
  import "../chunk-6KG5TOAU.js";
10
10
  import {
11
11
  __privateAdd,
@@ -4,7 +4,7 @@ import {
4
4
  ResourceUnavailableError,
5
5
  UserRejectedRequestError,
6
6
  getClient
7
- } from "../chunk-F4A7FMUQ.js";
7
+ } from "../chunk-TQC2HCNN.js";
8
8
  import "../chunk-6KG5TOAU.js";
9
9
  import {
10
10
  __privateAdd,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  MockConnector,
3
3
  MockProvider
4
- } from "../../chunk-VCRGL4ZG.js";
5
- import "../../chunk-F4A7FMUQ.js";
4
+ } from "../../chunk-SK7UQXOC.js";
5
+ import "../../chunk-TQC2HCNN.js";
6
6
  import "../../chunk-6KG5TOAU.js";
7
7
  import "../../chunk-MQXBDTVK.js";
8
8
  export {
@@ -4,7 +4,7 @@ import {
4
4
  UserRejectedRequestError,
5
5
  getClient,
6
6
  normalizeChainId
7
- } from "../chunk-F4A7FMUQ.js";
7
+ } from "../chunk-TQC2HCNN.js";
8
8
  import "../chunk-6KG5TOAU.js";
9
9
  import {
10
10
  __privateAdd,
package/dist/index.js CHANGED
@@ -73,7 +73,7 @@ import {
73
73
  watchSigner,
74
74
  watchWebSocketProvider,
75
75
  writeContract
76
- } from "./chunk-F4A7FMUQ.js";
76
+ } from "./chunk-TQC2HCNN.js";
77
77
  import {
78
78
  goerli,
79
79
  mainnet
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  debounce
3
- } from "../chunk-F4A7FMUQ.js";
3
+ } from "../chunk-TQC2HCNN.js";
4
4
  import "../chunk-6KG5TOAU.js";
5
5
  import "../chunk-MQXBDTVK.js";
6
6
  export {
@@ -1,6 +1,6 @@
1
1
  import "../chunk-J6DUE3KA.js";
2
- import "../chunk-VCRGL4ZG.js";
3
- import "../chunk-F4A7FMUQ.js";
2
+ import "../chunk-SK7UQXOC.js";
3
+ import "../chunk-TQC2HCNN.js";
4
4
  import {
5
5
  foundry,
6
6
  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": "0.8.0",
5
+ "version": "0.8.1",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/wagmi-dev/wagmi.git",