mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fixing ENS input entry in send flow (#10923)
* Fixing ENS input entry in send flow Fixes MetaMask/metamask-extension#10691 * removed unnecessary apostrophe
This commit is contained in:
parent
9fa6fc9d05
commit
f080c10cbc
@ -83,6 +83,9 @@ export function isValidAddress(address) {
|
||||
return false;
|
||||
}
|
||||
const prefixed = addHexPrefix(address);
|
||||
if (!isHex(prefixed)) {
|
||||
return false;
|
||||
}
|
||||
return (
|
||||
(isAllOneCase(prefixed.slice(2)) && ethUtil.isValidAddress(prefixed)) ||
|
||||
ethUtil.isValidChecksumAddress(prefixed)
|
||||
|
@ -22,7 +22,7 @@ export function getToErrorObject(to, sendTokenAddress, chainId) {
|
||||
let toError = null;
|
||||
if (!to) {
|
||||
toError = REQUIRED_ERROR;
|
||||
} else if (!isValidAddress(to)) {
|
||||
} else if (!isValidAddress(to) && !isValidDomainName(to)) {
|
||||
toError = isDefaultMetaMaskChain(chainId)
|
||||
? INVALID_RECIPIENT_ADDRESS_ERROR
|
||||
: INVALID_RECIPIENT_ADDRESS_NOT_ETH_NETWORK_ERROR;
|
||||
|
@ -314,7 +314,7 @@ export default class EnsInput extends Component {
|
||||
}
|
||||
|
||||
if (ensFailure) {
|
||||
return <i className="fa fa-warning fa-lg warning'" />;
|
||||
return <i className="fa fa-warning fa-lg warning" />;
|
||||
}
|
||||
|
||||
if (ensResolution && ensResolution !== ZERO_ADDRESS) {
|
||||
|
Loading…
Reference in New Issue
Block a user