@onekeyfe/hwk-trezor-adapter 1.2.8-alpha.117 → 1.2.8-alpha.119
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 +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -124,8 +124,7 @@ declare class TrezorAdapter implements IHardwareWallet {
|
|
|
124
124
|
private _getTrezorDeviceId;
|
|
125
125
|
cancel(connectId?: string): void;
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
128
|
-
* operation of its connectId, so a mid-call UI request can name it.
|
|
127
|
+
* Only the operation explicitly supplied to the running job owns its UI requests.
|
|
129
128
|
*/
|
|
130
129
|
private _activeOperationId;
|
|
131
130
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -124,8 +124,7 @@ declare class TrezorAdapter implements IHardwareWallet {
|
|
|
124
124
|
private _getTrezorDeviceId;
|
|
125
125
|
cancel(connectId?: string): void;
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
128
|
-
* operation of its connectId, so a mid-call UI request can name it.
|
|
127
|
+
* Only the operation explicitly supplied to the running job owns its UI requests.
|
|
129
128
|
*/
|
|
130
129
|
private _activeOperationId;
|
|
131
130
|
/**
|
package/dist/index.js
CHANGED
|
@@ -913,7 +913,8 @@ var _TrezorAdapter = class _TrezorAdapter {
|
|
|
913
913
|
this._emitter.emit(data.type, { ...data, payload });
|
|
914
914
|
};
|
|
915
915
|
this._onUiEvent = (data) => {
|
|
916
|
-
this.
|
|
916
|
+
const operationId = this._activeOperationId();
|
|
917
|
+
this._emitter.emit("ui-event", operationId ? { ...data, operationId } : data);
|
|
917
918
|
};
|
|
918
919
|
this._onThpCredentialsChanged = (data) => {
|
|
919
920
|
this._emitter.emit(_hwkadaptercore.DEVICE.TREZOR_THP_CREDENTIALS_CHANGED, {
|
|
@@ -1732,7 +1733,7 @@ var _TrezorAdapter = class _TrezorAdapter {
|
|
|
1732
1733
|
for (const key of queueKeys) {
|
|
1733
1734
|
this._jobQueue.cancelActiveAndPending(key, userAbortReason);
|
|
1734
1735
|
}
|
|
1735
|
-
if (resolvedConnectId) {
|
|
1736
|
+
if (resolvedConnectId && (activeJobId === void 0 || ownsConnectorInteraction)) {
|
|
1736
1737
|
void this._connector.cancel(_nullishCoalesce(this._sessions.get(resolvedConnectId), () => ( resolvedConnectId)));
|
|
1737
1738
|
}
|
|
1738
1739
|
return;
|
|
@@ -1745,8 +1746,7 @@ var _TrezorAdapter = class _TrezorAdapter {
|
|
|
1745
1746
|
}
|
|
1746
1747
|
}
|
|
1747
1748
|
/**
|
|
1748
|
-
*
|
|
1749
|
-
* operation of its connectId, so a mid-call UI request can name it.
|
|
1749
|
+
* Only the operation explicitly supplied to the running job owns its UI requests.
|
|
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]));
|