Skip to content

Commit

Permalink
feat: add Celo blockchain (#2146)
Browse files Browse the repository at this point in the history
* feat: add Celo blockchain

* chore: tweak changeset

---------

Co-authored-by: Daniel Sinclair <[email protected]>
  • Loading branch information
bakoushin and DanielSinclair authored Aug 17, 2024
1 parent 595c84d commit f65b5c4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/orange-mayflies-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@rainbow-me/rainbowkit": patch
"example": patch
---

Add icon for Celo chain
4 changes: 4 additions & 0 deletions packages/example/src/wagmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ import {
blast,
blastSepolia,
bsc,
celo,
celoAlfajores,
holesky,
klaytn,
klaytnBaobab,
Expand Down Expand Up @@ -145,6 +147,7 @@ export const config = getDefaultConfig({
klaytn,
sei,
mantle,
celo,
...(process.env.NEXT_PUBLIC_ENABLE_TESTNETS === 'true'
? [
sepolia,
Expand All @@ -159,6 +162,7 @@ export const config = getDefaultConfig({
zetachainAthensTestnet,
klaytnBaobab,
mantleTestnet,
celoAlfajores,
]
: []),
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ type ChainName =
| 'arbitrumSepolia'
| 'avalanche'
| 'avalancheFuji'
| 'celo'
| 'celoAlfajores'
| 'cronos'
| 'cronosTestnet'
| 'base'
Expand Down Expand Up @@ -87,6 +89,11 @@ const bscIcon: IconMetadata = {
iconUrl: async () => (await import('./chainIcons/bsc.svg')).default,
};

const celoIcon: IconMetadata = {
iconBackground: '#FCFF52',
iconUrl: async () => (await import('./chainIcons/celo.svg')).default,
};

const cronosIcon: IconMetadata = {
iconBackground: '#002D74',
iconUrl: async () => (await import('./chainIcons/cronos.svg')).default,
Expand Down Expand Up @@ -170,6 +177,8 @@ const chainMetadataByName: Record<ChainName, ChainMetadata | null> = {
blastSepolia: { chainId: 168_587_773, ...blastIcon },
bsc: { chainId: 56, name: 'BSC', ...bscIcon },
bscTestnet: { chainId: 97, ...bscIcon },
celo: { chainId: 42220, name: 'Celo', ...celoIcon },
celoAlfajores: { chainId: 44787, name: 'Celo Alfajores', ...celoIcon },
cronos: { chainId: 25, ...cronosIcon },
cronosTestnet: { chainId: 338, ...cronosIcon },
goerli: { chainId: 5, ...ethereumIcon },
Expand Down

0 comments on commit f65b5c4

Please sign in to comment.