mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-03 07:03:30 +00:00
fix warning
This commit is contained in:
parent
c14a5bb1e9
commit
f74fc9d7e0
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user