diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2017-12-20 13:44:08 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-12-20 22:30:25 +0800 |
commit | cb11aec84df346d5180c7d5874859c1c34f0bf1c (patch) | |
tree | b959a65bdcfc3e8b01dca1bc160f93a0df8a4bf9 /packages/website/ts/components/dialogs/send_dialog.tsx | |
parent | 972e1675f6490bc10e8d9fd64cce2f7945cd4840 (diff) | |
download | dexon-0x-contracts-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.gz dexon-0x-contracts-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.zst dexon-0x-contracts-cb11aec84df346d5180c7d5874859c1c34f0bf1c.zip |
Add new underscore-privates rule to @0xproject/tslint-config and fix lint errors
Diffstat (limited to 'packages/website/ts/components/dialogs/send_dialog.tsx')
-rw-r--r-- | packages/website/ts/components/dialogs/send_dialog.tsx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/packages/website/ts/components/dialogs/send_dialog.tsx b/packages/website/ts/components/dialogs/send_dialog.tsx index 0f3516993..9a85ea8b1 100644 --- a/packages/website/ts/components/dialogs/send_dialog.tsx +++ b/packages/website/ts/components/dialogs/send_dialog.tsx @@ -36,14 +36,14 @@ export class SendDialog extends React.Component<SendDialogProps, SendDialogState <FlatButton key="cancelTransfer" label="Cancel" - onTouchTap={this.onCancel.bind(this)} + onTouchTap={this._onCancel.bind(this)} />, <FlatButton key="sendTransfer" - disabled={this.hasErrors()} + disabled={this._hasErrors()} label="Send" primary={true} - onTouchTap={this.onSendClick.bind(this)} + onTouchTap={this._onSendClick.bind(this)} />, ]; return ( @@ -53,17 +53,17 @@ export class SendDialog extends React.Component<SendDialogProps, SendDialogState actions={transferDialogActions} open={this.props.isOpen} > - {this.renderSendDialogBody()} + {this._renderSendDialogBody()} </Dialog> ); } - private renderSendDialogBody() { + private _renderSendDialogBody() { return ( <div className="mx-auto" style={{maxWidth: 300}}> <div style={{height: 80}}> <AddressInput initialAddress={this.state.recipient} - updateAddress={this.onRecipientChange.bind(this)} + updateAddress={this._onRecipientChange.bind(this)} isRequired={true} label={'Recipient address'} hintText={'Address'} @@ -76,27 +76,27 @@ export class SendDialog extends React.Component<SendDialogProps, SendDialogState shouldShowIncompleteErrs={this.state.shouldShowIncompleteErrs} shouldCheckBalance={true} shouldCheckAllowance={false} - onChange={this.onValueChange.bind(this)} + onChange={this._onValueChange.bind(this)} amount={this.state.value} onVisitBalancesPageClick={this.props.onCancelled} /> </div> ); } - private onRecipientChange(recipient?: string) { + private _onRecipientChange(recipient?: string) { this.setState({ shouldShowIncompleteErrs: false, recipient, }); } - private onValueChange(isValid: boolean, amount?: BigNumber) { + private _onValueChange(isValid: boolean, amount?: BigNumber) { this.setState({ isAmountValid: isValid, value: amount, }); } - private onSendClick() { - if (this.hasErrors()) { + private _onSendClick() { + if (this._hasErrors()) { this.setState({ shouldShowIncompleteErrs: true, }); @@ -109,13 +109,13 @@ export class SendDialog extends React.Component<SendDialogProps, SendDialogState this.props.onComplete(this.state.recipient, value); } } - private onCancel() { + private _onCancel() { this.setState({ value: undefined, }); this.props.onCancelled(); } - private hasErrors() { + private _hasErrors() { return _.isUndefined(this.state.recipient) || _.isUndefined(this.state.value) || !this.state.isAmountValid; |