From 038d428832110016f98a1e93272e80e6ddc33fa4 Mon Sep 17 00:00:00 2001 From: "heronlancellot.eth" Date: Tue, 4 Jun 2024 15:18:41 -0300 Subject: [PATCH 1/2] refactor: getOwner to getAddress --- components/01-atoms/SearchBar.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/01-atoms/SearchBar.tsx b/components/01-atoms/SearchBar.tsx index aa5b2b6d..fa18d068 100644 --- a/components/01-atoms/SearchBar.tsx +++ b/components/01-atoms/SearchBar.tsx @@ -21,6 +21,7 @@ export const SearchBar = () => { process.env.NEXT_PUBLIC_ALCHEMY_ETHEREUM_HTTP, ); const ens = new ENS(undefined, provider); + console.log("SearchBar -> ens", ens); const { lastWalletConnected, @@ -75,7 +76,9 @@ export const SearchBar = () => { const formattedAddress = normalizeENSName(inputAddress); try { - const address: unknown = await ens.getOwner(formattedAddress); + console.log("getUserAddress -> formattedAddress", formattedAddress); + const address: unknown = await ens.getAddress(formattedAddress); + console.log("getUserAddress -> address", address); if (typeof address !== "string") { toast.error( "Wrong type of address returned by provider. Please contact the team", From 4866ec9cd5b7c6023025c1d87d2d8d439bce5e58 Mon Sep 17 00:00:00 2001 From: "heronlancellot.eth" Date: Wed, 5 Jun 2024 12:21:07 -0300 Subject: [PATCH 2/2] fix: remove console.log --- components/01-atoms/SearchBar.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/01-atoms/SearchBar.tsx b/components/01-atoms/SearchBar.tsx index fa18d068..6696ba47 100644 --- a/components/01-atoms/SearchBar.tsx +++ b/components/01-atoms/SearchBar.tsx @@ -21,7 +21,6 @@ export const SearchBar = () => { process.env.NEXT_PUBLIC_ALCHEMY_ETHEREUM_HTTP, ); const ens = new ENS(undefined, provider); - console.log("SearchBar -> ens", ens); const { lastWalletConnected, @@ -76,9 +75,7 @@ export const SearchBar = () => { const formattedAddress = normalizeENSName(inputAddress); try { - console.log("getUserAddress -> formattedAddress", formattedAddress); const address: unknown = await ens.getAddress(formattedAddress); - console.log("getUserAddress -> address", address); if (typeof address !== "string") { toast.error( "Wrong type of address returned by provider. Please contact the team",