@onekeyfe/cross-inpage-provider-core 2.2.39 → 2.2.41

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.
package/dist/cjs/index.js CHANGED
@@ -52,6 +52,7 @@ __exportStar(require("./CrossEventEmitter"), exports);
52
52
  __exportStar(require("./walletProperty"), exports);
53
53
  __exportStar(require("./notification"), exports);
54
54
  __exportStar(require("./utils/hashUtils"), exports);
55
+ __exportStar(require("./utils/isOneKeyWebsite"), exports);
55
56
  const consts = __importStar(require("./consts"));
56
57
  exports.consts = consts;
57
58
  const injectedFactory_1 = __importDefault(require("./injectedFactory"));
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isOneKeyWebsite = isOneKeyWebsite;
4
+ const ONEKEY_WEBSITE_LIST = [
5
+ 'app.onekey.so',
6
+ '1key.so',
7
+ 'app.onekeytest.com',
8
+ ];
9
+ function isOneKeyWebsite() {
10
+ return ONEKEY_WEBSITE_LIST.some(hostname => window.location.origin.includes(hostname));
11
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const version = '2.2.39';
3
+ const version = '2.2.41';
4
4
  const versionBuild = '2020-0101-1';
5
5
  exports.default = {
6
6
  version,
package/dist/index.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from './CrossEventEmitter';
10
10
  export * from './walletProperty';
11
11
  export * from './notification';
12
12
  export * from './utils/hashUtils';
13
+ export * from './utils/isOneKeyWebsite';
13
14
  import * as consts from './consts';
14
15
  export { consts };
15
16
  import injectedFactory from './injectedFactory';
package/dist/index.js CHANGED
@@ -10,6 +10,7 @@ export * from './CrossEventEmitter';
10
10
  export * from './walletProperty';
11
11
  export * from './notification';
12
12
  export * from './utils/hashUtils';
13
+ export * from './utils/isOneKeyWebsite';
13
14
  import * as consts from './consts';
14
15
  export { consts };
15
16
  import injectedFactory from './injectedFactory';
@@ -0,0 +1 @@
1
+ export declare function isOneKeyWebsite(): boolean;
@@ -0,0 +1,8 @@
1
+ const ONEKEY_WEBSITE_LIST = [
2
+ 'app.onekey.so',
3
+ '1key.so',
4
+ 'app.onekeytest.com',
5
+ ];
6
+ export function isOneKeyWebsite() {
7
+ return ONEKEY_WEBSITE_LIST.some(hostname => window.location.origin.includes(hostname));
8
+ }
@@ -1,4 +1,4 @@
1
- const version = '2.2.39';
1
+ const version = '2.2.41';
2
2
  const versionBuild = '2020-0101-1';
3
3
  export default {
4
4
  version,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/cross-inpage-provider-core",
3
- "version": "2.2.39",
3
+ "version": "2.2.41",
4
4
  "keywords": [
5
5
  "cross-inpage-provider"
6
6
  ],
@@ -29,9 +29,9 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@noble/hashes": "^1.7.1",
32
- "@onekeyfe/cross-inpage-provider-errors": "2.2.39",
33
- "@onekeyfe/cross-inpage-provider-events": "2.2.39",
34
- "@onekeyfe/cross-inpage-provider-types": "2.2.39",
32
+ "@onekeyfe/cross-inpage-provider-errors": "2.2.41",
33
+ "@onekeyfe/cross-inpage-provider-events": "2.2.41",
34
+ "@onekeyfe/cross-inpage-provider-types": "2.2.41",
35
35
  "events": "^3.3.0",
36
36
  "lodash-es": "^4.17.21",
37
37
  "ms": "^2.1.3"
@@ -39,5 +39,5 @@
39
39
  "devDependencies": {
40
40
  "@types/lodash-es": "^4.17.12"
41
41
  },
42
- "gitHead": "e6e12930ba5139c204cef7bd3c56b3b21f7c217b"
42
+ "gitHead": "b4200d7f74d3d74acfd2aaedc631841db1c95b38"
43
43
  }