From eb9ff28becebcd74f873099f87f245ecaf9f507c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20S=C3=A1nchez?= Date: Thu, 5 Sep 2024 12:14:29 +0200 Subject: [PATCH] Fix bug on AddressInput (#33) --- .../nextjs/components/scaffold-eth/Input/AddressInput.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/nextjs/components/scaffold-eth/Input/AddressInput.tsx b/packages/nextjs/components/scaffold-eth/Input/AddressInput.tsx index 4058611..a3cfde5 100644 --- a/packages/nextjs/components/scaffold-eth/Input/AddressInput.tsx +++ b/packages/nextjs/components/scaffold-eth/Input/AddressInput.tsx @@ -50,6 +50,10 @@ export const AddressInput = ({ value, name, placeholder, disabled, onChange }: A onChange(ensAddress); }, [ensAddress, onChange, value]); + useEffect(() => { + setEnteredEnsName(undefined); + }, [value]); + const handleChange = useCallback( (newValue: Address) => { setEnteredEnsName(undefined);