Skip to content

Commit 2d98279

Browse files
committed
refactor: simplify search handling by removing ENS resolution logic
1 parent b8934bd commit 2d98279

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

src/modules/search/SearcherBar.tsx

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -68,30 +68,7 @@ export function SearcherBar({ className }: { className?: string }) {
6868
const rawValue = inputValue.trim().toLowerCase();
6969
if (!rawValue) return;
7070

71-
const isEnsName = rawValue.endsWith('.eth');
72-
73-
if (isEnsName) {
74-
try {
75-
const { data: address } = await fetchEnsAddress({
76-
name: rawValue,
77-
chainId,
78-
});
79-
if (address) {
80-
setEnsResolvedAddress(address);
81-
navigate({
82-
to: `/${getChainFromId(chainId)?.slug}/address/${address}`,
83-
});
84-
} else {
85-
// ENS non résolu : fallback vers page de recherche
86-
navigate({ to: `/search`, search: { q: rawValue } });
87-
}
88-
} catch (err) {
89-
console.error('ENS resolution failed:', err);
90-
navigate({ to: `/search`, search: { q: rawValue } });
91-
}
92-
} else {
93-
mutate();
94-
}
71+
mutate();
9572
};
9673

9774
const handleKeyDown = (e: React.KeyboardEvent) => {

0 commit comments

Comments
 (0)