diff options
author | Xianny <8582774+xianny@users.noreply.github.com> | 2019-01-12 02:04:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-12 02:04:30 +0800 |
commit | 943c378309a84ed142852c6584b53958df7817c8 (patch) | |
tree | 43536b7812b11f3a83db4208bfa5640643cfd6e8 /packages/website/ts/components/dialogs | |
parent | cf3787edbb9e8acf7160ab93b903b54c63bdffda (diff) | |
download | dexon-sol-tools-943c378309a84ed142852c6584b53958df7817c8.tar dexon-sol-tools-943c378309a84ed142852c6584b53958df7817c8.tar.gz dexon-sol-tools-943c378309a84ed142852c6584b53958df7817c8.tar.bz2 dexon-sol-tools-943c378309a84ed142852c6584b53958df7817c8.tar.lz dexon-sol-tools-943c378309a84ed142852c6584b53958df7817c8.tar.xz dexon-sol-tools-943c378309a84ed142852c6584b53958df7817c8.tar.zst dexon-sol-tools-943c378309a84ed142852c6584b53958df7817c8.zip |
Implement tslint enum-naming to enforce PascalCase on enum members (#1474)
Diffstat (limited to 'packages/website/ts/components/dialogs')
-rw-r--r-- | packages/website/ts/components/dialogs/ledger_config_dialog.tsx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/packages/website/ts/components/dialogs/ledger_config_dialog.tsx b/packages/website/ts/components/dialogs/ledger_config_dialog.tsx index e15a2dd94..527353aa0 100644 --- a/packages/website/ts/components/dialogs/ledger_config_dialog.tsx +++ b/packages/website/ts/components/dialogs/ledger_config_dialog.tsx @@ -20,8 +20,8 @@ import { utils } from 'ts/utils/utils'; const VALID_ETHEREUM_DERIVATION_PATH_PREFIX = `44'/60'`; enum LedgerSteps { - CONNECT, - SELECT_ADDRESS, + Connect, + SelectAddress, } interface LedgerConfigDialogProps { @@ -52,7 +52,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps, const derivationPathIfExists = props.blockchain.getLedgerDerivationPathIfExists(); this.state = { connectionErrMsg: '', - stepIndex: LedgerSteps.CONNECT, + stepIndex: LedgerSteps.Connect, userAddresses: [], addressBalances: [], derivationPath: _.isUndefined(derivationPathIfExists) @@ -67,7 +67,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps, <FlatButton key="ledgerConnectCancel" label="Cancel" onClick={this._onClose.bind(this)} />, ]; const dialogTitle = - this.state.stepIndex === LedgerSteps.CONNECT ? 'Connect to your Ledger' : 'Select desired address'; + this.state.stepIndex === LedgerSteps.Connect ? 'Connect to your Ledger' : 'Select desired address'; return ( <Dialog title={dialogTitle} @@ -79,8 +79,8 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps, bodyStyle={{ paddingBottom: 0 }} > <div style={{ color: colors.grey700, paddingTop: 1 }}> - {this.state.stepIndex === LedgerSteps.CONNECT && this._renderConnectStep()} - {this.state.stepIndex === LedgerSteps.SELECT_ADDRESS && this._renderSelectAddressStep()} + {this.state.stepIndex === LedgerSteps.Connect && this._renderConnectStep()} + {this.state.stepIndex === LedgerSteps.SelectAddress && this._renderSelectAddressStep()} </div> </Dialog> ); @@ -195,7 +195,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps, private _onClose(): void { this.setState({ connectionErrMsg: '', - stepIndex: LedgerSteps.CONNECT, + stepIndex: LedgerSteps.Connect, }); const isOpen = false; this.props.toggleDialogFn(isOpen); @@ -210,7 +210,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps, this.props.blockchain.fetchTokenInformationAsync(); this.props.dispatcher.updateUserWeiBalance(selectAddressBalance); this.setState({ - stepIndex: LedgerSteps.CONNECT, + stepIndex: LedgerSteps.Connect, }); const isOpen = false; this.props.toggleDialogFn(isOpen); @@ -284,7 +284,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps, const didSucceed = await this._fetchAddressesAndBalancesAsync(); if (didSucceed) { this.setState({ - stepIndex: LedgerSteps.SELECT_ADDRESS, + stepIndex: LedgerSteps.SelectAddress, connectionErrMsg: '', }); } |