Skip to content

Commit

Permalink
chore: remove reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
slavastartsev committed Dec 2, 2024
1 parent 608c4c3 commit 9b346d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
8 changes: 1 addition & 7 deletions apps/bob-pay/src/app/[lang]/nested-providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { usePrices } from '@gobob/hooks';
import { BOBUIProvider, CSSReset } from '@gobob/ui';
import { usePathname, useRouter } from 'next/navigation';
import { PropsWithChildren, useEffect } from 'react';
import { useChainId, useReconnect } from 'wagmi';
import { useChainId } from 'wagmi';

import { Header, Layout } from '@/components';
import { useBalances, useTokens } from '@/hooks';
Expand All @@ -31,12 +31,6 @@ export function NestedProviders({ children }: PropsWithChildren) {
useBalances(chainId);
useTokens(chainId);

const { reconnect } = useReconnect();

useEffect(() => {
reconnect();
}, [reconnect]);

return (
<StyledComponentsRegistry>
<BOBUIProvider navigate={router.push}>
Expand Down
8 changes: 1 addition & 7 deletions apps/evm/src/app/[lang]/nested-providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { usePathname, useRouter } from 'next/navigation';
import { PropsWithChildren, Suspense, useEffect, useRef, useState } from 'react';
import { useLocalStorage } from 'usehooks-ts';
import { isAddressEqual } from 'viem';
import { useAccount, useAccountEffect, useChainId, useConfig, useReconnect, useSwitchChain } from 'wagmi';
import { useAccount, useAccountEffect, useChainId, useConfig, useSwitchChain } from 'wagmi';

import { Header, Layout, Sidebar } from '@/components';
import { ConnectProvider } from '@/connect-ui';
Expand Down Expand Up @@ -133,12 +133,6 @@ export function NestedProviders({ children }: PropsWithChildren) {

usePromptSwitchChain();

const { reconnect } = useReconnect();

useEffect(() => {
reconnect();
}, [reconnect]);

return (
<StyledComponentsRegistry>
<BOBUIProvider navigate={router.push}>
Expand Down

0 comments on commit 9b346d7

Please sign in to comment.