Skip to content

Commit

Permalink
Parameterize TokenListController by NetworkClientId + Integrate `…
Browse files Browse the repository at this point in the history
…PollingController` (#1763)

Resolves: MetaMask/MetaMask-planning#1032

Integrates new `PollingController` abstraction into the
`TokenListController`, implements the `executePoll` method and
parameterizes the `fetchTokenList` method by `networkClientId` such that
tokenLists can be fetched and cached for different networks via
concurrent polling sessions.

**A note:** As is our current controller refactor strategy, these
changes are additive, backwards compatible and coexist alongside the
existing globally selected network pattern. Once we fully adopt this
polling pattern we should no longer access the root `tokenList` state
but rather access from the cache with a chainId selector.
  • Loading branch information
adonesky1 authored and MajorLift committed Oct 12, 2023
1 parent dfe4833 commit 234f171
Show file tree
Hide file tree
Showing 6 changed files with 360 additions and 44 deletions.
Loading

0 comments on commit 234f171

Please sign in to comment.