@onekeyfe/hd-common-connect-sdk 1.1.27-alpha.40 → 1.1.27-alpha.42
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/index.js +5 -3
- package/package.json +9 -9
- package/src/index.ts +5 -2
package/dist/index.js
CHANGED
|
@@ -632,8 +632,9 @@ function handleMessage(message) {
|
|
|
632
632
|
if (!_core) {
|
|
633
633
|
return;
|
|
634
634
|
}
|
|
635
|
+
var blockLog = HardwareSdk.getLogBlockLabel(message);
|
|
635
636
|
if (event !== HardwareSdk.LOG_EVENT) {
|
|
636
|
-
Log.debug('hd-common-connect-sdk handleMessage', message);
|
|
637
|
+
Log.debug('hd-common-connect-sdk handleMessage', blockLog !== null && blockLog !== void 0 ? blockLog : message);
|
|
637
638
|
}
|
|
638
639
|
switch (event) {
|
|
639
640
|
case HardwareSdk.UI_EVENT:
|
|
@@ -714,12 +715,13 @@ var init = function (settings, _, plugin) { return __awaiter(void 0, void 0, voi
|
|
|
714
715
|
});
|
|
715
716
|
}); };
|
|
716
717
|
var call = function (params) { return __awaiter(void 0, void 0, void 0, function () {
|
|
717
|
-
var response, error_2;
|
|
718
|
+
var blockLog, response, error_2;
|
|
718
719
|
var _a, _b, _c;
|
|
719
720
|
return __generator(this, function (_d) {
|
|
720
721
|
switch (_d.label) {
|
|
721
722
|
case 0:
|
|
722
|
-
|
|
723
|
+
blockLog = HardwareSdk.getLogBlockLabel(params);
|
|
724
|
+
Log.debug('call: ', blockLog !== null && blockLog !== void 0 ? blockLog : params);
|
|
723
725
|
_d.label = 1;
|
|
724
726
|
case 1:
|
|
725
727
|
_d.trys.push([1, 3, , 4]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-common-connect-sdk",
|
|
3
|
-
"version": "1.1.27-alpha.
|
|
3
|
+
"version": "1.1.27-alpha.42",
|
|
4
4
|
"author": "OneKey",
|
|
5
5
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
6
6
|
"license": "ISC",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"lint:fix": "eslint . --fix"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@onekeyfe/hd-core": "1.1.27-alpha.
|
|
24
|
-
"@onekeyfe/hd-shared": "1.1.27-alpha.
|
|
25
|
-
"@onekeyfe/hd-transport-emulator": "1.1.27-alpha.
|
|
26
|
-
"@onekeyfe/hd-transport-http": "1.1.27-alpha.
|
|
27
|
-
"@onekeyfe/hd-transport-lowlevel": "1.1.27-alpha.
|
|
28
|
-
"@onekeyfe/hd-transport-usb": "1.1.27-alpha.
|
|
29
|
-
"@onekeyfe/hd-transport-web-device": "1.1.27-alpha.
|
|
23
|
+
"@onekeyfe/hd-core": "1.1.27-alpha.42",
|
|
24
|
+
"@onekeyfe/hd-shared": "1.1.27-alpha.42",
|
|
25
|
+
"@onekeyfe/hd-transport-emulator": "1.1.27-alpha.42",
|
|
26
|
+
"@onekeyfe/hd-transport-http": "1.1.27-alpha.42",
|
|
27
|
+
"@onekeyfe/hd-transport-lowlevel": "1.1.27-alpha.42",
|
|
28
|
+
"@onekeyfe/hd-transport-usb": "1.1.27-alpha.42",
|
|
29
|
+
"@onekeyfe/hd-transport-web-device": "1.1.27-alpha.42"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "4c797dec8e17ef4f82ad61754c1b9ae299bfc181"
|
|
32
32
|
}
|
package/src/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ import HardwareSdk, {
|
|
|
13
13
|
createUiMessage,
|
|
14
14
|
enableLog,
|
|
15
15
|
executeCallback,
|
|
16
|
+
getLogBlockLabel,
|
|
16
17
|
getLogger,
|
|
17
18
|
initCore,
|
|
18
19
|
parseConnectSettings,
|
|
@@ -84,8 +85,9 @@ function handleMessage(message: CoreMessage) {
|
|
|
84
85
|
return;
|
|
85
86
|
}
|
|
86
87
|
|
|
88
|
+
const blockLog = getLogBlockLabel(message);
|
|
87
89
|
if (event !== LOG_EVENT) {
|
|
88
|
-
Log.debug('hd-common-connect-sdk handleMessage', message);
|
|
90
|
+
Log.debug('hd-common-connect-sdk handleMessage', blockLog ?? message);
|
|
89
91
|
}
|
|
90
92
|
switch (event) {
|
|
91
93
|
case UI_EVENT:
|
|
@@ -159,7 +161,8 @@ const init = async (
|
|
|
159
161
|
};
|
|
160
162
|
|
|
161
163
|
const call = async (params: any) => {
|
|
162
|
-
|
|
164
|
+
const blockLog = getLogBlockLabel(params);
|
|
165
|
+
Log.debug('call: ', blockLog ?? params);
|
|
163
166
|
|
|
164
167
|
try {
|
|
165
168
|
const response = await postMessage({ event: IFRAME.CALL, type: IFRAME.CALL, payload: params });
|