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)
- 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-id
constant(s) tostatus-im.contexts.wallet.networks.config
- Add additional chain information in the same namespace, under
mainnets
andtestnets
respectively, 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-name
and refer to a chain solely by itschain-id
- Remove the definition of the network images from
quo.foundations.resources/networks
by relying on the images provided bystatus-go
quo
components that should render a network image should get the image source as a prop- The chain data added in
status-im.contexts.wallet.networks.config
should be received fromstatus-go
or 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-go
side - Remove deprecated namespaces dealing with chains e.g.
utils.ethereum.chains