-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
chore(431-1): multichain list preparation #12293
base: main
Are you sure you want to change the base?
Conversation
…currently the functions are not in use
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. |
Bitrise🔄🔄🔄 Commit hash: 0066034 Note
|
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.
Only nit I would add is to add a comment link to the extension networks, but nbd
…hub.com:MetaMask/metamask-mobile into chore-431-1-prepare-multi-chain-network-filters
Bitrise❌❌❌ Commit hash: 894743a Note
Tip
|
Quality Gate passedIssues Measures |
'0x8157': require('../../images/ape-network.png'), // ApeChain testnet | ||
'0x8173': require('../../images/ape-network.png'), // ApeChain mainnet | ||
'0x659': require('../../images/gravity.png'), // Gravity Alpha Mainnet | ||
export const NETWORK_CHAIN_ID: { |
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.
Mirror what we have in extension. See here
Description
This pull request is preparatory work for the upcoming multi-chain feature, here is the pull request. It introduces utility functions and type improvements to support multi-chain asset management. The improvements for chain id's mapping is also an attempt to mirror what we have in extension
Key Changes
Added new utility functions:
enableAllNetworksFilter
: Creates a mapping of chain IDs to boolean values for network filteringfilterAssets
: Generic asset filtering utility that supports chain ID and balance filteringEnhanced network type definitions:
NETWORK_CHAIN_ID
to usereadonly
properties for better type safety@metamask/transaction-controller
'sCHAIN_IDS
Added test coverage:
enableAllNetworksFilter
covering basic functionality and edge casesfilterAssets
demonstrating chain ID and balance filtering capabilitiesTechnical Details
enableAllNetworksFilter
: Converts network configurations into a boolean map for filteringfilterAssets
: Implements flexible filtering with support for:Purpose
This PR aims to:
Related issues
Fixes: NA
Manual testing steps
Screenshots/Recordings
NA
Before
NA
After
NA
Pre-merge author checklist
Pre-merge reviewer checklist