aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/inputs
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-07-14 02:15:50 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-07-14 02:15:50 +0800
commitb70f5d1a1efcb3b07673aa3b4bc7bc2318f55462 (patch)
treed011565b1c95d4682381f8f573afadf98911e396 /packages/website/ts/components/inputs
parentc5fcdd06579b67b5b129749474acd9a4d1d4db65 (diff)
parent26363931ed8ba35a55073d00c4fe128c7e616acc (diff)
downloaddexon-0x-contracts-b70f5d1a1efcb3b07673aa3b4bc7bc2318f55462.tar
dexon-0x-contracts-b70f5d1a1efcb3b07673aa3b4bc7bc2318f55462.tar.gz
dexon-0x-contracts-b70f5d1a1efcb3b07673aa3b4bc7bc2318f55462.tar.bz2
dexon-0x-contracts-b70f5d1a1efcb3b07673aa3b4bc7bc2318f55462.tar.lz
dexon-0x-contracts-b70f5d1a1efcb3b07673aa3b4bc7bc2318f55462.tar.xz
dexon-0x-contracts-b70f5d1a1efcb3b07673aa3b4bc7bc2318f55462.tar.zst
dexon-0x-contracts-b70f5d1a1efcb3b07673aa3b4bc7bc2318f55462.zip
Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into bug/website/txhash-error
Diffstat (limited to 'packages/website/ts/components/inputs')
-rw-r--r--packages/website/ts/components/inputs/allowance_toggle.tsx12
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/website/ts/components/inputs/allowance_toggle.tsx b/packages/website/ts/components/inputs/allowance_toggle.tsx
index ff3a01136..297617bef 100644
--- a/packages/website/ts/components/inputs/allowance_toggle.tsx
+++ b/packages/website/ts/components/inputs/allowance_toggle.tsx
@@ -1,4 +1,4 @@
-import { constants as sharedConstants, Styles } from '@0xproject/react-shared';
+import { Styles } from '@0xproject/react-shared';
import { BigNumber, logUtils } from '@0xproject/utils';
import * as _ from 'lodash';
import Toggle from 'material-ui/Toggle';
@@ -111,14 +111,16 @@ export class AllowanceToggle extends React.Component<AllowanceToggleProps, Allow
if (!this._isAllowanceSet()) {
newAllowanceAmountInBaseUnits = DEFAULT_ALLOWANCE_AMOUNT_IN_BASE_UNITS;
}
- const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId];
- const eventLabel = `${this.props.token.symbol}-${networkName}`;
+ const logData = {
+ tokenSymbol: this.props.token.symbol,
+ newAllowance: newAllowanceAmountInBaseUnits.toNumber(),
+ };
try {
await this.props.blockchain.setProxyAllowanceAsync(this.props.token, newAllowanceAmountInBaseUnits);
- analytics.logEvent('Portal', 'Set Allowance Success', eventLabel, newAllowanceAmountInBaseUnits.toNumber());
+ analytics.track('Set Allowances Success', logData);
await this.props.refetchTokenStateAsync();
} catch (err) {
- analytics.logEvent('Portal', 'Set Allowance Failure', eventLabel, newAllowanceAmountInBaseUnits.toNumber());
+ analytics.track('Set Allowance Failure', logData);
this.setState({
isSpinnerVisible: false,
});