aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/wallet/wrap_ether_item.tsx
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-07-12 06:39:12 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-07-12 06:39:12 +0800
commit098322c56475581df5bd80e12cb6c511963e4daf (patch)
treebed34b4b9b9be4ea124a7a3247db02e8e39d7ba2 /packages/website/ts/components/wallet/wrap_ether_item.tsx
parent9131a72a47690912db9b536186d05120daabd115 (diff)
downloaddexon-0x-contracts-098322c56475581df5bd80e12cb6c511963e4daf.tar
dexon-0x-contracts-098322c56475581df5bd80e12cb6c511963e4daf.tar.gz
dexon-0x-contracts-098322c56475581df5bd80e12cb6c511963e4daf.tar.bz2
dexon-0x-contracts-098322c56475581df5bd80e12cb6c511963e4daf.tar.lz
dexon-0x-contracts-098322c56475581df5bd80e12cb6c511963e4daf.tar.xz
dexon-0x-contracts-098322c56475581df5bd80e12cb6c511963e4daf.tar.zst
dexon-0x-contracts-098322c56475581df5bd80e12cb6c511963e4daf.zip
Integrate heap analytics
Diffstat (limited to 'packages/website/ts/components/wallet/wrap_ether_item.tsx')
-rw-r--r--packages/website/ts/components/wallet/wrap_ether_item.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/website/ts/components/wallet/wrap_ether_item.tsx b/packages/website/ts/components/wallet/wrap_ether_item.tsx
index 01d9bdb66..9fec8afa1 100644
--- a/packages/website/ts/components/wallet/wrap_ether_item.tsx
+++ b/packages/website/ts/components/wallet/wrap_ether_item.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 { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
@@ -196,13 +196,13 @@ export class WrapEtherItem extends React.Component<WrapEtherItemProps, WrapEther
if (this.props.direction === Side.Deposit) {
await this.props.blockchain.convertEthToWrappedEthTokensAsync(etherToken.address, amountToConvert);
this.props.dispatcher.showFlashMessage(`Successfully wrapped ${ethAmount} ETH to WETH`);
- analytics.track('Wrap ETH Success', {
+ analytics.trackAsync('Wrap ETH Success', {
amount: ethAmount,
});
} else {
await this.props.blockchain.convertWrappedEthTokensToEthAsync(etherToken.address, amountToConvert);
this.props.dispatcher.showFlashMessage(`Successfully unwrapped ${tokenAmount} WETH to ETH`);
- analytics.track('Unwrap WETH Success', {
+ analytics.trackAsync('Unwrap WETH Success', {
amount: tokenAmount,
});
}
@@ -217,12 +217,12 @@ export class WrapEtherItem extends React.Component<WrapEtherItemProps, WrapEther
logUtils.log(err.stack);
if (this.props.direction === Side.Deposit) {
this.props.dispatcher.showFlashMessage('Failed to wrap your ETH. Please try again.');
- analytics.track('Wrap ETH Failure', {
+ analytics.trackAsync('Wrap ETH Failure', {
amount: ethAmount,
});
} else {
this.props.dispatcher.showFlashMessage('Failed to unwrap your WETH. Please try again.');
- analytics.track('Unwrap WETH Failed', {
+ analytics.trackAsync('Unwrap WETH Failed', {
amount: tokenAmount,
});
}