Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const changeToAddress = (e: React.ChangeEvent): void => {
e.preventDefault();
const value = e.target.value;
const key = 'toAddress';
const validationResult: any = getInputValidationState(key, value, isBech32(value));
setToAddress(value);
setToAddressValid(validationResult.toAddressValid);
setToAddressInvalid(validationResult.toAddressInvalid);
};
const changeToAddress = (e: React.ChangeEvent): void => {
e.preventDefault();
const value = e.target.value;
const key = 'toAddress';
const validationResult: any = getInputValidationState(key, value, isBech32(value));
setToAddress(value);
setToAddressValid(validationResult.toAddressValid);
setToAddressInvalid(validationResult.toAddressInvalid);
};