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. |
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/core-extension-ux (2 files, +363 -184)
|
Builds ready [60aa3ac]
⚡ Performance Benchmarks (1453 ± 113 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚀 Bundle size reduced!]
|
| default: | ||
| break; | ||
| } | ||
| } |
There was a problem hiding this comment.
Identical NFT classification switch blocks duplicated in two places
Low Severity
The classifyNft call and its associated switch statement (mapping classification to translated title) are copy-pasted verbatim in both the TRANSFER and CONTRACT_CALL branches. If a new NFT classification is added or a label changes, both sites need updating in lockstep — omitting one silently produces wrong titles. Extracting a small helper that maps the classifyNft result to a translated string would eliminate the risk.
Additional Locations (1)
Triggered by project rule: BUGBOT Rules
|
Builds ready [379bea7]
⚡ Performance Benchmarks (1379 ± 100 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚀 Bundle size reduced!]
|





Description
Update handling of mint/buy and send/receive NFT titles
Changelog
CHANGELOG entry: chore: update NFT transaction labels
Related issues
Fixes: #40319 and #40321
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes user-visible activity labeling logic based on
valueTransfers, which could misclassify NFT transactions if transfer metadata is incomplete or varies across providers.Overview
Adds new i18n strings
nftBoughtandnftMinted, and updatesuseGetTitleto classify NFT-relatedTRANSFERandCONTRACT_CALLtransactions as minted, bought, received, or sent by inspectingvalueTransfers(including detecting mints via the zero address and purchases via a paired native payment).Refactors and expands
useGetTitletests to cover these new NFT title cases (including missingvalueTransfers, OpenSea-like purchases, gifts, and sender/receiver viewpoints), while keeping existing swap/bridge/approve title behavior covered.Written by Cursor Bugbot for commit 379bea7. This will update automatically on new commits. Configure here.