@reef-knot/wallet-adapter-dapp-browser-injected 1.1.1 → 2.0.0

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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAIrD,eAAO,MAAM,EAAE,wBAAwB,CAAC;AACxC,eAAO,MAAM,IAAI,gBAAgB,CAAC;AAElC,eAAO,MAAM,mBAAmB,EAAE,iBAYhC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAIrD,eAAO,MAAM,EAAE,wBAAwB,CAAC;AACxC,eAAO,MAAM,IAAI,gBAAgB,CAAC;AAWlC,eAAO,MAAM,mBAAmB,EAAE,iBAOhC,CAAC"}
package/dist/index.js CHANGED
@@ -1,28 +1,28 @@
1
- import { InjectedConnector } from 'wagmi/connectors/injected';
1
+ import { injected } from 'wagmi/connectors';
2
2
  import { isMobileOrTablet } from '@reef-knot/wallets-helpers';
3
3
 
4
4
  const id = 'dappBrowserInjected';
5
5
  const name = 'DAppBrowser';
6
- const DAppBrowserInjected = ({
7
- chains
8
- }) => ({
6
+ const getDAppBrowserInjectedConnector = () => injected({
7
+ target: () => ({
8
+ id,
9
+ name,
10
+ provider: () => {
11
+ var _a;
12
+ return (_a = globalThis.window) === null || _a === void 0 ? void 0 : _a.ethereum;
13
+ }
14
+ })
15
+ });
16
+ const DAppBrowserInjected = () => ({
9
17
  walletName: name,
10
18
  walletId: id,
19
+ type: injected.type,
11
20
  autoConnectOnly: true,
12
21
  detector: () => {
13
22
  var _a;
14
23
  return !!((_a = globalThis.window) === null || _a === void 0 ? void 0 : _a.ethereum) && isMobileOrTablet;
15
24
  },
16
- connector: new InjectedConnector({
17
- chains,
18
- options: {
19
- name: 'DAppBrowser',
20
- getProvider: () => {
21
- var _a;
22
- return (_a = globalThis.window) === null || _a === void 0 ? void 0 : _a.ethereum;
23
- }
24
- }
25
- })
25
+ createConnectorFn: getDAppBrowserInjectedConnector()
26
26
  });
27
27
 
28
28
  export { DAppBrowserInjected, id, name };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reef-knot/wallet-adapter-dapp-browser-injected",
3
- "version": "1.1.1",
3
+ "version": "2.0.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -32,14 +32,15 @@
32
32
  "lint": "eslint --ext ts,tsx,js,mjs ."
33
33
  },
34
34
  "devDependencies": {
35
- "@reef-knot/types": "^1.6.0",
36
- "@reef-knot/wallets-helpers": "^1.1.6",
35
+ "@reef-knot/types": "^2.0.0",
36
+ "@reef-knot/wallets-helpers": "^2.0.0",
37
37
  "@svgr/rollup": "^6.5.1",
38
38
  "eslint-config-custom": "*"
39
39
  },
40
40
  "peerDependencies": {
41
- "wagmi": "^0.12.19",
42
- "@reef-knot/types": "^1.2.1",
43
- "@reef-knot/wallets-helpers": "^1.1.6"
41
+ "wagmi": "2.10.4",
42
+ "@reef-knot/types": "^2.0.0",
43
+ "@reef-knot/wallets-helpers": "^2.0.0",
44
+ "@tanstack/react-query": "^5.29.0"
44
45
  }
45
46
  }