Skip to content

Commit

Permalink
fix: useAcceptAngleConditions
Browse files Browse the repository at this point in the history
  • Loading branch information
0xMasayoshi committed Jan 13, 2025
1 parent 9d53e71 commit ca058a1
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,11 @@ export const useAcceptAngleConditions = (
},
})

// biome-ignore lint/correctness/useExhaustiveDependencies: Typecheck speedup
const write = useMemo(
() => {
if (!simulation?.request) return
const write = useMemo(() => {
if (!simulation?.request) return

return () => execute.writeContract(simulation.request as any)
// eslint-disable-next-line react-hooks/exhaustive-deps
},
[execute.writeContract, simulation?.request] as const,
)
return () => execute.writeContract(simulation.request)
}, [execute.writeContract, simulation])

return useMemo<
[AngleConditionsState, { write: undefined | (() => void) }]
Expand Down

0 comments on commit ca058a1

Please sign in to comment.