@onekeyfe/hd-web-sdk 0.1.7 → 0.1.8
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/build/iframe.html +1 -1
- package/build/js/iframe.13ea4a3b8866021692da.js +3 -0
- package/build/js/{iframe.400953dbfdbb1e0d0372.js.LICENSE.txt → iframe.13ea4a3b8866021692da.js.LICENSE.txt} +0 -0
- package/build/js/iframe.13ea4a3b8866021692da.js.map +1 -0
- package/build/onekey-js-sdk.js +8 -1
- package/build/onekey-js-sdk.js.map +1 -1
- package/build/onekey-js-sdk.min.js +1 -1
- package/build/onekey-js-sdk.min.js.map +1 -1
- package/package.json +5 -5
- package/build/js/iframe.400953dbfdbb1e0d0372.js +0 -3
- package/build/js/iframe.400953dbfdbb1e0d0372.js.map +0 -1
package/build/onekey-js-sdk.js
CHANGED
|
@@ -14132,7 +14132,8 @@ const UI_REQUEST$1 = {
|
|
|
14132
14132
|
CLOSE_UI_WINDOW: 'ui-close_window',
|
|
14133
14133
|
BLUETOOTH_PERMISSION: 'ui-bluetooth_permission',
|
|
14134
14134
|
LOCATION_PERMISSION: 'ui-location_permission',
|
|
14135
|
-
FIRMWARE_PROGRESS: 'ui-firmware-progress'
|
|
14135
|
+
FIRMWARE_PROGRESS: 'ui-firmware-progress',
|
|
14136
|
+
NOT_IN_BOOTLOADER: 'ui-device_not_in_bootloader_mode'
|
|
14136
14137
|
};
|
|
14137
14138
|
|
|
14138
14139
|
const createUiMessage = (type, payload) => ({
|
|
@@ -18580,6 +18581,10 @@ const callAPI = message => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
18580
18581
|
const unexpectedMode = device.hasUnexpectedMode(method.allowDeviceMode, method.requireDeviceMode);
|
|
18581
18582
|
|
|
18582
18583
|
if (unexpectedMode) {
|
|
18584
|
+
if (unexpectedMode === UI_REQUEST$1.NOT_IN_BOOTLOADER) {
|
|
18585
|
+
return Promise.reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.DeviceUnexpectedBootloaderMode));
|
|
18586
|
+
}
|
|
18587
|
+
|
|
18583
18588
|
return Promise.reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.DeviceUnexpectedMode, unexpectedMode));
|
|
18584
18589
|
}
|
|
18585
18590
|
|
|
@@ -20067,6 +20072,7 @@ const HardwareErrorCode = {
|
|
|
20067
20072
|
DeviceNotFound: 105,
|
|
20068
20073
|
DeviceInitializeFailed: 106,
|
|
20069
20074
|
DeviceInterruptedFromOutside: 107,
|
|
20075
|
+
DeviceUnexpectedBootloaderMode: 108,
|
|
20070
20076
|
NotInitialized: 200,
|
|
20071
20077
|
IFrameNotInitialized: 300,
|
|
20072
20078
|
IFrameAleradyInitialized: 301,
|
|
@@ -20107,6 +20113,7 @@ const HardwareErrorCodeMessage = {
|
|
|
20107
20113
|
[HardwareErrorCode.DeviceNotFound]: 'Device not found',
|
|
20108
20114
|
[HardwareErrorCode.DeviceInitializeFailed]: 'Device initialization failed',
|
|
20109
20115
|
[HardwareErrorCode.DeviceInterruptedFromOutside]: 'Device interrupted',
|
|
20116
|
+
[HardwareErrorCode.DeviceUnexpectedBootloaderMode]: 'Device should be in bootloader mode',
|
|
20110
20117
|
[HardwareErrorCode.NotInitialized]: 'Not initialized',
|
|
20111
20118
|
[HardwareErrorCode.IFrameNotInitialized]: 'IFrame not initialized',
|
|
20112
20119
|
[HardwareErrorCode.IFrameAleradyInitialized]: 'IFrame alerady initialized',
|