Commit 58f1c6ff authored by Greg Bugyis's avatar Greg Bugyis Committed by GitHub

fix: Event property fixes (#5108)

* Fix usd value on NFT buy bag success

* Fix bag quantity property on nft_buy_bag_changed
parent b2481d6b
...@@ -69,7 +69,7 @@ export const BagContent = () => { ...@@ -69,7 +69,7 @@ export const BagContent = () => {
name={EventName.NFT_BUY_BAG_CHANGED} name={EventName.NFT_BUY_BAG_CHANGED}
properties={{ properties={{
usd_value: fetchedPriceData, usd_value: fetchedPriceData,
bag_quantity: itemsInBag, bag_quantity: itemsInBag.length,
...formatAssetEventProperties(unavailableAssets), ...formatAssetEventProperties(unavailableAssets),
}} }}
shouldLogImpression shouldLogImpression
......
import { formatEther } from '@ethersproject/units'
import { EventName, ModalName } from 'analytics/constants' import { EventName, ModalName } from 'analytics/constants'
import { Trace } from 'analytics/Trace' import { Trace } from 'analytics/Trace'
import { useTrace } from 'analytics/Trace' import { useTrace } from 'analytics/Trace'
...@@ -82,7 +83,7 @@ const TxCompleteModal = () => { ...@@ -82,7 +83,7 @@ const TxCompleteModal = () => {
name={EventName.NFT_BUY_BAG_SUCCEEDED} name={EventName.NFT_BUY_BAG_SUCCEEDED}
properties={{ properties={{
buy_quantity: nftsPurchased.length, buy_quantity: nftsPurchased.length,
usd_value: totalPurchaseValue, usd_value: parseFloat(formatEther(totalPurchaseValue)) * ethPrice,
transaction_hash: txHash, transaction_hash: txHash,
...formatAssetEventProperties(nftsPurchased), ...formatAssetEventProperties(nftsPurchased),
...trace, ...trace,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment