fix warning

This commit is contained in:
Hristo Nedelkov 2023-10-11 10:14:22 +03:00
parent c14a5bb1e9
commit f74fc9d7e0

View File

@ -1,8 +1,8 @@
import { Stack, YStack, validPseudoKeys } from 'tamagui'
import { Stack, YStack } from 'tamagui'
import { InformationBox, Input as StatusInput, Text } from '@status-im/components'
import { ClearIcon, CloseCircleIcon } from '@status-im/icons'
import { useState } from 'react'
import { isAddress } from 'web3-validator';
import { isAddress } from 'web3-validator'
type WithdrawalAddressProps = {
title: string
@ -10,7 +10,7 @@ type WithdrawalAddressProps = {
const WithdrawalAddress = ({ title }: WithdrawalAddressProps) => {
const [withdrawalAddress, setWithdrawalAddress] = useState('')
const [isValidAddress, setIsValidAddress] = useState(true);
const [isValidAddress, setIsValidAddress] = useState(true)
const changeWithdrawalAddressHandler = (value: string) => {
setWithdrawalAddress(value)
}
@ -19,9 +19,8 @@ const WithdrawalAddress = ({ title }: WithdrawalAddressProps) => {
setWithdrawalAddress('')
}
const checkAddress = (e: any) => {
if (e.nativeEvent.text.length !== 0) {
setIsValidAddress(isAddress(e.nativeEvent.text));
setIsValidAddress(isAddress(e.nativeEvent.text))
}
}
return (
@ -46,7 +45,7 @@ const WithdrawalAddress = ({ title }: WithdrawalAddressProps) => {
}
value={withdrawalAddress}
onChangeText={changeWithdrawalAddressHandler}
onBlur={(e) => checkAddress(e)}
onBlur={e => checkAddress(e)}
/>
</Stack>
<InformationBox