diff options
author | Thomas Schmidt <tomhschmidt@thomass-mbp-2.lan> | 2018-02-07 03:47:24 +0800 |
---|---|---|
committer | Thomas Schmidt <tomhschmidt@thomass-mbp-2.lan> | 2018-02-07 03:47:24 +0800 |
commit | 00bfc7f889fcf1527c77c7f88816f463843c4282 (patch) | |
tree | 8c292231cca0c168b4a662c29540df7411676703 | |
parent | 9d80a62bb18296c34824048b8ea2be5ad9b3515d (diff) | |
download | dexon-sol-tools-00bfc7f889fcf1527c77c7f88816f463843c4282.tar dexon-sol-tools-00bfc7f889fcf1527c77c7f88816f463843c4282.tar.gz dexon-sol-tools-00bfc7f889fcf1527c77c7f88816f463843c4282.tar.bz2 dexon-sol-tools-00bfc7f889fcf1527c77c7f88816f463843c4282.tar.lz dexon-sol-tools-00bfc7f889fcf1527c77c7f88816f463843c4282.tar.xz dexon-sol-tools-00bfc7f889fcf1527c77c7f88816f463843c4282.tar.zst dexon-sol-tools-00bfc7f889fcf1527c77c7f88816f463843c4282.zip |
Added logging for order filling and order cancelling
-rw-r--r-- | packages/website/ts/components/fill_order.tsx | 25 | ||||
-rw-r--r-- | packages/website/ts/components/inputs/allowance_toggle.tsx | 2 |
2 files changed, 26 insertions, 1 deletions
diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx index d0cfd2cf5..9da3006a0 100644 --- a/packages/website/ts/components/fill_order.tsx +++ b/packages/website/ts/components/fill_order.tsx @@ -6,6 +6,7 @@ import { Card, CardHeader, CardText } from 'material-ui/Card'; import Divider from 'material-ui/Divider'; import RaisedButton from 'material-ui/RaisedButton'; import * as React from 'react'; +import * as ReactGA from 'react-ga'; import { Link } from 'react-router-dom'; import { Blockchain } from 'ts/blockchain'; import { TrackTokenConfirmationDialog } from 'ts/components/dialogs/track_token_confirmation_dialog'; @@ -565,6 +566,12 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> { signedOrder, this.props.orderFillAmount, ); + ReactGA.event({ + category: 'Portal', + action: 'Fill Order Success', + label: parsedOrder.taker.token.symbol, + value: parsedOrder.taker.amount, + }); // After fill completes, let's force fetch the token balances this.props.dispatcher.forceTokenStateRefetch(); this.setState({ @@ -578,6 +585,12 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> { this.setState({ isFilling: false, }); + ReactGA.event({ + category: 'Portal', + action: 'Fill Order Failure', + label: parsedOrder.taker.token.symbol, + value: parsedOrder.taker.amount, + }); const errMsg = `${err}`; if (utils.didUserDenyWeb3Request(errMsg)) { return; @@ -653,6 +666,12 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> { globalErrMsg: '', unavailableTakerAmount: takerTokenAmount, }); + ReactGA.event({ + category: 'Portal', + action: 'Cancel Order Success', + label: parsedOrder.maker.token.symbol, + value: parsedOrder.maker.amount, + }); return; } catch (err) { this.setState({ @@ -662,6 +681,12 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> { if (utils.didUserDenyWeb3Request(errMsg)) { return; } + ReactGA.event({ + category: 'Portal', + action: 'Cancel Order Failure', + label: parsedOrder.maker.token.symbol, + value: parsedOrder.maker.amount, + }); globalErrMsg = 'Failed to cancel order, please refresh and try again'; utils.consoleLog(`${err}`); this.setState({ diff --git a/packages/website/ts/components/inputs/allowance_toggle.tsx b/packages/website/ts/components/inputs/allowance_toggle.tsx index 0a42df71b..a737222ca 100644 --- a/packages/website/ts/components/inputs/allowance_toggle.tsx +++ b/packages/website/ts/components/inputs/allowance_toggle.tsx @@ -75,7 +75,7 @@ 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) + await this.props.blockchain.setProxyAllowanceAsync(this.props.token, newAllowanceAmountInBaseUnits); ReactGA.event({ category: 'Portal', action: 'Set Allowance Success', |