@onekeyfe/hd-common-connect-sdk 1.2.0-alpha.20 → 1.2.0-alpha.22
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 +1 -5
- package/package.json +9 -9
- package/src/index.ts +1 -6
package/dist/index.js
CHANGED
|
@@ -641,9 +641,6 @@ var cancel = function (connectId) {
|
|
|
641
641
|
return;
|
|
642
642
|
_core.handleMessage({ event: HardwareSdk.IFRAME.CANCEL, type: HardwareSdk.IFRAME.CANCEL, payload: { connectId: connectId } });
|
|
643
643
|
};
|
|
644
|
-
var cancelOperation = function (operationId) {
|
|
645
|
-
_core === null || _core === void 0 ? void 0 : _core.cancelOperation(operationId);
|
|
646
|
-
};
|
|
647
644
|
function handleMessage(message) {
|
|
648
645
|
var event = message.event;
|
|
649
646
|
if (!_core) {
|
|
@@ -752,7 +749,7 @@ var call = function (params) { return __awaiter(void 0, void 0, void 0, function
|
|
|
752
749
|
case 2:
|
|
753
750
|
response = _d.sent();
|
|
754
751
|
if (response) {
|
|
755
|
-
Log.debug('response: ', response);
|
|
752
|
+
Log.debug('response: ', blockLog ? '[REDACTED]' : response);
|
|
756
753
|
if (!response.success) {
|
|
757
754
|
if (((_a = response.payload) === null || _a === void 0 ? void 0 : _a.code) === hdShared.HardwareErrorCode.BleUnsupported) {
|
|
758
755
|
postMessage(HardwareSdk.createUiMessage(HardwareSdk.UI_REQUEST.BLUETOOTH_UNSUPPORTED), false);
|
|
@@ -782,7 +779,6 @@ var HardwareCommonConnectSdk = HardwareSdk__default["default"]({
|
|
|
782
779
|
init: init,
|
|
783
780
|
call: call,
|
|
784
781
|
cancel: cancel,
|
|
785
|
-
cancelOperation: cancelOperation,
|
|
786
782
|
dispose: dispose,
|
|
787
783
|
uiResponse: uiResponse,
|
|
788
784
|
updateSettings: updateSettings,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-common-connect-sdk",
|
|
3
|
-
"version": "1.2.0-alpha.
|
|
3
|
+
"version": "1.2.0-alpha.22",
|
|
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.2.0-alpha.
|
|
24
|
-
"@onekeyfe/hd-shared": "1.2.0-alpha.
|
|
25
|
-
"@onekeyfe/hd-transport-emulator": "1.2.0-alpha.
|
|
26
|
-
"@onekeyfe/hd-transport-http": "1.2.0-alpha.
|
|
27
|
-
"@onekeyfe/hd-transport-lowlevel": "1.2.0-alpha.
|
|
28
|
-
"@onekeyfe/hd-transport-usb": "1.2.0-alpha.
|
|
29
|
-
"@onekeyfe/hd-transport-web-device": "1.2.0-alpha.
|
|
23
|
+
"@onekeyfe/hd-core": "1.2.0-alpha.22",
|
|
24
|
+
"@onekeyfe/hd-shared": "1.2.0-alpha.22",
|
|
25
|
+
"@onekeyfe/hd-transport-emulator": "1.2.0-alpha.22",
|
|
26
|
+
"@onekeyfe/hd-transport-http": "1.2.0-alpha.22",
|
|
27
|
+
"@onekeyfe/hd-transport-lowlevel": "1.2.0-alpha.22",
|
|
28
|
+
"@onekeyfe/hd-transport-usb": "1.2.0-alpha.22",
|
|
29
|
+
"@onekeyfe/hd-transport-web-device": "1.2.0-alpha.22"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "ce94a5ebbe141b0c15db7c68d08085ca1ddb0166"
|
|
32
32
|
}
|
package/src/index.ts
CHANGED
|
@@ -84,10 +84,6 @@ const cancel = (connectId?: string) => {
|
|
|
84
84
|
_core.handleMessage({ event: IFRAME.CANCEL, type: IFRAME.CANCEL, payload: { connectId } });
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
-
const cancelOperation = (operationId: string) => {
|
|
88
|
-
_core?.cancelOperation(operationId);
|
|
89
|
-
};
|
|
90
|
-
|
|
91
87
|
function handleMessage(message: CoreMessage) {
|
|
92
88
|
const { event } = message;
|
|
93
89
|
if (!_core) {
|
|
@@ -182,7 +178,7 @@ const call = async (params: any) => {
|
|
|
182
178
|
try {
|
|
183
179
|
const response = await postMessage({ event: IFRAME.CALL, type: IFRAME.CALL, payload: params });
|
|
184
180
|
if (response) {
|
|
185
|
-
Log.debug('response: ', response);
|
|
181
|
+
Log.debug('response: ', blockLog ? '[REDACTED]' : response);
|
|
186
182
|
|
|
187
183
|
if (!response.success) {
|
|
188
184
|
if (response.payload?.code === HardwareErrorCode.BleUnsupported) {
|
|
@@ -214,7 +210,6 @@ const HardwareCommonConnectSdk = HardwareSdk({
|
|
|
214
210
|
init,
|
|
215
211
|
call,
|
|
216
212
|
cancel,
|
|
217
|
-
cancelOperation,
|
|
218
213
|
dispose,
|
|
219
214
|
uiResponse,
|
|
220
215
|
updateSettings,
|