1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 17:33:23 +01:00

Update "NFT Added" events (#19796)

* Update NFT events

* remove uneeded toString()

* source_connection_method to source for TokenAdded events

* redelete add-nft

---------

Co-authored-by: Alex Donesky <adonesky@gmail.com>
This commit is contained in:
jiexi 2023-07-21 08:17:56 -07:00 committed by GitHub
parent ba001b597c
commit 4c881f70fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 10 deletions

View File

@ -495,16 +495,14 @@ export default class MetamaskController extends EventEmitter {
this.metaMetricsController.trackEvent({
event: MetaMetricsEventName.NftAdded,
category: MetaMetricsEventCategory.Wallet,
properties: {
sensitiveProperties: {
token_contract_address: address,
token_symbol: symbol,
asset_type: AssetType.NFT,
token_id: tokenId,
token_standard: standard,
asset_type: AssetType.NFT,
source,
},
sensitiveProperties: {
tokenId,
},
}),
},
{},

View File

@ -73,7 +73,7 @@ const DetectedToken = ({ setShowDetectedTokens }) => {
token_symbol: importedToken.symbol,
token_contract_address: importedToken.address,
token_decimal_precision: importedToken.decimals,
source_connection_method: MetaMetricsTokenEventSource.Detected,
source: MetaMetricsTokenEventSource.Detected,
token_standard: TokenStandard.ERC20,
asset_type: AssetType.token,
token_added_type: 'detected',

View File

@ -69,12 +69,12 @@ const ConfirmAddSuggestedNFT = () => {
event: MetaMetricsEventName.NftAdded,
category: MetaMetricsEventCategory.Wallet,
sensitiveProperties: {
token_contract_address: asset.address,
token_symbol: asset.symbol,
token_id: asset.tokenId,
token_contract_address: asset.address,
source_connection_method: MetaMetricsTokenEventSource.Dapp,
token_standard: asset.standard,
asset_type: AssetType.NFT,
source: MetaMetricsTokenEventSource.Dapp,
},
});
}),

View File

@ -132,7 +132,7 @@ const ConfirmAddSuggestedToken = () => {
token_contract_address: asset.address,
token_decimal_precision: asset.decimals,
unlisted: asset.unlisted,
source_connection_method: MetaMetricsTokenEventSource.Dapp,
source: MetaMetricsTokenEventSource.Dapp,
token_standard: TokenStandard.ERC20,
asset_type: AssetType.token,
},

View File

@ -51,7 +51,7 @@ const ConfirmImportToken = () => {
token_contract_address: pendingToken.address,
token_decimal_precision: pendingToken.decimals,
unlisted: pendingToken.unlisted,
source_connection_method: pendingToken.isCustom
source: pendingToken.isCustom
? MetaMetricsTokenEventSource.Custom
: MetaMetricsTokenEventSource.List,
token_standard: TokenStandard.ERC20,