Fix: remove auto checksum address from InputAddress (#2242)

* Fix: remove auto chacksum address from InputAddress

* Mikhail feedback

Co-authored-by: katspaugh <katspaugh@users.noreply.github.com>
This commit is contained in:
nicolas 2021-05-12 07:00:44 -03:00 committed by GitHub
parent ad109668fb
commit 961f274c6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 5 deletions

View File

@ -62,9 +62,6 @@ const AddressInput = ({
} catch (err) {
console.error('Failed to resolve address for ENS name: ', err)
}
} else {
const formattedAddress = checksumAddress(address)
fieldMutator(formattedAddress)
}
}}
</OnChange>

View File

@ -130,7 +130,7 @@ describe('Forms > Validators', () => {
})
describe('mustBeEthereumAddress validator', () => {
const MUST_BE_ETH_ADDRESS_ERR_MSG = 'Input must be a valid Ethereum address, ENS or Unstoppable domain'
const MUST_BE_ETH_ADDRESS_ERR_MSG = 'Must be a valid address, ENS or Unstoppable domain'
it('Returns undefined for a valid ethereum address', async () => {
expect(await mustBeEthereumAddress('0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe')).toBeUndefined()

View File

@ -68,7 +68,7 @@ export const mustBeEthereumAddress = memoize(
const startsWith0x = address?.startsWith('0x')
const isAddress = getWeb3().utils.isAddress(address)
const errorMessage = `Input must be a valid Ethereum address${
const errorMessage = `Must be a valid address${
isFeatureEnabled(FEATURES.DOMAIN_LOOKUP) ? ', ENS or Unstoppable domain' : ''
}`