aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/subproviders/CHANGELOG.md4
-rw-r--r--packages/subproviders/README.md4
-rw-r--r--packages/subproviders/src/globals.d.ts4
-rw-r--r--packages/subproviders/test/integration/ledger_subprovider_test.ts7
4 files changed, 10 insertions, 9 deletions
diff --git a/packages/subproviders/CHANGELOG.md b/packages/subproviders/CHANGELOG.md
index b7247748e..8e7321d4a 100644
--- a/packages/subproviders/CHANGELOG.md
+++ b/packages/subproviders/CHANGELOG.md
@@ -1,8 +1,8 @@
# CHANGELOG
-## v0.7.0 - _March 6, 2018_
+## v0.7.0 - _TBD_
- * Updated legerco packages. Removed node-hid packages as a dependency. (#437)
+ * Updated legerco packages. Removed node-hid package as a dependency and make it an optional dependency. It is still used in integration tests but is causing problems for users on Linux distros. (#437)
## v0.6.0 - _March 4, 2018_
diff --git a/packages/subproviders/README.md b/packages/subproviders/README.md
index f3e3bd0ae..53fbb2348 100644
--- a/packages/subproviders/README.md
+++ b/packages/subproviders/README.md
@@ -67,8 +67,8 @@ ledgerSubprovider = new LedgerSubprovider({
##### Testing Subprovider + Ledger integration
To run our integration tests you need a ledger configured with our development mnemonic seed.
-This is available in the top level package.json under `mnemonic`.
-Configure your ledger and run the integration tests. We assume a derivation path of `m/44'/60'/0'/0` and this is configured in the tests. To this setup and derivation path, your first account should be `0x5409ed021d9299bf6814279a6a1411a7e866a631`, exactly like TestRPC.
+Our development mnemonic is `concert load couple harbor equip island argue ramp clarify fence smart topic`.
+Configure your ledger and run the integration tests. We assume a derivation path of `m/44'/60'/0'/0` and this is configured in the tests. With this setup and derivation path, your first account should be `0x5409ed021d9299bf6814279a6a1411a7e866a631`, exactly like TestRPC.
#### Redundant RPC subprovider
diff --git a/packages/subproviders/src/globals.d.ts b/packages/subproviders/src/globals.d.ts
index e258ef947..d59ee9e67 100644
--- a/packages/subproviders/src/globals.d.ts
+++ b/packages/subproviders/src/globals.d.ts
@@ -54,14 +54,14 @@ declare module '@ledgerhq/hw-app-eth' {
}
declare module '@ledgerhq/hw-transport-u2f' {
- export default class TransportU2F {
+ export default class TransportU2F implements LedgerTransport {
public static create(): Promise<LedgerTransport>;
public close(): Promise<void>;
}
}
declare module '@ledgerhq/hw-transport-node-hid' {
- export default class TransportNodeHid {
+ export default class TransportNodeHid implements LedgerTransport {
public static create(): Promise<LedgerTransport>;
public close(): Promise<void>;
}
diff --git a/packages/subproviders/test/integration/ledger_subprovider_test.ts b/packages/subproviders/test/integration/ledger_subprovider_test.ts
index 8ed69edaf..a94cfbe3a 100644
--- a/packages/subproviders/test/integration/ledger_subprovider_test.ts
+++ b/packages/subproviders/test/integration/ledger_subprovider_test.ts
@@ -1,4 +1,5 @@
import Eth from '@ledgerhq/hw-app-eth';
+// HACK: This depdency is optional and tslint skips optional depdencies
// tslint:disable-next-line:no-implicit-dependencies
import TransportNodeHid from '@ledgerhq/hw-transport-node-hid';
import * as chai from 'chai';
@@ -23,7 +24,7 @@ async function ledgerEthereumNodeJsClientFactoryAsync(): Promise<LedgerEthereumC
return ledgerEthClient;
}
-const DEFAULT_DERIVATION_PATH = `m/44'/60'/0'/0`;
+const TESTRPC_DERIVATION_PATH = `m/44'/60'/0'/0`;
const TEST_RPC_ACCOUNT_0 = '0x5409ed021d9299bf6814279a6a1411a7e866a631';
describe('LedgerSubprovider', () => {
@@ -33,7 +34,7 @@ describe('LedgerSubprovider', () => {
ledgerSubprovider = new LedgerSubprovider({
networkId,
ledgerEthereumClientFactoryAsync: ledgerEthereumNodeJsClientFactoryAsync,
- derivationPath: DEFAULT_DERIVATION_PATH,
+ derivationPath: TESTRPC_DERIVATION_PATH,
});
});
describe('direct method calls', () => {
@@ -42,7 +43,7 @@ describe('LedgerSubprovider', () => {
expect(accounts[0]).to.not.be.an('undefined');
expect(accounts.length).to.be.equal(10);
});
- it('returns the expected account', async () => {
+ it('returns the expected first account from a ledger set up with the test mnemonic', async () => {
const accounts = await ledgerSubprovider.getAccountsAsync();
expect(accounts[0]).to.be.equal(TEST_RPC_ACCOUNT_0);
});