@onekeyfe/hd-web-sdk 0.1.34 → 0.1.37

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.
@@ -14471,7 +14471,7 @@ class DevicePool extends events.exports {
14471
14471
  static _sendDisconnectMessage() {
14472
14472
  for (let i = this.disconnectPool.length - 1; i >= 0; i--) {
14473
14473
  const descriptor = this.connectedPool[i];
14474
- const device = this.getDeviceByPath(descriptor.path);
14474
+ const device = (descriptor === null || descriptor === void 0 ? void 0 : descriptor.path) ? this.getDeviceByPath(descriptor.path) : null;
14475
14475
 
14476
14476
  if (device) {
14477
14477
  this.emitter.emit(DEVICE.DISCONNECT, device);
@@ -14865,7 +14865,7 @@ const UI_REQUEST = {
14865
14865
  FIRMWARE_NOT_INSTALLED: 'ui-device_firmware_not_installed',
14866
14866
  NOT_USE_ONEKEY_DEVICE: 'ui-device_please_use_onekey_device'
14867
14867
  };
14868
- const DEFAULT_DOMAIN = `https://jssdk.onekey.so/${"0.1.34"}/`;
14868
+ const DEFAULT_DOMAIN = `https://jssdk.onekey.so/${"0.1.37"}/`;
14869
14869
  const DEFAULT_PRIORITY = 2;
14870
14870
  const initialSettings = {
14871
14871
  configSrc: './data/config.json',
@@ -19368,6 +19368,7 @@ class DeviceConnector {
19368
19368
 
19369
19369
  return res;
19370
19370
  } catch (error) {
19371
+ Log$1.debug('acquire error: ', error.message);
19371
19372
  safeThrowError(error);
19372
19373
  }
19373
19374
  });
@@ -19709,7 +19710,7 @@ const ensureConnected = (method, pollingId) => __awaiter(void 0, void 0, void 0,
19709
19710
  } catch (error) {
19710
19711
  Log.debug('device error: ', error);
19711
19712
 
19712
- if ([hdShared.HardwareErrorCode.BlePermissionError, hdShared.HardwareErrorCode.BleLocationError, hdShared.HardwareErrorCode.BleDeviceNotBonded, hdShared.HardwareErrorCode.BleCharacteristicNotifyError, hdShared.HardwareErrorCode.BleWriteCharacteristicError].includes(error.errorCode)) {
19713
+ if ([hdShared.HardwareErrorCode.BlePermissionError, hdShared.HardwareErrorCode.BleLocationError, hdShared.HardwareErrorCode.BleDeviceNotBonded, hdShared.HardwareErrorCode.BleCharacteristicNotifyError, hdShared.HardwareErrorCode.BleWriteCharacteristicError, hdShared.HardwareErrorCode.BleAlreadyConnected].includes(error.errorCode)) {
19713
19714
  reject(error);
19714
19715
  return;
19715
19716
  }
@@ -21223,6 +21224,7 @@ const HardwareErrorCode = {
21223
21224
  BleMonitorError: 708,
21224
21225
  BleCharacteristicNotifyError: 709,
21225
21226
  BleWriteCharacteristicError: 710,
21227
+ BleAlreadyConnected: 711,
21226
21228
  RuntimeError: 800,
21227
21229
  PinInvalid: 801,
21228
21230
  PinCancelled: 802,
@@ -21276,6 +21278,7 @@ const HardwareErrorCodeMessage = {
21276
21278
  [HardwareErrorCode.BleMonitorError]: 'Monitor Error: characteristic not found',
21277
21279
  [HardwareErrorCode.BleCharacteristicNotifyError]: 'Characteristic Notify Error',
21278
21280
  [HardwareErrorCode.BleWriteCharacteristicError]: 'Write Characteristic Error',
21281
+ [HardwareErrorCode.BleAlreadyConnected]: 'Already connected to device',
21279
21282
  [HardwareErrorCode.RuntimeError]: 'Runtime error',
21280
21283
  [HardwareErrorCode.PinInvalid]: 'Pin invalid',
21281
21284
  [HardwareErrorCode.PinCancelled]: 'Pin cancelled',
@@ -46537,7 +46540,7 @@ const src_init = async settings => {
46537
46540
 
46538
46541
  try {
46539
46542
  await init({ ..._settings,
46540
- version: "0.1.34"
46543
+ version: "0.1.37"
46541
46544
  });
46542
46545
  return true;
46543
46546
  } catch (e) {