Skip to content

Commit 4f00bea

Browse files
author
dschlabach
committed
build preview
1 parent 366d91f commit 4f00bea

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

playground/nextjs-app-router/components/AppProvider.tsx

+2-7
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from '@/types/onchainkit';
1313
import { OnchainKitProvider } from '@coinbase/onchainkit';
1414
import type React from 'react';
15-
import { createContext, useEffect, useRef, useState } from 'react';
15+
import { createContext, useEffect, useState } from 'react';
1616
import { useConnect, useConnectors } from 'wagmi';
1717
import { base } from 'wagmi/chains';
1818
import { WalletPreference } from './form/wallet-type';
@@ -83,7 +83,7 @@ export const AppProvider = ({ children }: { children: React.ReactNode }) => {
8383
WalletPreference | undefined
8484
>({
8585
key: 'walletType',
86-
defaultValue: WalletPreference.SMART_WALLET,
86+
defaultValue: undefined,
8787
});
8888

8989
const [chainId, setChainId] = useStateWithStorage<number>({
@@ -140,13 +140,8 @@ export const AppProvider = ({ children }: { children: React.ReactNode }) => {
140140
}
141141
}, []);
142142

143-
const runningRef = useRef<number>(0);
144-
145143
// Connect to wallet if walletType changes
146144
useEffect(() => {
147-
runningRef.current += 1;
148-
console.log('RUNNING!', runningRef.current);
149-
150145
if (walletType === WalletPreference.SMART_WALLET) {
151146
connect({ connector: connectors[0] });
152147
} else if (walletType === WalletPreference.EOA) {

0 commit comments

Comments
 (0)