@reef-knot/web3-react 7.1.0 → 7.1.1-alpha.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.
@@ -1,4 +1,7 @@
1
- import { Network } from '@ethersproject/providers';
1
+ export type Network = {
2
+ chainId: number;
3
+ name: string;
4
+ };
2
5
  export declare const useSupportedChains: () => {
3
6
  isUnsupported: boolean;
4
7
  supportedChains: Network[];
@@ -1 +1 @@
1
- {"version":3,"file":"useSupportedChains.d.ts","sourceRoot":"","sources":["../../src/hooks/useSupportedChains.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAG/D,eAAO,MAAM,kBAAkB,QAAO;IACpC,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,EAAE,CAAC;CAiB5B,CAAC"}
1
+ {"version":3,"file":"useSupportedChains.d.ts","sourceRoot":"","sources":["../../src/hooks/useSupportedChains.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,kBAAkB,QAAO;IACpC,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,EAAE,CAAC;CAiB5B,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { useMemo } from "react";
2
- import { getNetwork } from "@ethersproject/providers";
3
2
  import { useConfig, useConnection } from "wagmi";
4
3
 
5
4
  //#region src/hooks/useSupportedChains.ts
@@ -11,7 +10,10 @@ const useSupportedChains = () => {
11
10
  return !chainId || !chains?.find((c) => c.id === chainId);
12
11
  }, [chainId, chains]),
13
12
  supportedChains: useMemo(() => {
14
- return chains.map((c) => getNetwork(c.id));
13
+ return chains.map((c) => ({
14
+ chainId: c.id,
15
+ name: c.name
16
+ }));
15
17
  }, [chains])
16
18
  };
17
19
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reef-knot/web3-react",
3
- "version": "7.1.0",
3
+ "version": "7.1.1-alpha.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -39,16 +39,15 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@babel/cli": "7.19.3",
42
- "@babel/core": "7.20.5",
42
+ "@babel/core": "7.29.6",
43
43
  "@babel/plugin-proposal-class-properties": "7.18.6",
44
44
  "@babel/plugin-proposal-private-methods": "7.18.6",
45
45
  "@babel/plugin-proposal-private-property-in-object": "7.20.5",
46
46
  "@babel/preset-env": "7.20.2",
47
47
  "@babel/preset-react": "7.18.6",
48
48
  "@babel/preset-typescript": "7.18.6",
49
- "@ethersproject/providers": "^5.7.2",
50
- "@reef-knot/core-react": "7.2.0",
51
- "@reef-knot/ledger-connector": "5.1.0",
49
+ "@reef-knot/core-react": "7.2.1-alpha.1",
50
+ "@reef-knot/ledger-connector": "5.2.0-alpha.1",
52
51
  "@reef-knot/wallets-helpers": "3.1.0",
53
52
  "@testing-library/react": "^12.1.5",
54
53
  "@testing-library/react-hooks": "^7.0.2",
@@ -63,9 +62,8 @@
63
62
  "tiny-invariant": "^1.1.0"
64
63
  },
65
64
  "peerDependencies": {
66
- "@ethersproject/providers": "5",
67
- "@reef-knot/core-react": "7.2.0",
68
- "@reef-knot/ledger-connector": "5.1.0",
65
+ "@reef-knot/core-react": "7.2.1-alpha.1",
66
+ "@reef-knot/ledger-connector": "5.2.0-alpha.1",
69
67
  "@reef-knot/wallets-helpers": "3.1.0",
70
68
  "@tanstack/react-query": "^5.29.0",
71
69
  "react": ">=18",