diff --git a/packages/bridge-ui-v2/src/components/Bridge/AddressInput.svelte b/packages/bridge-ui-v2/src/components/Bridge/AddressInput.svelte index 2212f985edb..6d275a2daf0 100644 --- a/packages/bridge-ui-v2/src/components/Bridge/AddressInput.svelte +++ b/packages/bridge-ui-v2/src/components/Bridge/AddressInput.svelte @@ -2,7 +2,7 @@ import { isAddress } from 'ethereum-address'; import { createEventDispatcher } from 'svelte'; import { t } from 'svelte-i18n'; - + import type { Address } from 'viem'; import { Alert } from '$components/Alert'; import { uid } from '$libs/util/uid'; @@ -10,7 +10,7 @@ let inputId = `input-${uid()}`; let showAlert = true; - let ethereumAddress = ''; + export let ethereumAddress: Address | string = ''; let isValidEthereumAddress = false; let tooShort = true; @@ -23,6 +23,7 @@ if (ethereumAddress.length > 41) { tooShort = false; validateEthereumAddress(); + dispatch('input', ethereumAddress); } else { tooShort = true; } @@ -39,9 +40,6 @@ }; export const focus = () => input.focus(); - export const value = () => { - return input.value; - };