-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: asset-list
and token-list
#29886
refactor: asset-list
and token-list
#29886
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [439b107]
Page Load Metrics (1945 ± 100 ms)
Bundle size diffs
|
…hub.com:MetaMask/metamask-extension into refactor/mmassets-492_chain-agnostic-asset-list
Builds ready [cbfd264]
Page Load Metrics (1620 ± 115 ms)
Bundle size diffs
|
asset-list
and token-list
…hub.com:MetaMask/metamask-extension into refactor/mmassets-492_chain-agnostic-asset-list
Builds ready [78b2643]
Page Load Metrics (1675 ± 75 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
ui/components/app/assets/asset-list/asset-list-funding-modals/asset-list-funding-modals.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are absolutely killer refactors. Mobile sorely needs this type of love. LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
circular dep changes are 👍 !
Builds ready [3df8360]
Page Load Metrics (1712 ± 79 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [3df8360]
Page Load Metrics (1712 ± 79 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
This is the first of a series of PRs that aim to address two things:
PortfolioView
sprintsThis PR aims to simplify
asset-list
andtoken-list
components. The next PR will simplifytoken-cell
andtoken-list-item
Refactor
consolidateTokenBalances
into a redux selectorgetTokenBalancesEvm
. Eventually (soon) this will be wrapped in a more generic selector, that will understand how to select/calculate balances for tokens on different chains.Add a
app/assets/hooks
directory to help clean up and extract business logic away from the body ofasset-list
andtoken-list
components and improve readabilityAdds two utility files:
calculateTokenBalance
andcalculateTokenFiatAmount
(these are called from the selector file)Adds a
app/assets/types.ts
file to consolidate all the types related to assets.Related issues
Manual testing steps
This PR should not break anything. It also should not introduce anything.
Screenshots/Recordings
Pre-merge author checklist
Pre-merge reviewer checklist