(Fix) change error message Contract address input (#2060)

* change error message Contract address input
This commit is contained in:
Agustín Longoni 2021-03-23 05:48:49 -03:00 committed by GitHub
parent da9031568f
commit 4297671869
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -80,9 +80,7 @@ export const mustBeEthereumContractAddress = memoize(
async (address: string): Promise<ValidatorReturnType> => {
const contractCode = await getWeb3().eth.getCode(address)
const errorMessage = `Input must be a valid Ethereum contract address${
isFeatureEnabled(FEATURES.DOMAIN_LOOKUP) ? ', ENS or Unstoppable domain' : ''
}`
const errorMessage = `Must resolve to a valid smart contract address.`
return !contractCode || contractCode.replace('0x', '').replace(/0/g, '') === '' ? errorMessage : undefined
},