1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-15 21:08:57 +00:00

Added address validation

This commit is contained in:
Vladimir Volek 2018-10-20 02:01:24 +02:00
parent 739339b53e
commit 6a40191e61

View File

@ -3,6 +3,7 @@ import styled from 'styled-components';
import Input from 'components/inputs/Input';
import Textarea from 'components/Textarea';
import ICONS from 'config/icons';
import { validateAddress } from 'utils/ethUtils';
import Icon from 'components/Icon';
import Title from 'views/Wallet/components/Title';
import Button from 'components/Button';
@ -202,6 +203,8 @@ class SignVerify extends Component {
value={this.state.verifyAddress}
onChange={this.handleInputChange}
type="text"
state={(this.state.verifyAddress && validateAddress(this.state.verifyAddress)) ? 'error' : null}
bottomText={this.state.verifyAddress !== '' ? validateAddress(this.state.verifyAddress) : null}
isSmallText
/>
</Row>