fix: Event property fixes (#5108)

* Fix usd value on NFT buy bag success

* Fix bag quantity property on nft_buy_bag_changed
This commit is contained in:
Greg Bugyis 2022-11-07 19:35:48 +02:00 committed by GitHub
parent b2481d6ba8
commit 58f1c6ff84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

@ -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

@ -1,3 +1,4 @@
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,