@@ -12,6 +12,7 @@ import {
1212 useState ,
1313 useEffect ,
1414 FocusEvent ,
15+ ChangeEvent ,
1516} from "react"
1617import { Form , FormikInput } from "../../../../components/Forms"
1718import withOnlyConnectedWallet from "../../../../components/withOnlyConnectedWallet"
@@ -68,7 +69,6 @@ type ComponentProps = {
6869const MintingProcessFormBase : FC < ComponentProps & FormikProps < FormValues > > = ( {
6970 formId,
7071 values,
71- setFieldTouched,
7272} ) => {
7373 const dispatch = useAppDispatch ( )
7474 const threshold = useThreshold ( )
@@ -80,9 +80,8 @@ const MintingProcessFormBase: FC<ComponentProps & FormikProps<FormValues>> = ({
8080 : BitcoinNetwork . Mainnet
8181 )
8282
83- const handleBtcAddressChange = ( event : FocusEvent < HTMLInputElement > ) => {
83+ const handleBtcAddressChange = ( event : ChangeEvent < HTMLInputElement > ) => {
8484 const btcAddress = event . target . value
85- setFieldTouched ( "btcRecoveryAddress" , true )
8685
8786 const isValidFormat =
8887 validateBTCAddress ( btcAddress , threshold . tbtc . bitcoinNetwork ) ===
@@ -95,10 +94,6 @@ const MintingProcessFormBase: FC<ComponentProps & FormikProps<FormValues>> = ({
9594 ethChainId : SupportedChainIds . Ethereum ,
9695 } )
9796 )
98- } else if ( btcAddress ) {
99- console . log (
100- "BTC Address format validation failed (onBlur) or address is empty."
101- )
10297 }
10398 }
10499
@@ -156,6 +151,7 @@ const MintingProcessForm = withFormik<MintingProcessFormProps, FormValues>({
156151 } ,
157152 displayName : "MintingProcessForm" ,
158153 enableReinitialize : true ,
154+ validateOnChange : false ,
159155} ) ( MintingProcessFormBase )
160156
161157export const ProvideDataComponent : FC < {
0 commit comments