-
Notifications
You must be signed in to change notification settings - Fork 5.4k
chore: add event for hide token #38358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [666c4df]
UI Startup Metrics (1275 ± 106 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
| token_contract_address: token?.address, | ||
| token_decimal_precision: token?.decimals, | ||
| location: MetaMetricsEventLocation.TokenDetails, | ||
| token_standard: TokenStandard.ERC20, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Hardcoded ERC20 token standard ignores ERC721 tokens
The token_standard in the TokenHidden event is hardcoded as TokenStandard.ERC20, but the token object can also represent ERC721 tokens (it has an isERC721 property). When users hide an ERC721 token, the event will incorrectly report it as ERC20, causing inaccurate analytics data. The token standard could be determined dynamically using token?.isERC721 since TokenStandard.ERC721 is available in the same imported enum.
Builds ready [ff07f37]
UI Startup Metrics (1226 ± 125 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [247e105]
UI Startup Metrics (1144 ± 115 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [11e465c]
UI Startup Metrics (1274 ± 109 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
PR to add event tracing for hiding tokens from asset options
Changelog
CHANGELOG entry: Adds event tracing for hide token.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Adds MetaMetrics tracking for hiding a token and updates
AssetOptionsto use atokenobject instead oftokenSymbol, adjusting call sites accordingly.ui/pages/asset/components/asset-options.js):MetaMetricsEventName.TokenHiddenon hide with token details (symbol,address,decimals,chain_id, etc.).tokenSymbolprop withtoken; update label to usetoken?.symboland validate viapropTypes.handleRemoveTokento wrap hide action; integrateMetaMetricsContextand related constants.ui/pages/asset/components/token-asset.tsx):tokentoAssetOptionsinstead oftokenSymbol.Written by Cursor Bugbot for commit 11e465c. This will update automatically on new commits. Configure here.