aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/dialogs
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-01-31 03:10:51 +0800
committerFabio Berger <me@fabioberger.com>2018-01-31 03:10:51 +0800
commit5019c5194044f9ab2631090365e09083044a730d (patch)
tree67f56079553df262ad3ab77b573ec1acf3cd6a33 /packages/website/ts/components/dialogs
parentda1071526f1faae9e80b992bcbd3dfd3c9a98e1a (diff)
downloaddexon-sol-tools-5019c5194044f9ab2631090365e09083044a730d.tar.gz
dexon-sol-tools-5019c5194044f9ab2631090365e09083044a730d.tar.zst
dexon-sol-tools-5019c5194044f9ab2631090365e09083044a730d.zip
Default the derivation path to that found in the Ledger subprovider
Diffstat (limited to 'packages/website/ts/components/dialogs')
-rw-r--r--packages/website/ts/components/dialogs/ledger_config_dialog.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/website/ts/components/dialogs/ledger_config_dialog.tsx b/packages/website/ts/components/dialogs/ledger_config_dialog.tsx
index d9b4d1504..5b7e20671 100644
--- a/packages/website/ts/components/dialogs/ledger_config_dialog.tsx
+++ b/packages/website/ts/components/dialogs/ledger_config_dialog.tsx
@@ -45,12 +45,15 @@ interface LedgerConfigDialogState {
export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps, LedgerConfigDialogState> {
constructor(props: LedgerConfigDialogProps) {
super(props);
+ const derivationPathIfExists = props.blockchain.getLedgerDerivationPathIfExists();
this.state = {
connectionErrMsg: '',
stepIndex: LedgerSteps.CONNECT,
userAddresses: [],
addressBalances: [],
- derivationPath: configs.DEFAULT_DERIVATION_PATH,
+ derivationPath: _.isUndefined(derivationPathIfExists)
+ ? configs.DEFAULT_DERIVATION_PATH
+ : derivationPathIfExists,
derivationErrMsg: '',
preferredNetworkId: props.networkId,
};