mirror of
https://github.com/status-im/status-mobile.git
synced 2026-08-30 08:31:13 +00:00
* ref: isolate chain definitions * moved networks to wallet context * ref: removed redundant block explorer url definitions * fix: removed more network mentions * ref: removed remaining network dependencies * test: fixed tests * ref: restructured networks * fix: removed unused network utils * ref: removed unused network-preferences sheet * ref: simplified the network api * ref: removed networks dependencies (more) * ref: simplified chain definition to use status-go values * test: fixed unit tests * fix: removed most usages of utils.ethereum.chain ns in status-im * ref: removed utils.network ns and deprecated utils.ethereum.chain ns * ref: profile/testnet? and networks fns instead of manual extraction * feat: added doc for adding new chains * test: added tests for networks.core * fix: removed network names from translations * feat: added schema for network rpc data-store * fix: default networks not defined correctly * doc: adjusted the add new chains doc * fix: bridge network subscription * ref: moved db functions (networks/profile) to respective db ns * fix: make sure block explorer url ends with "/" * fix: wallet connect sessions not showing up * fix: lint
1.6 KiB
1.6 KiB
Adding new chains
This doc only describes how to add new chains on the client side, so make sure the chain is added on status-go first (see eth-rpc-proxy:ADD_NEW_CHAINS.md)
Steps
- Add the chain image (.png) to
resources/images/networks/ - Add the chain name (keyword) and the path to the chain image to
quo.foundations.resources/networks - Add the mainnet (and/or testnet)
chain-idconstant(s) tostatus-im.contexts.wallet.networks.config - Add additional chain information in the same namespace, under
mainnetsandtestnetsrespectively, including the chain name keyword added for the image. - In case the network should be highlighted as new in the UI, add the chain id to
status-im.contexts.wallet.networks.config/new-networks
Future steps to improve addition of new chains and facilitate the addition of custom chains by the user
- Remove reliance on the
network-nameand refer to a chain solely by itschain-id - Remove the definition of the network images from
quo.foundations.resources/networksby relying on the images provided bystatus-go quocomponents that should render a network image should get the image source as a prop- The chain data added in
status-im.contexts.wallet.networks.configshould be received fromstatus-goor derived on the client, instead of being added manually. - Ideally, when adding a new chain, we shouln't bring new changes on the client. All the changes should happen on the
status-goside - Remove deprecated namespaces dealing with chains e.g.
utils.ethereum.chains