@onekeyfe/hwk-trezor-adapter 1.2.8-alpha.119 → 1.2.8-alpha.120

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.
package/dist/index.d.mts CHANGED
@@ -124,7 +124,8 @@ declare class TrezorAdapter implements IHardwareWallet {
124
124
  private _getTrezorDeviceId;
125
125
  cancel(connectId?: string): void;
126
126
  /**
127
- * Only the operation explicitly supplied to the running job owns its UI requests.
127
+ * Operation owning the running job: its queue key when pinned, else the live
128
+ * operation of its connectId, so a mid-call UI request can name it.
128
129
  */
129
130
  private _activeOperationId;
130
131
  /**
package/dist/index.d.ts CHANGED
@@ -124,7 +124,8 @@ declare class TrezorAdapter implements IHardwareWallet {
124
124
  private _getTrezorDeviceId;
125
125
  cancel(connectId?: string): void;
126
126
  /**
127
- * Only the operation explicitly supplied to the running job owns its UI requests.
127
+ * Operation owning the running job: its queue key when pinned, else the live
128
+ * operation of its connectId, so a mid-call UI request can name it.
128
129
  */
129
130
  private _activeOperationId;
130
131
  /**
package/dist/index.js CHANGED
@@ -913,8 +913,7 @@ var _TrezorAdapter = class _TrezorAdapter {
913
913
  this._emitter.emit(data.type, { ...data, payload });
914
914
  };
915
915
  this._onUiEvent = (data) => {
916
- const operationId = this._activeOperationId();
917
- this._emitter.emit("ui-event", operationId ? { ...data, operationId } : data);
916
+ this._emitter.emit("ui-event", data);
918
917
  };
919
918
  this._onThpCredentialsChanged = (data) => {
920
919
  this._emitter.emit(_hwkadaptercore.DEVICE.TREZOR_THP_CREDENTIALS_CHANGED, {
@@ -1733,7 +1732,7 @@ var _TrezorAdapter = class _TrezorAdapter {
1733
1732
  for (const key of queueKeys) {
1734
1733
  this._jobQueue.cancelActiveAndPending(key, userAbortReason);
1735
1734
  }
1736
- if (resolvedConnectId && (activeJobId === void 0 || ownsConnectorInteraction)) {
1735
+ if (resolvedConnectId) {
1737
1736
  void this._connector.cancel(_nullishCoalesce(this._sessions.get(resolvedConnectId), () => ( resolvedConnectId)));
1738
1737
  }
1739
1738
  return;
@@ -1746,7 +1745,8 @@ var _TrezorAdapter = class _TrezorAdapter {
1746
1745
  }
1747
1746
  }
1748
1747
  /**
1749
- * Only the operation explicitly supplied to the running job owns its UI requests.
1748
+ * Operation owning the running job: its queue key when pinned, else the live
1749
+ * operation of its connectId, so a mid-call UI request can name it.
1750
1750
  */
1751
1751
  _activeOperationId() {
1752
1752
  return this._operations.findOperationIdByJobKey(_optionalChain([this, 'access', _76 => _76._jobQueue, 'access', _77 => _77.getActiveJob, 'call', _78 => _78(), 'optionalAccess', _79 => _79.deviceId]));