diff --git a/src/wallet/components/Wallet.tsx b/src/wallet/components/Wallet.tsx index c58f28968c..a70a03ab7f 100644 --- a/src/wallet/components/Wallet.tsx +++ b/src/wallet/components/Wallet.tsx @@ -16,6 +16,8 @@ function WalletContent({ children, className }: WalletReact) { containerRef: walletContainerRef, } = useWalletContext(); + useOutsideClick(walletContainerRef, handleClose); + const { connect, dropdown } = useMemo(() => { const childrenArray = Children.toArray(children); return { @@ -24,8 +26,6 @@ function WalletContent({ children, className }: WalletReact) { }; }, [children]); - useOutsideClick(walletContainerRef, handleClose); - return (