@onekeyfe/hd-web-sdk 0.1.30 → 0.1.31

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.
@@ -14789,10 +14789,6 @@ class DeviceCommands {
14789
14789
  return Promise.resolve(patchFeatures(res));
14790
14790
  }
14791
14791
 
14792
- if ((_a = this.device.features) === null || _a === void 0 ? void 0 : _a.passphrase_protection) {
14793
- return Promise.reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.DeviceNotSupportPassphrase));
14794
- }
14795
-
14796
14792
  if (res.type === 'ButtonRequest') {
14797
14793
  if (res.message.code === 'ButtonRequest_PassphraseEntry') {
14798
14794
  this.device.emit(DEVICE.PASSPHRASE_ON_DEVICE, this.device);
@@ -14822,6 +14818,10 @@ class DeviceCommands {
14822
14818
  }, () => this._commonCall('Cancel', {}));
14823
14819
  }
14824
14820
 
14821
+ if ((_a = this.device.features) === null || _a === void 0 ? void 0 : _a.passphrase_protection) {
14822
+ return Promise.reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.DeviceNotSupportPassphrase));
14823
+ }
14824
+
14825
14825
  if (res.type === 'PassphraseRequest') {
14826
14826
  return Promise.reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.DeviceNotSupportPassphrase));
14827
14827
  }
@@ -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.30"}/`;
14868
+ const DEFAULT_DOMAIN = `https://jssdk.onekey.so/${"0.1.31"}/`;
14869
14869
  const DEFAULT_PRIORITY = 2;
14870
14870
  const initialSettings = {
14871
14871
  configSrc: './data/config.json',
@@ -15138,6 +15138,14 @@ class Device extends events.exports {
15138
15138
  } = yield this.commands.typedCall('Initialize', 'Features', payload);
15139
15139
 
15140
15140
  this._updateFeatures(message);
15141
+
15142
+ if (message.passphrase_protection) {
15143
+ if (this.listenerCount(DEVICE.PIN) > 0) {
15144
+ yield this.commands.typedCall('ApplySettings', 'Success', {
15145
+ use_passphrase: false
15146
+ });
15147
+ }
15148
+ }
15141
15149
  });
15142
15150
  }
15143
15151
 
@@ -46495,7 +46503,7 @@ const src_init = async settings => {
46495
46503
 
46496
46504
  try {
46497
46505
  await init({ ..._settings,
46498
- version: "0.1.30"
46506
+ version: "0.1.31"
46499
46507
  });
46500
46508
  return true;
46501
46509
  } catch (e) {