Skip to content

Commit

Permalink
fix: checks violetid address for network and returns if none (#169)
Browse files Browse the repository at this point in the history
* fix: checks violetid address for network and returns if none

* chore: lint
  • Loading branch information
0xpApaSmURf committed Oct 17, 2023
1 parent 99fb1b6 commit 89f8f03
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/hooks/useVioletID.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export function useVioletID() {
return useMemo(() => {
if (!chainId) return

const contract = new Contract(VIOLET_ID_ADDRESSES[chainId], VioletIDABI, provider)
const violetIdAddress = VIOLET_ID_ADDRESSES[chainId]
if (!violetIdAddress) return

const contract = new Contract(violetIdAddress, VioletIDABI, provider)
return contract
}, [chainId, provider])
}
Expand Down

0 comments on commit 89f8f03

Please sign in to comment.