feat: add token verification source count and link to block explorer
Description
In a previous redesign, the information about the number of sources a token has been verified on and the link to that token on the relevant block explorer was removed from the swap page. This returns that information.
Related issues
Fixes:
Manual testing steps
- Go to the swap page
- Select swap assets and amount
- See token verification info and block explorer link
Screenshots/Recordings
Before
After
Pre-merge author checklist
- [x] I've followed MetaMask Contributor Docs and MetaMask Extension Coding Standards.
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using JSDoc format if applicable
- [x] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
Pre-merge reviewer checklist
- [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
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.
I have read the CLA Document and I hereby sign the CLA
Builds ready [5b410dc]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (2061 ± 261 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 295 | 2666 | 1801 | 560 | 269 |
| domContentLoaded | 1581 | 4028 | 2035 | 536 | 258 | ||
| load | 1594 | 4053 | 2061 | 543 | 261 | ||
| domInteractive | 26 | 112 | 51 | 23 | 11 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 159 Bytes (0.00%)
- common: 1 Bytes (0.00%)
Looks good. Could we update the copy?
Verified on x sources. You can check on [block explorer].
Can we specify which block explorer? I think we did on Extension before it disappeared. @coreyjanssen does this look ok?
Builds ready [8523b5b]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1844 ± 109 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 1543 | 2334 | 1839 | 229 | 110 |
| domContentLoaded | 1535 | 2323 | 1817 | 224 | 108 | ||
| load | 1544 | 2333 | 1844 | 226 | 109 | ||
| domInteractive | 21 | 96 | 50 | 23 | 11 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 159 Bytes (0.00%)
- common: 1 Bytes (0.00%)
I noticed something similar to @vstern1
In the designs we are using human readable names (Etherscan, PolygonScan, LineaScan, etc.) but in the current implementation we are using human readable URLs instead (etherscan.io, lineascan.build, etc.). Hopefully we have a way to get human readable block explorer names instead
Update: looks like there's not directly in the BlockExplorer component as we have defined. But we could consider including a new enum that maps the chain id to block explorer readable name
We probably shouldn't show the message for the native token, as this makes a highly trustable token (ETH) look unreliable.
Looks good to me. Approved by content design.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
66.7% Coverage on New Code
0.0% Duplication on New Code
Builds ready [5b010b0]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (2038 ± 147 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 273 | 2837 | 1935 | 482 | 231 |
| domContentLoaded | 1653 | 2774 | 1972 | 268 | 129 | ||
| load | 1669 | 2833 | 2038 | 307 | 147 | ||
| domInteractive | 32 | 249 | 72 | 45 | 21 | ||
| backgroundConnect | 8 | 319 | 59 | 86 | 42 | ||
| firstReactRender | 46 | 287 | 113 | 52 | 25 | ||
| getState | 5 | 389 | 47 | 84 | 41 | ||
| initialActions | 0 | 0 | 0 | 0 | 0 | ||
| loadScripts | 1208 | 2256 | 1486 | 242 | 116 | ||
| setupStore | 11 | 188 | 50 | 46 | 22 | ||
| uiStartup | 1863 | 3377 | 2352 | 429 | 206 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 254 Bytes (0.00%)
- common: 736 Bytes (0.01%)
Builds ready [8d00e80]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1808 ± 85 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 1648 | 2391 | 1803 | 168 | 81 |
| domContentLoaded | 1627 | 2227 | 1765 | 139 | 67 | ||
| load | 1647 | 2414 | 1808 | 176 | 85 | ||
| domInteractive | 16 | 204 | 50 | 40 | 19 | ||
| backgroundConnect | 9 | 187 | 44 | 45 | 22 | ||
| firstReactRender | 47 | 204 | 104 | 41 | 20 | ||
| getState | 4 | 111 | 16 | 26 | 13 | ||
| initialActions | 0 | 1 | 0 | 0 | 0 | ||
| loadScripts | 1182 | 1680 | 1327 | 120 | 57 | ||
| setupStore | 11 | 145 | 43 | 35 | 17 | ||
| uiStartup | 1825 | 3147 | 2084 | 329 | 158 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 254 Bytes (0.00%)
- common: 736 Bytes (0.01%)
Builds ready [e1fdd68]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1775 ± 60 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 226 | 2260 | 1700 | 365 | 175 |
| domContentLoaded | 1603 | 2084 | 1741 | 115 | 55 | ||
| load | 1611 | 2160 | 1775 | 125 | 60 | ||
| domInteractive | 19 | 82 | 46 | 19 | 9 | ||
| backgroundConnect | 7 | 87 | 33 | 29 | 14 | ||
| firstReactRender | 50 | 292 | 112 | 55 | 27 | ||
| getState | 4 | 58 | 10 | 11 | 6 | ||
| initialActions | 0 | 1 | 0 | 0 | 0 | ||
| loadScripts | 1136 | 1526 | 1278 | 94 | 45 | ||
| setupStore | 11 | 95 | 31 | 27 | 13 | ||
| uiStartup | 1821 | 2757 | 2009 | 218 | 104 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 254 Bytes (0.00%)
- common: 736 Bytes (0.01%)
Ticket description said to display after fetching a quote, but now that you point it out, that does feel a little off.
@vstern1, did you want it to wait until after fetching for a specific reason?
Builds ready [74ad24c]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1643 ± 50 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 302 | 1909 | 1589 | 315 | 151 |
| domContentLoaded | 1504 | 1854 | 1627 | 94 | 45 | ||
| load | 1513 | 1899 | 1643 | 104 | 50 | ||
| domInteractive | 19 | 190 | 52 | 43 | 21 | ||
| backgroundConnect | 7 | 50 | 18 | 13 | 6 | ||
| firstReactRender | 42 | 209 | 89 | 44 | 21 | ||
| getState | 4 | 70 | 22 | 25 | 12 | ||
| initialActions | 0 | 0 | 0 | 0 | 0 | ||
| loadScripts | 1074 | 1396 | 1203 | 78 | 37 | ||
| setupStore | 10 | 93 | 20 | 21 | 10 | ||
| uiStartup | 1657 | 2409 | 1842 | 162 | 78 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 262 Bytes (0.00%)
- common: 736 Bytes (0.01%)
Builds ready [dd670b9]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1939 ± 171 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 458 | 2694 | 1859 | 434 | 209 |
| domContentLoaded | 1564 | 2638 | 1852 | 251 | 120 | ||
| load | 1568 | 3074 | 1939 | 357 | 171 | ||
| domInteractive | 27 | 88 | 48 | 20 | 10 | ||
| backgroundConnect | 6 | 794 | 84 | 167 | 80 | ||
| firstReactRender | 48 | 204 | 103 | 48 | 23 | ||
| getState | 4 | 122 | 27 | 30 | 14 | ||
| initialActions | 0 | 0 | 0 | 0 | 0 | ||
| loadScripts | 1147 | 2218 | 1389 | 237 | 114 | ||
| setupStore | 11 | 96 | 29 | 25 | 12 | ||
| uiStartup | 1756 | 3286 | 2182 | 379 | 182 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 427 Bytes (0.01%)
- common: 730 Bytes (0.01%)
Absolutely right, good catch @infiniteflower! Fix made 👌
Builds ready [8f8d708]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1865 ± 109 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 1562 | 2472 | 1867 | 229 | 110 |
| domContentLoaded | 1552 | 2315 | 1813 | 181 | 87 | ||
| load | 1561 | 2515 | 1865 | 227 | 109 | ||
| domInteractive | 25 | 266 | 59 | 51 | 24 | ||
| backgroundConnect | 9 | 196 | 50 | 55 | 27 | ||
| firstReactRender | 52 | 199 | 110 | 38 | 18 | ||
| getState | 4 | 128 | 31 | 37 | 18 | ||
| initialActions | 0 | 1 | 0 | 0 | 0 | ||
| loadScripts | 1132 | 1737 | 1344 | 144 | 69 | ||
| setupStore | 10 | 83 | 22 | 19 | 9 | ||
| uiStartup | 1710 | 3077 | 2139 | 368 | 177 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 451 Bytes (0.01%)
- common: 730 Bytes (0.01%)
Builds ready [8eded5d]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1833 ± 94 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 462 | 2307 | 1771 | 355 | 170 |
| domContentLoaded | 1540 | 2199 | 1809 | 178 | 85 | ||
| load | 1550 | 2324 | 1833 | 195 | 94 | ||
| domInteractive | 16 | 277 | 50 | 55 | 26 | ||
| backgroundConnect | 8 | 128 | 25 | 27 | 13 | ||
| firstReactRender | 48 | 264 | 102 | 49 | 24 | ||
| getState | 4 | 66 | 12 | 17 | 8 | ||
| initialActions | 0 | 1 | 0 | 0 | 0 | ||
| loadScripts | 1108 | 1794 | 1348 | 159 | 76 | ||
| setupStore | 10 | 73 | 35 | 25 | 12 | ||
| uiStartup | 1698 | 2704 | 2067 | 229 | 110 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 697 Bytes (0.01%)
- common: 639 Bytes (0.01%)
Builds ready [7284081]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (2249 ± 120 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 307 | 2693 | 1939 | 709 | 340 |
| domContentLoaded | 1788 | 2603 | 2213 | 237 | 114 | ||
| load | 1815 | 2700 | 2249 | 249 | 120 | ||
| domInteractive | 30 | 190 | 69 | 34 | 16 | ||
| backgroundConnect | 10 | 106 | 38 | 27 | 13 | ||
| firstReactRender | 54 | 136 | 103 | 20 | 10 | ||
| getState | 4 | 64 | 22 | 19 | 9 | ||
| initialActions | 0 | 0 | 0 | 0 | 0 | ||
| loadScripts | 1286 | 2032 | 1669 | 213 | 102 | ||
| setupStore | 11 | 84 | 44 | 26 | 12 | ||
| uiStartup | 2020 | 3020 | 2490 | 273 | 131 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 971 Bytes (0.01%)
- common: 639 Bytes (0.01%)