diff --git a/libs/ledger-live-common/src/hw/deviceAccess.ts b/libs/ledger-live-common/src/hw/deviceAccess.ts index 7baa4d56ebd..553465e8acf 100644 --- a/libs/ledger-live-common/src/hw/deviceAccess.ts +++ b/libs/ledger-live-common/src/hw/deviceAccess.ts @@ -46,6 +46,7 @@ let errorRemapping = e => throwError(() => e); export const setErrorRemapping = (f: (arg0: Error) => Observable): void => { errorRemapping = f; }; + const never = new Promise(() => {}); /** diff --git a/libs/ledgerjs/packages/errors/src/index.ts b/libs/ledgerjs/packages/errors/src/index.ts index 992aed2c31c..6ad0e6baf8f 100644 --- a/libs/ledgerjs/packages/errors/src/index.ts +++ b/libs/ledgerjs/packages/errors/src/index.ts @@ -378,6 +378,14 @@ export class LockedDeviceError extends TransportStatusError { } } +export class DeviceMangementKitError extends Error { + constructor(name: string, message: string) { + super(message); + this.name = name; + Object.setPrototypeOf(this, DeviceMangementKitError.prototype); + } +} + // Represents the type of the class TransportStatusError and its children export type TransportStatusErrorClassType = typeof TransportStatusError | typeof LockedDeviceError; diff --git a/libs/live-dmk/.unimportedrc.json b/libs/live-dmk/.unimportedrc.json index e66efc9e825..ba8c2dd0a18 100644 --- a/libs/live-dmk/.unimportedrc.json +++ b/libs/live-dmk/.unimportedrc.json @@ -1,5 +1,5 @@ { - "entry": ["src/index.tsx"], + "entry": ["src/index.ts"], "ignorePatterns": ["**/node_modules/**", "**/*.test.{ts,tsx}"], "ignoreUnused": ["react-dom"] } diff --git a/libs/live-dmk/src/config/activeDeviceSession.ts b/libs/live-dmk/src/config/activeDeviceSession.ts index d22ba69fa13..3e7c8a2fea3 100644 --- a/libs/live-dmk/src/config/activeDeviceSession.ts +++ b/libs/live-dmk/src/config/activeDeviceSession.ts @@ -1,5 +1,5 @@ import { BehaviorSubject } from "rxjs"; -import { DeviceManagementKitTransport } from "src/transport/DeviceManagementKitTransport"; +import { DeviceManagementKitTransport } from "../transport/DeviceManagementKitTransport"; export const activeDeviceSessionSubject: BehaviorSubject<{ sessionId: string;