fix: lower occurenceFloor for linea mainnet to 1#4253
Merged
sahar-fehri merged 7 commits intomainfrom May 7, 2024
Merged
Conversation
hurricanenara
previously approved these changes
May 6, 2024
hurricanenara
previously approved these changes
May 6, 2024
bergeron
reviewed
May 6, 2024
| return parseJsonResponse(response); | ||
| const result = await parseJsonResponse(response); | ||
| if (Array.isArray(result) && chainId === ChainId['linea-mainnet']) { | ||
| return result.filter((elm) => elm.aggregators.includes('lineaTeam')); |
Contributor
There was a problem hiding this comment.
Suggested change
| return result.filter((elm) => elm.aggregators.includes('lineaTeam')); | |
| return result.filter((elm) => elm.aggregators.includes('lineaTeam') || elm.aggregators.length >= 3); |
What do you think about this? This still includes 100% of whats in the lineaTeam list. But continues allowing tokens that made it into 3 sources. Otherwise we could be excluding tokens that used to appear.
Contributor
Author
There was a problem hiding this comment.
Thank you 🙏 for record, added the OR statement to avoid disappearing tokens that used to appear to users before because they were on +3 lists different than lineaTeam
bergeron
approved these changes
May 6, 2024
hurricanenara
approved these changes
May 6, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Lower occurenceFloor for linea mainnet to only 1 list instead of 3.
Add a filter for lineaTeam aggregator when we fetch token list from token-api when the user is on linea-mainnet.
References
Changelog
@metamask/assets-controllerslineaTeamaggregator on the returned list byfetchTokenListByChainIdwhen the user is on linea mainnet.Checklist