aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/inputs/allowance_toggle.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/components/inputs/allowance_toggle.tsx')
-rw-r--r--packages/website/ts/components/inputs/allowance_toggle.tsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/website/ts/components/inputs/allowance_toggle.tsx b/packages/website/ts/components/inputs/allowance_toggle.tsx
index b29511390..1be441e17 100644
--- a/packages/website/ts/components/inputs/allowance_toggle.tsx
+++ b/packages/website/ts/components/inputs/allowance_toggle.tsx
@@ -47,7 +47,7 @@ export class AllowanceToggle extends React.Component<AllowanceToggleProps, Allow
<Toggle
disabled={this.state.isSpinnerVisible}
toggled={this._isAllowanceSet()}
- onToggle={this._onToggleAllowanceAsync.bind(this, this.props.token)}
+ onToggle={this._onToggleAllowanceAsync.bind(this)}
/>
</div>
{this.state.isSpinnerVisible && (
@@ -58,10 +58,9 @@ export class AllowanceToggle extends React.Component<AllowanceToggleProps, Allow
</div>
);
}
- private async _onToggleAllowanceAsync() {
+ private async _onToggleAllowanceAsync(): Promise<void> {
if (this.props.userAddress === '') {
this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- return false;
}
this.setState({
@@ -80,7 +79,7 @@ export class AllowanceToggle extends React.Component<AllowanceToggleProps, Allow
});
const errMsg = '' + err;
if (_.includes(errMsg, 'User denied transaction')) {
- return false;
+ return;
}
utils.consoleLog(`Unexpected error encountered: ${err}`);
utils.consoleLog(err.stack);