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/generate_order/generate_order_form.tsx | |
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/generate_order/generate_order_form.tsx')
-rw-r--r-- | packages/website/ts/components/generate_order/generate_order_form.tsx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/website/ts/components/generate_order/generate_order_form.tsx b/packages/website/ts/components/generate_order/generate_order_form.tsx index 8afbee977..0f70aa18f 100644 --- a/packages/website/ts/components/generate_order/generate_order_form.tsx +++ b/packages/website/ts/components/generate_order/generate_order_form.tsx @@ -36,9 +36,9 @@ import { errorReporter } from 'ts/utils/error_reporter'; import { utils } from 'ts/utils/utils'; enum SigningState { - UNSIGNED, - SIGNING, - SIGNED, + Unsigned, + Signing, + Signed, } interface GenerateOrderFormProps { @@ -76,7 +76,7 @@ export class GenerateOrderForm extends React.Component<GenerateOrderFormProps, G this.state = { globalErrMsg: '', shouldShowIncompleteErrs: false, - signingState: SigningState.UNSIGNED, + signingState: SigningState.Unsigned, }; } public componentDidMount(): void { @@ -207,7 +207,7 @@ export class GenerateOrderForm extends React.Component<GenerateOrderFormProps, G /> </div> {this.state.globalErrMsg !== '' && ( - <Alert type={AlertTypes.ERROR} message={this.state.globalErrMsg} /> + <Alert type={AlertTypes.Error} message={this.state.globalErrMsg} /> )} </div> </div> @@ -215,7 +215,7 @@ export class GenerateOrderForm extends React.Component<GenerateOrderFormProps, G title="Order JSON" titleStyle={{ fontWeight: 100 }} modal={false} - open={this.state.signingState === SigningState.SIGNED} + open={this.state.signingState === SigningState.Signed} onRequestClose={this._onCloseOrderJSONDialog.bind(this)} > <OrderJSON @@ -247,7 +247,7 @@ export class GenerateOrderForm extends React.Component<GenerateOrderFormProps, G // orderHash will not collide with the previously generated orderHash. this.props.dispatcher.updateOrderSalt(generatePseudoRandomSalt()); this.setState({ - signingState: SigningState.UNSIGNED, + signingState: SigningState.Unsigned, }); } private async _onSignClickedAsync(): Promise<boolean> { @@ -305,13 +305,13 @@ export class GenerateOrderForm extends React.Component<GenerateOrderFormProps, G } private async _signTransactionAsync(): Promise<PortalOrder | undefined> { this.setState({ - signingState: SigningState.SIGNING, + signingState: SigningState.Signing, }); const exchangeAddress = this.props.blockchain.getExchangeContractAddressIfExists(); if (_.isUndefined(exchangeAddress)) { this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true); this.setState({ - signingState: SigningState.UNSIGNED, + signingState: SigningState.Unsigned, }); return undefined; } @@ -371,7 +371,7 @@ export class GenerateOrderForm extends React.Component<GenerateOrderFormProps, G } } this.setState({ - signingState: globalErrMsg === '' ? SigningState.SIGNED : SigningState.UNSIGNED, + signingState: globalErrMsg === '' ? SigningState.Signed : SigningState.Unsigned, globalErrMsg, }); return order; |