aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/wallet
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-07-13 07:57:03 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-07-13 07:57:03 +0800
commit1df074b73e05adf669b0cedc4bb1473e9e5631db (patch)
treee32cb0adcfcc5df9b7d2b562cfa17cdd86003567 /packages/website/ts/components/wallet
parent0941e0a929f2fe3ef6d0cf1de5a1274f5f45f031 (diff)
downloaddexon-sol-tools-1df074b73e05adf669b0cedc4bb1473e9e5631db.tar
dexon-sol-tools-1df074b73e05adf669b0cedc4bb1473e9e5631db.tar.gz
dexon-sol-tools-1df074b73e05adf669b0cedc4bb1473e9e5631db.tar.bz2
dexon-sol-tools-1df074b73e05adf669b0cedc4bb1473e9e5631db.tar.lz
dexon-sol-tools-1df074b73e05adf669b0cedc4bb1473e9e5631db.tar.xz
dexon-sol-tools-1df074b73e05adf669b0cedc4bb1473e9e5631db.tar.zst
dexon-sol-tools-1df074b73e05adf669b0cedc4bb1473e9e5631db.zip
Make Analytics API non-async
Diffstat (limited to 'packages/website/ts/components/wallet')
-rw-r--r--packages/website/ts/components/wallet/wallet.tsx6
-rw-r--r--packages/website/ts/components/wallet/wrap_ether_item.tsx12
2 files changed, 6 insertions, 12 deletions
diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx
index 8523b819a..e462ab3e0 100644
--- a/packages/website/ts/components/wallet/wallet.tsx
+++ b/packages/website/ts/components/wallet/wallet.tsx
@@ -490,8 +490,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
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);
+ analytics.track(action);
this.setState({
wrappedEtherDirection,
});
@@ -499,8 +498,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
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);
+ analytics.track(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 9e3d06817..2b85b69be 100644
--- a/packages/website/ts/components/wallet/wrap_ether_item.tsx
+++ b/packages/website/ts/components/wallet/wrap_ether_item.tsx
@@ -196,15 +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`);
- // tslint:disable-next-line:no-floating-promises
- analytics.trackAsync('Wrap ETH Success', {
+ analytics.track('Wrap ETH Success', {
amount: ethAmount,
});
} else {
await this.props.blockchain.convertWrappedEthTokensToEthAsync(etherToken.address, amountToConvert);
this.props.dispatcher.showFlashMessage(`Successfully unwrapped ${tokenAmount} WETH to ETH`);
- // tslint:disable-next-line:no-floating-promises
- analytics.trackAsync('Unwrap WETH Success', {
+ analytics.track('Unwrap WETH Success', {
amount: tokenAmount,
});
}
@@ -219,14 +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.');
- // tslint:disable-next-line:no-floating-promises
- analytics.trackAsync('Wrap ETH Failure', {
+ analytics.track('Wrap ETH Failure', {
amount: ethAmount,
});
} else {
this.props.dispatcher.showFlashMessage('Failed to unwrap your WETH. Please try again.');
- // tslint:disable-next-line:no-floating-promises
- analytics.trackAsync('Unwrap WETH Failed', {
+ analytics.track('Unwrap WETH Failed', {
amount: tokenAmount,
});
}