repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
when blackout ?
stars
latest
clone command
git clone gitlawb://did:key:z6MkjiiY...3Cmt/when-blackoutgit clone gitlawb://did:key:z6MkjiiY.../when-blackout3914b18async from playground4h ago| #2 | import { ConnectionProvider, WalletProvider } from "@solana/wallet-adapter-react"; |
| #3 | import { WalletModalProvider } from "@solana/wallet-adapter-react-ui"; |
| #4 | import { PhantomWalletAdapter, SolflareWalletAdapter } from "@solana/wallet-adapter-wallets"; |
| #5 | import { clusterApiUrl } from "@solana/web3.js"; |
| #6 |
| #7 | import "@solana/wallet-adapter-react-ui/styles.css"; |
| #8 |
| #9 | const NETWORK = "devnet"; |
| #10 |
| #11 | export function SolanaWalletProvider({ children }: { children: ReactNode }) { |
| #12 | const endpoint = useMemo(() => clusterApiUrl(NETWORK), []); |
| #13 | const wallets = useMemo(() => [new PhantomWalletAdapter(), new SolflareWalletAdapter()], []); |
| #14 |
| #15 | return ( |
| #16 | <ConnectionProvider endpoint={endpoint}> |
| #17 | <WalletProvider wallets={wallets} autoConnect> |
| #18 | <WalletModalProvider> |
| #19 | {children} |
| #20 | </WalletModalProvider> |
| #21 | </WalletProvider> |
| #22 | </ConnectionProvider> |
| #23 | ); |
| #24 | } |
| #25 |