aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2018-04-11 13:12:02 +0800
committerJacob Evans <jacob@dekz.net>2018-04-11 13:12:02 +0800
commitf44ef7ce59cd5c811a92662d3fb095f21d80f665 (patch)
treec55df9d4c6cb145692c07de25717ce5870445d15
parentb08c616713e153ca767d2f01976da5f1ef903251 (diff)
downloaddexon-0x-contracts-f44ef7ce59cd5c811a92662d3fb095f21d80f665.tar
dexon-0x-contracts-f44ef7ce59cd5c811a92662d3fb095f21d80f665.tar.gz
dexon-0x-contracts-f44ef7ce59cd5c811a92662d3fb095f21d80f665.tar.bz2
dexon-0x-contracts-f44ef7ce59cd5c811a92662d3fb095f21d80f665.tar.lz
dexon-0x-contracts-f44ef7ce59cd5c811a92662d3fb095f21d80f665.tar.xz
dexon-0x-contracts-f44ef7ce59cd5c811a92662d3fb095f21d80f665.tar.zst
dexon-0x-contracts-f44ef7ce59cd5c811a92662d3fb095f21d80f665.zip
Update website to support latest ledger
-rw-r--r--packages/subproviders/package-lock.json25
-rw-r--r--packages/subproviders/src/index.ts1
-rw-r--r--packages/subproviders/src/types.ts6
-rw-r--r--packages/website/ts/blockchain.ts9
-rw-r--r--packages/website/ts/components/dialogs/ledger_config_dialog.tsx1
5 files changed, 26 insertions, 16 deletions
diff --git a/packages/subproviders/package-lock.json b/packages/subproviders/package-lock.json
new file mode 100644
index 000000000..61675f9ea
--- /dev/null
+++ b/packages/subproviders/package-lock.json
@@ -0,0 +1,25 @@
+{
+ "name": "@0xproject/subproviders",
+ "version": "0.8.4",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "@types/bip39": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/@types/bip39/-/bip39-2.4.0.tgz",
+ "integrity": "sha512-qxJBGh55SPbSGv+91D6H3WOR8vKdA/p8Oc58oK/DTbORgjO6Ebuo8MRzdy2OWi+dw/lxtX4VWJkkCUTSQvhAnw==",
+ "dev": true,
+ "requires": {
+ "@types/node": "9.6.2"
+ },
+ "dependencies": {
+ "@types/node": {
+ "version": "9.6.2",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.2.tgz",
+ "integrity": "sha512-UWkRY9X7RQHp5OhhRIIka58/gVVycL1zHZu0OTsT5LI86ABaMOSbUjAl+b0FeDhQcxclrkyft3kW5QWdMRs8wQ==",
+ "dev": true
+ }
+ }
+ }
+ }
+}
diff --git a/packages/subproviders/src/index.ts b/packages/subproviders/src/index.ts
index 01aec956a..dc45ea9f1 100644
--- a/packages/subproviders/src/index.ts
+++ b/packages/subproviders/src/index.ts
@@ -18,7 +18,6 @@ export {
Callback,
ErrorCallback,
NextCallback,
- LedgerWalletSubprovider,
LedgerCommunicationClient,
NonceSubproviderErrors,
LedgerSubproviderConfigs,
diff --git a/packages/subproviders/src/types.ts b/packages/subproviders/src/types.ts
index c76be1bf8..121992278 100644
--- a/packages/subproviders/src/types.ts
+++ b/packages/subproviders/src/types.ts
@@ -69,12 +69,6 @@ export interface LedgerGetAddressResult {
chainCode: string;
}
-export interface LedgerWalletSubprovider {
- getPath: () => string;
- setPath: (path: string) => void;
- setPathIndex: (pathIndex: number) => void;
-}
-
export interface PartialTxParams {
nonce: string;
gasPrice?: string;
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
index fd34ab82d..bb1f47dd0 100644
--- a/packages/website/ts/blockchain.ts
+++ b/packages/website/ts/blockchain.ts
@@ -20,7 +20,6 @@ import {
InjectedWeb3Subprovider,
ledgerEthereumBrowserClientFactoryAsync,
LedgerSubprovider,
- LedgerWalletSubprovider,
RedundantRPCSubprovider,
} from '@0xproject/subproviders';
import { Provider } from '@0xproject/types';
@@ -76,7 +75,7 @@ export class Blockchain {
private _userAddressIfExists: string;
private _cachedProvider: Provider;
private _cachedProviderNetworkId: number;
- private _ledgerSubprovider: LedgerWalletSubprovider;
+ private _ledgerSubprovider: LedgerSubprovider;
private _defaultGasPrice: BigNumber;
private static _getNameGivenProvider(provider: Provider): string {
const providerType = utils.getProviderType(provider);
@@ -168,12 +167,6 @@ export class Blockchain {
}
this._ledgerSubprovider.setPath(path);
}
- public updateLedgerDerivationIndex(pathIndex: number) {
- if (_.isUndefined(this._ledgerSubprovider)) {
- return; // noop
- }
- this._ledgerSubprovider.setPathIndex(pathIndex);
- }
public async updateProviderToLedgerAsync(networkId: number) {
utils.assert(!_.isUndefined(this._zeroEx), 'ZeroEx must be instantiated.');
diff --git a/packages/website/ts/components/dialogs/ledger_config_dialog.tsx b/packages/website/ts/components/dialogs/ledger_config_dialog.tsx
index d7190c0bb..a72d33183 100644
--- a/packages/website/ts/components/dialogs/ledger_config_dialog.tsx
+++ b/packages/website/ts/components/dialogs/ledger_config_dialog.tsx
@@ -199,7 +199,6 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps,
}
private _onAddressSelected(selectedRowIndexes: number[]) {
const selectedRowIndex = selectedRowIndexes[0];
- this.props.blockchain.updateLedgerDerivationIndex(selectedRowIndex);
const selectedAddress = this.state.userAddresses[selectedRowIndex];
const selectAddressBalance = this.state.addressBalances[selectedRowIndex];
this.props.dispatcher.updateUserAddress(selectedAddress);