Skip to content

Commit

Permalink
fix(contracts): set wrappedContract undefined if not found
Browse files Browse the repository at this point in the history
  • Loading branch information
abstract829 committed Jul 30, 2024
1 parent b62fdd1 commit 4b6cdaf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/contracts/src/useRegisteredContract.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ export const useWrappedContract = (
)

useEffect(() => {
if (!deploymentInfo) return
if (!deploymentInfo) {
setwWrappedContract(undefined)
return
}

const newWrappedContract: WrappedContract = {
deploymentInfo,
Expand Down

0 comments on commit 4b6cdaf

Please sign in to comment.