From cc578ef5421890f4d89a3f31aea3bc98b9038ec5 Mon Sep 17 00:00:00 2001 From: Gabito Esmiapodo <4015436+gabitoesmiapodo@users.noreply.github.com> Date: Fri, 10 Apr 2026 11:43:37 -0300 Subject: [PATCH] fix: type WalletStatusVerifier children as ReactNode instead of ReactElement Closes #454 --- .../demos/TransactionButton/index.tsx | 27 +++++++++---------- .../sharedComponents/WalletStatusVerifier.tsx | 4 +-- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/components/pageComponents/home/Examples/demos/TransactionButton/index.tsx b/src/components/pageComponents/home/Examples/demos/TransactionButton/index.tsx index c8233417..a8733bb2 100644 --- a/src/components/pageComponents/home/Examples/demos/TransactionButton/index.tsx +++ b/src/components/pageComponents/home/Examples/demos/TransactionButton/index.tsx @@ -18,21 +18,18 @@ const TransactionButton = () => { return ( - {/* biome-ignore lint/complexity/noUselessFragments: WalletStatusVerifier expects a single ReactElement child */} - <> - - - {currentTokenInput === 'erc20' && } - {currentTokenInput === 'native' && } - - + + + {currentTokenInput === 'erc20' && } + {currentTokenInput === 'native' && } + ) } diff --git a/src/components/sharedComponents/WalletStatusVerifier.tsx b/src/components/sharedComponents/WalletStatusVerifier.tsx index 9d39d13b..4c883563 100644 --- a/src/components/sharedComponents/WalletStatusVerifier.tsx +++ b/src/components/sharedComponents/WalletStatusVerifier.tsx @@ -1,4 +1,4 @@ -import { createContext, type FC, type ReactElement, useContext } from 'react' +import { createContext, type FC, type ReactElement, type ReactNode, useContext } from 'react' import SwitchChainButton from '@/src/components/sharedComponents/ui/SwitchChainButton' import { useWalletStatus } from '@/src/hooks/useWalletStatus' import { useWeb3Status, type Web3Status } from '@/src/hooks/useWeb3Status' @@ -27,7 +27,7 @@ export const useWeb3StatusConnected = () => { interface WalletStatusVerifierProps { chainId?: ChainsIds - children?: ReactElement + children?: ReactNode fallback?: ReactElement switchChainLabel?: string }