aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/src/index.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-03-09 00:43:16 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-03-09 00:43:16 +0800
commit098dae9a7e57385505f0f272fd76d44f43fa1e34 (patch)
treebcd47532910e5804746ec88c8d9f6b85c157d6e1 /packages/subproviders/src/index.ts
parent5b5037a844f49c17deeaf695fc8ed57832038da6 (diff)
parentaaa7affa46450bb48639e9b90c2a2e8adb28826c (diff)
downloaddexon-sol-tools-098dae9a7e57385505f0f272fd76d44f43fa1e34.tar
dexon-sol-tools-098dae9a7e57385505f0f272fd76d44f43fa1e34.tar.gz
dexon-sol-tools-098dae9a7e57385505f0f272fd76d44f43fa1e34.tar.bz2
dexon-sol-tools-098dae9a7e57385505f0f272fd76d44f43fa1e34.tar.lz
dexon-sol-tools-098dae9a7e57385505f0f272fd76d44f43fa1e34.tar.xz
dexon-sol-tools-098dae9a7e57385505f0f272fd76d44f43fa1e34.tar.zst
dexon-sol-tools-098dae9a7e57385505f0f272fd76d44f43fa1e34.zip
Merge branch 'development' into feature/sra-reporter
* development: (68 commits) Update list of packages and organize them alphabetically Fix prettier issues Add support for going back to previous hashes via the browser back button to wiki Scroll to previous hashed elements when user clicks back button Add back strict null checks to react-shared package and fix issues remove ability to have implicit dependencies and add missing deps update license remove no-implicit-this Add example & screenshot to npmignore Remove `;` to be nice to windows users Use unencoded @ symbol, browser will fix Fix external type links Add comment about commented out CSS exception Update prettier since the previous version had a bug when dealing with css files Fix css files with prettier Added base-contract package to README Prettify test jsons Update yarn.lock Improve README Feedback ...
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;
}