Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove explicit wallet adapter configuration #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"@solana/spl-token": "^0.3.9",
"@solana/wallet-adapter-react": "^0.15.35",
"@solana/wallet-adapter-react-ui": "^0.9.34",
"@solana/wallet-adapter-wallets": "^0.19.25",
"@solana/web3.js": "^1.87.6",
"@tabler/icons-react": "^2.45.0",
"@tanstack/react-query": "^5.17.0",
Expand Down
10 changes: 1 addition & 9 deletions providers/Providers.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use client';

import { ConnectionProvider, WalletProvider } from '@solana/wallet-adapter-react';
import { PhantomWalletAdapter, SolflareWalletAdapter } from '@solana/wallet-adapter-wallets';
import { WalletModalProvider } from '@solana/wallet-adapter-react-ui';
import { ReactNode, useMemo, useState } from 'react';
import { Notifications } from '@mantine/notifications';
Expand All @@ -21,13 +20,6 @@ export function Providers({ children }: { children: ReactNode }) {
const queryEnv = searchParams.get('env');
const [client] = useState(new QueryClient());
const [env, setEnv] = useState<Env>((queryEnv === 'mainnet' || queryEnv === 'devnet') ? queryEnv : 'mainnet');
const wallets = useMemo(
() => [
new PhantomWalletAdapter(),
new SolflareWalletAdapter(),
],
[]
);

const doSetEnv = (e: Env) => {
const params = new URLSearchParams(window.location.search);
Expand Down Expand Up @@ -64,7 +56,7 @@ export function Providers({ children }: { children: ReactNode }) {
return (
<EnvProvider env={env!}>
<ConnectionProvider endpoint={endpoint!}>
<WalletProvider wallets={wallets} autoConnect>
<WalletProvider wallets={[]} autoConnect>
<WalletModalProvider>
<UmiProvider>
<QueryClientProvider client={client}>
Expand Down
Loading