Skip to content

Commit

Permalink
Fix: pass config parameter to useConnectorClient in useSimulateContra…
Browse files Browse the repository at this point in the history
…ct and useEstimateGas (#4447)

fix: pass down config from useSimulate and useEstimateGas to internal useConnectorClient calls
  • Loading branch information
Aerilym authored Dec 9, 2024
1 parent 1e0dd8f commit 244f777
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/proud-knives-behave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wagmi": patch
---

Fixed config parameter passing in useSimulateContract and useEstimateGas
1 change: 1 addition & 0 deletions packages/react/src/hooks/useEstimateGas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export function useEstimateGas(

const config = useConfig(parameters)
const { data: connectorClient } = useConnectorClient({
config,
connector,
query: { enabled: parameters.account === undefined },
})
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/hooks/useSimulateContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export function useSimulateContract<

const config = useConfig(parameters)
const { data: connectorClient } = useConnectorClient({
config,
connector,
query: { enabled: parameters.account === undefined },
})
Expand Down

0 comments on commit 244f777

Please sign in to comment.