Skip to content

Commit

Permalink
feat: add zetachain metadata (#1897)
Browse files Browse the repository at this point in the history
* add zetachain icon

* feat: add zetachain logo

* chore: tweak

* revert: add to site

* fix: naming

* fix: changeset

---------

Co-authored-by: Magomed Khamidov <53529533+KosmosKey@users.noreply.github.com>
Co-authored-by: Daniel Sinclair <d@niel.nyc>
  • Loading branch information
3 people authored Apr 1, 2024
1 parent cc82ed3 commit 81ba812
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/flat-maps-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@rainbow-me/rainbowkit": patch
"example": patch
---

Added support for `zetachain` and `zetachainAthensTestnet` testnet chain
4 changes: 4 additions & 0 deletions packages/example/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ import {
polygonMumbai,
ronin,
sepolia,
zetachain,
zetachainAthensTestnet,
zkSync,
zora,
zoraSepolia,
Expand Down Expand Up @@ -135,6 +137,7 @@ const config = getDefaultConfig({
zora,
blast,
zkSync,
zetachain,
ronin,
...(process.env.NEXT_PUBLIC_ENABLE_TESTNETS === 'true'
? [
Expand All @@ -147,6 +150,7 @@ const config = getDefaultConfig({
zoraSepolia,
blastSepolia,
avalancheFuji,
zetachainAthensTestnet,
]
: []),
],
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 @@ -36,6 +36,8 @@ type ChainName =
| 'sepolia'
| 'xdc'
| 'xdcTestnet'
| 'zetachain'
| 'zetachainAthensTestnet'
| 'zkSync'
| 'zkSyncTestnet'
| 'zora'
Expand Down Expand Up @@ -107,6 +109,11 @@ const xdcIcon: IconMetadata = {
iconUrl: async () => (await import('./chainIcons/xdc.svg')).default,
};

const zetachainIcon: IconMetadata = {
iconBackground: '#000000',
iconUrl: async () => (await import('./chainIcons/zetachain.svg')).default,
};

const zkSyncIcon: IconMetadata = {
iconBackground: '#f9f7ec',
iconUrl: async () => (await import('./chainIcons/zkSync.svg')).default,
Expand Down Expand Up @@ -155,6 +162,12 @@ const chainMetadataByName: Record<ChainName, ChainMetadata | null> = {
sepolia: { chainId: 11_155_111, ...ethereumIcon },
xdc: { chainId: 50, name: 'XinFin', ...xdcIcon },
xdcTestnet: { chainId: 51, ...xdcIcon },
zetachain: { chainId: 7000, name: 'ZetaChain', ...zetachainIcon },
zetachainAthensTestnet: {
chainId: 7001,
name: 'Zeta Athens',
...zetachainIcon,
},
zkSync: { chainId: 324, name: 'zkSync', ...zkSyncIcon },
zkSyncTestnet: { chainId: 280, ...zkSyncIcon },
zora: { chainId: 7777777, name: 'Zora', ...zoraIcon },
Expand Down

0 comments on commit 81ba812

Please sign in to comment.