From b7a65a987c88f0ec0a3c89f74ce4f318a36e24d5 Mon Sep 17 00:00:00 2001 From: yoginawaka Date: Mon, 17 Mar 2025 16:15:53 +0000 Subject: [PATCH] Updated Privy provider for bnb --- providers/privy-provider.tsx | 64 +++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/providers/privy-provider.tsx b/providers/privy-provider.tsx index 226eb07..1d1f1d9 100644 --- a/providers/privy-provider.tsx +++ b/providers/privy-provider.tsx @@ -1,43 +1,45 @@ -'use client'; // Add this at the top to mark as Client Component +'use client'; import { PrivyProvider } from '@privy-io/react-auth'; -import { ReactNode } from 'react'; -import { toSolanaWalletConnectors } from '@privy-io/react-auth/solana'; +import { ReactNode , useEffect } from 'react'; +// Replace this with any of the networks listed at https://github.com/wevm/viem/blob/main/src/chains/index.ts +import {bsc} from 'viem/chains'; export function Providers({ children }: { children: ReactNode }) { - const solanaConnectors = toSolanaWalletConnectors({ - shouldAutoConnect: false, - }); + useEffect(() => { + localStorage.removeItem('privy:embedded-wallet:iframe-ready'); + localStorage.removeItem('privy:embedded-wallet:ready'); + }, []); return ( - - {children} - + > + {children} + ); } \ No newline at end of file