Skip to content

Conversation

@bergeron
Copy link
Contributor

@bergeron bergeron commented Apr 30, 2024

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 bergeron requested review from a team, hurricanenara, sahar-fehri and salimtb April 30, 2024 19:49
hurricanenara
hurricanenara previously approved these changes Apr 30, 2024
hurricanenara
hurricanenara previously approved these changes Apr 30, 2024
sahar-fehri
sahar-fehri previously approved these changes May 1, 2024
@bergeron bergeron dismissed stale reviews from sahar-fehri and hurricanenara via 3da4577 May 31, 2024 01:54
@bergeron bergeron merged commit 26d4fe4 into main May 31, 2024
@bergeron bergeron deleted the brian/token-list-response-size branch May 31, 2024 14:28
mcmire pushed a commit that referenced this pull request May 31, 2024
## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants