@reef-knot/wallet-adapter-imtoken 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, _defs;
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 SvgImtoken = function SvgImtoken(props) {
20
15
  return /*#__PURE__*/React.createElement("svg", _extends({
package/dist/index.js CHANGED
@@ -8,10 +8,7 @@ const getImTokenConnector = () => injected({
8
8
  target: () => ({
9
9
  id,
10
10
  name,
11
- provider: () => {
12
- var _a;
13
- return (_a = globalThis.window) === null || _a === void 0 ? void 0 : _a.ethereum;
14
- }
11
+ provider: () => globalThis.window?.ethereum
15
12
  })
16
13
  });
17
14
  const ImToken = () => ({
@@ -19,10 +16,7 @@ const ImToken = () => ({
19
16
  walletId: id,
20
17
  type: injected.type,
21
18
  icon: Memo,
22
- detector: () => {
23
- var _a, _b;
24
- return !!((_b = (_a = globalThis.window) === null || _a === void 0 ? void 0 : _a.ethereum) === null || _b === void 0 ? void 0 : _b.isImToken);
25
- },
19
+ detector: () => !!globalThis.window?.ethereum?.isImToken,
26
20
  deeplink: `imtokenv2://navigate/DappView?url=${currentHref}`,
27
21
  downloadURLs: {
28
22
  default: 'https://token.im/download'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reef-knot/wallet-adapter-imtoken",
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/imtoken"
29
+ },
25
30
  "publishConfig": {
26
31
  "registry": "https://registry.npmjs.org/",
27
32
  "access": "public"
@@ -32,13 +37,13 @@
32
37
  "lint": "eslint --ext ts,tsx,js,mjs ."
33
38
  },
34
39
  "devDependencies": {
35
- "@reef-knot/types": "^4.1.0",
40
+ "@reef-knot/types": "4.2.0-alpha.2",
36
41
  "@svgr/rollup": "^6.5.1",
37
42
  "eslint-config-custom": "*"
38
43
  },
39
44
  "peerDependencies": {
40
- "wagmi": ">=2.14",
41
- "@reef-knot/types": "^4.0.0",
42
- "@tanstack/react-query": "^5.29.0"
45
+ "@reef-knot/types": "4.2.0-alpha.2",
46
+ "@tanstack/react-query": "^5.29.0",
47
+ "wagmi": ">=3.3"
43
48
  }
44
49
  }