Skip to content

Commit

Permalink
chore(hardware-ledger): remove device model guard
Browse files Browse the repository at this point in the history
  • Loading branch information
tomislavhoracek committed Jun 17, 2024
1 parent 5fd31f2 commit d8a014e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions packages/hardware-ledger/src/LedgerKeyAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ const stakeCredentialCert = (cert: Certificate) =>
cert.type === CertificateType.STAKE_REGISTRATION ||
cert.type === CertificateType.STAKE_DEREGISTRATION ||
cert.type === CertificateType.STAKE_DELEGATION;
const isLedgerModelSupported = (deviceModelId: string): deviceModelId is 'nanoS' | 'nanoX' | 'nanoSP' =>
['nanoS', 'nanoX', 'nanoSP'].includes(deviceModelId);

const establishDeviceConnectionMethodName = 'establishDeviceConnection';

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

const newConnection = await LedgerKeyAgent.createDeviceConnection(transport);
this.rememberConnection({
Expand Down

0 comments on commit d8a014e

Please sign in to comment.