@onekeyfe/hd-web-sdk 0.1.4 → 0.1.5

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.
@@ -14726,7 +14726,7 @@ class Device extends events.exports {
14726
14726
  this.featuresNeedsReload = false;
14727
14727
  }
14728
14728
 
14729
- updateDescriptor(descriptor) {
14729
+ updateDescriptor(descriptor, forceUpdate = false) {
14730
14730
  const env = DataManager.getSettings('env');
14731
14731
 
14732
14732
  if (env === 'react-native') {
@@ -14739,12 +14739,16 @@ class Device extends events.exports {
14739
14739
  if (originalSession !== upcomingSession) {
14740
14740
  this.originalDescriptor.session = upcomingSession;
14741
14741
  }
14742
+
14743
+ if (forceUpdate) {
14744
+ this.originalDescriptor = descriptor;
14745
+ }
14742
14746
  }
14743
14747
 
14744
14748
  updateFromCache(device) {
14745
14749
  this.mainId = device.mainId;
14746
14750
  this.commands = device.commands;
14747
- this.updateDescriptor(device.originalDescriptor);
14751
+ this.updateDescriptor(device.originalDescriptor, true);
14748
14752
 
14749
14753
  if (device.features) {
14750
14754
  this._updateFeatures(device.features);