aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/src/index.ts
diff options
context:
space:
mode:
authorJacob Evans <dekz@dekz.net>2018-03-08 08:11:16 +0800
committerGitHub <noreply@github.com>2018-03-08 08:11:16 +0800
commit883feabb8b0f9470ae2bd1713b929c220fdfae95 (patch)
tree5ee3bc56810852a0ce00bd49465f05d3c3268587 /packages/subproviders/src/index.ts
parent5fb79e3253b825853e607c05f9782b3d54c0d176 (diff)
parentc3eaa694dd81dd9f36a965c52b9bf5104a7a8fa7 (diff)
downloaddexon-sol-tools-883feabb8b0f9470ae2bd1713b929c220fdfae95.tar
dexon-sol-tools-883feabb8b0f9470ae2bd1713b929c220fdfae95.tar.gz
dexon-sol-tools-883feabb8b0f9470ae2bd1713b929c220fdfae95.tar.bz2
dexon-sol-tools-883feabb8b0f9470ae2bd1713b929c220fdfae95.tar.lz
dexon-sol-tools-883feabb8b0f9470ae2bd1713b929c220fdfae95.tar.xz
dexon-sol-tools-883feabb8b0f9470ae2bd1713b929c220fdfae95.tar.zst
dexon-sol-tools-883feabb8b0f9470ae2bd1713b929c220fdfae95.zip
Merge pull request #437 from 0xProject/feature/subproviders/update-ledgerco
Update ledgerco packages
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;
}