@onekeyfe/cross-inpage-provider-core 2.2.30 → 2.2.32
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/JsBridgeBase.js
CHANGED
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
11
|
-
import { isPlainObject, isString } from 'lodash-es';
|
|
11
|
+
import { isPlainObject, isString, isNil } from 'lodash-es';
|
|
12
12
|
import { CrossEventEmitter } from './CrossEventEmitter';
|
|
13
13
|
import { appDebugLogger, consoleErrorInDev } from './loggers';
|
|
14
14
|
import { web3Errors, toNativeErrorObject } from '@onekeyfe/cross-inpage-provider-errors';
|
|
@@ -256,6 +256,9 @@ class JsBridgeBase extends CrossEventEmitter {
|
|
|
256
256
|
let payload = {
|
|
257
257
|
data: null,
|
|
258
258
|
};
|
|
259
|
+
if (isNil(payloadReceived) || payloadReceived === '') {
|
|
260
|
+
throw new Error('JsBridge ERROR: receive() payload is empty');
|
|
261
|
+
}
|
|
259
262
|
if (isPlainObject(payloadReceived)) {
|
|
260
263
|
payload = payloadReceived;
|
|
261
264
|
}
|
package/dist/cjs/JsBridgeBase.js
CHANGED
|
@@ -263,6 +263,9 @@ class JsBridgeBase extends CrossEventEmitter_1.CrossEventEmitter {
|
|
|
263
263
|
let payload = {
|
|
264
264
|
data: null,
|
|
265
265
|
};
|
|
266
|
+
if ((0, lodash_es_1.isNil)(payloadReceived) || payloadReceived === '') {
|
|
267
|
+
throw new Error('JsBridge ERROR: receive() payload is empty');
|
|
268
|
+
}
|
|
266
269
|
if ((0, lodash_es_1.isPlainObject)(payloadReceived)) {
|
|
267
270
|
payload = payloadReceived;
|
|
268
271
|
}
|
package/dist/cjs/versionInfo.js
CHANGED
package/dist/versionInfo.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/cross-inpage-provider-core",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.32",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"cross-inpage-provider"
|
|
6
6
|
],
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
|
-
"type": "module",
|
|
14
13
|
"files": [
|
|
15
14
|
"dist/*"
|
|
16
15
|
],
|
|
@@ -30,9 +29,9 @@
|
|
|
30
29
|
},
|
|
31
30
|
"dependencies": {
|
|
32
31
|
"@noble/hashes": "^1.7.1",
|
|
33
|
-
"@onekeyfe/cross-inpage-provider-errors": "2.2.
|
|
34
|
-
"@onekeyfe/cross-inpage-provider-events": "2.2.
|
|
35
|
-
"@onekeyfe/cross-inpage-provider-types": "2.2.
|
|
32
|
+
"@onekeyfe/cross-inpage-provider-errors": "2.2.32",
|
|
33
|
+
"@onekeyfe/cross-inpage-provider-events": "2.2.32",
|
|
34
|
+
"@onekeyfe/cross-inpage-provider-types": "2.2.32",
|
|
36
35
|
"events": "^3.3.0",
|
|
37
36
|
"lodash-es": "^4.17.21",
|
|
38
37
|
"ms": "^2.1.3"
|
|
@@ -40,5 +39,5 @@
|
|
|
40
39
|
"devDependencies": {
|
|
41
40
|
"@types/lodash-es": "^4.17.12"
|
|
42
41
|
},
|
|
43
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "1daa0a175d6a15ccb32a68cfb394b49f53cc8cb4"
|
|
44
43
|
}
|