@reef-knot/wallet-adapter-metamask 4.1.0 → 4.2.0-alpha.2

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.
@@ -3,18 +3,13 @@ import { memo } from 'react';
3
3
 
4
4
  var _rect, _path, _path2, _path3, _path4, _path5, _path6, _path7, _path8, _path9, _path10, _path11, _path12, _path13, _path14, _path15, _path16, _path17, _path18, _path19, _path20, _path21, _path22, _path23, _path24, _path25, _path26, _path27, _path28, _path29;
5
5
  function _extends() {
6
- _extends = Object.assign ? Object.assign.bind() : function (target) {
7
- for (var i = 1; i < arguments.length; i++) {
8
- var source = arguments[i];
9
- for (var key in source) {
10
- if (Object.prototype.hasOwnProperty.call(source, key)) {
11
- target[key] = source[key];
12
- }
13
- }
6
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
7
+ for (var e = 1; e < arguments.length; e++) {
8
+ var t = arguments[e];
9
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
14
10
  }
15
- return target;
16
- };
17
- return _extends.apply(this, arguments);
11
+ return n;
12
+ }, _extends.apply(null, arguments);
18
13
  }
19
14
  var SvgMetamaskInverted = function SvgMetamaskInverted(props) {
20
15
  return /*#__PURE__*/React.createElement("svg", _extends({
@@ -3,18 +3,13 @@ import { memo } from 'react';
3
3
 
4
4
  var _rect, _path, _path2, _path3, _path4, _path5, _path6, _path7, _path8, _path9, _path10, _path11, _path12, _path13, _path14, _path15, _path16, _path17, _path18, _path19, _path20, _path21, _path22, _path23, _path24, _path25, _path26, _path27, _path28, _path29;
5
5
  function _extends() {
6
- _extends = Object.assign ? Object.assign.bind() : function (target) {
7
- for (var i = 1; i < arguments.length; i++) {
8
- var source = arguments[i];
9
- for (var key in source) {
10
- if (Object.prototype.hasOwnProperty.call(source, key)) {
11
- target[key] = source[key];
12
- }
13
- }
6
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
7
+ for (var e = 1; e < arguments.length; e++) {
8
+ var t = arguments[e];
9
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
14
10
  }
15
- return target;
16
- };
17
- return _extends.apply(this, arguments);
11
+ return n;
12
+ }, _extends.apply(null, arguments);
18
13
  }
19
14
  var SvgMetamask = function SvgMetamask(props) {
20
15
  return /*#__PURE__*/React.createElement("svg", _extends({
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAO1D,eAAO,MAAM,EAAE,aAAa,CAAC;AAC7B,eAAO,MAAM,IAAI,aAAa,CAAC;AAC/B,eAAO,MAAM,IAAI,gBAAgB,CAAC;AAKlC,eAAO,MAAM,QAAQ,EAAE,iBAiBrB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAI1D,eAAO,MAAM,EAAE,aAAa,CAAC;AAC7B,eAAO,MAAM,IAAI,aAAa,CAAC;AAC/B,eAAO,MAAM,IAAI,gBAAgB,CAAC;AAElC,eAAO,MAAM,QAAQ,EAAE,iBAUrB,CAAC"}
package/dist/index.js CHANGED
@@ -1,13 +1,11 @@
1
- import { injected } from 'wagmi/connectors';
2
- import { isProviderExistsEIP6963, getTargetEIP6963 } from '@reef-knot/wallets-helpers';
1
+ import { injected, metaMask } from 'wagmi/connectors';
2
+ import { isProviderExistsEIP6963 } from '@reef-knot/wallets-helpers';
3
3
  import Memo from './icons/metamask.svg.js';
4
4
  import Memo$1 from './icons/metamask-inverted.svg.js';
5
5
 
6
6
  const id = 'metaMask';
7
7
  const name = 'MetaMask';
8
8
  const rdns = 'io.metamask';
9
- const currentHref = globalThis.window ? globalThis.window.location.hostname + globalThis.window.location.pathname // encoding not supported
10
- : '';
11
9
  const MetaMask = ({
12
10
  providersStore
13
11
  }) => ({
@@ -19,14 +17,7 @@ const MetaMask = ({
19
17
  dark: Memo$1
20
18
  },
21
19
  detector: () => isProviderExistsEIP6963(providersStore, rdns),
22
- downloadURLs: {
23
- default: 'https://metamask.io/download/'
24
- },
25
- deeplink: `https://metamask.app.link/dapp/${currentHref}`,
26
- createConnectorFn: injected({
27
- target: () => getTargetEIP6963(providersStore, rdns),
28
- shimDisconnect: true
29
- })
20
+ createConnectorFn: metaMask()
30
21
  });
31
22
 
32
23
  export { MetaMask, id, name, rdns };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reef-knot/wallet-adapter-metamask",
3
- "version": "4.1.0",
3
+ "version": "4.2.0-alpha.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -22,6 +22,11 @@
22
22
  "bugs": {
23
23
  "url": "https://github.com/lidofinance/reef-knot/issues"
24
24
  },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/lidofinance/reef-knot.git",
28
+ "directory": "packages/wallets/metamask"
29
+ },
25
30
  "publishConfig": {
26
31
  "registry": "https://registry.npmjs.org/",
27
32
  "access": "public"
@@ -32,15 +37,15 @@
32
37
  "lint": "eslint --ext ts,tsx,js,mjs ."
33
38
  },
34
39
  "devDependencies": {
35
- "@reef-knot/types": "^4.1.0",
36
- "@reef-knot/wallets-helpers": "^2.2.0",
40
+ "@reef-knot/types": "4.2.0-alpha.1",
41
+ "@reef-knot/wallets-helpers": "2.3.0-alpha.1",
37
42
  "@svgr/rollup": "^6.5.1",
38
43
  "eslint-config-custom": "*"
39
44
  },
40
45
  "peerDependencies": {
41
- "wagmi": ">=2.14",
42
- "@reef-knot/types": "^4.0.0",
43
- "@reef-knot/wallets-helpers": "^2.0.2",
44
- "@tanstack/react-query": "^5.29.0"
46
+ "@reef-knot/types": "4.2.0-alpha.1",
47
+ "@reef-knot/wallets-helpers": "2.3.0-alpha.1",
48
+ "@tanstack/react-query": "^5.29.0",
49
+ "wagmi": ">=2.14"
45
50
  }
46
51
  }