aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/src/index.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-08 23:40:46 +0800
committerFabio Berger <me@fabioberger.com>2018-03-08 23:40:46 +0800
commit98e8105ec5a629ce67f34216df72e11422649c4e (patch)
treea30bc127779789aae5eff5457366264d09a9e31b /packages/subproviders/src/index.ts
parent4a94a2b4e81d8b5d773ebeaa671b78ac4bf9a408 (diff)
parent03902b0b26fe443705dde20c42e78e1cb4bd3c4b (diff)
downloaddexon-sol-tools-98e8105ec5a629ce67f34216df72e11422649c4e.tar
dexon-sol-tools-98e8105ec5a629ce67f34216df72e11422649c4e.tar.gz
dexon-sol-tools-98e8105ec5a629ce67f34216df72e11422649c4e.tar.bz2
dexon-sol-tools-98e8105ec5a629ce67f34216df72e11422649c4e.tar.lz
dexon-sol-tools-98e8105ec5a629ce67f34216df72e11422649c4e.tar.xz
dexon-sol-tools-98e8105ec5a629ce67f34216df72e11422649c4e.tar.zst
dexon-sol-tools-98e8105ec5a629ce67f34216df72e11422649c4e.zip
Merge branch 'development' into extractDocs
* development: Added base-contract package to README Update yarn.lock Improve README Feedback README on derivation path Use our dev seed derivation path. README Add ledger-node package as optional dependency Force shouldGetChainCode to true in types Nuke tests for now Remove old ledger Update ledgerco packages Remove only Fix a typo Add PR name Improve an error message when an inorrect number of constructor params is passed
Diffstat (limited to 'packages/subproviders/src/index.ts')
-rw-r--r--packages/subproviders/src/index.ts21
1 files changed, 4 insertions, 17 deletions
diff --git a/packages/subproviders/src/index.ts b/packages/subproviders/src/index.ts
index 4da405ec0..e22b6f5f3 100644
--- a/packages/subproviders/src/index.ts
+++ b/packages/subproviders/src/index.ts
@@ -1,8 +1,5 @@
-import {
- comm_node as LedgerNodeCommunication,
- comm_u2f as LedgerBrowserCommunication,
- eth as LedgerEthereumClientFn,
-} from 'ledgerco';
+import Eth from '@ledgerhq/hw-app-eth';
+import TransportU2F from '@ledgerhq/hw-transport-u2f';
import { LedgerEthereumClient } from './types';
@@ -19,17 +16,7 @@ export { ECSignature, LedgerWalletSubprovider, LedgerCommunicationClient, NonceS
* @return LedgerEthereumClient A browser client
*/
export async function ledgerEthereumBrowserClientFactoryAsync(): Promise<LedgerEthereumClient> {
- const ledgerConnection = await LedgerBrowserCommunication.create_async();
- const ledgerEthClient = new LedgerEthereumClientFn(ledgerConnection);
- return ledgerEthClient;
-}
-
-/**
- * A factory for creating a LedgerEthereumClient usable in a Node.js context.
- * @return LedgerEthereumClient A Node.js client
- */
-export async function ledgerEthereumNodeJsClientFactoryAsync(): Promise<LedgerEthereumClient> {
- const ledgerConnection = await LedgerNodeCommunication.create_async();
- const ledgerEthClient = new LedgerEthereumClientFn(ledgerConnection);
+ const ledgerConnection = await TransportU2F.create();
+ const ledgerEthClient = new Eth(ledgerConnection);
return ledgerEthClient;
}