Update components/providers/privy-provider.tsx

This commit is contained in:
yoginawaka 2025-02-13 15:57:01 +00:00
parent 6d0733fc67
commit e1f0c44569

View File

@ -2,7 +2,6 @@
import { PrivyProvider } from '@privy-io/react-auth';
import { ReactNode , useEffect } from 'react';
// import {toSolanaWalletConnectors} from '@privy-io/react-auth/solana';
export function Providers({ children }: { children: ReactNode }) {
useEffect(() => {
@ -10,12 +9,6 @@ export function Providers({ children }: { children: ReactNode }) {
localStorage.removeItem('privy:embedded-wallet:ready');
}, []);
// const solanaConnectors = toSolanaWalletConnectors({
// // By default, shouldAutoConnect is enabled
// shouldAutoConnect: true,
// });
return (
<PrivyProvider
appId={process.env.NEXT_PUBLIC_PRIVY_APP_ID || ''}
@ -28,11 +21,6 @@ export function Providers({ children }: { children: ReactNode }) {
"walletChainType": 'ethereum-only',
"walletList": ['metamask', 'wallet_connect', 'coinbase_wallet', 'rabby_wallet', 'cryptocom','safe']
},
// "externalWallets": {
// "solana": {
// "connectors": solanaConnectors,
// },
// },
"loginMethods": [
"email",
"wallet"
@ -44,7 +32,14 @@ export function Providers({ children }: { children: ReactNode }) {
},
"mfa": {
"noPromptOnMfaRequired": false
}
},
"defaultChain": 56, // BSC mainnet
"supportedChains": [{
id: 56,
name: 'BNB Smart Chain',
rpcUrl: 'https://bsc-dataseed.binance.org/',
blockExplorer: 'https://bscscan.com'
}]
}}
>
{children}