core icon indicating copy to clipboard operation
core copied to clipboard

exclude fields from token list fetch

Open bergeron opened this issue 10 months ago • 0 comments

Explanation

Adds 2 query parameters when fetching token lists:

  • includeERC20Permit=false
  • includeStorage=false

The best I can tell, neither field is used by extension or mobile. So we'll instead take the reduction in network usage (~5KB on mainnet) and controller state.

References

https://consensyssoftware.atlassian.net/browse/API-1186

Changelog

@metamask/assets-controllers

  • BREAKING: TokenListController no longer includes the fields storage and erc20Permit in its state.

Checklist

  • [ ] I've updated the test suite for new or updated code as appropriate
  • [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • [ ] I've highlighted breaking changes using the "BREAKING" category above as appropriate

bergeron avatar Apr 30 '24 19:04 bergeron