Skip to content

Commit

Permalink
fix: remove disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
jstinhw committed May 7, 2024
1 parent 89bf184 commit 7371483
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/providers/ZeroDevValidatorContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
useState
} from "react"
import type { Chain, Transport } from "viem"
import { useDisconnect } from "wagmi"

interface ZeroDevValidatorValue {
validator: KernelValidator<EntryPoint> | null
Expand Down Expand Up @@ -48,7 +47,6 @@ interface ZeroDevValidatorProviderProps {
export function ZeroDevValidatorProvider({
children
}: ZeroDevValidatorProviderProps) {
const { disconnect } = useDisconnect()
const [validator, setValidator] =
useState<KernelValidator<EntryPoint> | null>(null)
const [kernelAccount, setKernelAccount] =
Expand Down Expand Up @@ -98,10 +96,6 @@ export function ZeroDevValidatorProvider({
if (storedAccount) setKernelAccount(JSON.parse(storedAccount))
}, [])

useEffect(() => {
if (!validator && disconnect) disconnect()
}, [validator, disconnect])

return (
<ZeroDevValidatorContext.Provider
value={useMemo(
Expand Down

0 comments on commit 7371483

Please sign in to comment.