diff options
author | Fabio Berger <me@fabioberger.com> | 2018-01-31 03:10:51 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-01-31 03:10:51 +0800 |
commit | 5019c5194044f9ab2631090365e09083044a730d (patch) | |
tree | 67f56079553df262ad3ab77b573ec1acf3cd6a33 /packages/website | |
parent | da1071526f1faae9e80b992bcbd3dfd3c9a98e1a (diff) | |
download | dexon-sol-tools-5019c5194044f9ab2631090365e09083044a730d.tar dexon-sol-tools-5019c5194044f9ab2631090365e09083044a730d.tar.gz dexon-sol-tools-5019c5194044f9ab2631090365e09083044a730d.tar.bz2 dexon-sol-tools-5019c5194044f9ab2631090365e09083044a730d.tar.lz dexon-sol-tools-5019c5194044f9ab2631090365e09083044a730d.tar.xz 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')
-rw-r--r-- | packages/website/ts/components/dialogs/ledger_config_dialog.tsx | 5 |
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, }; |