Update components/providers/privy-provider.tsx
This commit is contained in:
parent
e10fe50830
commit
b0df6a8ad1
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { PrivyProvider } from '@privy-io/react-auth';
|
import { PrivyProvider } from '@privy-io/react-auth';
|
||||||
import { ReactNode , useEffect } from 'react';
|
import { ReactNode , useEffect } from 'react';
|
||||||
import {toSolanaWalletConnectors} from '@privy-io/react-auth/solana';
|
// import {toSolanaWalletConnectors} from '@privy-io/react-auth/solana';
|
||||||
|
|
||||||
export function Providers({ children }: { children: ReactNode }) {
|
export function Providers({ children }: { children: ReactNode }) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -10,10 +10,10 @@ export function Providers({ children }: { children: ReactNode }) {
|
|||||||
localStorage.removeItem('privy:embedded-wallet:ready');
|
localStorage.removeItem('privy:embedded-wallet:ready');
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const solanaConnectors = toSolanaWalletConnectors({
|
// const solanaConnectors = toSolanaWalletConnectors({
|
||||||
// By default, shouldAutoConnect is enabled
|
// // By default, shouldAutoConnect is enabled
|
||||||
shouldAutoConnect: true,
|
// shouldAutoConnect: true,
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -25,16 +25,16 @@ export function Providers({ children }: { children: ReactNode }) {
|
|||||||
"theme":"#FFFFFF",
|
"theme":"#FFFFFF",
|
||||||
"showWalletLoginFirst": false,
|
"showWalletLoginFirst": false,
|
||||||
"logo": "https://auth.privy.io/logos/privy-logo.png",
|
"logo": "https://auth.privy.io/logos/privy-logo.png",
|
||||||
"walletChainType": 'solana-only',
|
"walletChainType": 'ethereum-only',
|
||||||
"walletList": [
|
"walletList": [
|
||||||
"phantom"
|
"metamask"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"externalWallets": {
|
// "externalWallets": {
|
||||||
"solana": {
|
// "solana": {
|
||||||
"connectors": solanaConnectors,
|
// "connectors": solanaConnectors,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
"loginMethods": [
|
"loginMethods": [
|
||||||
"email",
|
"email",
|
||||||
"wallet"
|
"wallet"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user