fix: remove any and add types
This commit is contained in:
parent
90d95a245b
commit
1f719efb10
|
@ -14,9 +14,10 @@ const SetupRow = ({ title }: SetupRowProps) => {
|
|||
setValidatorCount((state: number) => state + 1)
|
||||
}
|
||||
|
||||
const changeValidatorCountHandler = (e: any) => {
|
||||
if (!isNaN(e.target.value)) {
|
||||
setValidatorCount(Number(e.target.value))
|
||||
const changeValidatorCountHandler = (value: string) => {
|
||||
const numberValue = Number(value)
|
||||
if (!isNaN(numberValue)) {
|
||||
setValidatorCount(numberValue)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +34,7 @@ const SetupRow = ({ title }: SetupRowProps) => {
|
|||
<StatusInput
|
||||
icon={<AddIcon size={16} style={{ cursor: 'pointer' }} onClick={addValidatorHandler} />}
|
||||
value={validatorCount.toString()}
|
||||
onChange={changeValidatorCountHandler}
|
||||
onChangeText={changeValidatorCountHandler}
|
||||
style={{ fontWeight: 'bold' }}
|
||||
/>
|
||||
</Stack>
|
||||
|
|
|
@ -10,8 +10,8 @@ type WithdrawalAddressProps = {
|
|||
const WithdrawalAddress = ({ title }: WithdrawalAddressProps) => {
|
||||
const [withdrawalAddress, setWithdrawalAddress] = useState('')
|
||||
|
||||
const changeWithdrawalAddressHandler = (e: any) => {
|
||||
setWithdrawalAddress(e.target.value)
|
||||
const changeWithdrawalAddressHandler = (value: string) => {
|
||||
setWithdrawalAddress(value)
|
||||
}
|
||||
|
||||
const removeWithdrawalAddressHandler = () => {
|
||||
|
@ -39,7 +39,7 @@ const WithdrawalAddress = ({ title }: WithdrawalAddressProps) => {
|
|||
/>
|
||||
}
|
||||
value={withdrawalAddress}
|
||||
onChange={changeWithdrawalAddressHandler}
|
||||
onChangeText={changeWithdrawalAddressHandler}
|
||||
/>
|
||||
</Stack>
|
||||
<InformationBox
|
||||
|
|
|
@ -9,12 +9,12 @@ const KeystoreFiles = () => {
|
|||
|
||||
const generateKeystoreFilesHandler = () => {}
|
||||
|
||||
const changeEncryptedPasswordHandler = (e: any) => {
|
||||
setEncryptedPassword(e.target.value)
|
||||
const changeEncryptedPasswordHandler = (value: string) => {
|
||||
setEncryptedPassword(value)
|
||||
}
|
||||
|
||||
const changeConfirmEncryptedPasswordHandler = (e: any) => {
|
||||
setConfirmEncryptedPassword(e.target.value)
|
||||
const changeConfirmEncryptedPasswordHandler = (value: string) => {
|
||||
setConfirmEncryptedPassword(value)
|
||||
}
|
||||
|
||||
const clearEncryptedPasswordHandler = () => {
|
||||
|
@ -46,7 +46,7 @@ const KeystoreFiles = () => {
|
|||
/>
|
||||
}
|
||||
value={encryptedPassword}
|
||||
onChange={changeEncryptedPasswordHandler}
|
||||
onChangeText={changeEncryptedPasswordHandler}
|
||||
/>
|
||||
</YStack>
|
||||
<YStack space={'$2'}>
|
||||
|
@ -64,7 +64,7 @@ const KeystoreFiles = () => {
|
|||
/>
|
||||
}
|
||||
value={confirmEncryptedPassword}
|
||||
onChange={changeConfirmEncryptedPasswordHandler}
|
||||
onChangeText={changeConfirmEncryptedPasswordHandler}
|
||||
/>
|
||||
</YStack>
|
||||
</YStack>
|
||||
|
|
Loading…
Reference in New Issue