From 0941e0a929f2fe3ef6d0cf1de5a1274f5f45f031 Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 11 Jul 2018 16:50:00 -0700 Subject: Add no-floating-promises ignore comments --- packages/website/ts/components/fill_order.tsx | 1 + packages/website/ts/components/forms/subscribe_form.tsx | 1 + .../website/ts/components/generate_order/generate_order_form.tsx | 2 ++ packages/website/ts/components/inputs/allowance_toggle.tsx | 2 ++ .../website/ts/components/onboarding/portal_onboarding_flow.tsx | 2 ++ packages/website/ts/components/portal/portal.tsx | 1 + packages/website/ts/components/relayer_index/relayer_grid_tile.tsx | 1 + .../website/ts/components/relayer_index/relayer_top_tokens.tsx | 7 ++----- packages/website/ts/components/wallet/wallet.tsx | 2 ++ packages/website/ts/components/wallet/wrap_ether_item.tsx | 4 ++++ packages/website/ts/redux/analyticsMiddleware.ts | 5 +++++ packages/website/ts/utils/analytics.ts | 1 + 12 files changed, 24 insertions(+), 5 deletions(-) diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx index 25d21c3dd..e4838bc0f 100644 --- a/packages/website/ts/components/fill_order.tsx +++ b/packages/website/ts/components/fill_order.tsx @@ -508,6 +508,7 @@ export class FillOrder extends React.Component { } private _trackOrderEvent(eventName: string): void { const parsedOrder = this.state.parsedOrder; + // tslint:disable-next-line:no-floating-promises analytics.trackOrderEventAsync(eventName, parsedOrder); } private async _onFillOrderClickFireAndForgetAsync(): Promise { diff --git a/packages/website/ts/components/forms/subscribe_form.tsx b/packages/website/ts/components/forms/subscribe_form.tsx index 19abbdf5f..be0468b6f 100644 --- a/packages/website/ts/components/forms/subscribe_form.tsx +++ b/packages/website/ts/components/forms/subscribe_form.tsx @@ -114,6 +114,7 @@ export class SubscribeForm extends React.Component { ); } private _startOnboarding(): void { + // tslint:disable-next-line:no-floating-promises analytics.trackAsync('Onboarding Started', { reason: 'manual', stepIndex: this.props.portalOnboardingStep, diff --git a/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx b/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx index 937f0b79d..475b79f8f 100644 --- a/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx +++ b/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx @@ -65,6 +65,7 @@ export const RelayerGridTile: React.StatelessComponent = ( const topTokens = props.relayerInfo.topTokens; const weeklyTxnVolume = props.relayerInfo.weeklyTxnVolume; const onClick = () => { + // tslint:disable-next-line:no-floating-promises analytics.trackAsync('Relayer Click', { name: props.relayerInfo.name, }); diff --git a/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx b/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx index e6e0095c2..33783b406 100644 --- a/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx +++ b/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx @@ -1,8 +1,4 @@ -import { - colors, - EtherscanLinkSuffixes, - utils as sharedUtils, -} from '@0xproject/react-shared'; +import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; @@ -47,6 +43,7 @@ class TokenLink extends React.Component { public render(): React.ReactNode { const onClick = (event: React.MouseEvent) => { event.stopPropagation(); + // tslint:disable-next-line:no-floating-promises analytics.trackAsync('Token Click', { tokenSymbol: this.props.tokenInfo.symbol, }); diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx index 2fdcded38..8523b819a 100644 --- a/packages/website/ts/components/wallet/wallet.tsx +++ b/packages/website/ts/components/wallet/wallet.tsx @@ -490,6 +490,7 @@ export class Wallet extends React.Component { private _openWrappedEtherActionRow(wrappedEtherDirection: Side): void { const action = wrappedEtherDirection === Side.Deposit ? 'Wallet - Wrap ETH Opened' : 'Wallet - Unwrap WETH Opened'; + // tslint:disable-next-line:no-floating-promises analytics.trackAsync(action); this.setState({ wrappedEtherDirection, @@ -498,6 +499,7 @@ export class Wallet extends React.Component { private _closeWrappedEtherActionRow(wrappedEtherDirection: Side): void { const action = wrappedEtherDirection === Side.Deposit ? 'Wallet - Wrap ETH Closed' : 'Wallet - Unwrap WETH Closed'; + // tslint:disable-next-line:no-floating-promises analytics.trackAsync(action); this.setState({ wrappedEtherDirection: undefined, diff --git a/packages/website/ts/components/wallet/wrap_ether_item.tsx b/packages/website/ts/components/wallet/wrap_ether_item.tsx index 9fec8afa1..9e3d06817 100644 --- a/packages/website/ts/components/wallet/wrap_ether_item.tsx +++ b/packages/website/ts/components/wallet/wrap_ether_item.tsx @@ -196,12 +196,14 @@ export class WrapEtherItem extends React.Component next => action => { const nextState = (store.getState() as any) as State; switch (action.type) { case ActionTypes.UpdateInjectedProviderName: + // tslint:disable-next-line:no-floating-promises analytics.addEventPropertiesAsync({ injectedProviderName: nextState.injectedProviderName, }); break; case ActionTypes.UpdateNetworkId: + // tslint:disable-next-line:no-floating-promises analytics.addEventPropertiesAsync({ networkId: nextState.networkId, }); break; case ActionTypes.UpdateUserAddress: + // tslint:disable-next-line:no-floating-promises analytics.addUserPropertiesAsync({ ethAddress: nextState.userAddress, }); break; case ActionTypes.UpdateUserEtherBalance: if (nextState.userEtherBalanceInWei) { + // tslint:disable-next-line:no-floating-promises analytics.addUserPropertiesAsync({ ethBalance: nextState.userEtherBalanceInWei.toString(), }); } break; case ActionTypes.UpdatePortalOnboardingStep: + // tslint:disable-next-line:no-floating-promises analytics.trackAsync('Update Onboarding Step', { stepIndex: nextState.portalOnboardingStep, }); diff --git a/packages/website/ts/utils/analytics.ts b/packages/website/ts/utils/analytics.ts index 961f9af5a..2ff9f8918 100644 --- a/packages/website/ts/utils/analytics.ts +++ b/packages/website/ts/utils/analytics.ts @@ -66,6 +66,7 @@ export class Analytics { takerToken: order.metadata.takerToken.symbol, makerToken: order.metadata.makerToken.symbol, }; + // tslint:disable-next-line:no-floating-promises this.trackAsync(eventName, orderLoggingData); } /** -- cgit v1.2.3