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 = () => {
name={EventName.NFT_BUY_BAG_CHANGED}
properties={{
usd_value: fetchedPriceData,
bag_quantity: itemsInBag,
bag_quantity: itemsInBag.length,
...formatAssetEventProperties(unavailableAssets),
}}
shouldLogImpression
......
import { formatEther } from '@ethersproject/units'
import { EventName, ModalName } from 'analytics/constants'
import { Trace } from 'analytics/Trace'
import { useTrace } from 'analytics/Trace'
......@@ -82,7 +83,7 @@ const TxCompleteModal = () => {
name={EventName.NFT_BUY_BAG_SUCCEEDED}
properties={{
buy_quantity: nftsPurchased.length,
usd_value: totalPurchaseValue,
usd_value: parseFloat(formatEther(totalPurchaseValue)) * ethPrice,
transaction_hash: txHash,
...formatAssetEventProperties(nftsPurchased),
...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