Comparing version 0.0.7 to 0.0.9
import { ResolvedENS } from 'get-ens'; | ||
import type { BaseProvider as Provider } from '@ethersproject/providers'; | ||
export declare type UseENSOptions = { | ||
provider: Provider; | ||
provider: any; | ||
chainId: number; | ||
@@ -14,2 +13,2 @@ domain: string; | ||
*/ | ||
export declare const useENS: ({ provider, domain, fetchOptions, contractAddress, chainId }: UseENSOptions) => ResolvedENS; | ||
export declare const useENS: ({ provider, domain, fetchOptions, contractAddress, chainId }: UseENSOptions) => ResolvedENS | undefined; |
@@ -9,5 +9,5 @@ import { useState, useEffect } from 'react'; | ||
const useENS = ({ provider, domain, fetchOptions, contractAddress, chainId }) => { | ||
const [data, set] = useState({ address: null, owner: null, records: {}, domain: '' }); | ||
const [data, set] = useState(); | ||
useEffect(() => { | ||
if (provider && domain && data.owner == null) { | ||
if (provider && domain && !data) { | ||
if (chainId) { | ||
@@ -14,0 +14,0 @@ if (contractAddress || chainId === 1) { |
{ | ||
"name": "use-ens", | ||
"version": "0.0.7", | ||
"version": "0.0.9", | ||
"description": "A React hook to fetch ENS records from a domain.", | ||
@@ -5,0 +5,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3248
44