Network selector
If your application can switch between Mainnet and Testnet networks you may want to add the network selector widget to the CSPR.click toolbar. For that, add a NetworkSettings
object to the <ClickUI>
component:
The settings object must have a networks
property with an array containing the networks your application can interact with, typically Mainnet and Testnet. Set them in the order you want to appear in the selector:
You must also indicate the current network, as it will be highlighted in the menu, and a callback function to handle a request from the user to change to another network.
Customize the network icons
You can also specify your custom icons for each of the networks:
Last updated