@wagmi/core 0.8.3 → 0.8.4

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.
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "type": "module",
3
3
  "main": "../dist/chains.js"
4
- }
4
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "type": "module",
3
3
  "main": "../../dist/connectors/coinbaseWallet.js"
4
- }
4
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "type": "module",
3
3
  "main": "../../dist/connectors/ledger.js"
4
- }
4
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "type": "module",
3
3
  "main": "../../dist/connectors/metaMask.js"
4
- }
4
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "type": "module",
3
3
  "main": "../../dist/connectors/mock.js"
4
- }
4
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "type": "module",
3
3
  "main": "../dist/connectors/index.js"
4
- }
4
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "type": "module",
3
3
  "main": "../../dist/connectors/walletConnect.js"
4
- }
4
+ }
package/dist/chains.d.ts CHANGED
@@ -1 +1 @@
1
- export { Chain, arbitrum, arbitrumGoerli, avalanche, avalancheFuji, bsc, bscTestnet, fantom, fantomTestnet, foundry, goerli, hardhat, localhost, mainnet, optimism, optimismGoerli, polygon, polygonMumbai, sepolia } from '@wagmi/chains';
1
+ export { Chain, arbitrum, arbitrumGoerli, avalanche, avalancheFuji, bsc, bscTestnet, fantom, fantomTestnet, foundry, goerli, hardhat, localhost, mainnet, optimism, optimismGoerli, polygon, polygonMumbai, sepolia, taraxa, taraxaTestnet } from '@wagmi/chains';
package/dist/chains.js CHANGED
@@ -16,8 +16,10 @@ import {
16
16
  optimismGoerli,
17
17
  polygon,
18
18
  polygonMumbai,
19
- sepolia
20
- } from "./chunk-6KG5TOAU.js";
19
+ sepolia,
20
+ taraxa,
21
+ taraxaTestnet
22
+ } from "./chunk-PCWDCFP4.js";
21
23
  import "./chunk-MQXBDTVK.js";
22
24
  export {
23
25
  arbitrum,
@@ -37,5 +39,7 @@ export {
37
39
  optimismGoerli,
38
40
  polygon,
39
41
  polygonMumbai,
40
- sepolia
42
+ sepolia,
43
+ taraxa,
44
+ taraxaTestnet
41
45
  };
@@ -2661,7 +2661,7 @@ async function sendTransaction({
2661
2661
  );
2662
2662
  return { hash, wait };
2663
2663
  } catch (error) {
2664
- if (error.code === 4001)
2664
+ if (error.code === 4001 || error.code === "ACTION_REJECTED")
2665
2665
  throw new UserRejectedRequestError(error);
2666
2666
  throw error;
2667
2667
  }
@@ -2920,7 +2920,7 @@ async function signMessage(args) {
2920
2920
  args.message
2921
2921
  );
2922
2922
  } catch (error) {
2923
- if (error.code === 4001)
2923
+ if (error.code === 4001 || error.code === "ACTION_REJECTED")
2924
2924
  throw new UserRejectedRequestError(error);
2925
2925
  throw error;
2926
2926
  }
@@ -2943,7 +2943,13 @@ async function signTypedData({
2943
2943
  types2[key] = attributes.filter((attr) => attr.type !== "EIP712Domain");
2944
2944
  return types2;
2945
2945
  }, {});
2946
- return signer._signTypedData(domain, types_, value);
2946
+ try {
2947
+ return await signer._signTypedData(domain, types_, value);
2948
+ } catch (error) {
2949
+ if (error.code === 4001 || error.code === "ACTION_REJECTED")
2950
+ throw new UserRejectedRequestError(error);
2951
+ throw error;
2952
+ }
2947
2953
  }
2948
2954
 
2949
2955
  // src/actions/accounts/switchNetwork.ts
@@ -17,7 +17,9 @@ import {
17
17
  optimismGoerli,
18
18
  polygon,
19
19
  polygonMumbai,
20
- sepolia
20
+ sepolia,
21
+ taraxa,
22
+ taraxaTestnet
21
23
  } from "@wagmi/chains";
22
24
 
23
25
  export {
@@ -38,5 +40,7 @@ export {
38
40
  optimismGoerli,
39
41
  polygon,
40
42
  polygonMumbai,
41
- sepolia
43
+ sepolia,
44
+ taraxa,
45
+ taraxaTestnet
42
46
  };
package/dist/index.js CHANGED
@@ -71,11 +71,11 @@ import {
71
71
  watchSigner,
72
72
  watchWebSocketProvider,
73
73
  writeContract
74
- } from "./chunk-37HX2X4M.js";
74
+ } from "./chunk-DYHSCPJD.js";
75
75
  import {
76
76
  goerli,
77
77
  mainnet
78
- } from "./chunk-6KG5TOAU.js";
78
+ } from "./chunk-PCWDCFP4.js";
79
79
  import {
80
80
  Connector
81
81
  } from "./chunk-BVC4KGLQ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  debounce
3
- } from "../chunk-37HX2X4M.js";
3
+ } from "../chunk-DYHSCPJD.js";
4
4
  import "../chunk-BVC4KGLQ.js";
5
5
  import "../chunk-MQXBDTVK.js";
6
6
  export {
@@ -1,13 +1,13 @@
1
1
  import "../chunk-KFW652VN.js";
2
2
  import "../chunk-KX4UEHS5.js";
3
- import "../chunk-37HX2X4M.js";
3
+ import "../chunk-DYHSCPJD.js";
4
4
  import {
5
5
  foundry,
6
6
  goerli,
7
7
  mainnet,
8
8
  optimism,
9
9
  polygon
10
- } from "../chunk-6KG5TOAU.js";
10
+ } from "../chunk-PCWDCFP4.js";
11
11
  import "../chunk-BVC4KGLQ.js";
12
12
  import "../chunk-EQOEZP46.js";
13
13
  import "../chunk-MQXBDTVK.js";
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "type": "module",
3
3
  "main": "../dist/internal/index.js"
4
- }
4
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "type": "module",
3
3
  "main": "../../dist/internal/test.js"
4
- }
4
+ }
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.3",
5
+ "version": "0.8.4",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/wagmi-dev/wagmi.git",
@@ -110,7 +110,7 @@
110
110
  "abitype": "^0.2.5",
111
111
  "eventemitter3": "^4.0.7",
112
112
  "zustand": "^4.1.4",
113
- "@wagmi/chains": "0.1.1",
113
+ "@wagmi/chains": "0.1.3",
114
114
  "@wagmi/connectors": "0.1.1"
115
115
  },
116
116
  "devDependencies": {
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "type": "module",
3
3
  "main": "../../dist/providers/alchemy.js"
4
- }
4
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "type": "module",
3
3
  "main": "../../dist/providers/infura.js"
4
- }
4
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "type": "module",
3
3
  "main": "../../dist/providers/jsonRpc.js"
4
- }
4
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "type": "module",
3
3
  "main": "../../dist/providers/public.js"
4
- }
4
+ }
@@ -1,4 +0,0 @@
1
- {
2
- "type": "module",
3
- "main": "../../dist/connectors/injected.js"
4
- }