core
core copied to clipboard
Merge TokenDetectionController with DetectTokensController (from extension), and migrate to this repo
These controllers are similar but have separate implementations. We will need to dive into how they are used in the extension vs. mobile app to understand what a combined version should look like.
While we are doing this, it may be worth it to complete the following items before completing the merge:
- Extract any API interactions or complex utility functions
- Refactor the
detectTokens/detectNewTokensmethod (as it is quite complex): https://github.com/MetaMask/core/issues/1614 - Write comprehensive unit tests: https://github.com/MetaMask/core/issues/1615
Additionally, there are patches in mobile around TokenDetectionController under @metamask/assets-controllers, and we will want to make sure those are integrated as well.