diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-11-22 07:18:31 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-11-27 06:48:07 +0800 |
commit | fad48b8b6c5299b2fd3b8490779a538e1158f2dd (patch) | |
tree | d99a554203a73874aa56d508857c605bc5c72f90 /packages/instant/src/components | |
parent | 685d83d6d0dc7998ce231e5106d74c0e16b17f34 (diff) | |
download | dexon-sol-tools-fad48b8b6c5299b2fd3b8490779a538e1158f2dd.tar dexon-sol-tools-fad48b8b6c5299b2fd3b8490779a538e1158f2dd.tar.gz dexon-sol-tools-fad48b8b6c5299b2fd3b8490779a538e1158f2dd.tar.bz2 dexon-sol-tools-fad48b8b6c5299b2fd3b8490779a538e1158f2dd.tar.lz dexon-sol-tools-fad48b8b6c5299b2fd3b8490779a538e1158f2dd.tar.xz dexon-sol-tools-fad48b8b6c5299b2fd3b8490779a538e1158f2dd.tar.zst dexon-sol-tools-fad48b8b6c5299b2fd3b8490779a538e1158f2dd.zip |
feat(instant): add txHash to relevant buy events
Diffstat (limited to 'packages/instant/src/components')
-rw-r--r-- | packages/instant/src/components/buy_button.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/instant/src/components/buy_button.tsx b/packages/instant/src/components/buy_button.tsx index 6db71852e..9a6785862 100644 --- a/packages/instant/src/components/buy_button.tsx +++ b/packages/instant/src/components/buy_button.tsx @@ -74,7 +74,7 @@ export class BuyButton extends React.Component<BuyButtonProps> { takerAddress: accountAddress, gasPrice: gasInfo.gasPriceInWei, }); - analytics.trackBuyTxSubmitted(); + analytics.trackBuyTxSubmitted(txHash); } catch (e) { if (e instanceof Error) { if (e.message === AssetBuyerError.SignatureRequestDenied) { @@ -95,14 +95,14 @@ export class BuyButton extends React.Component<BuyButtonProps> { try { await web3Wrapper.awaitTransactionSuccessAsync(txHash); } catch (e) { - analytics.trackBuyTxFailed(); + analytics.trackBuyTxFailed(txHash); if (e instanceof Error && e.message.startsWith(WEB_3_WRAPPER_TRANSACTION_FAILED_ERROR_MSG_PREFIX)) { this.props.onBuyFailure(buyQuote, txHash); return; } throw e; } - analytics.trackBuyTxSucceeded(); + analytics.trackBuyTxSucceeded(txHash); this.props.onBuySuccess(buyQuote, txHash); }; } |