-
Notifications
You must be signed in to change notification settings - Fork 5.4k
fix: fix re-import hidden custom token with checksum address #36784
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
base: main
Are you sure you want to change the base?
fix: fix re-import hidden custom token with checksum address #36784
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. |
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [6765478]
UI Startup Metrics (1248 ± 68 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [b9488f5]
UI Startup Metrics (1250 ± 83 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [53da464]
UI Startup Metrics (1273 ± 63 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
When a user re-imports a hidden token using custom import with checksum address, the token fails to import.
The test works successfully using the search token feature or adding the custom token in lowercase format.
The search token feature sends the tokens to the
addTokens
function in core in lowercase format because thetokensChainsCache
in state are also in lowercase format.When the user tries to re-add a hidden token in a checksum format; this causes the filter on this line to fail; hence the token does not appear on the list after clicking import.
The fix makes the addresses sent to the
addTokens
fct in lowercase to match the casing of tokensChainsCache.Changelog
CHANGELOG entry: Fixed a bug that was causing re-importing a previously hidden token using custom appear to not appear in the list
Related issues
Fixes: #36559
Manual testing steps
Screenshots/Recordings
Before
Screen.Recording.2025-10-10.at.16.39.39.mov
After
Screen.Recording.2025-10-10.at.16.42.32.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Lowercases addresses of imported tokens in
addImportedTokens
before sending to background.Written by Cursor Bugbot for commit 53da464. This will update automatically on new commits. Configure here.