From 0c6af550d5f54ef36dadbed8b37a9e81c3a7cb8c Mon Sep 17 00:00:00 2001 From: Alex <12097569+nialexsan@users.noreply.github.com> Date: Thu, 28 Nov 2024 03:08:27 -0500 Subject: [PATCH] feat: Flow chain support (#2251) * flow wallet * flow provider * format * Revert "flow wallet" This reverts commit 405f81161dd6aa3496138ae1cd1b12b71ebaa0f5. * fix icon * chore: changeset --------- Co-authored-by: Daniel Sinclair --- .changeset/poor-wasps-joke.md | 5 +++++ .../components/RainbowKitProvider/chainIcons/flow.svg | 1 + .../RainbowKitProvider/provideRainbowKitChains.ts | 9 +++++++++ 3 files changed, 15 insertions(+) create mode 100644 .changeset/poor-wasps-joke.md create mode 100644 packages/rainbowkit/src/components/RainbowKitProvider/chainIcons/flow.svg diff --git a/.changeset/poor-wasps-joke.md b/.changeset/poor-wasps-joke.md new file mode 100644 index 0000000000..b71ba56034 --- /dev/null +++ b/.changeset/poor-wasps-joke.md @@ -0,0 +1,5 @@ +--- +"@rainbow-me/rainbowkit": patch +--- + +Added icon for Flow chain diff --git a/packages/rainbowkit/src/components/RainbowKitProvider/chainIcons/flow.svg b/packages/rainbowkit/src/components/RainbowKitProvider/chainIcons/flow.svg new file mode 100644 index 0000000000..dba3e6ef30 --- /dev/null +++ b/packages/rainbowkit/src/components/RainbowKitProvider/chainIcons/flow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/rainbowkit/src/components/RainbowKitProvider/provideRainbowKitChains.ts b/packages/rainbowkit/src/components/RainbowKitProvider/provideRainbowKitChains.ts index 506eab687a..b0fcd1fcca 100644 --- a/packages/rainbowkit/src/components/RainbowKitProvider/provideRainbowKitChains.ts +++ b/packages/rainbowkit/src/components/RainbowKitProvider/provideRainbowKitChains.ts @@ -20,6 +20,8 @@ type ChainName = | 'blastSepolia' | 'bsc' | 'bscTestnet' + | 'flow' + | 'flowTestnet' | 'goerli' | 'gnosis' | 'hardhat' @@ -106,6 +108,11 @@ const ethereumIcon: IconMetadata = { iconUrl: async () => (await import('./chainIcons/ethereum.svg')).default, }; +const flowIcon: IconMetadata = { + iconBackground: 'transparent', + iconUrl: async () => (await import('./chainIcons/flow.svg')).default, +}; + const gnosisIcon: IconMetadata = { iconBackground: '#04795c', iconUrl: async () => (await import('./chainIcons/gnosis.svg')).default, @@ -188,6 +195,8 @@ const chainMetadataByName: Record = { celoAlfajores: { chainId: 44787, name: 'Celo Alfajores', ...celoIcon }, cronos: { chainId: 25, ...cronosIcon }, cronosTestnet: { chainId: 338, ...cronosIcon }, + flow: { chainId: 747, ...flowIcon }, + flowTestnet: { chainId: 545, ...flowIcon }, goerli: { chainId: 5, ...ethereumIcon }, gnosis: { chainId: 100, name: 'Gnosis', ...gnosisIcon }, hardhat: { chainId: 31_337, ...hardhatIcon },