Skip to content

[Refactor]: Consolidate token list loops into memoized selector #13995

@gambinish

Description

@gambinish

What is this about?

From Wallet Screen → Tokens component, we are looping through the tokenList in state several times.

  1. We initially select the tokens on Wallet screen here: selectTransformedTokens
  2. Manually build native asset and staked asset (this can be done in a memoized selector)
  3. getTokensToDisplay filterTokensByNetwork and categorizeTokens all loop through token list, but can be consolidated to a memoized selector

Stakeholder review needed before the work gets merged

  • Engineering (needed in most cases)

References

#13985

Metadata

Metadata

Assignees

Labels

INVALID-ISSUE-TEMPLATEIssue's body doesn't match any issue template.release-7.44.0Issue or pull request that will be included in release 7.44.0

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions