Skip to content

Commit 53b8e86

Browse files
Merge pull request #1335 from input-output-hk/feat/lw-10698-whitelist-trezor-safe3
chore: whitelist all device models
2 parents c359086 + d8a014e commit 53b8e86

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

packages/hardware-ledger/src/LedgerKeyAgent.ts

-5
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ const stakeCredentialCert = (cert: Certificate) =>
9898
cert.type === CertificateType.STAKE_REGISTRATION ||
9999
cert.type === CertificateType.STAKE_DEREGISTRATION ||
100100
cert.type === CertificateType.STAKE_DELEGATION;
101-
const isLedgerModelSupported = (deviceModelId: string): deviceModelId is 'nanoS' | 'nanoX' | 'nanoSP' =>
102-
['nanoS', 'nanoX', 'nanoSP'].includes(deviceModelId);
103101

104102
const establishDeviceConnectionMethodName = 'establishDeviceConnection';
105103

@@ -384,9 +382,6 @@ export class LedgerKeyAgent extends KeyAgentBase {
384382
if (!transport || !transport.deviceModel) {
385383
throw new errors.TransportError('Missing transport');
386384
}
387-
if (!isLedgerModelSupported(transport.deviceModel.id)) {
388-
throw new errors.TransportError(`Ledger device model: "${transport.deviceModel.id}" is not supported`);
389-
}
390385

391386
const newConnection = await LedgerKeyAgent.createDeviceConnection(transport);
392387
this.rememberConnection({

packages/hardware-trezor/src/TrezorKeyAgent.ts

-3
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,6 @@ export class TrezorKeyAgent extends KeyAgentBase {
129129
if (!deviceFeatures.success) {
130130
throw new errors.TransportError('Failed to get device', deviceFeatures.payload);
131131
}
132-
if (deviceFeatures.payload.model !== 'T') {
133-
throw new errors.TransportError(`Trezor device model "${deviceFeatures.payload.model}" is not supported.`);
134-
}
135132
return deviceFeatures.payload;
136133
} catch (error) {
137134
throw transportTypedError(error);

0 commit comments

Comments
 (0)