MetaMask / MetaMask/metamask-mobile

[Refactor]: Integrate `Tokens` and `NonEvmTokens` components

Open
#13,997 0 comments 0 reactions 0 assignees View on GitHub
area-performance
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

### What is this about?

We are currently maintaining two components that are essentially rendering the same list of tokens for different networks: [Tokens](https://github.com/MetaMask/metamask-mobile/blob/29568c66bd1c16104d10d5740127fbeb34fe615d/app/components/Views/Wallet/index.tsx#L625) and [NonEvmTokens](https://github.com/MetaMask/metamask-mobile/blob/29568c66bd1c16104d10d5740127fbeb34fe615d/app/components/Views/Wallet/index.tsx#L610). This should ultimately just be a single Tokens component. Having this as a single component will also lend itself to expanding to future networks.

Refactors from https://github.com/MetaMask/metamask-mobile/issues/13995 and https://github.com/MetaMask/metamask-mobile/issues/13996 will help to unblock this by addressing technical/performance debt accrued.

### Scenario

_No response_

### Design

_No response_

### Technical Details

_No response_

### Threat Modeling Framework

_No response_

### Acceptance Criteria

_No response_

### Stakeholder review needed before the work gets merged

- [ ] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)

### References

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in app/components/Views/Wallet/index.tsx at the Tokens and NonEvmTokens definitions around lines 610 and 625. Compare how each component receives and renders token data, then review issues #13995 and #13996 for the prerequisite refactors. Done means the two network-specific components are integrated into one Tokens component while preserving the existing token lists.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.