Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

use-ens

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-ens - npm Package Compare versions

Comparing version 0.0.7 to 0.0.9

5

dist/index.d.ts
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;

4

dist/index.js

@@ -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": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc