aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/dialogs/send_dialog.tsx
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2017-12-20 13:44:08 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-12-20 22:30:25 +0800
commitcb11aec84df346d5180c7d5874859c1c34f0bf1c (patch)
treeb959a65bdcfc3e8b01dca1bc160f93a0df8a4bf9 /packages/website/ts/components/dialogs/send_dialog.tsx
parent972e1675f6490bc10e8d9fd64cce2f7945cd4840 (diff)
downloaddexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.gz
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.bz2
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.lz
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.xz
dexon-sol-tools-cb11aec84df346d5180c7d5874859c1c34f0bf1c.tar.zst
dexon-sol-tools-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.tsx26
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;