@onekeyfe/hd-transport-http 0.3.26 → 0.3.29
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.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/package.json +4 -4
- package/src/index.ts +7 -2
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAA8B,MAAM,wBAAwB,CAAC;AAEpE,OAAO,KAAK,EAAE,YAAY,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAMxF,aAAK,wBAAwB,GAAG;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;IACrD,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC,SAAS,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC;IAEnE,UAAU,UAAS;IAEnB,OAAO,UAAS;IAEhB,GAAG,EAAE,MAAM,CAAC;IAEZ,GAAG,CAAC,EAAE,GAAG,CAAC;gBAEE,GAAG,CAAC,EAAE,MAAM;IAIxB,KAAK,CAAC,OAAO,EAAE,wBAAwB;IAWjC,IAAI,CAAC,MAAM,EAAE,GAAG;IAMhB,WAAW;IAUjB,SAAS,CAAC,UAAU,EAAE,GAAG;IAMnB,MAAM,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,2BAA2B,CAAC;IAY/C,SAAS;IAMf,aAAa,CAAC,KAAK,EAAE,YAAY;IAO3B,OAAO,CAAC,KAAK,EAAE,YAAY;IAK3B,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAUzC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAyBjE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAYjE,IAAI,CAAC,OAAO,EAAE,MAAM;IAe1B,aAAa;IAKb,IAAI;IAIJ,MAAM;CAGP"}
|
package/dist/index.js
CHANGED
|
@@ -188,7 +188,12 @@ class HttpTransport {
|
|
|
188
188
|
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.TransportNotConfigured);
|
|
189
189
|
}
|
|
190
190
|
const messages = this._messages;
|
|
191
|
-
|
|
191
|
+
if (transport.LogBlockCommand.has(name)) {
|
|
192
|
+
this.Log.debug('call-', ' name: ', name);
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
this.Log.debug('call-', ' name: ', name, ' data: ', data);
|
|
196
|
+
}
|
|
192
197
|
const o = buildOne(messages, name, data);
|
|
193
198
|
const outData = o.toString('hex');
|
|
194
199
|
const resData = yield this._post({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-transport-http",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.29",
|
|
4
4
|
"description": "hardware http transport",
|
|
5
5
|
"author": "OneKey",
|
|
6
6
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@onekeyfe/hd-shared": "^0.3.
|
|
28
|
-
"@onekeyfe/hd-transport": "^0.3.
|
|
27
|
+
"@onekeyfe/hd-shared": "^0.3.29",
|
|
28
|
+
"@onekeyfe/hd-transport": "^0.3.29",
|
|
29
29
|
"axios": "^0.27.2"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "eae21a493ce3327cde5091537da3e1ace2d87607"
|
|
32
32
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import transport from '@onekeyfe/hd-transport';
|
|
1
|
+
import transport, { LogBlockCommand } from '@onekeyfe/hd-transport';
|
|
2
2
|
import { ERRORS, HardwareErrorCode } from '@onekeyfe/hd-shared';
|
|
3
3
|
import type { AcquireInput, OneKeyDeviceInfoWithSession } from '@onekeyfe/hd-transport';
|
|
4
4
|
import { request as http } from './http';
|
|
@@ -105,7 +105,12 @@ export default class HttpTransport {
|
|
|
105
105
|
throw ERRORS.TypedError(HardwareErrorCode.TransportNotConfigured);
|
|
106
106
|
}
|
|
107
107
|
const messages = this._messages;
|
|
108
|
-
|
|
108
|
+
if (LogBlockCommand.has(name)) {
|
|
109
|
+
this.Log.debug('call-', ' name: ', name);
|
|
110
|
+
} else {
|
|
111
|
+
this.Log.debug('call-', ' name: ', name, ' data: ', data);
|
|
112
|
+
}
|
|
113
|
+
|
|
109
114
|
const o = buildOne(messages, name, data);
|
|
110
115
|
const outData = o.toString('hex');
|
|
111
116
|
const resData = await this._post({
|