@onekeyfe/hd-web-sdk 0.1.39 → 0.1.40

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.
@@ -14918,7 +14918,7 @@ const UI_REQUEST = {
14918
14918
  FIRMWARE_NOT_INSTALLED: 'ui-device_firmware_not_installed',
14919
14919
  NOT_USE_ONEKEY_DEVICE: 'ui-device_please_use_onekey_device'
14920
14920
  };
14921
- const DEFAULT_DOMAIN = `https://jssdk.onekey.so/${"0.1.39"}/`;
14921
+ const DEFAULT_DOMAIN = `https://jssdk.onekey.so/${"0.1.40"}/`;
14922
14922
  const DEFAULT_PRIORITY = 2;
14923
14923
  const initialSettings = {
14924
14924
  configSrc: './data/config.json',
@@ -15172,16 +15172,24 @@ class Device extends events.exports {
15172
15172
  }
15173
15173
 
15174
15174
  getInternalState(_deviceId) {
15175
- var _a, _b, _c;
15175
+ var _a, _b;
15176
15176
 
15177
15177
  Log$3.debug('getInternalState session param: ', `device_id: ${_deviceId}`, `features.device_id: ${(_a = this.features) === null || _a === void 0 ? void 0 : _a.device_id}`, `passphraseState: ${this.passphraseState}`);
15178
15178
  Log$3.debug('getInternalState session cache: ', deviceSessionCache);
15179
15179
  const deviceId = _deviceId || ((_b = this.features) === null || _b === void 0 ? void 0 : _b.device_id);
15180
15180
  if (!deviceId) return undefined;
15181
- const key = `${deviceId}`;
15181
+ if (!this.passphraseState) return undefined;
15182
15182
  const usePassKey = `${deviceId}@${this.passphraseState}`;
15183
- const session = (_c = deviceSessionCache[key]) !== null && _c !== void 0 ? _c : deviceSessionCache[usePassKey];
15184
- return this.passphraseState ? session : undefined;
15183
+
15184
+ if (!deviceSessionCache[usePassKey]) {
15185
+ const key = `${deviceId}`;
15186
+
15187
+ if (deviceSessionCache[key]) {
15188
+ deviceSessionCache[usePassKey] = deviceSessionCache[key];
15189
+ }
15190
+ }
15191
+
15192
+ return deviceSessionCache[usePassKey];
15185
15193
  }
15186
15194
 
15187
15195
  setInternalState(state, initSession) {
@@ -46788,7 +46796,7 @@ const src_init = async settings => {
46788
46796
 
46789
46797
  try {
46790
46798
  await init({ ..._settings,
46791
- version: "0.1.39"
46799
+ version: "0.1.40"
46792
46800
  });
46793
46801
  return true;
46794
46802
  } catch (e) {