diff --git a/src/components/forms/fields/address-field.tsx b/src/components/forms/fields/address-field.tsx index 8a1c4fb6..bec5ad1c 100644 --- a/src/components/forms/fields/address-field.tsx +++ b/src/components/forms/fields/address-field.tsx @@ -123,6 +123,22 @@ export function AddressField
>( } } + // ENS domain suggestions: show .sarafu.eth and .eth completions + const suggestions = useMemo(() => { + if ( + !inputValue || + isAddress(inputValue) || + isPhoneNumber(inputValue) || + inputValue.endsWith(".eth") + ) { + return []; + } + return [ + { suffix: ".sarafu.eth", full: `${inputValue}.sarafu.eth` }, + { suffix: ".eth", full: `${inputValue}.eth` }, + ]; + }, [inputValue]); + return ( >( /> + {suggestions.length > 0 && ( +
+ {suggestions.map((s) => ( + + ))} +
+ )} {props.description && ( {props.description} )}