@onekeyfe/hd-web-sdk 0.1.9 → 0.1.10

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.
@@ -4972,6 +4972,18 @@ const versionCompare = (a, b) => {
4972
4972
  return 0;
4973
4973
  };
4974
4974
 
4975
+ function patchFeatures(response) {
4976
+ if (response.type !== 'Features') {
4977
+ return response;
4978
+ }
4979
+
4980
+ if (response.message.major_version < 1) {
4981
+ response.message.major_version = 1;
4982
+ }
4983
+
4984
+ return response;
4985
+ }
4986
+
4975
4987
  const getDeviceModel = features => {
4976
4988
  if (!features || typeof features !== 'object') {
4977
4989
  return 'model_mini';
@@ -14327,7 +14339,7 @@ class DeviceCommands {
14327
14339
  }
14328
14340
 
14329
14341
  if (res.type === 'Features') {
14330
- return Promise.resolve(res);
14342
+ return Promise.resolve(patchFeatures(res));
14331
14343
  }
14332
14344
 
14333
14345
  if (res.type === 'ButtonRequest') {
@@ -19222,6 +19234,7 @@ __webpack_unused_export__ = isValidVersionString;
19222
19234
  __webpack_unused_export__ = normalizeVersionArray;
19223
19235
  exports._4 = parseConnectSettings;
19224
19236
  exports.kW = parseMessage;
19237
+ __webpack_unused_export__ = patchFeatures;
19225
19238
  __webpack_unused_export__ = safeThrowError;
19226
19239
  __webpack_unused_export__ = versionCompare;
19227
19240
  __webpack_unused_export__ = versionSplit;