Skip to content

Commit 51b16ab

Browse files
fix: cp-12.17.0 clamp search token results that don't exist (#32213)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/32213?quickstart=1) ## **Related issues** Fixes: #32212 ## **Manual testing steps** See repro steps in issue. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** See issue. ### **After** https://www.loom.com/share/4ff57c7e01714bcfa514aadd8df79e8e?sid=03a7dc9e-ea4c-4e2c-800f-86108623b0bc ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [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](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). 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.
1 parent 300f257 commit 51b16ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/components/app/import-token/token-list/token-list.component.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default class TokenList extends Component {
7474
display={Display.Flex}
7575
flexDirection={FlexDirection.Column}
7676
>
77-
{Array(12)
77+
{Array(Math.min(12, results.length))
7878
.fill(undefined)
7979
.map((_, i) => {
8080
const { symbol, name, address, chainId } = results[i] || {};

0 commit comments

Comments
 (0)