aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/inputs
diff options
context:
space:
mode:
authorThomas Schmidt <tomhschmidt@thomass-mbp-2.lan>2018-02-06 08:56:53 +0800
committerThomas Schmidt <tomhschmidt@thomass-mbp-2.lan>2018-02-06 08:56:53 +0800
commit83c7c8110d16eec7cd0e2267ee6755ece2ed7be4 (patch)
treeb00a8748a88f72ad8426abf2cbfe01468e0afb56 /packages/website/ts/components/inputs
parent91a5bcf380e050605b9f7d32ea42b105b0677f20 (diff)
downloaddexon-sol-tools-83c7c8110d16eec7cd0e2267ee6755ece2ed7be4.tar.gz
dexon-sol-tools-83c7c8110d16eec7cd0e2267ee6755ece2ed7be4.tar.zst
dexon-sol-tools-83c7c8110d16eec7cd0e2267ee6755ece2ed7be4.zip
Formatting and removed old GA code
Diffstat (limited to 'packages/website/ts/components/inputs')
-rw-r--r--packages/website/ts/components/inputs/allowance_toggle.tsx34
1 files changed, 18 insertions, 16 deletions
diff --git a/packages/website/ts/components/inputs/allowance_toggle.tsx b/packages/website/ts/components/inputs/allowance_toggle.tsx
index 1f8c5fcd6..7d41d9633 100644
--- a/packages/website/ts/components/inputs/allowance_toggle.tsx
+++ b/packages/website/ts/components/inputs/allowance_toggle.tsx
@@ -75,22 +75,24 @@ export class AllowanceToggle extends React.Component<AllowanceToggleProps, Allow
newAllowanceAmountInBaseUnits = DEFAULT_ALLOWANCE_AMOUNT_IN_BASE_UNITS;
}
try {
- await this.props.blockchain.setProxyAllowanceAsync(this.props.token, newAllowanceAmountInBaseUnits)
- .then(() => {
- ReactGA.event({
- category: 'Portal',
- action: 'Set Allowance Success',
- label: this.props.token.symbol,
- value: newAllowanceAmountInBaseUnits.toNumber(),
- });
- }, () => {
- ReactGA.event({
- category: 'Portal',
- action: 'Set Allowance Failure',
- label: this.props.token.symbol,
- value: newAllowanceAmountInBaseUnits.toNumber(),
- });
- });
+ await this.props.blockchain.setProxyAllowanceAsync(this.props.token, newAllowanceAmountInBaseUnits).then(
+ () => {
+ ReactGA.event({
+ category: 'Portal',
+ action: 'Set Allowance Success',
+ label: this.props.token.symbol,
+ value: newAllowanceAmountInBaseUnits.toNumber(),
+ });
+ },
+ () => {
+ ReactGA.event({
+ category: 'Portal',
+ action: 'Set Allowance Failure',
+ label: this.props.token.symbol,
+ value: newAllowanceAmountInBaseUnits.toNumber(),
+ });
+ },
+ );
await this.props.refetchTokenStateAsync();
} catch (err) {
this.setState({