Chains
KryptogoKit is designed to integrate with wagmi’s chains (EVM). You can customize the chains that your app supports and their appearance.
⚠️
Chains can only be customized when using KryptoKit SDK for Dapp Integration. For Crypto Payment, this version only supports the Arbitrum chain.
Customizing the initial chain
By default, KryptogoKit will connect to the first chain supplied to Wagmi. This behavior can be customized via the initialChain prop.
The initial chain can be configured using a chain ID.
<KryptogoKitProvider initialChain={1}>
For convenience, you can also pass a chain object.
<KryptogoKitProvider initialChain={mainnet}>
Custom chain metadata
Several chain icons and backgrounds are provided by default, but you can customize the icon and background for each chain using the iconUrl and iconBackground properties.
import { mainnet, arbitrum } from 'wagmi/chains';
import { Chain } from '@kryptogo/kryptogokit-sdk-react';
const chains: readonly [Chain, ...Chain[]] = [
{
...mainnet,
iconBackground: '#000',
iconUrl: 'https://example.com/icons/ethereum.png',
},
{
...arbitrum,
iconBackground: '#dddd00',
iconUrl: 'https://example.com/icons/arbitrum.png',
},
];
const config = createConfig({
chains,
});
Last updated on