From 4a27224ac7e0dbb4689bd671d8c90a008ddc6817 Mon Sep 17 00:00:00 2001 From: HenryNguyen5 Date: Fri, 4 May 2018 16:23:39 -0400 Subject: [PATCH] Fix imports and filenames to cooperate with internal typings --- common/typescript/ledger/hw-app-eth.d.ts | 4 ++-- .../typescript/ledger/hw-transport-node-hid.d.ts | 6 +++--- common/typescript/ledger/hw-transport-u2f.d.ts | 16 ++++++++-------- common/typescript/ledger/hw-transport.d.ts | 2 +- yarn.lock | 6 +++--- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/common/typescript/ledger/hw-app-eth.d.ts b/common/typescript/ledger/hw-app-eth.d.ts index 1570f954..b22a4ef0 100644 --- a/common/typescript/ledger/hw-app-eth.d.ts +++ b/common/typescript/ledger/hw-app-eth.d.ts @@ -1,6 +1,6 @@ -import LedgerTransport from 'ledgerhq__hw-transport'; +declare module '@ledgerhq/hw-app-eth' { + import LedgerTransport from '@ledgerhq/hw-transport'; -declare module 'ledgerhq__hw-app-eth' { export default class Eth> { constructor(transport: T); diff --git a/common/typescript/ledger/hw-transport-node-hid.d.ts b/common/typescript/ledger/hw-transport-node-hid.d.ts index f39a9029..5db97fa6 100644 --- a/common/typescript/ledger/hw-transport-node-hid.d.ts +++ b/common/typescript/ledger/hw-transport-node-hid.d.ts @@ -1,7 +1,7 @@ -import LedgerTransport, { Observer, DescriptorEvent, Subscription } from 'ledgerhq__hw-transport'; -import { HID, Device } from 'node-hid'; +declare module '@ledgerhq/hw-transport-node-hid' { + import LedgerTransport, { Observer, DescriptorEvent, Subscription } from '@ledgerhq/hw-transport'; + import { HID, Device } from 'node-hid'; -declare module 'ledgerhq__hw-transport-node-hid' { export default class TransportNodeHid extends LedgerTransport { /** * @description Creates an instance of TransportNodeHid. diff --git a/common/typescript/ledger/hw-transport-u2f.d.ts b/common/typescript/ledger/hw-transport-u2f.d.ts index 71efe69b..88920b75 100644 --- a/common/typescript/ledger/hw-transport-u2f.d.ts +++ b/common/typescript/ledger/hw-transport-u2f.d.ts @@ -1,12 +1,12 @@ -import LedgerTransport, { - Observer, - DescriptorEvent, - Subscription, - TransportError -} from 'ledgerhq__hw-transport'; -import { isSupported, sign } from 'u2f-api'; +declare module '@ledgerhq/hw-transport-u2f' { + import LedgerTransport, { + Observer, + DescriptorEvent, + Subscription, + TransportError + } from '@ledgerhq/hw-transport'; + import { isSupported, sign } from 'u2f-api'; -declare module 'ledgerhq__hw-transport-u2f' { export default class TransportU2F extends LedgerTransport { public static isSupported: typeof isSupported; diff --git a/common/typescript/ledger/hw-transport.d.ts b/common/typescript/ledger/hw-transport.d.ts index 966186d5..7a1f9a4c 100644 --- a/common/typescript/ledger/hw-transport.d.ts +++ b/common/typescript/ledger/hw-transport.d.ts @@ -1,4 +1,4 @@ -declare module 'ledgerhq__hw-transport' { +declare module '@ledgerhq/hw-transport' { /** * @description all possible status codes. * @see https://github.com/LedgerHQ/blue-app-btc/blob/d8a03d10f77ca5ef8b22a5d062678eef788b824a/include/btchip_apdu_constants.h#L85-L115 diff --git a/yarn.lock b/yarn.lock index 9049f16b..d59d8435 100644 --- a/yarn.lock +++ b/yarn.lock @@ -88,7 +88,7 @@ "@types/cheerio" "*" "@types/react" "*" -"@types/events@^1.2.0": +"@types/events@1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" @@ -110,7 +110,7 @@ dependencies: moment ">=2.14.0" -"@types/node-hid@^0.7.0": +"@types/node-hid@0.7.0": version "0.7.0" resolved "https://registry.yarnpkg.com/@types/node-hid/-/node-hid-0.7.0.tgz#f696f39c528059116236e41df90c8fcba077d711" @@ -11167,7 +11167,7 @@ u2f-api@0.2.7: version "0.2.7" resolved "https://registry.yarnpkg.com/u2f-api/-/u2f-api-0.2.7.tgz#17bf196b242f6bf72353d9858e6a7566cc192720" -u2f-api@^1.0.6: +u2f-api@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/u2f-api/-/u2f-api-1.0.6.tgz#fdde2a0788fcf7d8d273aa8688b217625961f866"