-
Notifications
You must be signed in to change notification settings - Fork 5.4k
fix: updated navigation for asset-detail page #38559
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?
Conversation
| const result = getAssetDetailsAccountUrl(address, networkWithoutExplorer); | ||
|
|
||
| expect(result).toBe(expectedUrl); | ||
| }); |
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: Test expectation mismatch for missing block explorer fallback
The test at line 107 expects getAssetDetailsAccountUrl to return a URL ending with #asset-multichain when no blockExplorerUrl is configured, but the implementation simply calls getAccountLink from @metamask/etherscan-link which won't append this fragment. Either the test expectation is incorrect, or the implementation needs to detect when no block explorer is configured and add the #asset-multichain suffix to match the expected fallback behavior documented in the test name "falls back to Etherscan multichain".
Additional Locations (1)
Builds ready [f0cabe2]
UI Startup Metrics (1219 ± 92 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
This PR is to fix the link of "View Asset" button in asset-details page
Changelog
CHANGELOG entry:null
Related issues
Fixes: #34698
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Uses a new helper to generate asset-details explorer links (EVM uses configured explorer with fallback; non-EVM uses format URLs) and updates token asset to use it, with tests added.
getAssetDetailsAccountUrl(address, network)using@metamask/etherscan-link#getAccountLinkfor EVM (uses configuredrpcPrefs.blockExplorerUrl, falls back to Etherscan multichain) andformatBlockExplorerAddressUrlfor non-EVM.token-asset.tsxto usegetAssetDetailsAccountUrlfor non-EVM explorer links; adjust import.blockExplorer.test.tsto covergetAssetDetailsAccountUrlfor EVM with configured explorer, EVM without explorer (fallback), and non-EVM.Written by Cursor Bugbot for commit f0cabe2. This will update automatically on new commits. Configure here.