@onekeyfe/hd-web-sdk 0.1.45 → 0.1.46
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.1f1e5b5853efb0f6e168.js +3 -0
- package/build/js/{iframe.e24b2d31cab1c3bceaac.js.LICENSE.txt → iframe.1f1e5b5853efb0f6e168.js.LICENSE.txt} +0 -0
- package/build/js/iframe.1f1e5b5853efb0f6e168.js.map +1 -0
- package/build/onekey-js-sdk.js +8 -4
- 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 +6 -6
- package/build/js/iframe.e24b2d31cab1c3bceaac.js +0 -3
- package/build/js/iframe.e24b2d31cab1c3bceaac.js.map +0 -1
package/build/onekey-js-sdk.js
CHANGED
|
@@ -14783,6 +14783,7 @@ const UI_REQUEST$1 = {
|
|
|
14783
14783
|
CLOSE_UI_WINDOW: 'ui-close_window',
|
|
14784
14784
|
BLUETOOTH_PERMISSION: 'ui-bluetooth_permission',
|
|
14785
14785
|
LOCATION_PERMISSION: 'ui-location_permission',
|
|
14786
|
+
LOCATION_SERVICE_PERMISSION: 'ui-location_service_permission',
|
|
14786
14787
|
FIRMWARE_PROGRESS: 'ui-firmware-progress',
|
|
14787
14788
|
NOT_IN_BOOTLOADER: 'ui-device_not_in_bootloader_mode'
|
|
14788
14789
|
};
|
|
@@ -21216,7 +21217,7 @@ const ensureConnected = (method, pollingId) => __awaiter(void 0, void 0, void 0,
|
|
|
21216
21217
|
} catch (error) {
|
|
21217
21218
|
Log.debug('device error: ', error);
|
|
21218
21219
|
|
|
21219
|
-
if ([hdShared.HardwareErrorCode.BlePermissionError, hdShared.HardwareErrorCode.BleLocationError, hdShared.HardwareErrorCode.BleDeviceNotBonded, hdShared.HardwareErrorCode.BleCharacteristicNotifyError, hdShared.HardwareErrorCode.BleWriteCharacteristicError, hdShared.HardwareErrorCode.BleAlreadyConnected].includes(error.errorCode)) {
|
|
21220
|
+
if ([hdShared.HardwareErrorCode.BlePermissionError, hdShared.HardwareErrorCode.BleLocationError, hdShared.HardwareErrorCode.BleLocationServicesDisabled, hdShared.HardwareErrorCode.BleDeviceNotBonded, hdShared.HardwareErrorCode.BleCharacteristicNotifyError, hdShared.HardwareErrorCode.BleWriteCharacteristicError, hdShared.HardwareErrorCode.BleAlreadyConnected].includes(error.errorCode)) {
|
|
21220
21221
|
reject(error);
|
|
21221
21222
|
return;
|
|
21222
21223
|
}
|
|
@@ -21391,6 +21392,7 @@ class Core extends events.exports {
|
|
|
21391
21392
|
|
|
21392
21393
|
case UI_REQUEST$1.BLUETOOTH_PERMISSION:
|
|
21393
21394
|
case UI_REQUEST$1.LOCATION_PERMISSION:
|
|
21395
|
+
case UI_REQUEST$1.LOCATION_SERVICE_PERMISSION:
|
|
21394
21396
|
{
|
|
21395
21397
|
postMessage(message);
|
|
21396
21398
|
break;
|
|
@@ -22808,6 +22810,7 @@ const HardwareErrorCode = {
|
|
|
22808
22810
|
BleCharacteristicNotifyError: 709,
|
|
22809
22811
|
BleWriteCharacteristicError: 710,
|
|
22810
22812
|
BleAlreadyConnected: 711,
|
|
22813
|
+
BleLocationServicesDisabled: 712,
|
|
22811
22814
|
RuntimeError: 800,
|
|
22812
22815
|
PinInvalid: 801,
|
|
22813
22816
|
PinCancelled: 802,
|
|
@@ -22856,7 +22859,7 @@ const HardwareErrorCodeMessage = {
|
|
|
22856
22859
|
[HardwareErrorCode.TransportInvalidProtobuf]: 'Transport invalid protobuf',
|
|
22857
22860
|
[HardwareErrorCode.BleScanError]: 'BLE scan error',
|
|
22858
22861
|
[HardwareErrorCode.BlePermissionError]: 'Bluetooth required to be turned on',
|
|
22859
|
-
[HardwareErrorCode.BleLocationError]: '
|
|
22862
|
+
[HardwareErrorCode.BleLocationError]: 'Location permissions for the application are not available',
|
|
22860
22863
|
[HardwareErrorCode.BleRequiredUUID]: 'uuid is required',
|
|
22861
22864
|
[HardwareErrorCode.BleConnectedError]: 'connected error is always runtime error',
|
|
22862
22865
|
[HardwareErrorCode.BleDeviceNotBonded]: 'device is not bonded',
|
|
@@ -22866,6 +22869,7 @@ const HardwareErrorCodeMessage = {
|
|
|
22866
22869
|
[HardwareErrorCode.BleCharacteristicNotifyError]: 'Characteristic Notify Error',
|
|
22867
22870
|
[HardwareErrorCode.BleWriteCharacteristicError]: 'Write Characteristic Error',
|
|
22868
22871
|
[HardwareErrorCode.BleAlreadyConnected]: 'Already connected to device',
|
|
22872
|
+
[HardwareErrorCode.BleLocationServicesDisabled]: 'Location Services disabled',
|
|
22869
22873
|
[HardwareErrorCode.RuntimeError]: 'Runtime error',
|
|
22870
22874
|
[HardwareErrorCode.PinInvalid]: 'Pin invalid',
|
|
22871
22875
|
[HardwareErrorCode.PinCancelled]: 'Pin cancelled',
|
|
@@ -45604,7 +45608,7 @@ try {
|
|
|
45604
45608
|
/***/ ((module) => {
|
|
45605
45609
|
|
|
45606
45610
|
"use strict";
|
|
45607
|
-
module.exports = JSON.parse('{"name":"@onekeyfe/hd-core","version":"0.1.
|
|
45611
|
+
module.exports = JSON.parse('{"name":"@onekeyfe/hd-core","version":"0.1.46","description":"> TODO: description","author":"OneKey","homepage":"https://github.com/OneKeyHQ/hardware-js-sdk#readme","license":"ISC","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/OneKeyHQ/hardware-js-sdk.git"},"publishConfig":{"access":"public"},"scripts":{"dev":"rimraf dist && rollup -c ../../build/rollup.config.js -w","build":"rimraf dist && rollup -c ../../build/rollup.config.js","lint":"eslint .","lint:fix":"eslint . --fix"},"bugs":{"url":"https://github.com/OneKeyHQ/hardware-js-sdk/issues"},"dependencies":{"@onekeyfe/hd-shared":"^0.1.46","@onekeyfe/hd-transport":"^0.1.46","axios":"^0.27.2","bignumber.js":"^9.0.2","js-sha256":"^0.9.0","parse-uri":"^1.0.7","semver":"^7.3.7"},"devDependencies":{"@types/parse-uri":"^1.0.0","@types/semver":"^7.3.9"}}');
|
|
45608
45612
|
|
|
45609
45613
|
/***/ })
|
|
45610
45614
|
|
|
@@ -48136,7 +48140,7 @@ const src_init = async settings => {
|
|
|
48136
48140
|
|
|
48137
48141
|
try {
|
|
48138
48142
|
await init({ ..._settings,
|
|
48139
|
-
version: "0.1.
|
|
48143
|
+
version: "0.1.46"
|
|
48140
48144
|
});
|
|
48141
48145
|
return true;
|
|
48142
48146
|
} catch (e) {
|