diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-07-12 07:50:00 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-07-12 07:50:00 +0800 |
commit | 0941e0a929f2fe3ef6d0cf1de5a1274f5f45f031 (patch) | |
tree | 631a88686b5f2fa2f436daac18643c2a055e9311 /packages/website/ts/components/wallet | |
parent | 1ee78062d7731b35e47c0d4c4e30a68628f364a9 (diff) | |
download | dexon-sol-tools-0941e0a929f2fe3ef6d0cf1de5a1274f5f45f031.tar dexon-sol-tools-0941e0a929f2fe3ef6d0cf1de5a1274f5f45f031.tar.gz dexon-sol-tools-0941e0a929f2fe3ef6d0cf1de5a1274f5f45f031.tar.bz2 dexon-sol-tools-0941e0a929f2fe3ef6d0cf1de5a1274f5f45f031.tar.lz dexon-sol-tools-0941e0a929f2fe3ef6d0cf1de5a1274f5f45f031.tar.xz dexon-sol-tools-0941e0a929f2fe3ef6d0cf1de5a1274f5f45f031.tar.zst dexon-sol-tools-0941e0a929f2fe3ef6d0cf1de5a1274f5f45f031.zip |
Add no-floating-promises ignore comments
Diffstat (limited to 'packages/website/ts/components/wallet')
-rw-r--r-- | packages/website/ts/components/wallet/wallet.tsx | 2 | ||||
-rw-r--r-- | packages/website/ts/components/wallet/wrap_ether_item.tsx | 4 |
2 files changed, 6 insertions, 0 deletions
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<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); this.setState({ wrappedEtherDirection, @@ -498,6 +499,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); 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<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', { 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', { amount: tokenAmount, }); @@ -217,11 +219,13 @@ 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', { 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', { amount: tokenAmount, }); |